Skip to content

ci(renovate): auto-bump go-github in examples and readme - #283

Merged
cbrgm merged 1 commit into
mainfrom
renovate-automation
Aug 12, 2026
Merged

ci(renovate): auto-bump go-github in examples and readme#283
cbrgm merged 1 commit into
mainfrom
renovate-automation

Conversation

@cbrgm

@cbrgm cbrgm commented Aug 12, 2026

Copy link
Copy Markdown
Owner

What

Make Renovate bump the go-github version everywhere, not just the top-level go.mod.

  • postUpdateOptions: ["gomodUpdateImportPaths"] -> on a major bump, Renovate rewrites the Go import paths (.../v89/github -> .../v90/github) in every module: the examples/* modules, the hand-written githubevents/dispatch_test.go, and the generated files.
  • a customManagers regex that keeps the README's import snippet in sync, tracked against go-github's github tags.

Why

Right now a go-github major bump only edits go.mod. The import paths in examples/*/*.go and the README code block still point at the old major, so they get bumped by hand every time. gomodUpdateImportPaths is the built-in Renovate feature for exactly this (it runs the mod tool per module), so all the .go files move automatically. The README isn't a Go file, so it needs the small regex manager.

Note on the examples: they depend on a published githubevents/v2 (no local replace), so they can only move to a new go-github major once a githubevents release using that major exists. After that release, Renovate bumps the githubevents dep and go-github together, and this config rewrites the import paths for you.

Testing

$ renovate-config-validator .github/renovate.json
 INFO: Config validated successfully

The README manager validates against the schema. Since go's semantic-import-versioning (major-in-path) is a bit awkward for a non-code file, i'd confirm it on the next Renovate dry-run / first real bump, it's doc-only so nothing breaks if it needs a tweak.

Checklist

  • Tests added/updated (config validated; behavior is Renovate-side)
  • No breaking changes (CI/tooling config only)
  • Readable commit history (1 commit)
  • AI code review considered and comments resolved

@cbrgm
cbrgm merged commit fe91949 into main Aug 12, 2026
5 checks passed
@cbrgm
cbrgm deleted the renovate-automation branch August 12, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant