Fair Supply LogoFair Supply - Docs

Pull Requests

Guidelines for creating pull requests in the platform repository.

Branch Naming

Use conventional prefixes for branch names:

PrefixPurpose
feat/New features
fix/Bug fixes
docs/Documentation changes
refactor/Code refactoring
perf/Performance improvements
test/Test additions or fixes

Example: feat/user-authentication, fix/login-redirect

Commit Messages

Use Conventional Commits format:

type(scope): description

[optional body]

Types:

  • feat - New feature
  • fix - Bug fix
  • docs - Documentation only
  • refactor - Code change that neither fixes a bug nor adds a feature
  • perf - Performance improvement
  • test - Adding or updating tests
  • chore - Maintenance tasks

Examples:

feat(auth): add SSO login support
fix(dashboard): correct date formatting in reports
docs(api): update endpoint documentation
refactor(users): simplify validation logic

Creating a PR

Using Claude Code

Run the /pull-request command:

# Create a PR with auto-detected title and labels
/pull-request

# Create a draft PR
/pull-request draft

# Create a PR with a specific title
/pull-request feat: add user dashboard

The command will:

  1. Push your branch to origin if not already pushed
  2. Derive title from commit messages (conventional commit format)
  3. Auto-assign you as the assignee
  4. Auto-detect labels based on commit types
  5. Fill out the PR template

Manual Creation

# Push branch
git push -u origin HEAD

# Create PR
gh pr create --title "feat: your feature" --body "..."

PR Template

Every PR should include:

SectionPurpose
WhyLink to issue or explain motivation
WhatWhat the PR does
Breaking ChangesAPI changes, migrations, env vars (if any)
ChecklistSelf-review, testing, type checks

Auto-detected Labels

PRs are automatically labeled based on commit types:

Commit TypeGitHub Label
featenhancement
fixbug
docsdocumentation
refactorrefactor
perfperformance
testtesting

Best Practices

  • Keep PRs small - One feature, one fix, one refactor
  • Write clear descriptions - Explain what and why, not just how
  • Self-review first - Check the diff before requesting review
  • Link related issues - Use "Closes #123" or "Fixes #456"
  • Request specific reviewers - Tag people familiar with the code area