Thank you for your interest in contributing to renovate-scheduler! This document provides guidelines and instructions for contributing.
- Go 1.26 or later
- Docker (for building container images)
- Git
-
Clone the repository:
git clone https://github.com/mieliespoor/renovate-scheduler.git cd renovate-scheduler -
Install dependencies:
go mod download
-
Run tests locally:
go test -race -cover ./... -
Run linters:
golangci-lint run ./...
-
Build the binary:
go build -o renovate-scheduler . -
Build Docker image locally:
docker build -t renovate-scheduler:dev .
This project uses Conventional Commits to enable automated changelog generation and versioning.
Format: <type>(<scope>): <subject>
Types:
feat: A new featurefix: A bug fixperf: A performance improvementdocs: Documentation changesrefactor: Code refactoring without feature changestest: Adding or updating testschore: Build process, dependencies, or tooling changesci: CI/CD pipeline changes
Examples:
feat(scheduler): add support for custom polling intervals
fix(ingest): correct digest calculation for file changes
docs: update README with configuration examples
test(dispatch): add integration tests for concurrent job handling
-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Make your changes and commit using conventional commit messages
-
Push your branch and create a Pull Request
-
Run local pre-PR checks:
go test -race -cover ./... golangci-lint run ./... go mod tidy && git diff --exit-code go.mod go.sum go build -o renovate-scheduler . docker build -t renovate-scheduler:dev .
Confirm before requesting review:
go.modandgo.sumare up to date- New behavior includes tests
- Docs are updated when behavior or configuration changed
- Commit messages follow Conventional Commits
-
Ensure all CI checks pass:
- ✅ Lint (golangci-lint)
- ✅ Tests (go test -race)
- ✅ Build (docker build)
- ✅ Security scan (Trivy)
-
Request review from maintainers
-
Once approved, your PR will be merged
The release process is automated using release-please:
-
Release PR Creation: When commits are merged to
main, release-please automatically creates a PR that:- Bumps the version number (semantic versioning)
- Updates
CHANGELOG.mdwith unreleased changes - Groups changes by type (features, fixes, etc.)
-
Release Merge: When the release PR is merged:
- A Git tag is created with the version number
- A GitHub Release is created with the changelog as release notes
- Release artifacts are built and attached
-
Artifact Building: The release build workflow:
- Builds multi-platform binaries (Linux/macOS/Windows × amd64/arm64)
- Builds and pushes Docker images to GHCR
Runs on every PR and push to main:
- Lint: Code style and quality checks (golangci-lint)
- Test: Unit tests with race condition detection and coverage reporting
- Build: Binary compilation
- Docker: Docker image build
- Security: Vulnerability scanning (Trivy)
Runs on every push to main:
- Creates release PRs with version bumps and changelog updates
Triggered on Git tags:
- Builds multi-platform binaries
- Builds and pushes Docker images (amd64 and arm64)
- Creates GitHub Release with artifacts
- Go dependencies: Updated weekly
- GitHub Actions: Updated weekly
- Docker base image: Updated weekly
For deeper CI/CD details and release architecture, see CI-CD-GUIDE.md and WORKFLOW-ARCHITECTURE.md.
- Write tests for new features and bug fixes
- Maintain test coverage above 80%
- Use
t.Run()for test subtests - Use
t.TempDir()for temporary test files - Run
go test -raceto detect race conditions
Example:
func TestFeature(t *testing.T) {
tests := []struct {
name string
input string
want string
}{
{name: "basic", input: "test", want: "expected"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := Feature(tt.input)
if got != tt.want {
t.Fatalf("got %q, want %q", got, tt.want)
}
})
}
}- Follow standard Go conventions
- Run
go fmtbefore committing - Use meaningful variable and function names
- Add comments for exported functions
- Keep functions focused and modular
- Update
README.mdfor user-facing changes - Update
CHANGELOG.mdfor notable changes (release-please handles this) - Add inline code comments for complex logic
- Include examples in documentation
- Open an issue for bug reports or feature requests
- Discuss major changes in issues before implementing
- Ask questions in pull request comments
Be respectful and professional in all interactions. We're committed to providing a welcoming environment for all contributors.
Thank you for contributing! 🎉