feat: edit commit message after merging through PR (#43)

Closes #5
This commit is contained in:
Julian Tölle 2024-09-06 23:17:06 +02:00 committed by GitHub
parent 36a0b90bcd
commit 2effe5e72d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 420 additions and 40 deletions

View file

@ -28,14 +28,9 @@ func init() {
}
}
// ReleasePullRequest
//
// TODO: Reuse [git.PullRequest]
type ReleasePullRequest struct {
ID int
Title string
Description string
Labels []Label
git.PullRequest
Labels []Label
Head string
ReleaseCommit *git.Commit
@ -137,8 +132,8 @@ func (pr *ReleasePullRequest) parseDescription(overrides ReleaseOverrides) (Rele
source := []byte(pr.Description)
err := markdown.WalkAST(source,
markdown.GetCodeBlockText(source, DescriptionLanguagePrefix, &overrides.Prefix),
markdown.GetCodeBlockText(source, DescriptionLanguageSuffix, &overrides.Suffix),
markdown.GetCodeBlockText(source, DescriptionLanguagePrefix, &overrides.Prefix, nil),
markdown.GetCodeBlockText(source, DescriptionLanguageSuffix, &overrides.Suffix, nil),
)
if err != nil {
return ReleaseOverrides{}, err