Skip to content

chore: Update templates #19

chore: Update templates

chore: Update templates #19

name: Lint pull request
on:
pull_request_target:
branches:
- "main"
- "v[0-9]*"
types:
- opened
- edited
- unlabeled
- ready_for_review
concurrency:
group: >-
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
pull-requests: write
jobs:
lint:
runs-on: ubuntu-slim
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: amannn/action-semantic-pull-request@v6.1.1
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
plan
subjectPattern: ^([A-Z]).+$
subjectPatternError: >
The subject "**{subject}**" must start with an uppercase character.
Example: "Add feature" instead of "add feature"
ignoreLabels: |
bot
dependencies
automated
- uses: marocchino/sticky-pull-request-comment@v2.9.4
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
### ⚠️ Invalid Pull Request title
Your PR title must follow the format: `type: Subject` where:
- `type` is one of the conventional commit types (in lowercase)
- `Subject` starts with an uppercase letter
> [!CAUTION]
> ${{ steps.lint_pr_title.outputs.error_message }}
#### Valid examples
- `feat: Add API endpoint for market data`
- `fix: Resolve WebSocket connection issues`
- `plan: Define technical implementation approach`
- `chore: Update NuGet dependencies`
<details>
<summary>see more valid examples</summary>
#### Features & fixes
- `feat: Add API endpoint for market data`
- `fix: Resolve WebSocket connection issues`
#### Planning & architecture
- `plan: Define technical implementation approach`
#### Code quality
- `style: Format trading strategy classes`
- `refactor: Restructure trading engine components`
- `perf: Optimize trade order execution flow`
#### Documentation & testing
- `docs: Update API documentation`
- `test: Add unit tests for sign-in flow`
#### Infrastructure
- `build: Update .NET SDK version to 10.0`
- `ci: Add workflow for performance testing`
- `chore: Update NuGet dependencies`
#### Other
- `revert: Remove faulty market data provider`
See [Conventional Commits](https://www.conventionalcommits.org)
for more details.
</details>
# 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.9.4
with:
header: pr-title-lint-error
delete: true