chore: 'breaking change' in PR body overrides commit type in relnotes (#16911)

This commit is contained in:
Jeremy Apthorp 2019-02-12 21:30:39 -08:00 committed by GitHub
parent ca83d36426
commit 8d09219533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -521,10 +521,13 @@ const getNotes = async (fromRef, toRef, newVersion) => {
} }
// try to pull a release note from the pull comment // try to pull a release note from the pull comment
const prParsed = {} const prParsed = parseCommitMessage(`${prData.data.title}\n\n${prData.data.body}`, pr.owner, pr.repo)
parseCommitMessage(`${prData.data.title}\n\n${prData.data.body}`, pr.owner, pr.repo, prParsed) if (!commit.note) {
commit.note = commit.note || prParsed.note commit.note = prParsed.note
commit.type = commit.type || prParsed.type }
if (!commit.type || prParsed.type === 'breaking-change') {
commit.type = prParsed.type
}
prSubject = prSubject || prParsed.subject prSubject = prSubject || prParsed.subject
pr = prParsed.pr && (prParsed.pr.number !== pr.number) ? prParsed.pr : null pr = prParsed.pr && (prParsed.pr.number !== pr.number) ? prParsed.pr : null