Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 2.74 KB

CONTRIBUTING.md

File metadata and controls

95 lines (68 loc) · 2.74 KB

Contributing

We welcome contributes to the project, but please discuss features or significant changes in an issue before starting work on them.

Tools

The following tools are needed to work on this project:

  • Go: The project is written in Go, so you need the Go compiler.
  • Changie: We use Changie to manage the changelog. You'll need this if you make user-facing changes.
  • uv: We use uv to manage Python dependencies for documentation generation. You'll need this to preview changes to the doc/ directory.

Making contributions

Follow the usual GitHub contribution process for making changes with the following notes:

  • Add changelog entries for user-facing changes with changie new. If a change is not user-facing, add a note in the following format to the PR description:

    [skip changelog]: reason why no changelog entry is needed
    
  • If you edit documentation in doc/, install uv and run make serve to preview changes.

  • All commits must include meaningful commit messages.

  • Test new features and bug fixes. If it does not have a test, the bug is not fixed.

  • Verify tests pass before submitting a pull request.

Stacking changes

Unfortunately, it's not possible to submit a stack of pull requests to a repository that you do not have write access to. To work around this, we advise the following workflow to stack changes with git-spice for a contribution:

  1. Set your fork as the upstream remote for git-spice.

    gh repo fork --remote fork
    gs repo init --remote fork
  2. After preparing your stack of branches, submit them to your fork.

    gs stack submit
  3. Create a pull request to the upstream repository with the top branch of your stack.

Testing

We use standard Go testing.

go test ./...

Use make to get a coverage report:

make cover

Test scripts

Tests for the project make heavy use of the testscript package. Tests scripts are stored inside the testdata/script directory. Read more about the test script format in the documentation of the package.

Releasing a new version

(For maintainers only.)

To release a new version, take the following steps:

  1. Trigger the Prepare release workflow. This will create a pull request with the changelog entries for the release.
  2. Merge the pull request created by the workflow. Feel free to edit it before merging if needed.
  3. Once the pull request has merged, trigger the Publishh release workflow.