-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(infra): cleanup triage workflows (#2222)
* chore(ci): improve triage workflow - Prevent funning the triage PR workflow for dependabot submitted PRs. This is failing because the required credential is not available for that workflow on dependabot submitted PRs. - Add names to jobs. * Comment only on PRs submitted from other repos * split triage into separate workflows for issues and PRs * remove redundant condition check * add default scoped permissions for the workflow * fix names in Triage PR workflow * fix names in triage issues workflow
- Loading branch information
1 parent
6d0264e
commit bf03057
Showing
3 changed files
with
81 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.