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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ on:
branches: [master, main]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Install commitlint
run: |
npm install --save-dev @commitlint/config-conventional @commitlint/cli

- name: Validate PR title
run: |
echo "${{ github.event.pull_request.title }}" | npx commitlint

- name: Validate commits
if: github.event.pull_request.commits > 1
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit ${1}
Empty file added .husky/pre-commit
Empty file.
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ Problem definition → small, safe change → change review → refactor — rep
- ✅ `fix: resolve memory leak in user service`
- ✅ `feat(auth): add OAuth2 integration`
- ❌ `Fix: Some Message.` (wrong case, ends with period)
- ❌ `random: some change` (invalid type)
- ❌ `random: some change` (invalid type)
86 changes: 86 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing to Vercel Action

We welcome contributions to the Vercel Action project! This document provides guidelines and standards for contributing.

## Development Setup

1. Fork and clone the repository
2. Install dependencies: `pnpm install`
3. Run tests: `npm test`
4. Run linter: `npm run lint`

## Commit Message Guidelines

We use [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. This leads to more readable messages and enables automatic generation of the changelog.

### Commit Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

### Type

Must be one of the following:

- **build**: Changes that affect the build system or external dependencies
- **chore**: Other changes that don't modify src or test files
- **ci**: Changes to our CI configuration files and scripts
- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **revert**: Reverts a previous commit
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- **test**: Adding missing tests or correcting existing tests

### Examples

```bash
# Feature with scope
feat(auth): add OAuth2 integration

# Bug fix
fix: resolve memory leak in deployment process

# Breaking change
feat: update to Vercel CLI v30

BREAKING CHANGE: Minimum Node.js version is now 18
```

### Commitlint

This repository uses [commitlint](https://commitlint.js.org/) to ensure all commit messages follow our convention. The commit-msg hook will automatically validate your commit messages.

If your commit is rejected, please review the message format and ensure it follows the convention above.

## Pull Request Process

1. Ensure your PR title follows the Conventional Commits format
2. Update the README.md with details of changes if needed
3. Ensure all tests pass and linting is clean
4. Request review from maintainers

## Code Style

- We use ESLint with the Antfu config for code formatting and linting
- Run `npm run lint` to check your code
- Run `npm run lint:fix` to automatically fix issues

## Testing

- Write tests for new features
- Ensure existing tests pass
- Run `npm test` before submitting PR

## Questions?

Feel free to open an issue for any questions about contributing!
1 change: 1 addition & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-conventional'] }
Loading
Loading