diff --git a/.github/labeler.yml b/.github/labeler.yml index de284cfe..00db028f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,20 +1,24 @@ ci/cd: - - ".github/workflows/*" - - ".github/*.yml" + - changed-files: + - any-glob-to-any-file: + - ".github/workflows/*" + - ".github/*.yml" rust: - - "src/*" - - "src/**/*" + - changed-files: + - any-glob-to-any-file: + - "src/*" + - "src/**/*" protobuf: - - "proto/*" - - "proto/**/*" -deploy-prod: - - "master" -deploy-staging: - - "staging" -deploy-dev: - - "dev" + - changed-files: + - any-glob-to-any-file: + - "proto/*" + - "proto/**/*" documentation: - - ".github/ISSUE_TEMPLATE/*" - - "pull_request_template.md" + - changed-files: + - any-glob-to-any-file: + - ".github/ISSUE_TEMPLATE/*" + - "pull_request_template.md" data: - - "*.csv" + - changed-files: + - any-glob-to-any-file: + - "*.csv" diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index f096fb65..3088fd32 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,3 +1,11 @@ +# Head branch (source) patterns feature: feature/* fix: fix/* -chore: chore/* \ No newline at end of file +chore: chore/* +data: data/* +release: release/* + +# Base branch (target) patterns +deploy:production: master +deploy:dev: dev +deploy:staging: staging diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 356bbb91..e92890f4 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -3,12 +3,25 @@ on: - pull_request_target jobs: - triage: + label-by-files: + name: Label by changed files permissions: contents: read pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + + label-by-branch: + name: Label by branch + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr-labeler.yml