diff --git a/.github/workflows/conventional_commit_pr.yml b/.github/workflows/conventional_commit_pr.yml new file mode 100644 index 00000000..517d199f --- /dev/null +++ b/.github/workflows/conventional_commit_pr.yml @@ -0,0 +1,19 @@ +name: Conventional commit PR + +on: [pull_request] + +jobs: + cog_check_job: + runs-on: ubuntu-latest + name: check conventional commit compliance + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + # pick the pr HEAD instead of the merge commit + ref: ${{ github.event.pull_request.head.sha }} + + - name: Conventional commit check + uses: cocogitto/cocogitto-action@v3 + with: + check-latest-tag-only: true diff --git a/.github/workflows/conventional_commit_pr_title.yml b/.github/workflows/conventional_commit_pr_title.yml new file mode 100644 index 00000000..b06f470a --- /dev/null +++ b/.github/workflows/conventional_commit_pr_title.yml @@ -0,0 +1,21 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - 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 }}