gityo 1.1.7 → 1.1.8
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/index.js +30 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1710,7 +1710,7 @@ function useColor() {
|
|
|
1710
1710
|
if (process$1.env.FORCE_COLOR || process$1.env.CLICOLOR_FORCE !== void 0) return true;
|
|
1711
1711
|
}
|
|
1712
1712
|
new Command();
|
|
1713
|
-
var version$4 = "1.1.
|
|
1713
|
+
var version$4 = "1.1.8";
|
|
1714
1714
|
const keybindingLookup = new Set(["emacs", "vim"]);
|
|
1715
1715
|
function isKeybinding(value) {
|
|
1716
1716
|
return keybindingLookup.has(value);
|
|
@@ -229136,6 +229136,21 @@ function toSpawnError(command, error$125) {
|
|
|
229136
229136
|
if (error$125.code === "ENOENT") return /* @__PURE__ */ new Error(`'${command}' was not found. Install it and make sure it is on your PATH.`);
|
|
229137
229137
|
return error$125;
|
|
229138
229138
|
}
|
|
229139
|
+
const PULL_REQUEST_QUERY = `
|
|
229140
|
+
query($owner: String!, $name: String!, $base: String!, $head: String!) {
|
|
229141
|
+
repository(owner: $owner, name: $name) {
|
|
229142
|
+
pullRequests(first: 100, states: OPEN, baseRefName: $base, headRefName: $head) {
|
|
229143
|
+
nodes {
|
|
229144
|
+
number
|
|
229145
|
+
url
|
|
229146
|
+
baseRefName
|
|
229147
|
+
headRefName
|
|
229148
|
+
commits { totalCount }
|
|
229149
|
+
}
|
|
229150
|
+
}
|
|
229151
|
+
}
|
|
229152
|
+
}
|
|
229153
|
+
`;
|
|
229139
229154
|
async function getDefaultBranch() {
|
|
229140
229155
|
return (await exec("gh", [
|
|
229141
229156
|
"repo",
|
|
@@ -229151,19 +229166,19 @@ async function fetchCompare(base$2, head$1) {
|
|
|
229151
229166
|
}
|
|
229152
229167
|
async function findPullRequest(base$2, head$1) {
|
|
229153
229168
|
const matches = (await ghJson([
|
|
229154
|
-
"
|
|
229155
|
-
"
|
|
229156
|
-
"
|
|
229157
|
-
|
|
229158
|
-
"
|
|
229159
|
-
|
|
229160
|
-
"
|
|
229161
|
-
|
|
229162
|
-
"
|
|
229163
|
-
|
|
229164
|
-
"
|
|
229165
|
-
|
|
229166
|
-
])).filter((pullRequest) => pullRequest.baseRefName === base$2 && pullRequest.headRefName === head$1);
|
|
229169
|
+
"api",
|
|
229170
|
+
"graphql",
|
|
229171
|
+
"-f",
|
|
229172
|
+
`query=${PULL_REQUEST_QUERY}`,
|
|
229173
|
+
"-F",
|
|
229174
|
+
"owner={owner}",
|
|
229175
|
+
"-F",
|
|
229176
|
+
"name={repo}",
|
|
229177
|
+
"-F",
|
|
229178
|
+
`base=${base$2}`,
|
|
229179
|
+
"-F",
|
|
229180
|
+
`head=${head$1}`
|
|
229181
|
+
])).data.repository.pullRequests.nodes.filter((pullRequest) => pullRequest.baseRefName === base$2 && pullRequest.headRefName === head$1);
|
|
229167
229182
|
if (matches.length === 0) return null;
|
|
229168
229183
|
if (matches.length > 1) throw new Error(`Multiple open pull requests found for ${base$2} <- ${head$1}.`);
|
|
229169
229184
|
const match = matches[0];
|
|
@@ -229172,7 +229187,7 @@ async function findPullRequest(base$2, head$1) {
|
|
|
229172
229187
|
url: match.url,
|
|
229173
229188
|
baseRefName: match.baseRefName,
|
|
229174
229189
|
headRefName: match.headRefName,
|
|
229175
|
-
commitCount: match.commits.
|
|
229190
|
+
commitCount: match.commits.totalCount
|
|
229176
229191
|
};
|
|
229177
229192
|
}
|
|
229178
229193
|
async function createPullRequest$1(input$3) {
|