Skip to content

Latest commit

 

History

History
142 lines (105 loc) · 3.18 KB

File metadata and controls

142 lines (105 loc) · 3.18 KB

Contributing to wt

Development Workflow

For External Contributors (Fork-based workflow)

If you don't have write access to the repository:

  1. Fork the repository on GitHub

  2. Clone your fork:

    git clone https://github.com/YOUR-USERNAME/wt.git
    cd wt
  3. Create a feature branch:

    git checkout -b feature/your-feature-name
  4. Make your changes and commit:

    git add .
    git commit -m "feat: your feature description"
  5. Push to your fork:

    git push -u origin feature/your-feature-name
  6. Create a Pull Request from your fork to timvw/wt:main

  7. Wait for CI to pass and respond to any review feedback

For Maintainers (Branch-based workflow)

If you have write access to the repository:

  1. Create a feature branch:

    git checkout -b feature/your-feature-name
  2. Make your changes and commit:

    git add .
    git commit -m "feat: your feature description"
  3. Push the branch:

    git push -u origin feature/your-feature-name
  4. Create a Pull Request:

    gh pr create --title "feat: your feature" --body "Description of changes"
  5. Wait for CI to pass - Branch protection requires all checks to pass

  6. Merge the PR when CI is green

Branch Naming Convention

  • feat/description - New features
  • fix/description - Bug fixes
  • docs/description - Documentation changes
  • refactor/description - Code refactoring
  • chore/description - Maintenance tasks

Commit Message Convention

Follow Conventional Commits:

  • feat: add interactive selection for checkout
  • fix: filter out invalid branch names
  • docs: update installation instructions
  • refactor: simplify branch filtering logic
  • chore: update dependencies
  • security: update vulnerable dependency

Running Tests Locally

Before pushing:

# Run tests
go test ./...

# Run linter
golangci-lint run

# Build
go build -o bin/wt .

Branch Protection

The main branch is protected and requires:

  • ✅ All CI checks must pass (Test, Build, Lint, Cross Compile)
  • ✅ Branch must be up to date with main
  • ❌ No direct pushes to main

CI/CD

Continuous Integration

Every push triggers:

  • Tests on Go 1.24 and 1.25 (latest two releases)
  • Linting with golangci-lint
  • Build verification
  • Cross-compilation checks

Release Process

  1. All changes merged to main via PRs
  2. When ready to release:
    git tag v0.1.x
    git push origin v0.1.x
  3. Automated workflow:
    • Builds binaries for all platforms
    • Publishes GitHub release
    • Updates Homebrew tap formula
    • Updates Scoop bucket manifest
    • Submits WinGet package to microsoft/winget-pkgs
    • Publishes AUR package (wt-bin)
    • Creates .deb, .rpm, and .pkg.tar.zst packages

Getting Help