mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-01 05:37:27 +00:00
chore: auto-label kind/changelog-not-required for non-shipping PRs; add copilot-instructions.md
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
This commit is contained in:
co-authored by
kaovilai
parent
6215e115c6
commit
cba5a41ef7
@@ -0,0 +1,39 @@
|
||||
# GitHub Copilot instructions for velero-io/velero
|
||||
|
||||
## Changelog requirement
|
||||
|
||||
Velero uses per-PR changelog fragments (created via `make new-changelog`) that are
|
||||
assembled into release notes. A changelog entry is **not** required when a PR
|
||||
exclusively changes non-shipping content, i.e. the only files touched belong to
|
||||
one or more of these categories:
|
||||
|
||||
| Category | Paths |
|
||||
|---|---|
|
||||
| GitHub Actions / CI workflows | `.github/**` |
|
||||
| Documentation | `site/content/docs/**`, `site/**`, `docs/**`, `*.md` |
|
||||
| Website (non-docs) | `site/**` (excluding `site/content/docs/**`) |
|
||||
|
||||
When you open or review a PR that falls into one of the above categories (and does
|
||||
**not** modify `pkg/`, `internal/`, `cmd/`, `vendor/`, `hack/`, `go.mod`, or
|
||||
`go.sum`), apply the label **`kind/changelog-not-required`** instead of requesting
|
||||
a changelog entry. The `labeler.yml` auto-labeler handles this automatically for
|
||||
most cases; apply the label manually if the auto-labeler did not.
|
||||
|
||||
## Backport / cherry-pick workflow
|
||||
|
||||
Velero uses `.github/workflows/backport.yml` to automate cherry-picks onto release
|
||||
branches.
|
||||
|
||||
- **Before merge:** comment `/backport release-1.17` (or `/cherrypick release-1.17`)
|
||||
to add the label `backport release-1.17` to the PR. Multiple branches can be
|
||||
space-delimited: `/backport release-1.17 release-1.18`. The label causes the
|
||||
backport to run automatically when the PR merges.
|
||||
- **After merge:** the same comment immediately creates the backport PR.
|
||||
- Only repository **owners, members, and collaborators** may trigger these commands.
|
||||
|
||||
## General coding guidelines
|
||||
|
||||
- Follow the existing code style of the file being edited.
|
||||
- Add unit tests for new exported functions in `pkg/`.
|
||||
- Do not commit secrets, credentials, or API tokens.
|
||||
- Keep PRs focused; prefer small, reviewable changes over large omnibus PRs.
|
||||
@@ -31,3 +31,23 @@ has-e2e-2tests:
|
||||
has-unit-tests:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: pkg/**/*_test.go
|
||||
# PRs that only touch non-shipping files (.github/ config, workflows, or docs)
|
||||
# do not need a changelog entry; auto-apply the label so the changelog check passes.
|
||||
kind/changelog-not-required:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- .github/**/*
|
||||
- site/content/docs/**/*
|
||||
- site/**/*
|
||||
- '*.md'
|
||||
- docs/**/*
|
||||
- all-globs-to-all-files:
|
||||
- '!pkg/**'
|
||||
- '!internal/**'
|
||||
- '!cmd/**'
|
||||
- '!vendor/**'
|
||||
- '!hack/**'
|
||||
- '!Makefile'
|
||||
- '!go.mod'
|
||||
- '!go.sum'
|
||||
|
||||
Reference in New Issue
Block a user