github-repository-provider 7.33.45 → 7.33.47
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.33.
|
|
3
|
+
"version": "7.33.47",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"matching-iterator": "^2.0.11",
|
|
36
36
|
"node-fetch": "^3.3.0",
|
|
37
37
|
"one-time-execution-method": "^3.0.6",
|
|
38
|
-
"repository-provider": "^32.6.
|
|
38
|
+
"repository-provider": "^32.6.7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"ava": "^5.2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"etag-cache-leveldb": "^1.4.1",
|
|
45
45
|
"leveldown": "^6.1.1",
|
|
46
46
|
"levelup": "^5.1.1",
|
|
47
|
-
"repository-provider-test-support": "^2.2.
|
|
47
|
+
"repository-provider-test-support": "^2.2.37",
|
|
48
48
|
"semantic-release": "^20.1.1"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
package/src/github-owner.mjs
CHANGED
|
@@ -31,9 +31,6 @@ export class GithubOwner extends RepositoryGroup {
|
|
|
31
31
|
async createRepository(name, options = {}) {
|
|
32
32
|
const response = await this.provider.fetch(`${this.api}/repos`, {
|
|
33
33
|
method: "POST",
|
|
34
|
-
headers: {
|
|
35
|
-
accept: "application/vnd.github.nebula-preview+json"
|
|
36
|
-
},
|
|
37
34
|
body: JSON.stringify({
|
|
38
35
|
name,
|
|
39
36
|
auto_init: true,
|
|
@@ -87,7 +87,7 @@ export class GithubRepository extends Repository {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
async addCommit(tree, parents, message) {
|
|
90
|
-
|
|
90
|
+
const result = await this.provider.fetchJSON(`${this.api}/git/commits`, {
|
|
91
91
|
method: "POST",
|
|
92
92
|
body: JSON.stringify({
|
|
93
93
|
tree,
|
|
@@ -96,8 +96,8 @@ export class GithubRepository extends Repository {
|
|
|
96
96
|
})
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
this.#commits.set(
|
|
100
|
-
return
|
|
99
|
+
this.#commits.set(result.json.sha, result.json);
|
|
100
|
+
return result.json;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -291,7 +291,7 @@ export class GithubRepository extends Repository {
|
|
|
291
291
|
async setRefId(ref, sha, options) {
|
|
292
292
|
ref = ref.replace(/^refs\//, "");
|
|
293
293
|
|
|
294
|
-
const
|
|
294
|
+
const result = await this.provider.fetchJSON(`${this.api}/git/refs/${ref}`, {
|
|
295
295
|
method: "PATCH",
|
|
296
296
|
body: JSON.stringify({
|
|
297
297
|
...options,
|
|
@@ -299,9 +299,9 @@ export class GithubRepository extends Repository {
|
|
|
299
299
|
})
|
|
300
300
|
});
|
|
301
301
|
|
|
302
|
-
if (
|
|
302
|
+
if (result.response.ok) {
|
|
303
303
|
this.#refs.set(ref, sha);
|
|
304
|
-
return
|
|
304
|
+
return result.json;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|