forked from vmware-tanzu/velero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable automatic labeling of PRs via Actions (vmware-tanzu#3431)
* Automatically label PRs based on the file paths Signed-off-by: Nolan Brubaker <[email protected]> * Enable prow-like commands Signed-off-by: Nolan Brubaker <[email protected]> * Require filling in the PR template Signed-off-by: Nolan Brubaker <[email protected]> * Update contributor docs to reference PR template Signed-off-by: Nolan Brubaker <[email protected]> * Expand checklist and ask for issue number on PRs Signed-off-by: Nolan Brubaker <[email protected]> * Document why we're not enabling /lgtm yet Signed-off-by: Nolan Brubaker <[email protected]> * Combine PR assignment and labeling workflow Signed-off-by: Nolan Brubaker <[email protected]>
- Loading branch information
Showing
6 changed files
with
89 additions
and
28 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,13 @@ | ||
Thank you for contributing to Velero! | ||
|
||
# Please add a summary of your change | ||
|
||
# Does your change fix a particular issue? | ||
|
||
Fixes #(issue) | ||
|
||
# Please indicate you've done the following: | ||
|
||
[ ] [Accepted the DCO](https://velero.io/docs/v1.5/code-standards/#dco-sign-off). Commits without the DCO will delay acceptance. | ||
[ ] [Created a changelog file](https://velero.io/docs/v1.5/code-standards/#adding-a-changelog) or added `/kind changelog-not-required`. | ||
[ ] Updated the corresponding documentation in `site/content/docs/main`. |
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 @@ | ||
area: | ||
- "Cloud/AWS" | ||
- "Cloud/GCP" | ||
- "Cloud/Azure" | ||
- "Plugins" | ||
|
||
# Labels that can be applied to PRs with the /kind command | ||
kind: | ||
- "changelog-not-required" | ||
- "Tech debt" | ||
|
||
# Works with https://github.com/actions/labeler/ | ||
# Below this line, the keys are labels to be applied, and the values are the file globs to match against. | ||
# Anything in the `design` directory gets the `Design` label. | ||
Design: | ||
- design/* | ||
|
||
# Anything in the site directory gets the website label *EXCEPT* docs | ||
Website: | ||
- any: ["site/**/*", "!site/content/docs/**/*"] | ||
|
||
Documentation: | ||
- site/content/docs/**/* | ||
|
||
Dependencies: | ||
- go.mod | ||
|
||
# Anything that has plugin infra will be labeled. | ||
# Individual plugins don't necessarily live here, though | ||
Plugins: | ||
- "pkg/plugins/**/*" | ||
|
||
has-unit-tests: | ||
- "pkg/**/*_test.go" | ||
|
||
has-e2e-2tests: | ||
- "test/e2e/**/*" | ||
|
||
has-changelog: | ||
- "changelogs/**" |
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 |
---|---|---|
@@ -1,16 +1,24 @@ | ||
name: 'Auto Assign PR Reviewers' | ||
name: "Auto Assign PR Reviewers" | ||
# pull_request_target means that this will run on pull requests, but in the context of the base repo. | ||
# This should mean PRs from forks are supported. | ||
on: | ||
on: | ||
pull_request_target: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
|
||
|
||
jobs: | ||
jobs: | ||
# Automatically assigns reviewers and owner | ||
add-reviews: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: kentaro-m/[email protected] | ||
with: | ||
with: | ||
configuration-path: ".github/auto_assign.yml" | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
# Automatically labels PRs based on file globs in the change. | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@main | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
configuration-path: .github/labels.yaml |
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,20 @@ | ||
# Adds support for prow-like commands | ||
# Uses .github/labels.yaml to define areas and kinds | ||
name: "Prow github actions" | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
execute: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: jpmcb/prow-github-actions@v1 | ||
with: | ||
# Only support /kind command for now. | ||
# TODO: before allowing the /lgtm command, see if we can block merging if changelog labels are missing. | ||
prow-commands: "/area | ||
/kind | ||
/cc | ||
/uncc" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" |
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
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