website
website copied to clipboard
GitHub Actions: 2 weeks inactive label bug
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 the 2 weeks inactive label should be posted only after 14 days of inactivity from the time the issue is assigned.
Action Items
- [ ] Review add-label.js file located at (https://github.com/hackforla/website/tree/gh-pages/github-actions/add-update-label-weekly)
- [ ] Add a condition which checks for the amount of time since issue was assigned, and adds a 2 weeks inactive label only if no comment or PR from the assignee.
- [ ] Release dependency on #2652 and #2032
- [ ] Update action items in the dependency issues if needed
Pseudo-code
- When 14 days have elapsed from the time of issue being assigned
- [ ] Add 2 weeks inactive label if there is no comment or PR by assignee.
Checks
- [ ] Test in your local environment that it works
- [ ] If less than 14 days passed since issue was assigned, don't add 2 weeks inactive label.
- [ ] If less than 14 days passed since last comment by assignee, don't add 2 weeks inactive label.
Resources/Instructions
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
Hi @SAUMILDHANKAR.
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:
@SAUMILDHANKAR Do we want to make sure there has not been an unassignment?
@SAUMILDHANKAR says it will skip the loop if there is no assignee.
@blulady At the time you self-assign an issue, make sure to write in a comment the following:
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
Thanks Jess. Availability: 8 hours ETA: Wednesday 4.13.22
Hi @lilyarj, 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: 5hrs ETA: 7/8
This issue shows that summer did an update but the issue https://github.com/hackforla/website/issues/2763 still has the 2 week inactive label. What is supposed to happen
On this issue it shows it might be adding it to soon https://github.com/hackforla/website/issues/2309
see this page https://github.com/hackforla/website/wiki/GHA:-add-update-label-weekly https://github.com/hackforla/website/wiki/HfLA-GitHub-Actions
Progress: starting, read a bunch of material but haven't made any progress on the actual issue Blockers: Git is acting up for me, and I am confused Availability: 3 hours ETA: 7/14?
I'm un assigning myself from this issue, Bonnie think it might be a large issue
@kathrynsilvaconway will review the issue and determine if its fine the way it is once a large label is added, or if it needs further clarity. If it needs further clarity, reach out to Saumil to talk about next steps
@ExperimentsInHonesty @SAUMILDHANKAR
I've bumped the size on this issue up to large and moved it back to the prioritzed backlog. While it is definitely more complex than we originally believed, it is straight forward enough that I still think it can be done in one issue.
Hi @tunglinn, 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: 6-8pm PST for the whole week ETA: 10/26 (assuming I understand the issue, after the developer meeting)
Read through the code, not entirely sure where the bug is. Checked some issues with "2 weeks inactive" label, and it looks good.
Also, thinking ahead, I'll need to figure out how to test the action.
@tunglinn, moving this to the in progress column.
This is what a timeline looks like. Or you can use this format to access the timeline for any issue: https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/timeline
If there are many, many events, you can choose how many events you want to see by adding "?per_page=100" or whatever number to the end of the URL above.
Trying to find a way to test this issue without waiting 2 weeks for an issue to become inactive.
@tunglinn
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 Tuesday, November 1, 2022 at 12:20 AM PST.
Great to see the bug on this issue! github-actions added "2 weeks inactive" despite it being only 9 days.
- Progress: I understand the code. However, I'm focusing on finding a way to test any changes.
- Blockers: It's been a real difficulty in figuring out how to test the code. Currently trying to use this to use a dummy .json to test different examples of issue timelines.
- Availability: Sat, Sun, Tuesday evening
- ETA: 11/9
Was able to test some issues in my own repository. However, in order to test in this repo, I would need an authorization token. Is this something I could have access to, or just do all the testing in my own repo?
@tunglinn
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 14, 2022 at 11:19 PM PST.
Once again, the GHA is activating before 2 weeks. Although this makes me wonder if it was designed to do so, because the action only runs once a week, so the comment is (usually) either early or late. Progress: I have connected the testing method to my own repo. Blockers: Need access to a read token to test on website repo. Availability: 5-6 hours across the week ETA: Hopefully before next Monday
@tunglinn @blulady I don't have any idea how to give someone a read token for the website repo or why it's needed. Can you write something up about it, and figure out where that would live in our wiki. See revised resources above.
The problem I'm still working on is how to connect my local repo of the website to the data on GitHub. It is available freely using the "https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER" format, but the documentation for the REST API requires a token.
Using nektos act also requires a token to link the local testing to the full repository, which is required for testing this issue since it is not only checking if the assignee has commented but also if the issue is cross-referenced. The cross-referencing requires access to the whole repository and not just the issue event timeline.
I have completed a testing protocol for this issue, and will update my ongoing documentation of this process.
Update on fixing the bug: I've noticed we're using the event 'cross-referenced' as an indicator of a PR linked to the issue. However, this condition doesn't check if the PR is from the current assignee. For example in issue #2395, this GHA is detecting the last PR from a previous user.
List of bugs that need to be fixed:
- [x] Detecting linked PRs from non-assignees
- [ ] Triggering early
@tunglinn
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.
@tunglinn
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.
- Progress: I found bugs, now I need to fix them without changing the logic too much.
- Blockers: Shaky internet access until the new year.
- Availability: Jan 2-5
- ETA: Jan 5
@tunglinn
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 2, 2023 at 11:15 PM PST.