Compare commits

..

No commits in common. "1883466c3e333da89537e4f90889ba1c572972dc" and "763018ff9bcfbd07a058029013d5ff4e077f4443" have entirely different histories.

4 changed files with 4 additions and 13 deletions

View file

@ -1,11 +1,5 @@
# Changelog
## [v0.4.1](https://github.com/apricote/releaser-pleaser/releases/tag/v0.4.1)
### Bug Fixes
- **gitlab**: release not created when release pr was squashed (#86)
## [v0.4.0](https://github.com/apricote/releaser-pleaser/releases/tag/v0.4.0)
### ✨ Highlights

View file

@ -21,7 +21,7 @@ inputs:
outputs: {}
runs:
using: 'docker'
image: ghcr.io/apricote/releaser-pleaser:v0.4.1 # x-releaser-pleaser-version
image: ghcr.io/apricote/releaser-pleaser:v0.4.0 # x-releaser-pleaser-version
args:
- run
- --forge=github

View file

@ -176,8 +176,8 @@ func (g *GitLab) prForCommit(ctx context.Context, commit git.Commit) (*git.PullR
var mergeRequest *gitlab.MergeRequest
for _, mr := range associatedMRs {
// We only look for the MR that has this commit set as the "merge/squash commit" => The result of squashing this branch onto main
if mr.MergeCommitSHA == commit.Hash || mr.SquashCommitSHA == commit.Hash {
// We only look for the MR that has this commit set as the "merge commit" => The result of squashing this branch onto main
if mr.MergeCommitSHA == commit.Hash {
mergeRequest = mr
break
}
@ -387,12 +387,9 @@ func gitlabMRToReleasePullRequest(pr *gitlab.MergeRequest) *releasepr.ReleasePul
}
}
// Commit SHA is saved in either [MergeCommitSHA] or [SquashCommitSHA] depending on which merge method was used.
var releaseCommit *git.Commit
if pr.MergeCommitSHA != "" {
releaseCommit = &git.Commit{Hash: pr.MergeCommitSHA}
} else if pr.SquashCommitSHA != "" {
releaseCommit = &git.Commit{Hash: pr.SquashCommitSHA}
}
return &releasepr.ReleasePullRequest{

View file

@ -24,7 +24,7 @@ releaser-pleaser:
# There is no way to run a pipeline when the MR description is updated :(
- if: $CI_COMMIT_BRANCH == "$[[ inputs.branch ]]"
image:
name: ghcr.io/apricote/releaser-pleaser:v0.4.1 # x-releaser-pleaser-version
name: ghcr.io/apricote/releaser-pleaser:v0.4.0 # x-releaser-pleaser-version
entrypoint: [""]
variables:
GITLAB_TOKEN: $[[ inputs.token ]]