From 8087d6466afc8cd7d8507899b1a16a02bace8dfd Mon Sep 17 00:00:00 2001 From: rosewangrmi Date: Tue, 12 May 2026 15:19:21 -0400 Subject: [PATCH 1/2] add workflow to automatically create a jira ticket when an issue is created in this repo --- .github/workflows/.jira_ticket.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/.jira_ticket.yml diff --git a/.github/workflows/.jira_ticket.yml b/.github/workflows/.jira_ticket.yml new file mode 100644 index 0000000..a9f9028 --- /dev/null +++ b/.github/workflows/.jira_ticket.yml @@ -0,0 +1,51 @@ +name: Create Jira ticket on GitHub issue opened + +on: + issues: + types: [opened] + +jobs: + call-jira-incoming-webhook: + runs-on: ubuntu-latest + steps: + - name: Build payload + id: payload + run: | + # Build a simple JSON payload Jira automation can consume as webhookData.* + # We send 'summary' and 'description' directly for easy mapping. + jq -n \ + --arg action "opened" \ + --arg repository "${{ github.repository }}" \ + --arg issue_number "${{ github.event.issue.number }}" \ + --arg title "${{ github.event.issue.title }}" \ + --arg url "${{ github.event.issue.html_url }}" \ + --arg author "${{ github.event.issue.user.login }}" \ + --arg body "${{ github.event.issue.body }}" \ + '{ + action: $action, + repository: $repository, + issue_number: ($issue_number | tonumber), + issue: { + title: $title, + url: $url, + author: $author, + body: ($body // "") + } + }' > payload.json + + echo "Payload preview:" + cat payload.json + + - name: POST to Jira Automation Incoming Webhook + env: + JIRA_WEBHOOK_URL: ${{ secrets.JIRA_WEBHOOK_URL }} + JIRA_WEBHOOK_TOKEN: ${{ secrets.JIRA_WEBHOOK_TOKEN }} + run: | + curl -sS -X POST "$JIRA_WEBHOOK_URL" \ + -H "Content-Type: application/json" \ + -H "X-Automation-Webhook-Token: $JIRA_WEBHOOK_TOKEN" \ + --data-binary @payload.json \ + -o response.txt -w "\nHTTP %{http_code}\n" + + echo "Response:" + cat response.txt From a9947a2f867c8b52a502980768d37ad99868892a Mon Sep 17 00:00:00 2001 From: rosewangrmi Date: Tue, 12 May 2026 16:06:24 -0400 Subject: [PATCH 2/2] removed the .before yml file. it was a typo. --- .github/workflows/{.jira_ticket.yml => jira_ticket.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{.jira_ticket.yml => jira_ticket.yml} (100%) diff --git a/.github/workflows/.jira_ticket.yml b/.github/workflows/jira_ticket.yml similarity index 100% rename from .github/workflows/.jira_ticket.yml rename to .github/workflows/jira_ticket.yml