From c0fd40ebbac843f843e0fb75ba882f5db782eb43 Mon Sep 17 00:00:00 2001 From: andrey-canon Date: Fri, 4 Jul 2025 17:44:15 -0500 Subject: [PATCH 1/2] feat: trigger Jira issue automation on PR merge event --- .github/workflows/create-jira-issue.yml | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/create-jira-issue.yml diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml new file mode 100644 index 00000000..9ab2587d --- /dev/null +++ b/.github/workflows/create-jira-issue.yml @@ -0,0 +1,35 @@ +name: Trigger Jira Issue Creation + +on: + pull_request: + types: + - closed + - synchronize # Delete after testing and delete || github.event.action == 'synchronize' + +jobs: + prepare: + runs-on: ubuntu-latest + environment: + name: ${{ github.event.pull_request.base.ref }} + outputs: + story_summary: ${{ vars.MIGRATION_BACKLOG_JIRA_STORY_SUMMARY }} + story_description: ${{ vars.MIGRATION_BACKLOG_JIRA_STORY_DESCRIPTION }} + steps: + - run: echo "Preparing input vars..." + create-jira-issue: + needs: prepare + if: github.event.pull_request.merged == true || github.event.action == 'synchronize' + uses: nelc/actions-hub/.github/workflows/create-jira-issue.yml@and/jira_automation_action + with: + story_summary: ${{ needs.prepare.outputs.story_summary }} + story_description: ${{ needs.prepare.outputs.story_description }} + subtask_summary: "${{ github.event.pull_request.title }}" + subtask_description: "${{ github.event.pull_request.body }} 🔗 PR: ${{ github.event.pull_request.html_url }}" + environment: ${{ github.event.pull_request.base.ref }} + secrets: + MIGRATION_BACKLOG_JIRA_EMAIL: ${{ secrets.MIGRATION_BACKLOG_JIRA_EMAIL }} + MIGRATION_BACKLOG_JIRA_TOKEN: ${{ secrets.MIGRATION_BACKLOG_JIRA_TOKEN }} + MIGRATION_BACKLOG_JIRA_URL: ${{ secrets.MIGRATION_BACKLOG_JIRA_URL }} + MIGRATION_BACKLOG_JIRA_PROJECT: ${{ secrets.MIGRATION_BACKLOG_JIRA_PROJECT }} + MIGRATION_BACKLOG_JIRA_EPIC_KEY: ${{ secrets.MIGRATION_BACKLOG_JIRA_EPIC_KEY }} + MIGRATION_BACKLOG_JIRA_EPIC_LINK_FIELD: ${{ secrets.MIGRATION_BACKLOG_JIRA_EPIC_LINK_FIELD }} From 441217ecbfccc55d2e0f6147160c289bd7a30a97 Mon Sep 17 00:00:00 2001 From: andrey-canon Date: Tue, 8 Jul 2025 16:23:39 -0500 Subject: [PATCH 2/2] feat: remove debug lines --- .github/workflows/create-jira-issue.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index 9ab2587d..20eeb6ba 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -4,7 +4,6 @@ on: pull_request: types: - closed - - synchronize # Delete after testing and delete || github.event.action == 'synchronize' jobs: prepare: @@ -18,8 +17,8 @@ jobs: - run: echo "Preparing input vars..." create-jira-issue: needs: prepare - if: github.event.pull_request.merged == true || github.event.action == 'synchronize' - uses: nelc/actions-hub/.github/workflows/create-jira-issue.yml@and/jira_automation_action + if: github.event.pull_request.merged == true + uses: nelc/actions-hub/.github/workflows/create-jira-issue.yml@main with: story_summary: ${{ needs.prepare.outputs.story_summary }} story_description: ${{ needs.prepare.outputs.story_description }}