git-stack-cli 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +26 -4
- package/package.json +1 -1
- package/src/app/SyncGithub.tsx +19 -3
- package/src/core/github.tsx +8 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -29782,7 +29782,13 @@ async function pr_status(branch) {
|
|
|
29782
29782
|
}
|
|
29783
29783
|
async function pr_create(args) {
|
|
29784
29784
|
const title = safe_quote(args.title);
|
|
29785
|
-
|
|
29785
|
+
// explicit refs/heads head branch to avoid creation failing
|
|
29786
|
+
//
|
|
29787
|
+
// ❯ gh pr create --head origin/gs-ED2etrzv2 --base gs-6LAx-On45 --title="2024-01-05 test" --body=""
|
|
29788
|
+
// pull request create failed: GraphQL: Head sha can't be blank, Base sha can't be blank, No commits between gs-6LAx-On45 and origin/gs-ED2etrzv2, Head ref must be a branch (createPullRequest)
|
|
29789
|
+
//
|
|
29790
|
+
// https://github.com/cli/cli/issues/5465
|
|
29791
|
+
let command = `gh pr create --head refs/heads/${args.branch} --base ${args.base} --title="${title}" --body="${args.body}"`;
|
|
29786
29792
|
if (args.draft) {
|
|
29787
29793
|
command += " --draft";
|
|
29788
29794
|
}
|
|
@@ -31782,7 +31788,6 @@ async function run$3(args) {
|
|
|
31782
31788
|
before_push_tasks.push(before_push({ group }));
|
|
31783
31789
|
}
|
|
31784
31790
|
await Promise.all(before_push_tasks);
|
|
31785
|
-
// git push -f origin HEAD~6:OtVX7Qvrw HEAD~3:E63ytp5dj HEAD~2:gs-NBabNSjXA HEAD~1:gs-UGVJdKNoD HEAD~0:gs-6LAx-On4
|
|
31786
31791
|
const git_push_command = [`git push -f origin`];
|
|
31787
31792
|
if (argv.verify === false) {
|
|
31788
31793
|
git_push_command.push("--no-verify");
|
|
@@ -31790,7 +31795,24 @@ async function run$3(args) {
|
|
|
31790
31795
|
for (const group of push_group_list) {
|
|
31791
31796
|
const last_commit = last$1(group.commits);
|
|
31792
31797
|
invariant(last_commit, "last_commit must exist");
|
|
31793
|
-
|
|
31798
|
+
// explicit refs/heads head branch to avoid push failing
|
|
31799
|
+
//
|
|
31800
|
+
// ❯ git push -f origin --no-verify f6e249051b4820a03deb957ddebc19acfd7dfd7c:gs-ED2etrzv2
|
|
31801
|
+
// error: The destination you provided is not a full refname (i.e.,
|
|
31802
|
+
// starting with "refs/"). We tried to guess what you meant by:
|
|
31803
|
+
//
|
|
31804
|
+
// - Looking for a ref that matches 'gs-ED2etrzv2' on the remote side.
|
|
31805
|
+
// - Checking if the <src> being pushed ('f6e249051b4820a03deb957ddebc19acfd7dfd7c')
|
|
31806
|
+
// is a ref in "refs/{heads,tags}/". If so we add a corresponding
|
|
31807
|
+
// refs/{heads,tags}/ prefix on the remote side.
|
|
31808
|
+
//
|
|
31809
|
+
// Neither worked, so we gave up. You must fully qualify the ref.
|
|
31810
|
+
// hint: The <src> part of the refspec is a commit object.
|
|
31811
|
+
// hint: Did you mean to create a new branch by pushing to
|
|
31812
|
+
// hint: 'f6e249051b4820a03deb957ddebc19acfd7dfd7c:refs/heads/gs-ED2etrzv2'?
|
|
31813
|
+
// error: failed to push some refs to 'github.com:magus/git-multi-diff-playground.git'
|
|
31814
|
+
//
|
|
31815
|
+
const target = `${last_commit.sha}:refs/heads/${group.id}`;
|
|
31794
31816
|
git_push_command.push(target);
|
|
31795
31817
|
}
|
|
31796
31818
|
await cli(git_push_command);
|
|
@@ -37573,7 +37595,7 @@ async function command() {
|
|
|
37573
37595
|
.wrap(123)
|
|
37574
37596
|
// disallow unknown options
|
|
37575
37597
|
.strict()
|
|
37576
|
-
.version("1.13.
|
|
37598
|
+
.version("1.13.2" )
|
|
37577
37599
|
.showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
|
|
37578
37600
|
.help("help", "Show usage via `git stack help`")
|
|
37579
37601
|
.argv;
|
package/package.json
CHANGED
package/src/app/SyncGithub.tsx
CHANGED
|
@@ -93,8 +93,6 @@ async function run(args: Args) {
|
|
|
93
93
|
|
|
94
94
|
await Promise.all(before_push_tasks);
|
|
95
95
|
|
|
96
|
-
// git push -f origin HEAD~6:OtVX7Qvrw HEAD~3:E63ytp5dj HEAD~2:gs-NBabNSjXA HEAD~1:gs-UGVJdKNoD HEAD~0:gs-6LAx-On4
|
|
97
|
-
|
|
98
96
|
const git_push_command = [`git push -f origin`];
|
|
99
97
|
|
|
100
98
|
if (argv.verify === false) {
|
|
@@ -104,7 +102,25 @@ async function run(args: Args) {
|
|
|
104
102
|
for (const group of push_group_list) {
|
|
105
103
|
const last_commit = last(group.commits);
|
|
106
104
|
invariant(last_commit, "last_commit must exist");
|
|
107
|
-
|
|
105
|
+
|
|
106
|
+
// explicit refs/heads head branch to avoid push failing
|
|
107
|
+
//
|
|
108
|
+
// ❯ git push -f origin --no-verify f6e249051b4820a03deb957ddebc19acfd7dfd7c:gs-ED2etrzv2
|
|
109
|
+
// error: The destination you provided is not a full refname (i.e.,
|
|
110
|
+
// starting with "refs/"). We tried to guess what you meant by:
|
|
111
|
+
//
|
|
112
|
+
// - Looking for a ref that matches 'gs-ED2etrzv2' on the remote side.
|
|
113
|
+
// - Checking if the <src> being pushed ('f6e249051b4820a03deb957ddebc19acfd7dfd7c')
|
|
114
|
+
// is a ref in "refs/{heads,tags}/". If so we add a corresponding
|
|
115
|
+
// refs/{heads,tags}/ prefix on the remote side.
|
|
116
|
+
//
|
|
117
|
+
// Neither worked, so we gave up. You must fully qualify the ref.
|
|
118
|
+
// hint: The <src> part of the refspec is a commit object.
|
|
119
|
+
// hint: Did you mean to create a new branch by pushing to
|
|
120
|
+
// hint: 'f6e249051b4820a03deb957ddebc19acfd7dfd7c:refs/heads/gs-ED2etrzv2'?
|
|
121
|
+
// error: failed to push some refs to 'github.com:magus/git-multi-diff-playground.git'
|
|
122
|
+
//
|
|
123
|
+
const target = `${last_commit.sha}:refs/heads/${group.id}`;
|
|
108
124
|
git_push_command.push(target);
|
|
109
125
|
}
|
|
110
126
|
|
package/src/core/github.tsx
CHANGED
|
@@ -123,7 +123,14 @@ type CreatePullRequestArgs = {
|
|
|
123
123
|
|
|
124
124
|
export async function pr_create(args: CreatePullRequestArgs) {
|
|
125
125
|
const title = safe_quote(args.title);
|
|
126
|
-
|
|
126
|
+
|
|
127
|
+
// explicit refs/heads head branch to avoid creation failing
|
|
128
|
+
//
|
|
129
|
+
// ❯ gh pr create --head origin/gs-ED2etrzv2 --base gs-6LAx-On45 --title="2024-01-05 test" --body=""
|
|
130
|
+
// pull request create failed: GraphQL: Head sha can't be blank, Base sha can't be blank, No commits between gs-6LAx-On45 and origin/gs-ED2etrzv2, Head ref must be a branch (createPullRequest)
|
|
131
|
+
//
|
|
132
|
+
// https://github.com/cli/cli/issues/5465
|
|
133
|
+
let command = `gh pr create --head refs/heads/${args.branch} --base ${args.base} --title="${title}" --body="${args.body}"`;
|
|
127
134
|
|
|
128
135
|
if (args.draft) {
|
|
129
136
|
command += " --draft";
|