It checks for dependent pull requests, both same-repo and external, which should be defined by keywords on either pull request's body or comments:
- Same repo:
Depends on #1
- External:
Depends on alvarocavalcanti/pierre-decheck#1
Depends on https://github.com/alvarocavalcanti/pierre-decheck/pull/1
Pierre will perform checks only upon PR creation and Comment Activity (added/removed). In every case it will fetch all the PR's bodies (the PR body itself and from all its comments), extract the dependencies and perform the checks. Thus, it does not observe the dependencies themselves and re-run the checks if their status change.
For now, the best way of re-checking the dependencies statuses is to add a new comment. I suggest pierre re-check
. 😃
- Checkout/download this repo
- Publish the app wherever suits you the best (it has both Heroku and AWS Lambda configuration in place) and take note of the app's URL
- Go to the repository you want to set it up, then go to Settings > Webhooks > Add Webhook
- Under "Payload URL" enter
<YOUR_APP_URL>/webhook
- Under "Content type" select "application/json"
- Under "Which events would you like to trigger this webhook?" select "Let me select individual events." and then: "Commit comments", "Issue comments", "Issues", "Pull requests" and "Pull request review comments"
- Finally, make sure "Active" is selected and then create the webhook
- Create an access token for your repo and grant it with either
repo:status
for Public repos orrepo (Full control of private repositories)
for Private repos. - Add the token as an environment variable for you app, labeled
GITHUB_TOKEN
- Create a pull request on the repository that has pierre set up
- Add the keywords
Depends on #
(for same-repo) or "Depends onowner/repo#
" (for external) followed by an issue/pull request number,Depends on #2
orDepends on owner/repo#2
, to the pull request description, or later, as a comment. (Alternatively,Depends on <GITHUB_URL_OF_ISSUE_OR_PR>
style can be used) - Every time a comment is added or deleted, pierre will check the dependencies and update the "Checks" section:
Usually when one has external dependencies (other repos) these dependencies requires not only a PR to be merged, but also released. To that extent, Pierre offers an optional configuration: by setting the environment variable RELEASE_LABEL
to any given value, Pierre will then consider any dependency as met only if its state is closed
and if it also has the proper label. On the screenshot below it's possible to see how it looks like when the dependency is closed but does not have the release label:
- PyCharm - Community edition is free and decent, Professional edition is awesome
- VisualStudio Code - Completely free, large amount of extensions and great community support