We welcome contributes to the project, but please discuss features or significant changes in an issue before starting work on them.
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.
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 runmake 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.
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:
-
Set your fork as the upstream remote for git-spice.
gh repo fork --remote fork gs repo init --remote fork
-
After preparing your stack of branches, submit them to your fork.
gs stack submit
-
Create a pull request to the upstream repository with the top branch of your stack.
We use standard Go testing.
go test ./...
Use make
to get a coverage report:
make cover
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.
(For maintainers only.)
To release a new version, take the following steps:
- Trigger the Prepare release workflow. This will create a pull request with the changelog entries for the release.
- Merge the pull request created by the workflow. Feel free to edit it before merging if needed.
- Once the pull request has merged, trigger the Publishh release workflow.