feat: avoid pushing release branch only for rebasing (#114)

Right now releaser-pleaser pushes the branch even if it is only for a "rebase",
this wastes CI resources. Instead, it should only push when there are changes
to the files it owns.

- **Old**: Push when there is a diff origin/release-pr..release-pr
- **New**: Push when the these two diffs are not the same:
  
      origin/main..release-pr
      $(git merge-base origin/main origin/release-pr)..release-pr

Closes #92
This commit is contained in:
Julian Tölle 2025-06-09 10:52:09 +02:00 committed by GitHub
parent 175d6d0633
commit 81a855f5ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 376 additions and 11 deletions

2
go.mod
View file

@ -6,6 +6,7 @@ toolchain go1.24.4
require (
github.com/blang/semver/v4 v4.0.0
github.com/go-git/go-billy/v5 v5.6.2
github.com/go-git/go-git/v5 v5.16.2
github.com/google/go-github/v72 v72.0.0
github.com/leodido/go-conventionalcommits v0.12.0
@ -25,7 +26,6 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect