-
Notifications
You must be signed in to change notification settings - Fork 166
86 lines (85 loc) · 2.9 KB
/
add-to-dev-projects.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
76
77
78
79
80
81
82
83
84
85
86
name: Add to dev board
on:
pull_request_target:
types:
- labeled
permissions:
contents: read
jobs:
add_to_data_plane-project:
runs-on: ubuntu-latest
if: |
github.event.label.name == 'Team:Elastic-Agent-Data-Plane'
steps:
- name: Get token
id: get_token
uses: elastic/actions-app-token@master
with:
APP_PEM: ${{ secrets.OBS_DOCS_AUTOMATION_PRIVATE_KEY }}
APP_ID: 203735
- name: Add to EA Data Plane board
uses: octokit/[email protected]
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:[ID!]!,$contentid:ID!) {
updatePullRequest(input: {pullRequestId:$contentid, projectIds:$projectid}) {
clientMutationId
}
}
projectid: "PRO_kwDOAGc3Zs4AzG8z"
contentid: ${{ github.event.pull_request.node_id }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.app_token }}
add_to_control_plane-project:
runs-on: ubuntu-latest
if: |
github.event.label.name == 'Team:Elastic-Agent-Control-Plane'
steps:
- name: Get token
id: get_token
uses: elastic/actions-app-token@master
with:
APP_PEM: ${{ secrets.OBS_DOCS_AUTOMATION_PRIVATE_KEY }}
APP_ID: 203735
- name: Add to EA Control Plane board
uses: octokit/[email protected]
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:[ID!]!,$contentid:ID!) {
updatePullRequest(input: {pullRequestId:$contentid, projectIds:$projectid}) {
clientMutationId
}
}
projectid: "PRO_kwDOAGc3Zs4AzG9E"
contentid: ${{ github.event.pull_request.node_id }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.app_token }}
add_to_fleet_ui-project:
runs-on: ubuntu-latest
if: |
github.event.label.name == 'Team:Fleet'
steps:
- name: Get token
id: get_token
uses: elastic/actions-app-token@master
with:
APP_PEM: ${{ secrets.OBS_DOCS_AUTOMATION_PRIVATE_KEY }}
APP_ID: 203735
- name: Add to Fleet board
uses: octokit/[email protected]
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid: ID!, $contentid: ID!) {
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
projectNextItem {
id
}
}
}
projectid: "PN_kwDOAGc3Zs4AAsH6"
contentid: ${{ github.event.pull_request.node_id }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.app_token }}