Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automation for moving ice box items to new issue approval column #4950

Conversation

JpadillaCoding
Copy link
Member

@JpadillaCoding JpadillaCoding commented Jul 15, 2023

Fixes #3732

What changes did you make?

Made a workflow to move Ice Box items to the New Issue Approval column under the following circumstances:

  • In the dependency section, all enumerated action items are checked off
  • Cannot contain action items that are comments

Why did you make the changes (we will use this info to test)?

  • To increase productivity, issues with completed dependencies from the Ice Box are automatically moved to the New Issue Approval column along with adding the "ready for dev lead" label
  • The script checks for the dependency section's action list. Since a Template is for the issue approval process, the script looks for "### Dependency".
  • A separate check is used to verify all action items are linked to an issue using regex since they're made using markdown.
  • If there are no action items in this section then the workflow is aborted since there is nothing to check for.
  • If all of the above pass the the issue is moved to the new issue approval column & the "ready for dev lead" label is added to streamline the issue approval process.
  • A local secret token had to be made for local testing. This has been changed to use the hack for la token as seen on other workflow files.

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Demo Of Workflow in local enviroment

issue_mover_demo

Three test were made to follow the testing guidelines.
"Pass Tester" contains only an enumerated action list and should pass to moving to the new issue approval column.
"Fail Tester" contains no list and only a comment. This test should fail.
"Fail Tester2" contains an action list with enumerated and comment action items. This test should fail.

Test Performed

I am including the process I used to test this github action so that it can be replicated on review.

  • Copy the project board into a test repo. It is important to do this step since Hack For La uses the classic project board. Making a classic project is no longer an option unless it is copied. This Link shows how to do that.
  • Check for a "ready for dev lead" label. If the copied project does not have one, then one should be made.
  • A personal access token has to be made for the project. Make sure to save the generated code for the next step. This Link shows how to do that. Make sure the following permissions are checked "Repo", "Workflow", and "Project".
  • Make a repository secret by going to the settings in the test repo.
    • Click on "Secrets & Variables".
    • Under this tab click "Actions".
    • Click on "New repository secret".
    • Name your secret and add the generated token from step 2.
  • Add the secret to "repo-token" in the "Move_To_New_Issue_Approval_Column:" job. It should look like this
    $ {{ secrets.YOUR_SECRET_NAME }} .
  • Make at least 2 issues to use on the copied project board.
  • Four tests are made in the Ice Box column.
    • An issue using the "Blank Issue Form with Dependency" template. It should contain at least 1 checkbox item that links an issue (one of the ones you made earlier). Example Issue
    • An issue using the "Blank Issue Form with Dependency" template. It should contain at least 1 checkbox item that links an issue (one of the ones you made earlier) and a checkbox item that is a comment. Example Issue
    • An issue using the "Blank Issue Form with Dependency" template. It should only contain a comment. Example Issue
    • An issue using any template that doesn't have a "Dependency" template.
  • The action is triggered when an icebox item's body is edited.
    • For each test that has a "Dependency" section checkbox list, check off every item.
    • For each test that does not have a checkbox list or no "Dependency" section, edit the body of the issue.
  • Each test has now been triggered. The only one that should pass is the test that only actions checkbox items with a linked issue. The item will be moved from the Ice Box column to the New Issue Approval column and should have a "ready for dev lead" label

@github-actions
Copy link

Want to review this pull request? Take a look at this documentation for a step by step guide!

From your project repository, check out a new branch and test the changes.

git checkout -b JpadillaCoding-automate-ice-box-to-new-issue-approval-3732 gh-pages
git pull https://github.com/JpadillaCoding/Website.git automate-ice-box-to-new-issue-approval-3732

@github-actions github-actions bot added role: back end/devOps Tasks for back-end developers Complexity: Large Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly automation for manual github board maintenance actions that are going to be automated size: 3pt Can be done in 13-18 hours labels Jul 15, 2023
@adrianang
Copy link
Member

  • Availability: MTWThSu, 6 PM - 10 PM (PST) (Week of 7/17)
  • ETA: I plan on reviewing this issue by Wednesday, 7/19 at 10 PM.

@roslynwythe
Copy link
Member

Availability: afternoon 7/19, afternoon 7/20
ETA: EOD 7/20

Copy link
Member

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @JpadillaCoding for super impressive work on this PR. The branches are setup correctly, the code is clean and correct, the description is informative and your step-by-step instructions made it quite painless to review. Indeed of the four test issues edited in the Ice Box, the only one moved to the "New Issue Approval" column was the only in which every dependency was linked to an issue. The issue moved into "New Issue Approval" had the "ready for dev lead" label applied.

Copy link
Member

@adrianang adrianang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branching is set up correctly, and the corresponding issue is linked. I pushed the branch up to my fork of the website and tested the automation workflow according to your instructions, and can confirm that of the four test issues, only the issue that had only enumerated dependencies that were closed was (1) moved to the New Issue Approval column from the Ice Box column and (2) the ready for dev lead label was automatically added.

I also checked my workflow logs and noticed that the workflow was properly skipping the other three test issues that didn't satisfy the requirement to be automated, which checks out in the Check_Dependencies job you wrote — good job on that, by the way!

Thank you @JpadillaCoding for taking up this large issue and for taking the time to write out the testing instructions for reviewers — ditto Roslyn on how painless reviewing this was, and I also learned more about GHA from your documentation 🙌🏽

@adrianang adrianang merged commit 676abfa into hackforla:gh-pages Jul 20, 2023
@JpadillaCoding
Copy link
Member Author

@adrianang @roslynwythe Thanks for the compliments!

@JpadillaCoding JpadillaCoding deleted the automate-ice-box-to-new-issue-approval-3732 branch July 20, 2023 22:22
roslynwythe added a commit that referenced this pull request Jul 23, 2023
roslynwythe added a commit that referenced this pull request Jul 23, 2023
@roslynwythe
Copy link
Member

roslynwythe commented Nov 28, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation for manual github board maintenance actions that are going to be automated Complexity: Large Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly role: back end/devOps Tasks for back-end developers size: 3pt Can be done in 13-18 hours
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub Actions: Automatically Move Issues with Completed Dependencies from Ice Box
3 participants