mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 02:07:04 +00:00
Compare commits
5 commits
7d3ee9aa06
...
21dd200fe1
| Author | SHA1 | Date | |
|---|---|---|---|
| 21dd200fe1 | |||
| 50b2762dca | |||
|
|
983162d26e | ||
|
|
e6e9779e87 | ||
| 5f1849106c |
6 changed files with 19 additions and 9 deletions
|
|
@ -7,6 +7,10 @@
|
|||
- real user as commit author (#187)
|
||||
- avoid pushing release branch only for rebasing (#114)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- crash when running in repo without any tags (#190)
|
||||
|
||||
## [v0.5.1](https://github.com/apricote/releaser-pleaser/releases/tag/v0.5.1)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -14,7 +14,7 @@ require (
|
|||
github.com/stretchr/testify v1.10.0
|
||||
github.com/teekennedy/goldmark-markdown v0.5.1
|
||||
github.com/yuin/goldmark v1.7.12
|
||||
gitlab.com/gitlab-org/api/client-go v0.129.0
|
||||
gitlab.com/gitlab-org/api/client-go v0.130.1
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -105,8 +105,8 @@ github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM
|
|||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/yuin/goldmark v1.7.12 h1:YwGP/rrea2/CnCtUHgjuolG/PnMxdQtPMO5PvaE2/nY=
|
||||
github.com/yuin/goldmark v1.7.12/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
||||
gitlab.com/gitlab-org/api/client-go v0.129.0 h1:o9KLn6fezmxBQWYnQrnilwyuOjlx4206KP0bUn3HuBE=
|
||||
gitlab.com/gitlab-org/api/client-go v0.129.0/go.mod h1:ZhSxLAWadqP6J9lMh40IAZOlOxBLPRh7yFOXR/bMJWM=
|
||||
gitlab.com/gitlab-org/api/client-go v0.130.1 h1:1xF5C5Zq3sFeNg3PzS2z63oqrxifne3n/OnbI7nptRc=
|
||||
gitlab.com/gitlab-org/api/client-go v0.130.1/go.mod h1:ZhSxLAWadqP6J9lMh40IAZOlOxBLPRh7yFOXR/bMJWM=
|
||||
go.abhg.dev/goldmark/toc v0.11.0 h1:IRixVy3/yVPKvFBc37EeBPi8XLTXrtH6BYaonSjkF8o=
|
||||
go.abhg.dev/goldmark/toc v0.11.0/go.mod h1:XMFIoI1Sm6dwF9vKzVDOYE/g1o5BmKXghLG8q/wJNww=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ func (r *Repository) hasChangesWithRemote(ctx context.Context, mainBranchRef, lo
|
|||
return false, nil
|
||||
}
|
||||
|
||||
remoteDiff, err := commitOnRemotePRBranch.PatchContext(ctx, currentRemotePRMergeBase)
|
||||
remoteDiff, err := currentRemotePRMergeBase.PatchContext(ctx, commitOnRemotePRBranch)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ func (r *Repository) hasChangesWithRemote(ctx context.Context, mainBranchRef, lo
|
|||
return false, err
|
||||
}
|
||||
|
||||
return remoteDiff.String() == localDiff.String(), nil
|
||||
return remoteDiff.String() != localDiff.String(), nil
|
||||
}
|
||||
|
||||
func (r *Repository) commitFromRef(refName plumbing.ReferenceName) (*object.Commit, error) {
|
||||
|
|
|
|||
|
|
@ -147,15 +147,17 @@ func TestRepository_HasChangesWithRemote(t *testing.T) {
|
|||
OnBranch(mainBranchRef),
|
||||
AsNewBranch(remotePRBranchRef),
|
||||
WithFile("VERSION", "v1.1.0"),
|
||||
WithFile("CHANGELOG.md", "Foo"),
|
||||
),
|
||||
WithCommit(
|
||||
"chore: release v1.2.0",
|
||||
"chore: release v1.1.0",
|
||||
OnBranch(mainBranchRef),
|
||||
AsNewBranch(localPRBranchRef),
|
||||
WithFile("VERSION", "v1.2.0"),
|
||||
WithFile("VERSION", "v1.1.0"),
|
||||
WithFile("CHANGELOG.md", "FooBar"),
|
||||
),
|
||||
),
|
||||
want: false,
|
||||
want: true,
|
||||
wantErr: assert.NoError,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -327,7 +327,11 @@ func (rp *ReleaserPleaser) runReconcileReleasePR(ctx context.Context) error {
|
|||
}
|
||||
|
||||
func (rp *ReleaserPleaser) analyzedCommitsSince(ctx context.Context, since *git.Tag) ([]commitparser.AnalyzedCommit, error) {
|
||||
logger := rp.logger.With("method", "analyzedCommitsSince", "tag.hash", since.Hash, "tag.name", since.Name)
|
||||
logger := rp.logger.With("method", "analyzedCommitsSince")
|
||||
|
||||
if since != nil {
|
||||
logger = rp.logger.With("tag.hash", since.Hash, "tag.name", since.Name)
|
||||
}
|
||||
|
||||
commits, err := rp.forge.CommitsSince(ctx, since)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue