Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow upper case in commit-style #447

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
RobPasMue marked this conversation as resolved.
Show resolved Hide resolved