github-repository-provider 7.25.35 → 7.25.36
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.25.
|
|
3
|
+
"version": "7.25.36",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"matching-iterator": "^2.0.2",
|
|
37
37
|
"node-fetch": "3.2.0",
|
|
38
38
|
"one-time-execution-method": "^2.0.10",
|
|
39
|
-
"repository-provider": "^26.7.
|
|
39
|
+
"repository-provider": "^26.7.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"ava": "^4.0.1",
|
|
43
43
|
"c8": "^7.11.0",
|
|
44
44
|
"documentation": "^13.2.5",
|
|
45
|
-
"repository-provider-test-support": "^1.12.
|
|
45
|
+
"repository-provider-test-support": "^1.12.6",
|
|
46
46
|
"semantic-release": "^19.0.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
package/src/github-branch.mjs
CHANGED
|
@@ -75,7 +75,7 @@ export class GithubBranch extends Branch {
|
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
let r = await this.provider.fetchJSON(`repos/${this.slug}/git/commits`, {
|
|
79
79
|
method: "POST",
|
|
80
80
|
body: JSON.stringify({
|
|
81
81
|
message,
|
|
@@ -84,16 +84,18 @@ export class GithubBranch extends Branch {
|
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
r = await this.provider.fetchJSON(
|
|
88
88
|
`repos/${this.slug}/git/refs/heads/${this.name}`,
|
|
89
89
|
{
|
|
90
90
|
method: "PATCH",
|
|
91
91
|
body: JSON.stringify({
|
|
92
92
|
...options,
|
|
93
|
-
sha
|
|
93
|
+
sha: r.json.sha
|
|
94
94
|
})
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
|
+
|
|
98
|
+
return r.json;
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
/**
|
|
@@ -166,7 +168,6 @@ export class GithubBranch extends Branch {
|
|
|
166
168
|
});
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
|
-
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
|
|
@@ -107,12 +107,12 @@ export class GithubRepository extends Repository {
|
|
|
107
107
|
async refId(ref) {
|
|
108
108
|
ref = ref.replace(/^refs\//, "");
|
|
109
109
|
|
|
110
|
-
const { json } = await this.provider.fetchJSON(
|
|
110
|
+
const { response, json } = await this.provider.fetchJSON(
|
|
111
111
|
`repos/${this.slug}/git/ref/${ref}`
|
|
112
112
|
);
|
|
113
113
|
|
|
114
114
|
// TODO why does this happen ?
|
|
115
|
-
if (!json.object.sha) {
|
|
115
|
+
if (!response.ok || !json.object.sha) {
|
|
116
116
|
throw new Error(`No refId for '${this.name}' '${ref}'`);
|
|
117
117
|
}
|
|
118
118
|
|