triage_labelled.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Move labelled issues to correct projects
  2. on:
  3. issues:
  4. types: [ labeled ]
  5. jobs:
  6. move_needs_info:
  7. name: Move X-Needs-Info on the triage board
  8. runs-on: ubuntu-latest
  9. if: >
  10. contains(github.event.issue.labels.*.name, 'X-Needs-Info')
  11. steps:
  12. - uses: octokit/graphql-action@v2.x
  13. id: add_to_project
  14. with:
  15. headers: '{"GraphQL-Features": "projects_next_graphql"}'
  16. query: |
  17. mutation {
  18. updateProjectV2ItemFieldValue(
  19. input: {
  20. projectId: $projectid
  21. itemId: $contentid
  22. fieldId: $fieldid
  23. value: {
  24. singleSelectOptionId: "Todo"
  25. }
  26. }
  27. ) {
  28. projectV2Item {
  29. id
  30. }
  31. }
  32. }
  33. projectid: ${{ env.PROJECT_ID }}
  34. contentid: ${{ github.event.issue.node_id }}
  35. fieldid: ${{ env.FIELD_ID }}
  36. optionid: ${{ env.OPTION_ID }}
  37. env:
  38. PROJECT_ID: "PVT_kwDOAIB0Bs4AFDdZ"
  39. GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
  40. FIELD_ID: "PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4"
  41. OPTION_ID: "ba22e43c"