-
Notifications
You must be signed in to change notification settings - Fork 486
75 lines (64 loc) · 2.32 KB
/
create-botbuilder-parity-issues.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: create-botbuilder-parity-issues.yml
on:
pull_request:
branches:
- main
- v5
types: [closed]
jobs:
encode:
name: encode inputs
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
outputs:
pr-body: ${{ steps.pr-body.outputs.value }}
pr-number: ${{ steps.pr-number.outputs.value }}
pr-title: ${{ steps.pr-title.outputs.value }}
repository: ${{ steps.repository.outputs.value }}
steps:
- id: pr-body
uses: joshgummersall/base64-encode@main
with:
value: ${{ github.event.pull_request.body }}
- id: pr-number
uses: joshgummersall/base64-encode@main
with:
value: ${{ github.event.pull_request.number }}
- id: pr-title
uses: joshgummersall/base64-encode@main
with:
value: ${{ github.event.pull_request.title }}
- id: repository
uses: joshgummersall/base64-encode@main
with:
value: ${{ github.repository }}
dispatchWorkflow:
name: create parity issue
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
needs: encode
permissions:
issues: write
strategy:
matrix:
repo: [java, js, python]
steps:
- run: echo "::notice ::Creating issue for ${{ matrix.repo }}"
if: |
contains(github.event.pull_request.labels.*.name, 'Automation: Parity all') == true || contains(github.event.pull_request.labels.*.name, format('Automation: parity with {0}', matrix.repo)) == true
- uses: joshgummersall/dispatch-workflow@main
if: |
contains(github.event.pull_request.labels.*.name, 'Automation: Parity all') == true || contains(github.event.pull_request.labels.*.name, format('Automation: parity with {0}', matrix.repo)) == true
with:
encoded: "true"
inputs: |
{
"prDescription": "${{ needs.encode.outputs.pr-body }}",
"prNumber": "${{ needs.encode.outputs.pr-number }}",
"prTitle": "${{ needs.encode.outputs.pr-title }}",
"sourceRepo": "${{ needs.encode.outputs.repository }}"
}
ref: main
repo: microsoft/botbuilder-${{ matrix.repo }}
token: "${{ secrets.BOTBUILDER_JS_ACCESS_TOKEN }}"
workflow: create-parity-issue.yml