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) }} + } + }'