-
Notifications
You must be signed in to change notification settings - Fork 1.4k
39 lines (36 loc) · 1.03 KB
/
backport-pr.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
name: Backport PR
on:
pull_request_target:
types:
- closed
- labeled
jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- name: Create token
uses: actions/create-github-app-token@v1
id: token-generator
with:
app-id: ${{ secrets.DD_AGENT_INTEGRATIONS_BOT_APP_ID }}
private-key: ${{ secrets.DD_AGENT_INTEGRATIONS_BOT_PRIVATE_KEY }}
repositories: integrations-core
- uses: tibdex/backport@v2
with:
label_pattern: "^backport/(?<base>([^ ]+))$"
labels_template: "[\"backport\", \"bot\"]"
body_template: |
Backport <%= mergeCommitSha %> from #<%= number %>.
___
<%= body %>
github_token: ${{ steps.token-generator.outputs.token }}