Skip to content

Commit

Permalink
add condition to workflow to check if branch exists
Browse files Browse the repository at this point in the history
Signed-off-by: Kashish Mittal <[email protected]>
  • Loading branch information
04kash committed Oct 17, 2024
1 parent 938077b commit b36d49e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/ci/check-if-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ async function main() {

// Ensure we have fetched the targetBranch
await runPlain('git', 'fetch', 'origin', targetBranch);
const branchExists = await runPlain(
'git',
'rev-parse',
'--verify',
'[email protected]',
);
if (!branchExists) {
console.error(
`Branch '[email protected]' does not exist.`,
);
}

const diff = await runPlain(
'git',
Expand Down

0 comments on commit b36d49e

Please sign in to comment.