mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 13:21:00 +00:00
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:
parent
175d6d0633
commit
81a855f5ab
5 changed files with 376 additions and 11 deletions
|
|
@ -269,7 +269,7 @@ func (rp *ReleaserPleaser) runReconcileReleasePR(ctx context.Context) error {
|
|||
logger.InfoContext(ctx, "created release commit", "commit.hash", releaseCommit.Hash, "commit.message", releaseCommit.Message, "commit.author", releaseCommitAuthor)
|
||||
|
||||
// Check if anything changed in comparison to the remote branch (if exists)
|
||||
newReleasePRChanges, err := repo.HasChangesWithRemote(ctx, rpBranch)
|
||||
newReleasePRChanges, err := repo.HasChangesWithRemote(ctx, rp.targetBranch, rpBranch)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue