diff --git a/.github/actions/change-detector/label-draft-pr.yml b/.github/actions/change-detector/label-draft-pr.yml deleted file mode 100644 index 01d09225b6c80..0000000000000 --- a/.github/actions/change-detector/label-draft-pr.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Label Draft PRs -on: - pull_request: - types: - - opened - - converted_to_draft -jobs: - label-draft: - runs-on: ubuntu-latest - steps: - - name: Check if the PR is a draft - id: check-draft - uses: actions/github-script@v6 - with: - script: | - const isDraft = context.payload.pull_request.draft; - core.setOutput('isDraft', isDraft); - - name: Add `review:draft` Label - if: steps.check-draft.outputs.isDraft == 'true' - uses: actions-ecosystem/action-add-labels@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - labels: "review:draft" diff --git a/.github/labeler.yml b/.github/labeler.yml index 291516e11b501..6020d93c3936d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -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 diff --git a/.github/workflows/label-draft-pr.yml b/.github/workflows/label-draft-pr.yml new file mode 100644 index 0000000000000..f9e824de6094b --- /dev/null +++ b/.github/workflows/label-draft-pr.yml @@ -0,0 +1,18 @@ +name: Label Draft PRs +on: + pull_request_target: + types: + - opened + - converted_to_draft + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-24.04 + steps: + - name: Apply Draft Label + uses: actions/labeler@v5 + with: + sync-labels: true