mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-11 18:46:41 +00:00
Enable automatic labeling of PRs via Actions (#3431)
* Automatically label PRs based on the file paths Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Enable prow-like commands Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Require filling in the PR template Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Update contributor docs to reference PR template Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Expand checklist and ask for issue number on PRs Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Document why we're not enabling /lgtm yet Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Combine PR assignment and labeling workflow Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
@@ -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/auto-assign-action@v1.1.1
|
||||
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
|
||||
|
||||
@@ -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 }}"
|
||||
Reference in New Issue
Block a user