Contributing
The source is on GitHub. Open an issue or a pull request there.
Run the tests and the linter
Install the bundle and run the test suite:
bundle install
bundle exec rake test
The integration tests create git commits in temporary folders. Set git config --global user.name and user.email before you run them. CI runs the suite on Ruby 3.2, 3.3, 3.4 and 4.0.
Run RuboCop before you open a pull request:
bundle exec rubocop
Add a changelog entry
Shipnotes uses itself. Add an entry for a change under lib/, app/, config/ or exe/:
ruby exe/shipnotes new --title "One line that names the change" --kind fixed
The CI check uses require_entry: always. Every changed file that does not match check.ignore in .shipnotes.yml needs an entry. For a change that users do not see, add the no-changelog label to the pull request. Run the check locally before you push:
ruby exe/shipnotes check origin/main
How Shipnotes releases itself
- A maintainer runs
ruby exe/shipnotes releaseon a branch. It bumpslib/shipnotes/version.rband moves the entries into a release file. - The release goes to
mainas its own pull request. The check verifies it. - After the merge, the CI and Docs workflows run on
main. - When both pass, the Publish workflow pushes the gem to RubyGems, tags
vX.Y.Zand creates the GitHub Release. The release notes come fromshipnotes notes.
Nothing is published when the tag for the version already exists.
Work on the docs
The docs site uses Jekyll with the Just the Docs theme. Its Gemfile is separate from the gem’s bundle. Install it:
cd docs && bundle install
Then, from the repository root, generate the changelog page and serve the site:
ruby bin/docs-changelog
BUNDLE_GEMFILE=docs/Gemfile bundle exec jekyll serve --source docs
bin/docs-changelog writes docs/changelog.md from the release files. Git ignores that file. Do not edit it by hand.
Each page has front matter with its title, navigation order and URL. Link to other pages with {% link page.md %}. Link to assets with the relative_url filter.