-
Notifications
You must be signed in to change notification settings - Fork 3
Home
The OMPIBot is a script that will allow any user who is part of the Open MPI Github organization to set/unset labels, set/unset milestones, and assign/unassign users on Github issues/pull requests.
This is specifically useful on the ompi-release repository, where only the Release Managers have write access to that repo. That is, Github only allows those with write access to a repository to set/unset labels, set/unset milestones, and assign/unassign users to issues/pull requests.
With the OMPIBot, you can put special tokens in the text of an issue, pull request, or comment, and the OMPIBot will perform these actions for you.
For example, if you file a PR with the following initial text:
This PR fixes problem XYZ.
bot:milestone:v1.8.5
bot:label:bug
bot:label:enhancement
bot:assign: @jsquyres
Then the OMPIBot will set the v1.8.5
milestone, put the labels bug
and enhancement
on it, and assign it to user jsquyres
.
Please either make an issue/pull request on this ompi-release-bot repo, or comment on an existing issue and try out the OMPIBot. Once everyone likes the OMPIBot (enough), we'll deploy it on the ompi-release repo.
- Try it: ompi-release-bot issues
- Try it: ompi-release-bot pull requests
Here's the tokens that OMPIBot recognizes:
-
bot:label:LABEL
assigns the label "LABEL" to the issue-
:+1:
is a synonym for "label:reviewed"
-
-
bot:nolabel:LABEL
unassigns the label "LABEL" from the issue-
:-1:
is a synonym for "nolabel:reviewed"
-
-
bot:milestone:MILESTONE
assigns the milestone "MILESTONE" to the issue -
bot:nomilestone:
unassigns the currently-assigned milestone from the issue -
bot:assign:USER
assigns the user USER to the issue.- You can also use the form
bot:assign:@USER
. - You can also use the form
bot:assign: @USER
(note the extra space!), which allows for Github auto-completion.
- You can also use the form
-
bot:unassign:
unassigns the currently-assigned user from the issue
- You can list multiple tokens in a single issue/PR/comment. E.g.,
bot:label:bug bot:label:documentation bot:milestone:v1.8.5
- Except for the
bot:assign: @USER
form, do not put whitespace between the colon and the following token (e.g., label, milestone, or user). - Tokens don't have to be on their own line, but they do have to be whitespace delimited (whitespace does include newlines and beginning/end of string).
- E.g.,
Please assign bot:label:foo.
will attempt to assign the labelfoo.
(note the period), NOT the labelfoo
- E.g.,
- You can assign multiple labels to a single issue.
- You can only assign a single milestone to an issue.
- You can assign milestone X and then later assign milestone Y; OMPIBot is smart enough to unassign X before assigning Y.
- You can only assign a single user to an issue.
- You can assign user A and then later assign user B; OMPIBot is smart enough to unassign A before assigning B.
- You cannot list milestones or labels that include spaces (someone can add this feature in the future if they care enough). For OMPI's purposes, we're going to s/ /-/g in all of OMPI's milestones and labels.
- If something goes wrong, the OMPIBot will add a comment to the issue explaining the error.
- E.g., if you specify a label that does not exist
- Or if you specify a milestone that does not exist
- Or if you specify a user that cannot be assigned to the issue
- Label, milestone, and username matching is all case-insensitive
- E.g.,
bot:label:Reviewed
is equivalent tobot:label:reviewed
(regardless of whether the actual Github label is actuallyreviewed
,Reviewed
, or evenREVIEWED
).
- E.g.,
- The OMPIBot typically reacts to each submission within a few seconds. If more than 5 minutes goes by and the OMPIBot doesn't act, let @jsquyres and @ggouaillardet know.