Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

GitHub Action to search for a specific Jira issue with JQL

License

Notifications You must be signed in to change notification settings

tomhjp/gh-action-jira-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-action-jira-search

Run JQL in a GitHub action to find a specific Jira issue key.

Authentication

To provide a URL and credentials you can use the gajira-login action, which will write a config file this action can read. Alternatively, you can set some environment variables:

  • JIRA_BASE_URL - e.g. https://my-org.atlassian.net. The URL for your Jira instance.
  • JIRA_API_TOKEN - e.g. iaJGSyaXqn95kqYvq3rcEGu884TCbMkU. An access token.
  • JIRA_USER_EMAIL - e.g. [email protected]. The email address for the access token.

Inputs

  • jql - JQL query that returns at most 1 issue

Outputs

The action will exit with a zero exit code unless it encounters any errors or finds more than 1 issue.

  • issue - The issue key found, e.g. TEST-23. Empty if none.

Examples

Using atlassian/gajira-login and GitHub secrets for authentication:

- name: Login
  uses: atlassian/[email protected]
  env:
    JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
    JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
    JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Search
  id: search
  uses: tomhjp/[email protected]
  with:
    jql: 'key = TEST-23'

- name: Log
  run: echo "Found issue ${{ steps.search.outputs.issue }}"

Using environment variables for authentication:

- name: Search
  id: search
  uses: tomhjp/[email protected]
  with:
    jql: 'key = TEST-23'
  env:
    JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
    JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
    JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

About

GitHub Action to search for a specific Jira issue with JQL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages