From 330b80f9678b36baa9aca6c6bf13ecf3b66cd4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Mind=C3=AAllo=20de=20Andrade?= Date: Fri, 5 Jul 2024 07:33:53 -0300 Subject: [PATCH] chore: check PR conventional commit name (#201) ## Summary by CodeRabbit - **Chores** - Introduced a GitHub Actions workflow to validate pull request titles. - Added a commit linting job to the existing Python build workflow. --- .github/workflows/pr.yml | 17 +++++++++++++++++ .github/workflows/python-build.yml | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..b4c2c6d3 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,17 @@ +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.MIDEA_GITHUB_PAT }} diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 94ff92bc..42c2a2ec 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -7,7 +7,15 @@ on: branches: ["main"] jobs: + commitlint: + name: Lint Commit Messages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: wagoid/commitlint-github-action@v6.0.1 build: + needs: + - commitlint runs-on: ${{ matrix.os }} strategy: matrix: