diff options
author | Jake Potrebic <[email protected]> | 2023-04-06 14:19:06 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-04-06 14:19:06 -0700 |
commit | dab4864a11b9abbe5620414c0f0051be1d1ef7e5 (patch) | |
tree | 367e25a965860eae67aa31b8a976ecf7258cf05d /.github | |
parent | 9b77660f070a0ea2c0d82293d731ff19f60e9787 (diff) | |
download | Paper-dab4864a11b9abbe5620414c0f0051be1d1ef7e5.tar.gz Paper-dab4864a11b9abbe5620414c0f0051be1d1ef7e5.zip |
[ci skip] add workflow for auto-managing issue board (#8958)
* add workflow for auto-managing issue board
* make concurrency depend on the issue number
* generate token in the action
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/projects.yml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/.github/workflows/projects.yml b/.github/workflows/projects.yml new file mode 100644 index 0000000000..5d5ae55636 --- /dev/null +++ b/.github/workflows/projects.yml @@ -0,0 +1,72 @@ +name: Update Projects + +on: + issues: + types: + - labeled + - unlabeled + - closed + - reopened + +jobs: + bugs: + if: "github.event_name == 'issues' && contains(github.event.*.labels.*.name, 'type: bug')" + concurrency: + group: update-bugs-project-${{ github.event.issue.number }} + cancel-in-progress: true + runs-on: ubuntu-latest + steps: + - name: "authenticate" + id: "authenticate" + uses: "tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92" # v1 + with: + app_id: "${{ secrets.PROJECTS_APP_ID }}" + installation_id: "36153445" + private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}" + + - uses: PaperMC/[email protected] + name: Update open issue + if: github.event.issue.state == 'open' + with: + github-token: "${{ steps.authenticate.outputs.token }}" + project-url: https://github.com/orgs/PaperMC/projects/5/views/2 + column-field: Status + label-to-column-map: | + { + "status: needs triage": "🕑 Needs Triage", + "status: accepted": "✅ Accepted", + "status: in progress": "Needs Work", + "status: rebase required": "Needs Work", + "status: blocked": "Needs Work", + "status: defer upstream": "Needs Work", + "status: input wanted": "Needs Work", + "status: waiting on reporter": "⌛ Waiting for Reporter", + "resolution: works-as-intended": "Invalid", + "resolution: invalid": "Invalid", + "resolution: wontfix": "Invalid", + "resolution: duplicate": "Invalid", + "resolution: cannot reproduce": "Invalid", + "resolution: unsupported": "Invalid", + "resolution: incomplete": "Invalid", + "resolution: superseded": "Invalid" + } + + - uses: PaperMC/[email protected] + name: Update closed issue + if: github.event.issue.state == 'closed' + with: + github-token: "${{ steps.authenticate.outputs.token }}" + project-url: https://github.com/orgs/PaperMC/projects/5/views/2 + column-field: Status + clear-on-no-match: false + label-to-column-map: | + { + "resolution: works-as-intended": "Invalid", + "resolution: invalid": "Invalid", + "resolution: wontfix": "Invalid", + "resolution: duplicate": "Invalid", + "resolution: cannot reproduce": "Invalid", + "resolution: unsupported": "Invalid", + "resolution: incomplete": "Invalid", + "resolution: superseded": "Invalid" + } |