Update labelled issue automation

Migrate from graphql to actions.

Add QA team
This commit is contained in:
Kat Gerasimova 2023-04-25 13:06:31 +01:00 committed by Kat Gerasimova
parent e2b2dbf59f
commit dbbc14f683

View file

@ -12,22 +12,10 @@ jobs:
if: > if: >
github.repository == 'vector-im/element-x-android' github.repository == 'vector-im/element-x-android'
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: actions/add-to-project@main
with: with:
headers: '{"GraphQL-Features": "projects_next_graphql"}' project-url: https://github.com/orgs/vector-im/projects/43
query: | github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) {
item {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
PROJECT_ID: "PVT_kwDOAM0swc4ABTXY"
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
ex_plorers: ex_plorers:
name: Add labelled issues to X-Plorer project name: Add labelled issues to X-Plorer project
@ -35,23 +23,10 @@ jobs:
if: > if: >
contains(github.event.issue.labels.*.name, 'Team: Element X Feature') contains(github.event.issue.labels.*.name, 'Team: Element X Feature')
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: actions/add-to-project@main
id: add_to_project
with: with:
headers: '{"GraphQL-Features": "projects_next_graphql"}' project-url: https://github.com/orgs/vector-im/projects/73
query: | github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) {
item {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
PROJECT_ID: "PVT_kwDOAM0swc4ALoFY"
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
verticals_feature: verticals_feature:
name: Add labelled issues to Verticals Feature project name: Add labelled issues to Verticals Feature project
@ -59,20 +34,18 @@ jobs:
if: > if: >
contains(github.event.issue.labels.*.name, 'Team: Verticals Feature') contains(github.event.issue.labels.*.name, 'Team: Verticals Feature')
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: actions/add-to-project@main
id: add_to_project
with: with:
headers: '{"GraphQL-Features": "projects_next_graphql"}' project-url: https://github.com/orgs/vector-im/projects/57
query: | github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { qa:
item { name: Add labelled issues to QA project
id runs-on: ubuntu-latest
} if: >
} contains(github.event.issue.labels.*.name, 'Team: QA')
} steps:
projectid: ${{ env.PROJECT_ID }} - uses: actions/add-to-project@main
contentid: ${{ github.event.issue.node_id }} with:
env: project-url: https://github.com/orgs/vector-im/projects/69
PROJECT_ID: "PVT_kwDOAM0swc4AHJKW" github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}