diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 00000000..20f9166f --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,10 @@ +clear-prexisting: true +include-title: true +label-for-breaking-changes: "breaking change" +label-mapping: + bug: ["fix"] + configuration: ["build", "ci"] + documentation: ["docs"] + enhancement: ["feat"] + misc: ["chore", "performance", "refactor", "style"] + test: ["test"] diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml new file mode 100644 index 00000000..aba438dc --- /dev/null +++ b/.github/workflows/lint-pr.yml @@ -0,0 +1,20 @@ +name: "Check PR" + +on: + pull_request: + types: [opened, edited, reopened, labeled, unlabeled] + +jobs: + lint-pr-name: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + label-pr: + runs-on: ubuntu-latest + steps: + - uses: grafana/pr-labeler-action@v0.1.0 + with: + token: ${{ secrets.MIDEA_GITHUB_PAT }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index abc7305f..00000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Lint PR" - -on: - pull_request: - types: [opened, edited, reopened] - -permissions: - pull-requests: read - -jobs: - main: - name: Validate PR title - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}