Skip to content

Commit 6a653c3

Browse files
authored
Add issue automation for PS feature teams
1 parent 29331ff commit 6a653c3

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/triage-labelled.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,81 @@ jobs:
246246
env:
247247
PROJECT_ID: "PN_kwDOAM0swc4ABTXY"
248248
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
249+
250+
ps_features1:
251+
name: Add labelled issues to PS features team 1
252+
runs-on: ubuntu-latest
253+
if: >
254+
contains(github.event.issue.labels.*.name, 'A-Polls') ||
255+
contains(github.event.issue.labels.*.name, 'A-Location-Sharing') ||
256+
(contains(github.event.issue.labels.*.name, 'A-Voice-Messages') &&
257+
!contains(github.event.issue.labels.*.name, 'A-Broadcast')) ||
258+
(contains(github.event.issue.labels.*.name, 'A-Session-Mgmt') &&
259+
contains(github.event.issue.labels.*.name, 'A-User-Settings'))
260+
steps:
261+
- uses: octokit/graphql-action@v2.x
262+
id: add_to_project
263+
with:
264+
headers: '{"GraphQL-Features": "projects_next_graphql"}'
265+
query: |
266+
mutation add_to_project($projectid:ID!,$contentid:ID!) {
267+
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) {
268+
item {
269+
id
270+
}
271+
}
272+
}
273+
projectid: ${{ env.PROJECT_ID }}
274+
contentid: ${{ github.event.issue.node_id }}
275+
env:
276+
PROJECT_ID: "PVT_kwDOAM0swc4AHJKF"
277+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
278+
279+
ps_features2:
280+
name: Add labelled issues to PS features team 2
281+
runs-on: ubuntu-latest
282+
if: >
283+
contains(github.event.issue.labels.*.name, 'A-DM-Start') ||
284+
contains(github.event.issue.labels.*.name, 'A-Broadcast')
285+
steps:
286+
- uses: octokit/graphql-action@v2.x
287+
id: add_to_project
288+
with:
289+
headers: '{"GraphQL-Features": "projects_next_graphql"}'
290+
query: |
291+
mutation add_to_project($projectid:ID!,$contentid:ID!) {
292+
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) {
293+
item {
294+
id
295+
}
296+
}
297+
}
298+
projectid: ${{ env.PROJECT_ID }}
299+
contentid: ${{ github.event.issue.node_id }}
300+
env:
301+
PROJECT_ID: "PVT_kwDOAM0swc4AHJKd"
302+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
303+
304+
ps_features3:
305+
name: Add labelled issues to PS features team 3
306+
runs-on: ubuntu-latest
307+
if: >
308+
contains(github.event.issue.labels.*.name, 'A-Composer-WYSIWYG')
309+
steps:
310+
- uses: octokit/graphql-action@v2.x
311+
id: add_to_project
312+
with:
313+
headers: '{"GraphQL-Features": "projects_next_graphql"}'
314+
query: |
315+
mutation add_to_project($projectid:ID!,$contentid:ID!) {
316+
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) {
317+
item {
318+
id
319+
}
320+
}
321+
}
322+
projectid: ${{ env.PROJECT_ID }}
323+
contentid: ${{ github.event.issue.node_id }}
324+
env:
325+
PROJECT_ID: "PVT_kwDOAM0swc4AHJKW"
326+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

0 commit comments

Comments
 (0)