website
website copied to clipboard
Create GitHub Action to unassign devs from issues self-assigned from New Issue Approval column
Overview
We require a GitHub Action to unassign developers from issues that are self-assigned from the New Issue Approval
column of the Project Board, in order to reduce the confusion and wasted effort that results from developers working on issues that have not been approved nor prioritized.
Action Items
Currently, when a developer assigns themselves an issue, a GitHub Action runs that posts a comment on the issue (see message on assignment below):
- [ ] Become familiar with HfLA's GitHub Actions
- [ ] If you have not already done so, create a copy of the Project Board into your own repo (Tip 6: Creating your own Project Board)
- [ ] Be sure to read up on using Personal Access Tokens to test the project board in your own repo (Tip 7: Using Personal Access Tokens to test in your own Project Board)
- [ ] Navigate to the
github-actions/trigger-issue/add-preliminary-comment
folder - [ ] Add a new markdown file named
unassign-from-NIA.md
- [ ] Copy the following text into the .md file
<!-- Template for a notification to the assignee that they will be unassigned because the issue is in the "New Issue Approval" column -->
```
Hi @${issueAssignee}, HfLA appreciates your interest in this issue, but please note that it is in the `New Issue Approval` column of the Project Board because it has not been finalized, approved or prioritized, and so it is not ready for assignment. For this reason, you have been unassigned from this issue. Please remember to assign issues only from the `Prioritized Backlog` column. The one exception to this rule is if you are writing an issue and the `Draft` label is applied.
```
- [ ] Open
github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js
in your IDE and add code to perform checks on the newly assigned issue and respond appropriately - [ ] Your code should check the following:
- [ ] If the issue is in the
New Approval
column of theProject Board
- [ ] If the issue does not have the label
Draft
- [ ] If the issue is in the
- [ ] If the above two conditions are met:
- [ ] Unassign the developer from the issue
- [ ] Post a comment using the template file 'unassign-from-NIA.md` created earlier
- Note: We want this new comment to post instead of the comment that asks the dev for their availability
- [ ] Test the code in your copy of the Project Board by creating and assigning issues in your fork of the repository and observing the results. For testing you will have to modify the code to account for the fact that the columnID of the
New Issue Approval
column will be different in your fork of the repository, and you will have to provide your own versions of the secrets found in issue-trigger.yml.- [ ] Confirm that the behavior of the GHA is unchanged for issues assigned from columns other than
New Issue Approval
- [ ] Confirm that the behavior of the GHA is unchanged for issues
- [ ] Confirm the desired behavior of the GHA for issues assigned from the
New Issue Approval
column without theDraft
label
- [ ] Confirm that the behavior of the GHA is unchanged for issues assigned from columns other than
======================
If for some reason it is not possible to have the message selection logic in the /preliminary-update-comment.js file, here is an alternate approach:
- [ ] Add a new step to issue-trigger.yml immediately before
Post assigning issue comment
. The new step will be namedUnassign Issues from New Approval Column
and will do the following:- [ ] perform the checks on the issue to determine if it should be unassigned. An issue should be unassigned if it is in the
New Issue Approval
column and the labelDraft
is not applied. - [ ] unassign the issue if appropriate
- [ ] Post a comment using the template file 'unassign-from-NIA.md` created earlier
- [ ] return a value that can be tested in the next step ("Post assigning issue comment") to suppress the usual issue comment for unassigned issues.
- [ ] perform the checks on the issue to determine if it should be unassigned. An issue should be unassigned if it is in the
Resources/Instructions
- ER associated with this issue: https://github.com/hackforla/website/issues/4230
- 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
- HfLA GitHub Action workflows
- HfLA GitHub Action JavaScript files
- HfLA's GitHub Actions
- preliminary-update-comment.js
GitHub bot posts on issues
Message on Assignment
Hi @developer, 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 :)
Unassign from NIA
Hi @${issueAssignee}, HfLA appreciates your interest in this issue, but note that it is in the New Issue Approval
column of the Project Board because it has not been finalized, approved or prioritized, and so it is not ready for assignment. For this reason, you have been unassigned from this issue. Please remember to assign issues only from the Prioritized Backlog
column. The exception to this rule is if you are writing an issue and the Draft
label is applied.
Hi @roslynwythe, 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 :)
Hi @Brayheart, 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: I can give this 3-6 hours a week. ETA: Hard to say given its 5 points, I'm going to work on it and connect with my team weekly. This will likely require other people to complete which is part of why I took it, I love to collaborate!
@Brayheart I am unassigning you from this issue. You have not yet done a medium size issue. Please pick up one of those. Unfortunately there is no front end medium issues, but you can pick up a medium back end if you like.
Hi @marioantonini, 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 :)
i. Availability: T - F: 2:30-5:30 ii. ETA: Will update once I work more than a couple of hours on this and I get a better understanding.
ETA: EOW