Files
dependabot[bot] a3f194a8d1 build(deps): bump the actions group across 1 directory with 7 updates
Bumps the actions group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.2.2` | `4.3.1` |
| [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `4.0.2` | `4.3.1` |
| [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) | `1.27.0` | `1.27.1` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.6.0` | `4.6.2` |
| [actions/github-script](https://github.com/actions/github-script) | `7.0.1` | `7.1.0` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4.1.8` | `4.3.0` |
| [ncipollo/release-action](https://github.com/ncipollo/release-action) | `1.15.0` | `1.21.0` |



Updates `actions/checkout` from 4.2.2 to 4.3.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/11bd71901bbe5b1630ceea73d27597364c9af683...34e114876b0b11c390a56381ad16ebd13914f8d5)

Updates `aws-actions/configure-aws-credentials` from 4.0.2 to 4.3.1
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/e3dd6a429d7300a6a4c196c26e071d42e0343502...7474bc4690e29a8392af63c5b98e7449536d5c3a)

Updates `slackapi/slack-github-action` from 1.27.0 to 1.27.1
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Changelog](https://github.com/slackapi/slack-github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slackapi/slack-github-action/compare/37ebaef184d7626c5f204ab8d3baff4262dd30f0...fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3)

Updates `actions/upload-artifact` from 4.6.0 to 4.6.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08...ea165f8d65b6e75b540449e92b4886f43607fa02)

Updates `actions/github-script` from 7.0.1 to 7.1.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/60a0d83039c74a4aee543508d2ffcb1c3799cdea...f28e40c7f34bde8b3046d885e986cb6290c5673b)

Updates `actions/download-artifact` from 4.1.8 to 4.3.0
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/fa0a91b85d4f404e444e00e005971372dc801d16...d3f86a106a0bac45b974a628896c90dbdf5c8093)

Updates `ncipollo/release-action` from 1.15.0 to 1.21.0
- [Release notes](https://github.com/ncipollo/release-action/releases)
- [Commits](https://github.com/ncipollo/release-action/compare/cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87...339a81892b84b4eeb0f6e744e4574d79d0d9b8dd)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 4.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: 4.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: slackapi/slack-github-action
  dependency-version: 1.27.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: 4.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/github-script
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/download-artifact
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: ncipollo/release-action
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-03 06:56:15 +00:00

87 lines
3.5 KiB
YAML

on:
issues:
types: [labeled]
permissions:
contents: read
name: JIRA Sync
jobs:
sync:
name: Sync to JIRA
permissions:
issues: write # for actions/github-script to create comments
runs-on: ubuntu-latest
steps:
- name: Login
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Search
if: github.event.action == 'labeled'
id: search
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
with:
# cf[10089] is Issue Link (use JIRA API to retrieve)
jql: 'project = "HPR" AND cf[10089] = "${{ github.event.issue.html_url }}"'
- name: Set type
id: set-ticket-type
run: |
# Questions are not tracked in JIRA at this time.
if [[ "${{ contains(github.event.issue.labels.*.name, 'question') }}" == "true" ]]; then
echo "type=Invalid" >> $GITHUB_OUTPUT
else
# Properly labeled GH issues are assigned the standard "GH Issue" type upon creation.
echo "type=GH Issue" >> $GITHUB_OUTPUT
fi
- name: Set labels
id: set-ticket-labels
run: |
if [[ "${{ contains(github.event.issue.labels.*.name, 'bug') }}" == "true" ]]; then
echo "labels=[\"bug\"]" >> $GITHUB_OUTPUT
elif [[ "${{ contains(github.event.issue.labels.*.name, 'enhancement') }}" == "true" ]]; then
echo "labels=[\"enhancement\"]" >> $GITHUB_OUTPUT
else
echo "labels=[]" >> $GITHUB_OUTPUT
fi
- name: Validate ticket
if: steps.set-ticket-type.outputs.type == 'Invalid'
run: |
echo "Questions are not being synced to JIRA at this time."
echo "If the issue is a bug or an enhancement please remove the question label and reapply the 'sync to jira' label."
- name: Create ticket
id: create-ticket
if: steps.search.outputs.issue == '' && github.event.label.name == 'sync to jira' && steps.set-ticket-type.outputs.type != 'Invalid'
uses: atlassian/gajira-create@59e177c4f6451399df5b4911c2211104f171e669 # v3.0.1
with:
project: HPR
issuetype: "${{ steps.set-ticket-type.outputs.type }}"
summary: "${{ github.event.repository.name }}: ${{ github.event.issue.title }}"
description: "${{ github.event.issue.body }}\n\n_Created from GitHub by ${{ github.actor }}._"
# The field customfield_10089 refers to the Issue Link field in JIRA.
fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", "components": [{ "name": "core" }], "labels": ${{ steps.set-ticket-labels.outputs.labels }} }'
- name: Add tracking comment
if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid'
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `
This issue has been synced to JIRA for planning.
JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}})`
})