1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: give suggestion on PR open failure (#21145)

This commit is contained in:
Divy Srivastava 2023-11-10 05:40:00 -08:00 committed by GitHub
parent 81fd514613
commit 8ecb649182
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,6 +66,8 @@ async function forwardReleaseCommitToMain() {
await repo.gitPush("origin", newBranchName);
$.logStep(`Opening PR...`);
try {
const openedPr = await createOctoKit().request(
"POST /repos/{owner}/{repo}/pulls",
{
@ -78,6 +80,12 @@ async function forwardReleaseCommitToMain() {
},
);
$.log(`Opened PR at ${openedPr.data.url}`);
} catch (err) {
$.logError(
`Failed to open PR. Please open one manually: https://github.com/denoland/deno/pull/new/${newBranchName}`,
err,
);
}
function getPrBody() {
let text = "";