No description
Find a file
compliance-pr-automation-bot[bot] 9b6e864842
[Compliance] - PR Template Changes Required (#3)
Co-authored-by: compliance-pr-automation[bot] <1425255+compliance-pr-automation-bot[bot]@users.noreply.github.com>
2025-12-29 08:49:58 -08:00
.github [Compliance] - PR Template Changes Required (#3) 2025-12-29 08:49:58 -08:00
action.yml [COMPLIANCE] Update Copyright and License Headers (#6) 2025-12-17 15:47:28 -07:00
CODEOWNERS handoff to team-vault-quality (#5) 2025-10-17 13:38:59 -07:00
go.mod updating jq search url (#4) 2025-09-26 16:25:54 -07:00
go.sum updating jq search url (#4) 2025-09-26 16:25:54 -07:00
LICENSE [COMPLIANCE] Update Copyright and License Headers (#6) 2025-12-17 15:47:28 -07:00
main.go [COMPLIANCE] Update Copyright and License Headers (#6) 2025-12-17 15:47:28 -07:00
main_test.go [COMPLIANCE] Update Copyright and License Headers (#6) 2025-12-17 15:47:28 -07:00
README.md Don't fail the action when no issues found 2020-08-18 14:47:51 +01:00

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. user@example.com. 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/gajira-login@v2.0.0
  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/gh-action-jira-search@v0.1.0
  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/gh-action-jira-search@v0.1.0
  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 }}