mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-17 01:54:21 -05:00
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).
This commit is contained in:
parent
d4fac8a3e2
commit
19a57f4a37
54
.github/workflows/triage_labelled.yml
vendored
54
.github/workflows/triage_labelled.yml
vendored
@ -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"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user