From 90b6ba0a4d42e4a55a4d0717642432f4035cc433 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Thu, 1 Feb 2024 10:59:03 -0700 Subject: [PATCH] chore(actions): getting fancier with labels (#26950) --- .github/dependabot.yml | 29 -------- .github/labeler.yml | 128 ++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 9 +++ 3 files changed, 137 insertions(+), 29 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a166c85a6d..56c5cbe034 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -70,7 +70,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -81,7 +80,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -92,7 +90,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -103,7 +100,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -114,7 +110,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -125,7 +120,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -136,7 +130,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -147,7 +140,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -158,7 +150,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -169,7 +160,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -180,7 +170,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -191,7 +180,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -202,7 +190,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -213,7 +200,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -224,7 +210,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -235,7 +220,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -246,7 +230,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -257,7 +240,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -268,7 +250,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -279,7 +260,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -290,7 +270,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -301,7 +280,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -312,7 +290,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -323,7 +300,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -334,7 +310,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -345,7 +320,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -356,7 +330,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -367,7 +340,6 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase @@ -378,6 +350,5 @@ updates: labels: - npm - dependabot - - plugins open-pull-requests-limit: 5 versioning-strategy: increase diff --git a/.github/labeler.yml b/.github/labeler.yml index 0557e4277a..379311d8fa 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,20 +1,148 @@ +# TODO (if we can) +# - Label PRs in need of codeowner review +# - viz:charts:xyz labels +# – component/design system areas +# - storybook(s) +# - f/e and b/e test changes? +# - product areas (SQL Lab, Explore, Dashboard, etc.) +# - database areas (SQLAlchemy, labelind DBs by driver, etc.) + +############################################ +# General workflow warnings +# full list of labels is here: https://github.com/apache/superset/labels +############################################ + "risk:db-migration": - 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' "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' + +############################################ +# Areas of the main codebase +############################################ "doc": - changed-files: - any-glob-to-any-file: - 'docs/**' + +"api": +- changed-files: + - any-glob-to-any-file: + - 'superset/**/api.py' + - 'superset/views/core.py' + +"i18n": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/**' + +"i18n:brazilian": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/pt_BR/**' + +"i18n:chinese": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/zh/**' + +"i18n:dutch": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/nl/**' + +"i18n:french": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/fr/**' + +"i18n:italian": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/it/**' + +"i18n:japanese": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/ja/**' + +"i18n:korean": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/ko/**' + +"i18n:portuguese": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/pt/**' + +"i18n:russian": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/ru/**' + +"i18n:slovak": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/sk/**' + +"i18n:ukrainian": +- changed-files: + - any-glob-to-any-file: + - 'superset/translations/uk/**' + +"i18n:spanish": +- 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/**' + +"packages": +- changed-files: +- any-glob-to-any-file: + - 'superset-frontend/packages/**' + +"embedded": +- changed-files: +- any-glob-to-any-file: + - 'superset-embedded-sdk/**' + +"github_actions": +- changed-files: +- any-glob-to-any-file: + - '.github/actions/**' + - '.github/workflows/**' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index e57cd86e2b..15a41995d1 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -10,3 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/labeler@v5 + with: + sync-labels: true + + # TODO: run scripts based on labels! + # - id: run-translation-scripts + # if: contains(steps.label-the-PR.outputs.all-labels, 'i18n') + # run: | + # echo "Running translation scripts" + # # Generate .pot -> .po -> .json files