From 3a2f05434034519e16c2c84e853081f096664103 Mon Sep 17 00:00:00 2001 From: Mikhail Golbakh Date: Sun, 11 Aug 2024 16:38:54 +0200 Subject: [PATCH] ci: add verifying pr title (#14) --- .github/workflows/pr-title.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/pr-title.yml diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..5471f7c --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,27 @@ +name: PR Title + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - edited + +jobs: + verify_title: + name: Verify PR Title + runs-on: ubuntu-latest + if: ${{ github.event.action != 'edited' || github.event.changes.title }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - name: Install Packages + run: npm ci + - name: Run Commitlint + run: echo "${{ github.event.pull_request.title }}" | npx --no-install commitlint