Skip to content

Commit

Permalink
fix: do not mention auto-generated commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
hongaar committed Oct 29, 2019
1 parent 6119731 commit f8cc5ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pull-request-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ function getCommitMessageMarkdown (pullRequestInfo: PullRequestInfo, config: Con
const commitMessage = getCommitMessage(pullRequestInfo, config)

if (commitMessage === null) {
return `Commit message will be auto-generated by GitHub.`
return ''
}

const quotedCommitMessage = commitMessage.split('\n').map(line => `> ${line}`).join('\n')

return `Commit message preview:\n\n${quotedCommitMessage}`
return `\n\nCommit message preview:\n\n${quotedCommitMessage}`
}

/**
Expand Down Expand Up @@ -142,15 +142,15 @@ export function getPullRequestPlan (
if (pendingConditions.length > 0) {
return {
code: 'pending_condition',
message: `There are pending conditions:\n\n${getChecksMarkdown(pullRequestStatus)}\n\n${getCommitMessageMarkdown(pullRequestInfo, config)}`,
message: `There are pending conditions:\n\n${getChecksMarkdown(pullRequestStatus)}${getCommitMessageMarkdown(pullRequestInfo, config)}`,
actions: ['reschedule']
}
}

if (failingConditions.length > 0) {
return {
code: 'failing_condition',
message: `There are failing conditions:\n\n${getChecksMarkdown(pullRequestStatus)}\n\n${getCommitMessageMarkdown(pullRequestInfo, config)}`,
message: `There are failing conditions:\n\n${getChecksMarkdown(pullRequestStatus)}${getCommitMessageMarkdown(pullRequestInfo, config)}`,
actions: []
}
}
Expand Down Expand Up @@ -200,13 +200,13 @@ export function getPullRequestPlan (
if (config.deleteBranchAfterMerge && !isInFork(pullRequestInfo)) {
return {
code: 'merge_and_delete',
message: `Will merge the pull request and delete its branch.\n\n${getCommitMessageMarkdown(pullRequestInfo, config)}`,
message: `Will merge the pull request and delete its branch.${getCommitMessageMarkdown(pullRequestInfo, config)}`,
actions: ['merge', 'delete_branch']
}
} else {
return {
code: 'merge',
message: `Will merge the pull request.\n\n${getCommitMessageMarkdown(pullRequestInfo, config)}`,
message: `Will merge the pull request.${getCommitMessageMarkdown(pullRequestInfo, config)}`,
actions: ['merge']
}
}
Expand Down

0 comments on commit f8cc5ef

Please sign in to comment.