feat: configuring an extensible PR auto-labeler (#26880)

This commit is contained in:
Maxime Beauchemin 2024-01-30 09:26:34 -08:00 committed by GitHub
parent 7e3d01d0f4
commit f4473afccd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 25 deletions

20
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,20 @@
"risk:db-migration":
- changed-files:
- any-glob-to-any-file:
- 'superset/migrations/**'
"dependencies:python":
- changed-files:
- any-glob-to-any-file:
- 'superset/requirements/**'
"dependencies:npm":
- changed-files:
- any-glob-to-any-file:
- 'superset-frontend/package.json'
- 'superset-frontend/package-lock.json'
"doc":
- changed-files:
- any-glob-to-any-file:
- 'docs/**'

View File

@ -1,25 +0,0 @@
name: Label Migration PR
on:
pull_request:
paths:
- 'superset/migrations/**'
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Add label
uses: actions/github-script@v3
with:
github-token: ${{github.token}}
script: |
github.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['risk:db-migration']
})

12
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on:
- pull_request
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5

View File

@ -14,6 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import logging
import urllib.parse
from logging.config import fileConfig