Skip to content

Commit

Permalink
try to use our default labeler.yml to get things to work
Browse files Browse the repository at this point in the history
  • Loading branch information
sadpandajoe committed Jan 10, 2025
1 parent 5604436 commit 9eb4792
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 96 deletions.
170 changes: 88 additions & 82 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,141 +13,147 @@
############################################

"risk:db-migration":
- changed-files:
- any-glob-to-any-file:
- 'superset/migrations/**'
- changed-files:
- any-glob-to-any-file:
- "superset/migrations/**"

############################################
# Dependencies
############################################

"dependencies:python":
- changed-files:
- any-glob-to-any-file:
- 'superset/requirements/**'
- 'superset/translations/requirements.txt'
- 'RELEASING/requirements.txt'
- changed-files:
- any-glob-to-any-file:
- "superset/requirements/**"
- "superset/translations/requirements.txt"
- "RELEASING/requirements.txt"

"dependencies:npm":
- changed-files:
- any-glob-to-any-file:
- 'superset-frontend/package.json'
- 'superset-frontend/package-lock.json'
- 'superset-embedded-sdk/package.json'
- 'superset-embedded-sdk/package-lock.json'
- 'superset-websocket/package.json'
- 'superset-websocket/package-lock.json'
- 'superset-frontend/cypress-base/package.json'
- 'superset-frontend/cypress-base/package-lock.json'
- 'superset-frontend/packages/**/package.json'
- 'superset-frontend/plugins/**/package.json'
- changed-files:
- any-glob-to-any-file:
- "superset-frontend/package.json"
- "superset-frontend/package-lock.json"
- "superset-embedded-sdk/package.json"
- "superset-embedded-sdk/package-lock.json"
- "superset-websocket/package.json"
- "superset-websocket/package-lock.json"
- "superset-frontend/cypress-base/package.json"
- "superset-frontend/cypress-base/package-lock.json"
- "superset-frontend/packages/**/package.json"
- "superset-frontend/plugins/**/package.json"

############################################
# Areas of the main codebase
############################################

"doc":
- changed-files:
- any-glob-to-any-file:
- 'docs/**'
- changed-files:
- any-glob-to-any-file:
- "docs/**"

"api":
- changed-files:
- any-glob-to-any-file:
- 'superset/**/api.py'
- 'superset/views/core.py'
- changed-files:
- any-glob-to-any-file:
- "superset/**/api.py"
- "superset/views/core.py"

"i18n":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/**"

"i18n:brazilian":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/pt_BR/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/pt_BR/**"

"i18n:chinese":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/zh/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/zh/**"

"i18n:traditional-chinese":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/zh_TW/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/zh_TW/**"

"i18n:dutch":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/nl/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/nl/**"

"i18n:french":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/fr/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/fr/**"

"i18n:italian":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/it/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/it/**"

"i18n:japanese":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/ja/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/ja/**"

"i18n:korean":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/ko/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/ko/**"

"i18n:portuguese":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/pt/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/pt/**"

"i18n:russian":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/ru/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/ru/**"

"i18n:slovak":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/sk/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/sk/**"

"i18n:ukrainian":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/uk/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/uk/**"

"i18n:spanish":
- changed-files:
- any-glob-to-any-file:
- 'superset/translations/es/**'
- changed-files:
- any-glob-to-any-file:
- "superset/translations/es/**"

############################################
# Sub-projects and monorepo packages
############################################

"plugins":
- changed-files:
- any-glob-to-any-file:
- 'superset-frontend/plugins/**'
- changed-files:
- any-glob-to-any-file:
- "superset-frontend/plugins/**"

"packages":
- changed-files:
- any-glob-to-any-file:
- 'superset-frontend/packages/**'
- changed-files:
- any-glob-to-any-file:
- "superset-frontend/packages/**"

"embedded":
- changed-files:
- any-glob-to-any-file:
- 'superset-embedded-sdk/**'
- changed-files:
- any-glob-to-any-file:
- "superset-embedded-sdk/**"

"github_actions":
- changed-files:
- any-glob-to-any-file:
- '.github/actions/**'
- '.github/workflows/**'
- changed-files:
- any-glob-to-any-file:
- ".github/actions/**"
- ".github/workflows/**"

############################################
# label draft PRs
############################################
"review:draft":
- draft: true
19 changes: 5 additions & 14 deletions .github/workflows/label-draft-pr.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
name: Label Draft PRs
on:
pull_request:
pull_request_target:
types:
- opened
- converted_to_draft

jobs:
label-draft:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-24.04
steps:
- name: Check and Label Draft PR
uses: actions/github-script@v6
- name: Apply Draft Label
uses: actions/labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
if (context.payload.pull_request.draft) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['review:draft']
});
}
sync-labels: true

0 comments on commit 9eb4792

Please sign in to comment.