mirror of
https://github.com/peter-evans/create-pull-request.git
synced 2026-05-14 10:32:42 +00:00
fix format and cleanup
This commit is contained in:
+3
-10
@@ -201,16 +201,7 @@ export class GitHubHelper {
|
||||
branch: string
|
||||
): Promise<void> {
|
||||
let headSha = baseSha
|
||||
|
||||
// testing
|
||||
if (branchCommits.length > 0 && branchCommits[0].parents[0] !== baseSha) {
|
||||
throw new Error(
|
||||
`The base commit ${baseSha} does not match the first commit's parent ${branchCommits[0].parents[0]}`
|
||||
)
|
||||
}
|
||||
|
||||
for (const commit of branchCommits) {
|
||||
// TODO: The headSha of the previous commit should be passed and used as the parent.
|
||||
headSha = await this.createCommit(
|
||||
commit,
|
||||
[headSha],
|
||||
@@ -270,7 +261,9 @@ export class GitHubHelper {
|
||||
core.info(
|
||||
`Created commit ${remoteCommit.sha} for local commit ${commit.sha}`
|
||||
)
|
||||
core.debug(`Commit verified: ${remoteCommit.verification.verified}; reason: ${remoteCommit.verification.reason}`)
|
||||
core.info(
|
||||
`Commit verified: ${remoteCommit.verification.verified}; reason: ${remoteCommit.verification.reason}`
|
||||
)
|
||||
return remoteCommit.sha
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user