Skip to content

Commit

Permalink
fix: clean-up github-script
Browse files Browse the repository at this point in the history
  • Loading branch information
jbottigliero authored Mar 15, 2024
1 parent f715101 commit 1006b56
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/static-version-watch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ jobs:
return;
}
const [owner, repo] = generator.split("/");
const response = github.rest.repos.getBranch({
owner,
repo,
branch: nextVersion
});
console.log(nextVersion, response);
const branch = `v${nextVersion}`;
try {
const response = github.rest.repos.getBranch({
owner,
repo,
branch
});
} catch (e) {
console.log(`Error fetching next version (${branch}), it might not be published yet!`);
}
console.log(`Attempting to open a Pull Request to suggest updating to ${branch}`);

0 comments on commit 1006b56

Please sign in to comment.