OmpiReleaseBotCommands - ICLDisco/ompi GitHub Wiki
As noted in other wiki pages, most developers cannot set the following attributes on issues and pull requests in the ompi-release repo:
- Labels
- Milestones
- Assignees
This is due to limitations in the Github permissions system.
Specifically, most developers do not have push/write access to the ompi-release repo. Github also interprets that to mean that those users should not be able to set labels, milestones, and assignees.
As a workaround, we have a bot monitoring the issues and pull requests on the ompi-release repo. Any Github user who is a member of the Open MPI Github organization can issue commands in any issue/pull request that will set/unset labels, milestones, and assignees.
One-time setup
As a security measure, the bot will only allow commands from users in the Open MPI Github organization.
Github defaults to making your membership in the Open MPI organization private; you must change it to public (so that the bot can query to see if you're a member of the organization).
- Go to this page: https://github.com/orgs/open-mpi/people
- Find yourself on that page and change your Membership from "Private" to "Public".
Once you do this, the bot will recognize you as a member of the organization, and will allow you to issue any of the commands below.
Commands that the bot recognizes
Example
For example, if you file a pull request (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.
Short version
Here's the tokens that OMPIBot recognizes:
bot:label:LABELassigns the label "LABEL" to the issue:+1:is a synonym forbot:label:reviewedandbot:nolabel:pushed-back.
bot:nolabel:LABELremoves the label "LABEL" from the issue:-1:is a synonym forbot:nolabel:reviewedandbot:label:pushed-back.
bot:milestone:MILESTONEassigns the milestone "MILESTONE" to the issuebot:nomilestone:unassigns the currently-assigned milestone from the issuebot:assign:USERassigns 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
More detail
- 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: @USERform, 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:Reviewedis 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.