A fast 🔥 TypeScript GitHub Action that will auto-assign JIRA issue from PR github action
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
Required The JIRA ticket ID e.g. PRJ-123
Required The subdomain of JIRA cloud that you use to access it. Ex: "your-domain.atlassian.net".
Required Token used to update Jira Issue. Check below for more details on how to generate the token.
Required Github Token used to fetch PR info. Defaults to {{ secrets.GITHUB_TOKEN }}
None
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:-
- Generate an API token via JIRA
- Create the encoded token in the format of
base64Encode(<username>:<api_token>)
. For example, if the username isci@example.com
and the token is954c38744be9407ab6fb
, thenci@example.com:954c38744be9407ab6fb
needs to be base64 encoded to formY2lAZXhhbXBsZS5jb206OTU0YzM4NzQ0YmU5NDA3YWI2ZmI=
- The above value (in this example
Y2lAZXhhbXBsZS5jb206OTU0YzM4NzQ0YmU5NDA3YWI2ZmI=
) needs to be added as theJIRA_TOKEN
secret in your GitHub project.
Note: The user should have the required permissions (mentioned under GET Issue).
yarn install
yarn build
We package everything to a single file with Vercel's
ncc. Outputs to dist/index.js
.