Skip to content

fix: use unscoped package name for NPM publish #185

fix: use unscoped package name for NPM publish

fix: use unscoped package name for NPM publish #185

Workflow file for this run

name: PR Title Check
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
jobs:
check-title:
name: Validate PR Title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check PR title format
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Configure allowed commit types
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
a11y
security
# Allow scopes (e.g., feat(button): ...)
requireScope: false
# Validate subject case (sentence case)
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.
# Ignore dependabot PRs
ignoreLabels: |
dependencies
automated
# Validate the entire PR title
validateSingleCommit: false
validateSingleCommitMatchesPrTitle: false
- name: Post result comment
if: failure()
uses: actions/github-script@v8
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ **PR Title Check Failed**\n\n' +
'Please format your PR title using the Conventional Commits specification:\n\n' +
'**Format:** `<type>(<scope>): <subject>`\n\n' +
'**Examples:**\n' +
'- `feat: add new prop for autoplay control`\n' +
'- `fix(thumbnail): resolve image loading issue`\n' +
'- `docs: update README with examples`\n\n' +
'**Allowed types:**\n' +
'`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`, `a11y`, `security`'
})