Repository navigation
Add a PR auto-labeler workflow #6799
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,34 @@ | ||
| # Configuration for the "PR Labeler" workflow (.github/workflows/labeler.yml). | ||
| # | ||
| # Maps a label to the file globs that, when matched by a PR's diff, cause the | ||
| # label to be applied. Uses the actions/labeler v7 config format, documented at | ||
| # https://github.com/actions/labeler/blob/v7.0.0/README.md | ||
| # | ||
| # To add a new mapping, copy the block below. The label MUST already exist in | ||
| # the repository (labeler does not create labels), and globs use minimatch | ||
| # syntax where `**` matches nested paths: | ||
| # | ||
| # <LABEL>: | ||
| # - changed-files: | ||
| # - any-glob-to-any-file: | ||
| # - 'some/path/**' | ||
| # - 'another/path/**' | ||
|
|
||
| AIR: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| # Current (experimental) location. | ||
| - 'experimental/air/**' | ||
| - 'acceptance/experimental/air/**' | ||
| # Post-graduation location (see #6722): commands move to cmd/air, | ||
| # acceptance tests to acceptance/air. Kept alongside the experimental | ||
| # globs so labeling survives the move. | ||
| - 'cmd/air/**' | ||
| - 'acceptance/air/**' | ||
|
|
||
| DABs: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'bundle/**' | ||
| - 'cmd/bundle/**' | ||
| - 'acceptance/bundle/**' | ||
This file contains hidden or 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,34 @@ | ||
| name: PR Labeler | ||
|
|
||
| # Applies labels to PRs based on the files they touch, using the glob->label | ||
| # mapping in .github/labeler.yml. | ||
| # | ||
| # WARNING: | ||
| # This workflow uses pull_request_target so it can label PRs from forks (the | ||
| # default GITHUB_TOKEN only has write access under pull_request_target, not | ||
| # pull_request). It does NOT check out or execute any code from the PR: the | ||
| # labeler action reads the changed-file list and the config from the base | ||
| # branch via the API only. Do not add a checkout of the PR ref here. | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, reopened, synchronize] | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| label: | ||
| runs-on: | ||
| group: databricks-deco-testing-runner-group | ||
| labels: ubuntu-latest-deco | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| # Only add labels; never remove labels that were applied manually or by other automation. | ||
| sync-labels: false | ||
|
Comment on lines
+33
to
+34
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not remove them if the PR changes scope? e.g. accidentally touches DABs, gets labelled, refactored, keeps DABs |
||
Oops, something went wrong.
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.
nit: in case of changelog-only changes?