summary refs log tree commit diff
path: root/.github/workflows/triage_labelled.yml
blob: d1ac4357b153cb154d60a0389b8ca82bf9d669ba (plain) (blame)
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
name: Move labelled issues to correct projects

on:
  issues:
    types: [ labeled ]

jobs:
  move_needs_info:
    name: Move X-Needs-Info on the triage board
    runs-on: ubuntu-latest
    if: >
      contains(github.event.issue.labels.*.name, 'X-Needs-Info')
    steps:
      - uses: actions/add-to-project@main
        id: add_project
        with:
          project-url: "https://github.com/orgs/matrix-org/projects/67"
          github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
      - name: Set status
        env:
          GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
        run: |
          gh api graphql -f query='
          mutation(
              $project: ID!
              $item: ID!
              $fieldid: ID!
              $columnid: String!
            )  {
            updateProjectV2ItemFieldValue(
              input: {
               projectId: $project
                itemId: $item
                fieldId: $fieldid
                value: { 
                  singleSelectOptionId: $columnid
                  }
              }
            ) {
              projectV2Item {
                id
              }
            }
          }' -f project="PVT_kwDOAIB0Bs4AFDdZ" -f item=${{ steps.add_project.outputs.itemId }} -f fieldid="PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4" -f columnid=ba22e43c --silent