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:
parent
81fd514613
commit
8ecb649182
1 changed files with 20 additions and 12 deletions
|
@ -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 = "";
|
||||
|
|
Loading…
Reference in a new issue