diff --git a/.github/workflows/triage-issues.yaml b/.github/workflows/triage-issues.yaml new file mode 100644 index 0000000000..ae4a4d4be6 --- /dev/null +++ b/.github/workflows/triage-issues.yaml @@ -0,0 +1,41 @@ +name: Triage Issues + +on: + issues: + types: + - opened + - reopened + +jobs: + triage: + if: github.repository == 'kanisterio/kanister' + name: Triage + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - + name: Add label + uses: actions-ecosystem/action-add-labels@v1.1.3 + with: + labels: "triage" + github_token: ${{ secrets.GITHUB_TOKEN }} + - + name: Add comment + uses: actions-ecosystem/action-create-comment@v1.0.2 + if: github.event.action == 'opened' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + body: | + Thanks for opening this issue :+1:. The team will review it shortly. + + If this is a bug report, make sure to include clear instructions how on to reproduce the problem with [minimal reproducible examples](https://stackoverflow.com/help/minimal-reproducible-example), where possible. If this is a security report, please review our security policy as outlined in [SECURITY.md](https://github.com/kanisterio/kanister/blob/master/SECURITY.md). + + If you haven't already, please take a moment to review our project's [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document. + - + name: Update project + uses: alex-page/github-project-automation-plus@v0.8.3 + with: + repo-token: ${{ secrets.GH_TOKEN }} # must use a PAT here + project: Kanister + column: To Be Triaged diff --git a/.github/workflows/triage-prs.yaml b/.github/workflows/triage-prs.yaml new file mode 100644 index 0000000000..18c21e83e8 --- /dev/null +++ b/.github/workflows/triage-prs.yaml @@ -0,0 +1,40 @@ +name: Triage + +on: + pull_request: + types: + - opened + - reopened + +permissions: + contents: read + +jobs: + pull-requests-comment: + name: Comment and Triage + if: github.repository == 'kanisterio/kanister' && github.actor != 'dependabot' + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - + name: Comment + uses: actions-ecosystem/action-create-comment@v1.0.2 + # Avoid adding a comment when the PR is on the same repo. + if: github.event.action == 'opened' && github.event.pull_request.head.repo.fork + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + body: | + Thanks for submitting this pull request :tada:. The team will review it soon and get back to you. + + If you haven't already, please take a moment to review our project [contributing guideline](https://github.com/kanisterio/kanister/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document. + - + name: Update status in project + uses: alex-page/github-project-automation-plus@v0.8.3 + # This only works for PRs opened in the same repo and not by dependabot. + # Other PRs don't get the necessary credentials. + if: github.repository == 'kanisterio/kanister' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot' + with: + repo-token: ${{ secrets.GH_TOKEN }} + project: Kanister + column: In Progress diff --git a/.github/workflows/triage.yaml b/.github/workflows/triage.yaml deleted file mode 100644 index 16efc5a859..0000000000 --- a/.github/workflows/triage.yaml +++ /dev/null @@ -1,54 +0,0 @@ -on: - issues: - types: - - opened - - reopened - pull_request: - types: - - opened - - reopened -jobs: - issues: - if: github.repository == 'kanisterio/kanister' && github.event_name == 'issues' - permissions: - issues: write - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-add-labels@v1.1.3 - with: - labels: "triage" - github_token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions-ecosystem/action-create-comment@v1.0.2 - if: github.event.action == 'opened' - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - body: | - Thanks for opening this issue :+1:. The team will review it shortly. - - If this is a bug report, make sure to include clear instructions how on to reproduce the problem with [minimal reproducible examples](https://stackoverflow.com/help/minimal-reproducible-example), where possible. If this is a security report, please review our security policy as outlined in [SECURITY.md](https://github.com/kanisterio/kanister/blob/master/SECURITY.md). - - If you haven't already, please take a moment to review our project's [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document. - - uses: alex-page/github-project-automation-plus@v0.8.3 - with: - repo-token: ${{ secrets.GH_TOKEN }} # must use a PAT here - project: Kanister - column: To Be Triaged - pull-requests: - if: github.repository == 'kanisterio/kanister' && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork - permissions: - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-create-comment@v1.0.2 - if: github.event.action == 'opened' - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - body: | - Thanks for submitting this pull request :tada:. The team will review it soon and get back to you. - - If you haven't already, please take a moment to review our project [contributing guideline](https://github.com/kanisterio/kanister/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document. - - uses: alex-page/github-project-automation-plus@v0.8.3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - project: Kanister - column: In Progress