mirror of
https://github.com/git-chglog/git-chglog.git
synced 2026-01-23 02:15:12 +00:00
fix: Fix a bug that Commit.Revert.Header is not converted by GitHubProcessor
This commit is contained in:
parent
8780cd1244
commit
d165ea884a
2 changed files with 21 additions and 0 deletions
|
|
@ -42,9 +42,15 @@ func (p *GitHubProcessor) ProcessCommit(commit *Commit) *Commit {
|
|||
commit.Header = p.addLinks(commit.Header)
|
||||
commit.Subject = p.addLinks(commit.Subject)
|
||||
commit.Body = p.addLinks(commit.Body)
|
||||
|
||||
for _, note := range commit.Notes {
|
||||
note.Body = p.addLinks(note.Body)
|
||||
}
|
||||
|
||||
if commit.Revert != nil {
|
||||
commit.Revert.Header = p.addLinks(commit.Revert.Header)
|
||||
}
|
||||
|
||||
return commit
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,4 +51,19 @@ gh-56 hoge fuga`,
|
|||
},
|
||||
),
|
||||
)
|
||||
|
||||
assert.Equal(
|
||||
&Commit{
|
||||
Revert: &Revert{
|
||||
Header: "revert header [@mention](https://github.com/mention) [#123](https://example.com/issues/123)",
|
||||
},
|
||||
},
|
||||
processor.ProcessCommit(
|
||||
&Commit{
|
||||
Revert: &Revert{
|
||||
Header: "revert header @mention #123",
|
||||
},
|
||||
},
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue