diff --git a/.github/workflows/triage.yaml b/.github/workflows/triage.yaml index 16efc5a859..356ed92447 100644 --- a/.github/workflows/triage.yaml +++ b/.github/workflows/triage.yaml @@ -10,6 +10,7 @@ on: jobs: issues: if: github.repository == 'kanisterio/kanister' && github.event_name == 'issues' + name: Triage New Issue permissions: issues: write runs-on: ubuntu-latest @@ -33,13 +34,15 @@ jobs: 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 + pull-requests-comment: + name: Triage Pull Request + if: github.repository == 'kanisterio/kanister' && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot' permissions: pull-requests: write runs-on: ubuntu-latest steps: - 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' with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -48,6 +51,9 @@ jobs: 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 + # 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