build branch commits when there is a diff with the base

This commit is contained in:
Peter Evans 2024-08-17 21:17:22 +00:00
parent 2ba41ede85
commit 32e97fc746
3 changed files with 12 additions and 11 deletions

View file

@ -192,8 +192,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
inputs.branch,
branchRemoteName,
inputs.signoff,
inputs.addPaths,
inputs.signCommits
inputs.addPaths
)
outputs.set('pull-request-head-sha', result.headSha)
// Set the base. It would have been '' if not specified as an input
@ -235,6 +234,9 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
core.endGroup()
}
// If the verified output is not set yet, and there are commits (from result), and the head commit is signed, then:
// Get the commit and check verification status
if (result.hasDiffWithBase) {
core.startGroup('Create or update the pull request')
const pull = await ghPull.createOrUpdatePullRequest(