Skip to content

Github action that will auto-assign JIRA issue from PR

License

Notifications You must be signed in to change notification settings

cyrus-za/jira-auto-assign

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

JIRA auto assign

:octocat: A fast 🔥 TypeScript GitHub Action that will auto-assign JIRA issue from PR github action code style: prettier

Example usage

uses: cyrus-za/jira-auto-assign@master
with:
  issue-key: PRJ-123
  jira-token: ${{ secrets.JIRA_TOKEN }}
  github-token: ${{ secrets.GITHUB_TOKEN }}
  jira-domain: your-domain.atlassian.net

Inputs

issue-key

Required The JIRA ticket ID e.g. PRJ-123

jira-domain

Required The subdomain of JIRA cloud that you use to access it. Ex: "your-domain.atlassian.net".

jira-token

Required Token used to update Jira Issue. Check below for more details on how to generate the token.

github-token

Required Github Token used to fetch PR info. Defaults to {{ secrets.GITHUB_TOKEN }}

Outputs

None

jira-token

Since tokens are private, we suggest adding them as GitHub secrets.

The Jira token is used to fetch issue information via the Jira REST API. To get the token:-

  1. Generate an API token via JIRA
  2. Create the encoded token in the format of base64Encode(<username>:<api_token>). For example, if the username is ci@example.com and the token is 954c38744be9407ab6fb, then ci@example.com:954c38744be9407ab6fb needs to be base64 encoded to form Y2lAZXhhbXBsZS5jb206OTU0YzM4NzQ0YmU5NDA3YWI2ZmI=
  3. The above value (in this example Y2lAZXhhbXBsZS5jb206OTU0YzM4NzQ0YmU5NDA3YWI2ZmI=) needs to be added as the JIRA_TOKEN secret in your GitHub project.

Note: The user should have the required permissions (mentioned under GET Issue).

Build

yarn install

yarn build

We package everything to a single file with Vercel's ncc. Outputs to dist/index.js.

Related Reading

About

Github action that will auto-assign JIRA issue from PR

Resources

License

Stars

Watchers

Forks

Packages

No packages published