|
| 1 | +--- |
| 2 | +title: Pull Request Conventions |
| 3 | +--- |
| 4 | + |
| 5 | +# Pull Request Conventions |
| 6 | + |
| 7 | +This page outlines pull request conventions and standards across Cadence repositories. For language-specific tooling, build instructions, and formatting details, refer to the CONTRIBUTING.md file in each repository. |
| 8 | + |
| 9 | +## Pull Request Titles |
| 10 | + |
| 11 | +### Conventional Commits Format |
| 12 | + |
| 13 | +All pull request titles should follow the [Conventional Commits](https://www.conventionalcommits.org/) format: |
| 14 | + |
| 15 | +``` |
| 16 | +<type>(<optional scope>): <description> |
| 17 | +
|
| 18 | +Examples: |
| 19 | +feat(worker): Add batch processing API |
| 20 | +fix(history): Resolve deadlock in workflow execution |
| 21 | +docs: Update getting started guide |
| 22 | +``` |
| 23 | + |
| 24 | +**Types:** |
| 25 | +- **feat**: A new feature |
| 26 | +- **fix**: A bug fix |
| 27 | +- **docs**: Documentation only changes |
| 28 | +- **refactor**: Code change that neither fixes a bug nor adds a feature |
| 29 | +- **test**: Adding or updating tests |
| 30 | +- **chore**: Changes to build process, dependencies, or tools |
| 31 | + |
| 32 | +### PR Title Guidelines |
| 33 | + |
| 34 | +<!-- Source: https://github.com/cadence-workflow/cadence/blob/master/CONTRIBUTING.md#L253-L265 --> |
| 35 | +Follow the [Chris Beams guide](http://chris.beams.io/posts/git-commit/) to writing git commit messages. All PR titles should: |
| 36 | + |
| 37 | +- Start with UPPER case |
| 38 | +- Be specific (avoid generic titles like "bug fixes") |
| 39 | +- Use imperative mood ("Add feature" not "Added feature") |
| 40 | + |
| 41 | +**Examples from Cadence repositories:** |
| 42 | +- [Make sync activity retry multiple times before fetch history from remote](https://github.com/cadence-workflow/cadence/pull/1379) |
| 43 | +- [Enable archival config per domain](https://github.com/cadence-workflow/cadence/pull/1351) |
| 44 | + |
| 45 | +## Signing Commits |
| 46 | + |
| 47 | +The Developer Certificate of Origin (DCO) requires all commits to be signed before they can be merged to Cadence repositories. You can fulfill this requirement using either: |
| 48 | + |
| 49 | +- Signing every commit with `-s`: `git commit -s -m "Your commit message"` |
| 50 | +- Signing each commit with a GPG key |
| 51 | + |
| 52 | +### Setting up GPG key signing |
| 53 | + |
| 54 | +1. [Generate a new GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) |
| 55 | +2. [Add GPG key to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account) |
| 56 | +3. [Tell Git about your signing key](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key) |
| 57 | +4. Enable automatic signing: |
| 58 | + ```bash |
| 59 | + git config --global commit.gpgsign true |
| 60 | + ``` |
0 commit comments