Skip to content
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint PR

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
- labeled
- unlabeled

jobs:
validate-pr-title:
name: Validate PR title (Conventional Commits)
runs-on: ubuntu-latest
permissions:
statuses: write
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
test
chore
ci
build
perf
revert
requireScope: false
# Allow skipping this check with a label (e.g. for automated/bot PRs)
ignoreLabels: |
skip-conventional-commit-check
35 changes: 18 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,29 @@ To set up your development environment for Agentex, please refer to the [README.

---

## Best Practices for Writing Commit Messages

- **Separate subject from body with a blank line**.
- **Limit the subject line to 50 characters**.
- **Capitalize the subject line**.
- **Do not end the subject line with a period**.
- **Use the imperative mood in the subject line**
(e.g., “Fix bug” not “Fixed bug” or “Fixes bug”).
- **Wrap the body at 72 characters**.
- **Use the body to explain what and why vs. how** (if needed).
- **Reference relevant issues/PRs** (e.g., `Fixes #123`).
## Commit and PR Title Guidelines

**Example:**
```
Add user authentication middleware
This project enforces [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) on PR titles. A CI check will validate your PR title before it can be merged.

This middleware intercepts requests to check authentication tokens
and ensures only valid users can access protected routes.
**Format:** `type: description` or `type(scope): description`

Fixes #42
**Allowed types:** `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`, `build`, `perf`, `revert`

**Examples:**
```
feat: add user authentication middleware
fix(api): handle empty request body gracefully
docs: update contributing guidelines
chore: bump dependency versions
```

### General commit message best practices

- **Use the imperative mood** (e.g., “Add feature” not “Added feature”).
- **Keep the subject line under 72 characters**.
- **Use the body to explain what and why vs. how** (if needed).
- **Reference relevant issues/PRs** (e.g., `Fixes #123`).

For more, see: [Chris Beams' guide to writing great commit messages](https://cbea.ms/git-commit/).

---
Expand Down
Loading