mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-08 10:47:02 +00:00
Compare commits
5 commits
7d3ee9aa06
...
21dd200fe1
| Author | SHA1 | Date | |
|---|---|---|---|
| 21dd200fe1 | |||
| 50b2762dca | |||
|
|
983162d26e | ||
|
|
e6e9779e87 | ||
| 5f1849106c |
8 changed files with 28 additions and 11 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -1,5 +1,16 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v0.6.0](https://github.com/apricote/releaser-pleaser/releases/tag/v0.6.0)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- 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)
|
## [v0.5.1](https://github.com/apricote/releaser-pleaser/releases/tag/v0.5.1)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ inputs:
|
||||||
outputs: {}
|
outputs: {}
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: docker://ghcr.io/apricote/releaser-pleaser:v0.5.1 # x-releaser-pleaser-version
|
image: docker://ghcr.io/apricote/releaser-pleaser:v0.6.0 # x-releaser-pleaser-version
|
||||||
args:
|
args:
|
||||||
- run
|
- run
|
||||||
- --forge=github
|
- --forge=github
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -14,7 +14,7 @@ require (
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.10.0
|
||||||
github.com/teekennedy/goldmark-markdown v0.5.1
|
github.com/teekennedy/goldmark-markdown v0.5.1
|
||||||
github.com/yuin/goldmark v1.7.12
|
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 (
|
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/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 h1:YwGP/rrea2/CnCtUHgjuolG/PnMxdQtPMO5PvaE2/nY=
|
||||||
github.com/yuin/goldmark v1.7.12/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
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.130.1 h1:1xF5C5Zq3sFeNg3PzS2z63oqrxifne3n/OnbI7nptRc=
|
||||||
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/go.mod h1:ZhSxLAWadqP6J9lMh40IAZOlOxBLPRh7yFOXR/bMJWM=
|
||||||
go.abhg.dev/goldmark/toc v0.11.0 h1:IRixVy3/yVPKvFBc37EeBPi8XLTXrtH6BYaonSjkF8o=
|
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=
|
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=
|
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
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteDiff, err := commitOnRemotePRBranch.PatchContext(ctx, currentRemotePRMergeBase)
|
remoteDiff, err := currentRemotePRMergeBase.PatchContext(ctx, commitOnRemotePRBranch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +248,7 @@ func (r *Repository) hasChangesWithRemote(ctx context.Context, mainBranchRef, lo
|
||||||
return false, err
|
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) {
|
func (r *Repository) commitFromRef(refName plumbing.ReferenceName) (*object.Commit, error) {
|
||||||
|
|
|
||||||
|
|
@ -147,15 +147,17 @@ func TestRepository_HasChangesWithRemote(t *testing.T) {
|
||||||
OnBranch(mainBranchRef),
|
OnBranch(mainBranchRef),
|
||||||
AsNewBranch(remotePRBranchRef),
|
AsNewBranch(remotePRBranchRef),
|
||||||
WithFile("VERSION", "v1.1.0"),
|
WithFile("VERSION", "v1.1.0"),
|
||||||
|
WithFile("CHANGELOG.md", "Foo"),
|
||||||
),
|
),
|
||||||
WithCommit(
|
WithCommit(
|
||||||
"chore: release v1.2.0",
|
"chore: release v1.1.0",
|
||||||
OnBranch(mainBranchRef),
|
OnBranch(mainBranchRef),
|
||||||
AsNewBranch(localPRBranchRef),
|
AsNewBranch(localPRBranchRef),
|
||||||
WithFile("VERSION", "v1.2.0"),
|
WithFile("VERSION", "v1.1.0"),
|
||||||
|
WithFile("CHANGELOG.md", "FooBar"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
want: false,
|
want: true,
|
||||||
wantErr: assert.NoError,
|
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) {
|
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)
|
commits, err := rp.forge.CommitsSince(ctx, since)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ releaser-pleaser:
|
||||||
# There is no way to run a pipeline when the MR description is updated :(
|
# There is no way to run a pipeline when the MR description is updated :(
|
||||||
- if: $CI_COMMIT_BRANCH == "$[[ inputs.branch ]]"
|
- if: $CI_COMMIT_BRANCH == "$[[ inputs.branch ]]"
|
||||||
image:
|
image:
|
||||||
name: ghcr.io/apricote/releaser-pleaser:v0.5.1 # x-releaser-pleaser-version
|
name: ghcr.io/apricote/releaser-pleaser:v0.6.0 # x-releaser-pleaser-version
|
||||||
entrypoint: [ "" ]
|
entrypoint: [ "" ]
|
||||||
variables:
|
variables:
|
||||||
GITLAB_TOKEN: $[[ inputs.token ]]
|
GITLAB_TOKEN: $[[ inputs.token ]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue