Skip to content

Commit

Permalink
feat: allow upper case in commit-style (#447)
Browse files Browse the repository at this point in the history
Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com>
  • Loading branch information
SMoraisAnsys and RobPasMue committed Apr 8, 2024
1 parent f60ce81 commit e5b22f7
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion commit-style/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,48 @@ inputs:
required: true
type: string

# Optional inputs

use-upper-case:
description: >
Use of uppercase letters in the "type" and "scope" fields of the commit.
For example, "FIX(SERVER)!: fix server crash issue" would be a valid commit.
.. note::
Expected type are upper cases of `conventional commit types
<https://github.com/commitizen/conventional-commit-types/blob/master/index.json>`_.
required: false
default: false
type: boolean

runs:
using: "composite"
steps:

- name: "Check pull-request title follows conventional commits style"
if: ${{ (github.event_name == 'pull_request_target') || (github.event_name == 'pull_request') }}
if: ${{ ((github.event_name == 'pull_request_target') || (github.event_name == 'pull_request')) && inputs.use-upper-case == 'false' }}
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ inputs.token }}

- name: "Check pull-request title follows conventional commits style with upper case"
if: ${{ ((github.event_name == 'pull_request_target') || (github.event_name == 'pull_request')) && inputs.use-upper-case == 'true' }}
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ inputs.token }}
with:
types: |
BUILD
CHORE
CI
DOCS
FEAT
FIX
PERF
REFACTOR
REVERT
STYLE
TEST

0 comments on commit e5b22f7

Please sign in to comment.