forked from OSC/ondemand
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 2.32 KB
/
document-merge.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
name: Create issues for Merge Request
# Run this action when we merge into master
on:
pull_request:
branches:
- master
- 'feature/**'
- 'release_**'
types: [closed]
jobs:
# Create an issue on the documentation repository to document whatever was just pulled in.
create-doc-issue:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
env:
PR_NUM: ${{ github.event.pull_request.number }}
TITLE: ${{ github.event.pull_request.title }}
steps:
- name: Create an issue on the documentation repository
if: contains(github.event.pull_request.labels.*.name, 'needs doc')
run: |
BODY="{
\"title\": \"$TITLE\",
\"body\": \"Create documentation for https://github.com/OSC/ondemand/pull/$PR_NUM\"
}"
curl --silent --output /dev/null --request POST \
--url https://api.github.com/repos/OSC/ood-documentation/issues \
--header 'Authorization: token ${{ secrets.OSC_ROBOT_GH_PUB_REPO_TOKEN }}' \
--header 'content-type: application/json' \
--data "$BODY"
- name: Create an issue on the puppet repository
if: contains(github.event.pull_request.labels.*.name, 'needs automation')
run: |
BODY="{
\"title\": \"$TITLE\",
\"body\": \"Create automation for https://github.com/OSC/ondemand/pull/$PR_NUM\"
}"
curl --silent --output /dev/null --request POST \
--url https://api.github.com/repos/OSC/puppet-module-openondemand/issues \
--header 'Authorization: token ${{ secrets.OSC_ROBOT_GH_PUB_REPO_TOKEN }}' \
--header 'content-type: application/json' \
--data "$BODY"
- name: Create an issue on the ansible repository
if: contains(github.event.pull_request.labels.*.name, 'needs automation')
run: |
BODY="{
\"title\": \"$TITLE\",
\"body\": \"Create automation for https://github.com/OSC/ondemand/pull/$PR_NUM\"
}"
curl --silent --output /dev/null --request POST \
--url https://api.github.com/repos/OSC/ood-ansible/issues \
--header 'Authorization: token ${{ secrets.OSC_ROBOT_GH_PUB_REPO_TOKEN }}' \
--header 'content-type: application/json' \
--data "$BODY"