From fa870f41218bc5bc6c015f432e126e08e9a64205 Mon Sep 17 00:00:00 2001 From: Simone Haddad Date: Mon, 14 Oct 2024 13:21:02 -0700 Subject: [PATCH] Jira and Github Integration This workflow was requested by Jay It will push issues that are labeled as bugs to the PSPI ticket queue under the Epic PSPI-7 This is to track bounty program related issues in Jira --- .github/workflows/bountyissuestojira.yaml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/bountyissuestojira.yaml diff --git a/.github/workflows/bountyissuestojira.yaml b/.github/workflows/bountyissuestojira.yaml new file mode 100644 index 000000000..ad2234ef5 --- /dev/null +++ b/.github/workflows/bountyissuestojira.yaml @@ -0,0 +1,27 @@ +name: Origin Repository Workflow + +on: + issues: + types: [opened, labeled] + +jobs: + cross-repo-pipeline: + if: contains(github.event.issue.labels.*.name, 'bug') + runs-on: ubuntu-latest + steps: + - name: Trigger Target Repository + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.PAT_TOKEN }}" \ + -H "Accept: application/vnd.github.everest-preview+json" \ + https://api.github.com/repos/spaceandtimelabs/jira-github-integration/dispatches \ + -d '{ + "event_type": "repository_dispatch", + "client_payload": { + "issue_title": "${{ github.event.issue.title }}", + "issue_body": "${{ github.event.issue.body }}", + "issue_url": "${{ github.event.issue.html_url }}", + "issue_number": "${{ github.event.issue.number }}", + "issue_labels": ${{ toJson(github.event.issue.labels.*.name) }} + } + }'