From 474fa6ec21584789abdc00df1cf8ba82078dcc2b Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 25 Apr 2022 10:27:44 +0200 Subject: [PATCH] Add GH workflow to push issues to the [ElementX board](https://github.com/orgs/vector-im/projects/43) --- .github/workflows/triage-labelled.yml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/triage-labelled.yml diff --git a/.github/workflows/triage-labelled.yml b/.github/workflows/triage-labelled.yml new file mode 100644 index 000000000..2bc9c1ac6 --- /dev/null +++ b/.github/workflows/triage-labelled.yml @@ -0,0 +1,33 @@ +name: Move labelled issues to correct boards and columns + +on: + issues: + types: [labeled] + +jobs: + move_element_x_issues: + name: ElementX issues to ElementX project board + runs-on: ubuntu-latest + # Skip in forks + if: > + github.repository == 'vector-im/element-x-ios' && + (contains(github.event.issue.labels.*.name, 'Z-ElementX-Alpha') || + contains(github.event.issue.labels.*.name, 'Z-ElementX-Beta') || + contains(github.event.issue.labels.*.name, 'Z-ElementX')) + steps: + - uses: octokit/graphql-action@v2.x + 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: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc4ABTXY" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}