Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "quarterly"
interval: 'quarterly'
groups:
npm-packages:
patterns: [ "*" ]
patterns: ['*']

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "quarterly"
interval: 'quarterly'
groups:
github-action-workflows:
patterns: [ "*" ]
patterns: ['*']
9 changes: 6 additions & 3 deletions .github/workflows/lint-pr-title-preview-ignoreLabels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ jobs:
pull-requests: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn build
node-version: 24
- run: pnpm install
- run: pnpm build
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/lint-pr-title-preview-outputErrorMessage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR title preview (current branch, outputErrorMessage)"
name: 'Lint PR title preview (current branch, outputErrorMessage)'
on:
pull_request:
types:
Expand All @@ -13,11 +13,14 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn build
node-version: 24
- run: pnpm install
- run: pnpm build
- uses: ./
id: lint_pr_title
env:
Expand All @@ -30,17 +33,17 @@ jobs:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.

Details:

```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
with:
header: pr-title-lint-error
delete: true
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ jobs:
pull-requests: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn build
node-version: 24
- run: pnpm install
- run: pnpm build
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/lint-pr-title-preview.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR title preview (current branch)"
name: 'Lint PR title preview (current branch)'
on:
pull_request:
types:
Expand All @@ -13,11 +13,14 @@ jobs:
pull-requests: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn build
node-version: 24
- run: pnpm install
- run: pnpm build
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ jobs:
pull-requests: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn build
- run: yarn semantic-release
node-version: 24
- run: pnpm install
- run: pnpm build
- run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn lint && yarn test
node-version: 24
- run: pnpm install
- run: pnpm lint && pnpm test

dist:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
with:
with:
fetch-depth: 0
- name: Check if `dist/` has been modified.
run: |
Expand Down
24 changes: 15 additions & 9 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {"changelogTitle": "# Changelog"}],
"semantic-release-major-tag",
["@semantic-release/github", {
"failComment": false,
"failTitle": false,
"releasedLabels": false
}],
["@semantic-release/git", {
"assets": ["dist", "CHANGELOG.md"],
"message": "chore: Release ${nextRelease.version} [skip ci]"
}]
[
"@semantic-release/github",
{
"failComment": false,
"failTitle": false,
"releasedLabels": false
}
],
[
"@semantic-release/git",
{
"assets": ["dist", "CHANGELOG.md"],
"message": "chore: Release ${nextRelease.version} [skip ci]"
}
]
]
}
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Used by: [Electron](https://github.com/electron/electron) · [Vite](https://gith
## Examples

**Valid pull request titles:**

- fix: Correct typo
- feat: Add support for Node.js 18
- refactor!: Drop support for Node.js 12
Expand All @@ -20,8 +21,9 @@ See [Conventional Commits](https://www.conventionalcommits.org/) for more exampl

1. If your goal is to create squashed commits that will be used for automated releases, you'll want to configure your GitHub repository to [use the squash & merge strategy](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests) and tick the option "Default to PR title for squash merge commits".
2. [Add the action](https://docs.github.com/en/actions/quickstart) with the following configuration:

```yml
name: "Lint PR"
name: 'Lint PR'

on:
pull_request_target:
Expand All @@ -37,7 +39,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand Down Expand Up @@ -124,7 +126,7 @@ This will prevent the PR title from being validated, and pull request checks wil
**Attention**: If you want to use the this feature, you need to grant the `pull-requests: write` permission to the GitHub Action. This is because the action will update the status of the PR to remain in a pending state while `[WIP]` is present in the PR title.

```yml
name: "Lint PR"
name: 'Lint PR'

permissions:
pull-requests: write
Expand All @@ -136,7 +138,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -145,7 +147,7 @@ jobs:

### Legacy configuration for validating single commits

When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit. As it's easy to commit this by mistake this action supports two configuration options to provide additional validation for this case.
When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit. As it's easy to commit this by mistake this action supports two configuration options to provide additional validation for this case.

```yml
# If the PR only contains a single commit, the action will validate that
Expand Down Expand Up @@ -175,8 +177,8 @@ There are two events that can be used as triggers for this action, each with dif
<details>
<summary>Example</summary>

```yml
name: "Lint PR"
````yml
name: 'Lint PR'

on:
pull_request_target:
Expand All @@ -194,7 +196,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v6
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -207,21 +209,21 @@ jobs:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.

Details:

```
${{ steps.lint_pr_title.outputs.error_message }}
```

# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
with:
header: pr-title-lint-error
delete: true
```
````

</details>
Loading