Skip to content
Snippets Groups Projects
Unverified Commit 19a57f4a authored by Kat Gerasimova's avatar Kat Gerasimova Committed by GitHub
Browse files

Fix issue automation for Needs-Info (#14343)

Run when an issue is labelled with X-Needs-Info only. Add to triage board.

Use itemId which is output by actions/add-to-project to run the mutation to update the field value (i.e. move to the right column).
parent d4fac8a3
No related branches found
No related tags found
No related merge requests found
...@@ -11,34 +11,34 @@ jobs: ...@@ -11,34 +11,34 @@ jobs:
if: > if: >
contains(github.event.issue.labels.*.name, 'X-Needs-Info') contains(github.event.issue.labels.*.name, 'X-Needs-Info')
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: actions/add-to-project@main
id: add_to_project id: add_project
with: with:
headers: '{"GraphQL-Features": "projects_next_graphql"}' project-url: "https://github.com/orgs/matrix-org/projects/67"
query: | github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
mutation { - name: Set status
updateProjectV2ItemFieldValue( env:
input: { GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
projectId: $projectid run: |
itemId: $contentid gh api graphql -f query='
fieldId: $fieldid mutation(
value: { $project: ID!
singleSelectOptionId: "Todo" $item: ID!
$fieldid: ID!
$columnid: String!
) {
updateProjectV2ItemFieldValue(
input: {
projectId: $project
itemId: $item
fieldId: $fieldid
value: {
singleSelectOptionId: $columnid
} }
} }
) { ) {
projectV2Item { projectV2Item {
id id
}
} }
} }
}' -f project="PVT_kwDOAIB0Bs4AFDdZ" -f item=${{ steps.add_project.outputs.itemId }} -f fieldid="PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4" -f columnid=ba22e43c --silent
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
fieldid: ${{ env.FIELD_ID }}
optionid: ${{ env.OPTION_ID }}
env:
PROJECT_ID: "PVT_kwDOAIB0Bs4AFDdZ"
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
FIELD_ID: "PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4"
OPTION_ID: "ba22e43c"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment