From 1b8424ca7e1f7095c721629d26efeb03414205cc Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:00:36 +0000 Subject: [PATCH] refactor(pr-title): Get commit types from commitlint configuration --- .github/workflows/pr-title.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-title.yaml b/.github/workflows/pr-title.yaml index 3313886..a91186a 100644 --- a/.github/workflows/pr-title.yaml +++ b/.github/workflows/pr-title.yaml @@ -70,14 +70,19 @@ jobs: - name: Checkout repository uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - name: Get commitlint scopes from configuration file - id: commit_scope + - name: Get attributes from commitlint configuration file + id: commitlint run: | { echo 'COMMIT_SCOPES<> "$GITHUB_ENV" + { + echo 'COMMIT_TYPES<> "$GITHUB_ENV" - name: Validate PR title conforms to conventional spec id: validate-pr-title @@ -87,6 +92,8 @@ jobs: # https://github.com/amannn/action-semantic-pull-request/issues/248 uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 with: + types: | + ${{ env.COMMIT_TYPES }} requireScope: true scopes: | ${{ env.COMMIT_SCOPES }}