website
website copied to clipboard
GitHub Actions: Bot removing "Ready for Milestone" label
Overview
As a developer, we have to ensure that our kanban board is organized for all teams so that productivity is high. For this issue, we want to know why the GitHub action bot is removing the "Ready for Milestone" label when applied during issue creation and change the code logic so it doesn't.
Action Items
- [ ] Please go through the wiki article on Hack for LA's GitHub Actions
- [ ] Review the check-labels.js file, to understand how the issue trigger bot checks and removes labels from the issue.
- [ ] Understand why the github action bot removes the "Ready for Milestone" label if applied during issue creation. See resources for links to two helpful issues that discuss this.
- [ ] Change the code logic to fix this error
Checks
- [ ] Test in your local environment that it works
- [ ] Make sure that comments are still applied correctly and other labels are still added and removed correctly.
Resources/Instructions
- Issue #2676
- Issue #2397
- Relevant files:
- https://github.com/hackforla/website/blob/gh-pages/github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js
- https://github.com/hackforla/website/blob/gh-pages/github-actions/trigger-issue/add-missing-labels-to-issues/post-labels-comment.js
- https://github.com/hackforla/website/blob/gh-pages/github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js
- https://github.com/hackforla/website/blob/gh-pages/.github/workflows/issue-trigger.yml
Never done GitHub actions? Start here! GitHub Complex Workflows doc GitHub Actions Workflow Directory Events that trigger workflows Workflow syntax for GitHub Actions actions/github-script GitHub RESTAPI
Architecture Notes
The idea behind the refactor is to organize our GitHub Actions so that developers can easily maintain and understand them. Currently, we want our GitHub Actions to be structured like so based on this proposal:
- Schedules (military time) - Schedule Friday 0700 - Schedule Thursday 1100 - Schedule Daily 1100
- Linters - Lint SCSS
- PR Trigger - Add Linked Issue Labels to Pull Request - Add Pull Request Instructions
- Issue Trigger - Add Missing Labels To Issues
- WR - PR Trigger - WR Add Linked Issue Labels to Pull Request - WR Add Pull Request Instructions
- WR - Issue Trigger
Actions with the same triggers (excluding linters, which will be their own category) will live in the same github action file. Scheduled actions will live in the same file if they trigger on the same schedule (i.e. all files that trigger everyday at 11am will live in one file, while files that trigger on Friday at 7am will be on a separate file).
That said, this structure is not set in stone. If any part of it feels strange, or you have questions, feel free to bring it up with the team so we can evolve this format!
Hi @Zak234.
Good job adding the required labels for this issue. The merge team will review the issue and add a "Ready for Milestone" label once it is ready for prioritization.
Additional Resources:
Hi @MattPereira, thank you for taking up this issue! Hfla appreciates you :)
Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)
You're awesome!
P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)
Availability: 8 - 10 PM ETA: 11/20/22
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, November 21, 2022 at 11:17 PM PST.
Progress :
- Finished the first two action items
- Tested if the
Ready for Milestone
label is removed by GH bot if added during issue creation #3742 - Tested if the
Ready for Milestone
label is removed by GH bot if added after issue creation #3747
Blockers :
- I do not understand why the github action bot removes the
Ready for Milestone
label if applied during issue creation. I suspect the bug may be triggered by adding the particular label after issue creation? - I'm having difficulty figuring out how to test the github action that triggers on issue creation using my fork
Availability :
- 10 hours
ETA :
- To be determined
Pictures :
- None
@MattPereira Please put notes from the conversation we had with Ava at the Engineering Community of Practice on 2022-11-30 about race condition.
Notes From Engineering CoP Meeting on 2022-11-30
- Ava successfully recreated the bug on #3759
- link to the issue's github actions logs https://github.com/hackforla/website/actions/runs/3588856523/jobs/6040684324
- She deduced that the github-actions bot is removing the
Ready for Milestone
label because of a race condition - Her recommendations:
- Research github actions API to see if it is possible to prevent the label from being removed
- Try altering the logic to wait X number of seconds before running the github action to prevent the race condition
- Consider using a webhook to prevent the bug (very difficult)
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, December 12, 2022 at 11:15 PM PST.
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, December 19, 2022 at 11:16 PM PST.
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, December 26, 2022 at 11:15 PM PST.
- Progress: Returning from December month off
- Blockers: TBD
- Availability: 20 hours / week
- ETA: Will have a better handle on ETA by 1/8/23
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, January 9, 2023 at 11:16 PM PST.
- Progress: Created another issue with the
Ready For Milestone
label attached during issue creation, but the github actions bot did not remove the label this time- #3803
- GitHub Actions log
- Blockers: Snowboarding this weekend
- Availability: 15 hours
- ETA: TBD
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, January 23, 2023 at 11:16 PM PST.
- Progress: I have been creating issues with the
Ready For Milestone
label attached during issue creation, but the github actions bot is not removing the label- #3869
- #3870
- #3872
- Blockers: I do not understand why it only removes the
Ready For Milestone
label sometimes - Availability: 15 hours
- ETA: TBD
@MattPereira
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- Pictures (optional): "Add any pictures of the visual changes made to the site so far."
If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.
You are receiving this comment because your last comment was before Monday, February 6, 2023 at 11:17 PM PST.
I am moving this issue back to icebox because the github actions bot has not removed a ready for milestone
label from any of the many issues I have created with it.
This issue is resolved by us changing all the issue templates to have the missing labels by default #4307