Skip to content
check

GitHub Action

JIRA Auto Assign

v1.0 Latest version

JIRA Auto Assign

check

JIRA Auto Assign

Automatically assign a JIRA issue

Installation

Copy and paste the following snippet into your .yml file.

              

- name: JIRA Auto Assign

uses: cyrus-za/[email protected]

Learn more about this action in cyrus-za/jira-auto-assign

Choose a version

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 [email protected] and the token is 954c38744be9407ab6fb, then [email protected]: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