mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-12-19 05:19:42 +08:00
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The conventional commit check occurs to all PRs even for releases. Release PRs do not follow the same structure and causes a block when trying to merge them. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - `release` label has been marked as an `ignoreLabel`, this will let the conventional commit know that the PR has been marked to skip validation. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> N/A
33 lines
1.4 KiB
YAML
33 lines
1.4 KiB
YAML
name: PR Conventional Commit Validation
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, edited]
|
|
|
|
jobs:
|
|
validate-pr-title:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Validate PR title
|
|
uses: amannn/action-semantic-pull-request@v5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
# Configure that a scope must always be provided.
|
|
requireScope: true
|
|
# Configure additional validation for the subject based on a regex.
|
|
# This example ensures the subject doesn't start with an uppercase character.
|
|
subjectPattern: ^(?![A-Z]).+$
|
|
# If `subjectPattern` is configured, you can use this property to
|
|
# override the default error message that is shown when the pattern
|
|
# doesn't match. The variables `subject` and `title` can be used
|
|
# within the message.
|
|
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.
|
|
# If the PR contains one of these newline-delimited labels, the
|
|
# validation is skipped. If you want to rerun the validation when
|
|
# labels change, you might want to use the `labeled` and `unlabeled`
|
|
# event triggers in your workflow.
|
|
ignoreLabels: |
|
|
release
|