Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
ci: do not show an error if branch contains one commit only (#130)
Browse files Browse the repository at this point in the history
... as we squash all commits and use the PR as commit message it makes
no sense to check for single commits in a branch and report an error.
Would be true only if the PR content wouldn't be used as commit message.
GitHub uses the original commit message which might differ from the PR
title.
  • Loading branch information
kayman-mk authored Dec 7, 2023
1 parent 2c8dbba commit 9827e5d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 61 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/pull-request-lint.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: "Pull Request"

# yamllint disable-line rule:truthy
on:
pull_request_target:
types:
- opened
- edited
- synchronize
branches-ignore:
- "release-please--branches--*"

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
# yamllint disable-line rule:comments
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
# Configure which scopes are allowed.
# deps - dependency updates
# main - for release-please (scope used for releases)
scopes: |
deps
main
requireScope: false
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.
wip: true
validateSingleCommit: false
validateSingleCommitMatchesPrTitle: false

0 comments on commit 9827e5d

Please sign in to comment.