-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable automatic labeling of PRs via Actions #3431
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
27c20cd
Automatically label PRs based on the file paths
nrb f6c22f2
Enable prow-like commands
nrb c920dfa
Require filling in the PR template
nrb 0184ebb
Update contributor docs to reference PR template
nrb 1c1b44f
Expand checklist and ask for issue number on PRs
nrb dd952a2
Document why we're not enabling /lgtm yet
nrb d8537e4
Combine PR assignment and labeling workflow
nrb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This workflow automatically labels issues based on the changed filepaths | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we can use the
/lgtm
command, but make it work only if there's either ahas-changelog
(which should be set with the action on this PR) orchangelog-not-required
label on the PR.I think this way, we could retire the confusing changelog CI check that marks a perfectly-fine PR as failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm 😆