Skip to content

Commit

Permalink
Respect commit SHA if provided (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdmytriv authored Sep 5, 2023
1 parent 17f0566 commit 32e6868
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62260,7 +62260,7 @@ class GetTerraformPlanUseCase {
const { commitSHA, component, isMergeCommit, stack, planPath, pr, repoName, repoOwner, } = req;
let plan;
let metadata;
if (isMergeCommit) {
if (commitSHA && commitSHA != '' && isMergeCommit) {
if (!pr) {
return (0, infrastructure_1.left)(new infrastructure_1.AppError.UnexpectedError("PR is required for merge commits"));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/useCases/getPlan/useCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class GetTerraformPlanUseCase
let plan: Uint8Array;
let metadata: TerraformPlan;

if (isMergeCommit) {
if (commitSHA && commitSHA != '' && isMergeCommit) {
if (!pr) {
return left(
new AppError.UnexpectedError("PR is required for merge commits")
Expand Down

0 comments on commit 32e6868

Please sign in to comment.