Skip to content

Commit e75fede

Browse files
authored
Merge pull request #1 from nelc/and/jira-automation-trigger-on-merge
feat: trigger Jira issue automation on PR merge event
2 parents 62cb683 + 41b4126 commit e75fede

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Trigger Jira Issue Creation
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
prepare:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: ${{ github.event.pull_request.base.ref }}
13+
outputs:
14+
story_summary: ${{ vars.MIGRATION_BACKLOG_JIRA_STORY_SUMMARY }}
15+
story_description: ${{ vars.MIGRATION_BACKLOG_JIRA_STORY_DESCRIPTION }}
16+
steps:
17+
- run: echo "Preparing input vars..."
18+
create-jira-issue:
19+
needs: prepare
20+
if: github.event.pull_request.merged == true
21+
uses: nelc/actions-hub/.github/workflows/create-jira-issue.yml@main
22+
with:
23+
story_summary: ${{ needs.prepare.outputs.story_summary }}
24+
story_description: ${{ needs.prepare.outputs.story_description }}
25+
subtask_summary: "${{ github.event.pull_request.title }}"
26+
subtask_description: "${{ github.event.pull_request.body }} 🔗 PR: ${{ github.event.pull_request.html_url }}"
27+
environment: ${{ github.event.pull_request.base.ref }}
28+
secrets:
29+
MIGRATION_BACKLOG_JIRA_EMAIL: ${{ secrets.MIGRATION_BACKLOG_JIRA_EMAIL }}
30+
MIGRATION_BACKLOG_JIRA_TOKEN: ${{ secrets.MIGRATION_BACKLOG_JIRA_TOKEN }}
31+
MIGRATION_BACKLOG_JIRA_URL: ${{ secrets.MIGRATION_BACKLOG_JIRA_URL }}
32+
MIGRATION_BACKLOG_JIRA_PROJECT: ${{ secrets.MIGRATION_BACKLOG_JIRA_PROJECT }}
33+
MIGRATION_BACKLOG_JIRA_EPIC_KEY: ${{ secrets.MIGRATION_BACKLOG_JIRA_EPIC_KEY }}
34+
MIGRATION_BACKLOG_JIRA_EPIC_LINK_FIELD: ${{ secrets.MIGRATION_BACKLOG_JIRA_EPIC_LINK_FIELD }}

0 commit comments

Comments
 (0)