Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.41 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.41 KB

bye-github-draft

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.

Usage

  1. Ensure that enable Allow Uncertified Orbs in Organization Settings.
Organization Settings > Security
  1. Create Personal API Tokens and copy the token.
User Settings > Personal API Tokens
  1. Add a envrionment variable whose Name is CIRCLE_TOKEN and Value is the token you copied.
Project > Project Settings > Environment Variables
  1. Go to GitHub, And add a token which contains repo scope.
GitHub > Settings > Developer Settings > Personal access tokens
  1. Copy GitHub Personal Access Token

  2. Back to CircleCI, And add a envrionment variable whose Name is GITHUB_TOKEN and Value is the token you just copied.

  3. 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