An orb to check your pull request status and cancel whole CircleCI workflow which is created by commit of GitHub draft PR automatically.
The orb is a fork of artsy/skip-wip-ci. The mose part of code is base on skip-wip-ci. It just remain check-skippable-pr
job only.
- Ensure that enable Allow Uncertified Orbs in Organization Settings.
Organization Settings > Security
- Create Personal API Tokens and copy the token.
User Settings > Personal API Tokens
- Add a envrionment variable whose Name is
CIRCLE_TOKEN
and Value is the token you copied.
Project > Project Settings > Environment Variables
- Go to GitHub, And add a token which contains
repo
scope.
GitHub > Settings > Developer Settings > Personal access tokens
-
Copy GitHub Personal Access Token
-
Back to CircleCI, And add a envrionment variable whose Name is
GITHUB_TOKEN
and Value is the token you just copied. -
Modify CircleCI
config.yml
version: 2.1
orbs:
bye-github-draft: whyayen/[email protected]
# something else..
workflows:
your_workflow:
jobs:
- bye-github-draft/check-skippable-pr
# Make sure that your jobs run after check-skippable-pr by requires
- your_job:
requires:
- bye-github-draft/check-skippable-pr