-
Notifications
You must be signed in to change notification settings - Fork 36
52 lines (45 loc) · 1.25 KB
/
dependabot_jira.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Dependabot Jira
on:
pull_request:
branches:
- 4.6.x
- main
types:
- opened
- reopened
jobs:
summary:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
outputs:
summary: ${{ steps.summary.outputs.summary }}
steps:
- id: summary
run: echo summary=$(echo ${{ github.event.pull_request.title }} | grep -oP '(?<=Bump )(.*)(?=from)|(?<=to )(.*)' | tr -d '\n') >> $GITHUB_OUTPUT
jira:
needs: summary
uses: infinispan/infinispan/.github/workflows/jira_upsert.yml@main
secrets:
token: ${{ secrets.JIRA_API_TOKEN }}
with:
infinispanBranch: main
project: IPROTO
summary: ${{ needs.summary.outputs.summary }}
type: Component Upgrade
pullRequest: ${{ github.event.pull_request.html_url }}
comment:
needs: jira
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Add comment to PR
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '${{ needs.jira.outputs.url }}'
})