From 02c624a61731e227edd2e7d5a43d8d79ce696dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Thu, 19 Sep 2024 17:13:57 +0000 Subject: [PATCH] ci: add pull request title linting --- .github/workflows/pull_request.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 278449a2a1d..11ff4fae7d5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -6,10 +6,11 @@ concurrency: on: pull_request_target: - paths-ignore: - - '**/*.md' merge_group: +permissions: + pull-requests: read + jobs: push-comment: name: Create comments ✍️ @@ -23,13 +24,29 @@ jobs: automation: name: Automation 🎛️ - if: ${{ github.repository == 'jellyfin/jellyfin-vue' }} + if: ${{ always() && !cancelled() && github.repository == 'jellyfin/jellyfin-vue' }} uses: ./.github/workflows/__automation.yml secrets: inherit + semantic-commits: + if: ${{ always() && !cancelled() && github.repository == 'jellyfin/jellyfin-vue' }} + runs-on: ubuntu-latest + name: Semantic Pull Request 📚 + steps: + - name: Validate PR title 👌 + uses: amannn/action-semantic-pull-request@v5.5.3 + env: + GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }} + with: + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + The subject "{subject}" found in the pull request title "{title}" + didn't match the configured pattern. Please ensure that the subject + doesn't start with an uppercase character. + label: name: Labeling 🏷️ - if: ${{ always() && github.repository == 'jellyfin/jellyfin-vue'}} + if: ${{ always() && !cancelled() && github.repository == 'jellyfin/jellyfin-vue'}} runs-on: ubuntu-latest steps: