git-stack-cli
Advanced tools
+1
-1
| { | ||
| "name": "git-stack-cli", | ||
| "version": "2.7.7", | ||
| "version": "2.7.8", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "author": "magus", |
+41
-14
@@ -172,6 +172,22 @@ import * as React from "react"; | ||
| if (group.pr) { | ||
| await github.pr_edit({ | ||
| branch: group.id, | ||
| base: master_branch, | ||
| }); | ||
| // only update base if it is different | ||
| // github api started returning errors here on 2025-12-08 | ||
| // | ||
| // ``` | ||
| // [2025-12-08 17:54:44.114] [start] gh pr edit noah/cua-images-chatgpt-prod-tags---4h0tk3liqmmplu --base master | ||
| // [2025-12-08 17:54:45.935] [end] gh pr edit noah/cua-images-chatgpt-prod-tags---4h0tk3liqmmplu --base master (exit_code=1 duration=1.8s) | ||
| // [2025-12-08 17:54:45.937] GraphQL: A pull request already exists for base branch 'master' and head branch 'noah/cua-images-chatgpt-prod-tags---4h0tk3liqmmplu' (updatePullRequest) | ||
| // | ||
| // [2025-12-08 17:54:45.938] gh pr edit noah/cua-images-chatgpt-prod-tags---4h0tk3liqmmplu --base master (exit_code=1 duration=1.8s) | ||
| // GraphQL: A pull request already exists for base branch 'master' and head branch 'noah/cua-images-chatgpt-prod-tags---4h0tk3liqmmplu' (updatePullRequest) | ||
| // gh pr edit noah/cua-images-chatgpt-prod-tags---4h0tk3liqmmplu --base master (exit_code=1 duration=1.8s) | ||
| // Unable to sync. | ||
| // ``` | ||
| // | ||
| if (`origin/${group.pr.baseRefName}` !== master_branch) { | ||
| await github.pr_edit({ | ||
| branch: group.id, | ||
| base: master_branch, | ||
| }); | ||
| } | ||
| } | ||
@@ -188,12 +204,23 @@ } | ||
| if (group.pr) { | ||
| // ensure base matches pr in github | ||
| await github.pr_edit({ | ||
| branch: group.id, | ||
| base: group.base, | ||
| body: StackSummaryTable.write({ | ||
| body: group.pr.body, | ||
| pr_url_list, | ||
| selected_url, | ||
| }), | ||
| }); | ||
| if (`origin/${group.pr.baseRefName}` !== master_branch) { | ||
| // ensure base matches pr in github | ||
| await github.pr_edit({ | ||
| branch: group.id, | ||
| base: group.base, | ||
| body: StackSummaryTable.write({ | ||
| body: group.pr.body, | ||
| pr_url_list, | ||
| selected_url, | ||
| }), | ||
| }); | ||
| } else { | ||
| await github.pr_edit({ | ||
| branch: group.id, | ||
| body: StackSummaryTable.write({ | ||
| body: group.pr.body, | ||
| pr_url_list, | ||
| selected_url, | ||
| }), | ||
| }); | ||
| } | ||
| } else { | ||
@@ -200,0 +227,0 @@ // create pr in github |
@@ -165,3 +165,3 @@ import * as React from "react"; | ||
| branch: string; | ||
| base: string; | ||
| base?: string; | ||
| body?: string; | ||
@@ -171,5 +171,9 @@ }; | ||
| export async function pr_edit(args: EditPullRequestArgs) { | ||
| const base = args.base.replace(/^origin\//, ""); | ||
| const command_parts = [`gh pr edit ${args.branch} --base ${base}`]; | ||
| const command_parts = [`gh pr edit ${args.branch}`]; | ||
| if (args.base) { | ||
| const base = args.base.replace(/^origin\//, ""); | ||
| command_parts.push(`--base ${base}`); | ||
| } | ||
| let body_file: string | undefined; | ||
@@ -284,3 +288,4 @@ | ||
| // the flashes would mess up the filesystem path to this file | ||
| const base = args.base.replace(/^origin\//, ""); | ||
| let base = args.base || "master"; | ||
| base = base.replace(/^origin\//, ""); | ||
| let tmp_filename = safe_filename(`git-stack-body-${base}`); | ||
@@ -287,0 +292,0 @@ |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
4856353
0.09%9299
0.33%