Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/labeler.yml
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/**'
Comment on lines +32 to +34

Copy link
Copy Markdown
Member

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?

Suggested change
- 'bundle/**'
- 'cmd/bundle/**'
- 'acceptance/bundle/**'
- '.nextchanges/bundles/*'
- 'bundle/**'
- 'cmd/bundle/**'
- 'acceptance/bundle/**'

34 changes: 34 additions & 0 deletions .github/workflows/labeler.yml
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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

Loading