Skip to content

About

GitHub Action to check for offsetting required/granted strings given a set of inputs. Main use case for this is currently to run in conjunction with Jira labels.

Resources

Stars

10 stars

Watchers

31 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Action to check JIRA story for labels matching a required/approved convention.

Primary use case for this is to prevent someone from merging a PR without external approval. JIRA tags in a commit message or PR title is used to get labels on the issue and find matching pairs of labels.

The convention operates based on the -required and -approved suffixes and works with any content before that.

#Inputs Please check the action.yml for a full list of required and optional inputs.

#Sample Action

name: Jira Approval
on:
  push:
    branches-ignore:
      - main
jobs:
  job:
    name: Ticket Labels
    runs-on: ubuntu-latest
    steps:
      - name: Check Jira Ticket Labels
        uses: g2crowd/required-approvals-action@v1.7
        with:
          commit_message: ${{ github.event.commits[0]['message'] }}
          pr_title: ${{ github.event.pull_request.title }}
          jira_user: ${{secrets.JIRANAME}}
          jira_token: ${{secrets.JIRATOKEN}}
          jira_url: organization.atlassian.net

Running Tests

yarn install
yarn test

Ready for release

  1. Install vercel/ncc by running this command in your terminal. npm i -g @vercel/ncc

  2. Compile your index.js file. ncc build index.js --license licenses.txt

About

GitHub Action to check for offsetting required/granted strings given a set of inputs. Main use case for this is currently to run in conjunction with Jira labels.

Resources

Stars

10 stars

Watchers

31 watching

Forks

Releases

Packages

Used by

Contributors

Languages