diff --git a/.github/workflows/pr-labeler-kind.yaml b/.github/workflows/pr-labeler-kind.yaml deleted file mode 100644 index f6af322006..0000000000 --- a/.github/workflows/pr-labeler-kind.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: PR Labeler -on: -- pull_request_target - -jobs: - pr-labeler: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/config/labeler.yml - - name: Label PR based on branch name - uses: actions/labeler@v5 - with: - configuration-path: .github/config/labeler.yml \ No newline at end of file diff --git a/.github/workflows/pr-labeler-size.yml b/.github/workflows/pr-labeler.yaml similarity index 52% rename from .github/workflows/pr-labeler-size.yml rename to .github/workflows/pr-labeler.yaml index af2f0a763c..7f9806f62c 100644 --- a/.github/workflows/pr-labeler-size.yml +++ b/.github/workflows/pr-labeler.yaml @@ -1,13 +1,27 @@ -name: labeler - -on: [pull_request] +name: PR Labeler +on: +- pull_request_target permissions: pull-requests: write issues: write - + jobs: - labeler: + branch-name-labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/config/labeler.yml + - name: Label PR based on branch name + uses: actions/labeler@v5 + with: + configuration-path: .github/config/labeler.yml + size-labeler: runs-on: ubuntu-latest name: Label the PR size permissions: @@ -33,3 +47,12 @@ jobs: Note this PR might be rejected due to its size. # github_api_url: 'api.github.com' # files_to_ignore: '' + check_labels: + needs: [branch-name-labeler, size-labeler] + name: Check labels + runs-on: ubuntu-latest + steps: + - uses: docker://agilepathway/pull-request-label-checker:latest + with: + one_of: hore,fix,bugfix,bug,kind/bug,feature,enhancement,kind/enhancement,dependencies + repo_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file