-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
Fix bug and consolidate "Schedule Thursday" into "Schedule Monthly" 4788 #5467
Fix bug and consolidate "Schedule Thursday" into "Schedule Monthly" 4788 #5467
Conversation
Combining functionalities of prev. `schedule-monthly.yml` and `schedule-thu-1100.yml`
Consolidate previous `schedule-monthly.yml` and `schedule-thu-1100.yml`
Consolidate `schedule-monthly.yml` and `schedule-thu-1100.yml`
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.
|
github-actions/trigger-schedule/list-inactive-members/create-new-issue.js
Fixed
Show fixed
Hide fixed
Address CodeQL notice
Consolidated functionality into revised `schedule-monthly.yml`
Availability: 9/12 noon - 2 pm |
changed 'Website' team to 'website-write' team in the paragraph beginning "If this was a mistake..."
Hi @t-will-gillis I have a few questions:
|
Hi @roslynwythe Thanks for reviewing and thanks for the questions:
|
Thank you @t-will-gillis for a super useful response. I'm afraid I'm not familar with these "Review of Inactive Member" issues and so I'm puzzled: For a member who has been removed from website-write, if there has been mistake or they want to come back, shouldn't they contact a dev lead immediately via Slack to be restored? I guess I'm unclear on how this "review" issue will work and so I don't understand the reason for the the instructions under "If it ihas been less than 20 days". Is the idea that the issue will remain open for 20 days to give members a chance to leave their comments, and then after 20 days I close it? Also I noticed the "ready for product" label. What is the role of product in this process? |
Remove `ready for product` label
Hi @roslynwythe - The intended function for the first of the two original GHAs was to create and post a list of the inactive members to the Monday Meeting Agenda. (I don't know the original reason- maybe to help with reviewing For this revised/consolidated GHA, Bonnie wants to notify members when the bot determines that they have been inactive for over one-month, so that they know they're on the list to be cut from the The -message- of the issue comes from Bonnie. I believe she intends that eventually this message will be posted to the individuals' personal, progress-summary issues, when we implement those. So for the future, the bot will write this message as a comment onto an individual's issue, and then the individual can choose to respond or not. (This is how I understand it, but I could also be wrong.) As I noted above, one of the original GHAs was supposed to post an issue on the board with the list of inactive members. This new "Review Inactive Team Members" issue extends the original by not only listing the inactive members but also "@-ing" them so that they are flagged with the message. The new issue also lists the two-month inactive members who were removed. Regarding the notes for "if it has been less than (/more than) 20 days": My thought is that the "Review Inactive Team Members" issue would remain open for 30 days, until the next month's update. (*** See note below) So although the issue says 20 days, the one-month inactive member has the next 30 days to perform any kind of activity, such as by commenting, by picking up a new issue, or anything else. If they do, then the bot won't list them as 'inactive' the following month. If the member is on the list of 'one-month inactive' members this month, and they do nothing, then the following month when the bot runs again the member will be on the 'two-month inactive' list, so they will be cut from Regarding the ***Note from above. The unanswered question: what are the reasons for the dev leads and Bonnie to receive this list of inactive members, besides "it-is-always-nice-to-know"? The bot automatically cuts the 'two-month inactive' members from 'website-write', however the issue itself says that "If we don't hear back from you in the upcoming weeks, we will unassign you from any issues you may be working on..." So to me it seems like late in the month, someone would want to take this list and do a quick search to see if these members have any open issues, and if so, manually remove those members and reprioritize their issues. (There probably is a way to have the bot unassign inactive members but to me it seems like this would be better as a manual activity.) |
Review ETA: 11/22/2023 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @t-will-gillis i like how you made this code readable along with the proper changes to fix bug in order to make the code work.
updating actions/github-script@v6 --> v7 per hackforla#5899
Adding check to skip run on January 1st (since December is off for HfLA website)
Adding checks to skip the January 1st run, and adjust to 3 months inactive only for the February 1st run
Corrected the name of the GH_TOKEN
Corrected name of repo-token
latest updates for Inactive Members
The reopening mechanism will be different; this workflow no longer needed
latest with new mechanism for inactive members to create issues
new mechanism for inactive members to send message
@ExperimentsInHonesty @roslynwythe |
Demo video slowed down
f. ER#4541: add check to see if inactive member on 'website' team prior to removal from 'website-write' team
uploaded new demo gif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @t-will-gillis for completing work on this complex issue.
Delete obsolete file, functionality incorporated in hackforla#5467
Delete obsolete file, functionality incorporated in #5467
Fixes #4788
Notes to PR Reviewers
schedule-monthly.yml
file:contributors-data.js
:create-new-issue.js
:comment-issue.js
:Background
schedule-monthly.yml
andschedule-thu-1100.yml
have had bugs and have not run correctly for over a year. Both actions were intended to run once a month, and both involved listing inactive members and then performing some action with the list. For these reasons, we decided that these two should be consolidated into a single action.schedule-monthly-PREV.yml
, thenschedule-monthly.yml
(and deleting the now-emptyschedule-thu-1100.yml
)schedule-monthly.yml
and deleting the now-empty temporary file.What changes did you make?
get-list.ls
from the original "Thursday" / renamed "monthly-PREV" action gathered a list of inactive members. However, its definition of 'inactive' was to mean that the member did not have an open issue at the exact time that the action checked. This is not very helpful information, thereforeget-list.js
is not used/ is deleted.Instead, the definition of 'inactive' fromUPDATE 11/12/23: This is incorrect. The originaltrim-contributors.js
file in the original "monthly" action is used. This file uses "true-github-contributors" from HfLA's "100 Automations" to search for activity and decide whether the member is active or not.contributors-data.js
file does import "true-github-contributors" from HfLA's "100 Automations"; however, on further review this automation is not actually used in the file and therefore the import is deleted. See notes from 10/29/23 below.schedule-monthly-PREV.yml
(i.e. other thanget-list.js
) has been integrated into the new, consolidatedschedule-monthly.yml
.schedule-monthly.yml
:actions/checkout@v3
toactions/checkout@v4
per dependabot Bump actions/checkout from 3 to 4 #5443contributors-data.js
:create-new-issue.js
:comment-issue.js
: Besides edits to ensure the automation works, the changes are mainly to comments and formatting.Why did you make the changes (we will use this info to test)?
Screenshots of Proposed Changes
Diffchecker showing consolidation of `schedule-monthly.yml` functions
10/29/23: Additional changes
Per Bonnie's comments here and especially here:
schedule-monthly.yml
: bump actions/setup-node@v3 --> v4 per Bump actions/setup-node from 3 to 4 #5769contributors-data.js
: removed reference to ‘trueContributorsMixin’ / ‘true-github-contributors’: This is not actually being used within the function.create-new-issue.js
: added "thisIssuePredict" and "thisIssueNumber" to identify number of next issue prior to the issue being createdcreate-new-issue.js
: revised body, labels of “Review Inactive Members” <-- Major changecreate-new-issue.js
: added milestone with correct reference to HfLA11/22/23: Latest changes
Per Bonnie's comments here and discussion with Roslyn and Jessica:
schedule-monthly.yml
: bump actions/github-script@v6 --> v7 per Bump actions/github-script from 6 to 7 #5899contributors-data.js
: when octokit.request() is run on "/issues", it returns only users who are "assignee"s. This is to avoid the problem discussed with Bonnie et al about the issue author considered as "active" when someone other than the author updates the issue.create-new-issue.js
: added instructions to the "Review Inactive Team Members" issue a.) for members to respond with a comment, then reopen the issue and b.) for dev leads to follow a process to reinstall members, etc.wr-schedule-monthly.yml
that only runs ifschedule-monthly.yml
was successful, then automatically finds and closes the issue that was created.created a new workflowschedule-monthly-reopen.yml
that is triggered when someone reopens the "Review Inactive Team Members" issue. The workflow moves the reopened issue to the "Questions / In Review" column and applies theready for dev leads
label.schedule-monthly-PREV.yml
needs to be deleted immediately after merging this issue.11/23/23: Addendum
Since we will be taking off for the month of December, this monthly check for inactive members should skip the January 1st run and resume on February 1st. Also, the February 1st run should remove members inactive since November 1st (3 months ago) since again, no December.
schedule-monthly.yml
andcontributors-data.js
to account for the December holiday.11/29/23: Final Addendum
The remaining edits to this GHA address the problem of how to allow an inactive member (w/o write access) to create an issue to notify dev leads. The prev method was to create a new issue when the member commented; however as discussed this causes the GHA to run every time a comment is made on every issue. The new method is for the member to create a new issue themselves from the comment. Then when the issue is being created, it is picked up by the existing GHAs for issue creation and filtered/labelled appropriately.
schedule-monthly-reopen.yml
is deleted/removed. It is no longer needed with the revisions.create-new-issue.js
issue-trigger.yml
to filter and label the new issue.New issue created
Issue created by member in comment
Log for revised Schedule Monthly
Log for new WR Schedule Monthly
Log for new issue