Course automation submission: Automatic labels #1144
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Course-automation: Automatic labels
Members
Kalle Meurman ([email protected])
GitHub: Kalle
Måns Andersson ([email protected])
GitHub: Måns
Proposal
Action that automatically adds labels to issues, pull-requests, etc. based on keywords in message.
Original proposal pull request: #932
Submission
We have created our own Github action that adds labels to a pull request based on
keywords within the title of the pull request. The code is available publicly at
https://github.com/Wizkas0/PR-LabelGenerator. In the repo both the code and
documentation (README) can be found.
The keywords and corresponding labels to be added are specified in the workflow .yml file
as a JSON object. As a part of this pull request we have added the file
./github/workflows/label-generator.yml
.If this pull request gets merged the action will hopefully become functional instantly and
start adding labels to pull requests.
Here are the suggestions for keyword/label pairs that we think are reasonable based on
the labels that are already used in the course:
For example this would mean that if the PR title contains the phrase "course automation"
the label
course_automation
will be added. We will gladly take suggestions for changing thekeywords/labels and adding additional labels.
Here is the link to the repo we used for testing our action: https://github.com/mansand1/action-test/pulls
If you look at the PRs you can see that some labels have been added automatically.
Grading
According to our own assessment, we have satisfied four criteria and two of those at a remarkable level.
Yes
pending
status, and when the job is completed, it receives asuccessful
status. If any labels are added by the action, this shows up in the pull request asgithub-actions[bot] added the <something> label
.Yes (next year for this course)
In other courses than this one
keyword-dict
input in the workflow .yml file to include the appropriate key-words/phrases and labels for the course/ course-run.Yes (Github action)
Yes (public repo)
Well documented repo