Skip to content

Commit fe66693

Browse files
authored
Merge pull request #7362 from vector-im/kittykat-patch-1
Add issue automation for PS feature teams
2 parents 29d3856 + 6a653c3 commit fe66693

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

0 commit comments

Comments
 (0)