Skip to content

Ensures all pull requests have clubhouse card numbers attached

License

Notifications You must be signed in to change notification settings

movableink/pr-clubhouse-lint-action

Repository files navigation

pr-shortcut-lint-action

A GitHub Action that verifies your pull request contains a reference to a Shortcut card. If your Shortcut card number is 1234, this will check for [ch1234] or ch1234/ in:

  • The pull request title
  • The pull request body
  • The pull request branch name

Usage

Add .github/workflows/lint.yaml with the following:

name: Shortcut
on:
  pull_request:
    types: [opened, edited, reopened, synchronize]

jobs:
  ch_lint_pr:
    name: Check for story ID
    runs-on: ubuntu-latest
    steps:
      - uses: movableink/pr-clubhouse-lint-action@release

Releasing

This action needs node_modules vendored, but we don't want to do so normally. To release a new version:

  • Remove node_modules
  • Check out the release branch
  • Run git merge master
  • Run npm install --production (to ensure dev dependencies don't get installed)
  • Commit the result, if any changes
  • Push the release branch to Github

Testing

Run npm test to test.

About

Ensures all pull requests have clubhouse card numbers attached

Resources

License

Stars

Watchers

Forks

Packages

No packages published