|
| 1 | +# Contributing to Vercel Action |
| 2 | + |
| 3 | +We welcome contributions to the Vercel Action project! This document provides guidelines and standards for contributing. |
| 4 | + |
| 5 | +## Development Setup |
| 6 | + |
| 7 | +1. Fork and clone the repository |
| 8 | +2. Install dependencies: `npm install` |
| 9 | +3. Run tests: `npm test` |
| 10 | +4. Run linter: `npm run lint` |
| 11 | + |
| 12 | +## Commit Message Guidelines |
| 13 | + |
| 14 | +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. |
| 15 | + |
| 16 | +### Commit Message Format |
| 17 | + |
| 18 | +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**: |
| 19 | + |
| 20 | +``` |
| 21 | +<type>[optional scope]: <description> |
| 22 | +
|
| 23 | +[optional body] |
| 24 | +
|
| 25 | +[optional footer(s)] |
| 26 | +``` |
| 27 | + |
| 28 | +### Type |
| 29 | + |
| 30 | +Must be one of the following: |
| 31 | + |
| 32 | +- **build**: Changes that affect the build system or external dependencies |
| 33 | +- **chore**: Other changes that don't modify src or test files |
| 34 | +- **ci**: Changes to our CI configuration files and scripts |
| 35 | +- **docs**: Documentation only changes |
| 36 | +- **feat**: A new feature |
| 37 | +- **fix**: A bug fix |
| 38 | +- **perf**: A code change that improves performance |
| 39 | +- **refactor**: A code change that neither fixes a bug nor adds a feature |
| 40 | +- **revert**: Reverts a previous commit |
| 41 | +- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc) |
| 42 | +- **test**: Adding missing tests or correcting existing tests |
| 43 | + |
| 44 | +### Examples |
| 45 | + |
| 46 | +```bash |
| 47 | +# Feature with scope |
| 48 | +feat(auth): add OAuth2 integration |
| 49 | + |
| 50 | +# Bug fix |
| 51 | +fix: resolve memory leak in deployment process |
| 52 | + |
| 53 | +# Breaking change |
| 54 | +feat: update to Vercel CLI v30 |
| 55 | + |
| 56 | +BREAKING CHANGE: Minimum Node.js version is now 18 |
| 57 | +``` |
| 58 | + |
| 59 | +### Commitlint |
| 60 | + |
| 61 | +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. |
| 62 | + |
| 63 | +If your commit is rejected, please review the message format and ensure it follows the convention above. |
| 64 | + |
| 65 | +## Pull Request Process |
| 66 | + |
| 67 | +1. Ensure your PR title follows the Conventional Commits format |
| 68 | +2. Update the README.md with details of changes if needed |
| 69 | +3. Ensure all tests pass and linting is clean |
| 70 | +4. Request review from maintainers |
| 71 | + |
| 72 | +## Code Style |
| 73 | + |
| 74 | +- We use ESLint with the Antfu config for code formatting and linting |
| 75 | +- Run `npm run lint` to check your code |
| 76 | +- Run `npm run lint:fix` to automatically fix issues |
| 77 | + |
| 78 | +## Testing |
| 79 | + |
| 80 | +- Write tests for new features |
| 81 | +- Ensure existing tests pass |
| 82 | +- Run `npm test` before submitting PR |
| 83 | + |
| 84 | +## Questions? |
| 85 | + |
| 86 | +Feel free to open an issue for any questions about contributing! |
0 commit comments