diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b0ef1f8..1024502 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,9 +9,11 @@ jobs: check-pr-title: name: Check PR Title runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + env: + TITLE: ${{ gitea.event.pull_request.title }} steps: - run: | - TITLE="${{ gitea.event.pull_request.title }}" if ! echo "$TITLE" | grep -qE '^(WIP: )?(feat|fix|docs|chore|ci|test|refactor|perf|build|style|revert)(\(.+\))?(!)?: .+'; then echo "::error::Pull Request title must follow conventional commits" exit 1