github-repository-provider 7.29.6 → 7.30.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/README.md +3 -3
- package/package.json +4 -4
- package/src/github-provider.mjs +17 -24
- package/src/github-repository.mjs +1 -2
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ console.log(entry.name);
|
|
|
73
73
|
* [Parameters](#parameters-11)
|
|
74
74
|
* [initializeBranches](#initializebranches)
|
|
75
75
|
* [initializeTags](#initializetags)
|
|
76
|
-
* [
|
|
76
|
+
* [url](#url)
|
|
77
77
|
* [issuesURL](#issuesurl)
|
|
78
78
|
* [homePageURL](#homepageurl)
|
|
79
79
|
* [api](#api)
|
|
@@ -304,9 +304,9 @@ Returns **AsyncIterator\<Commit>**
|
|
|
304
304
|
|
|
305
305
|
<https://docs.github.com/en/rest/reference/repos#list-repository-tags>
|
|
306
306
|
|
|
307
|
-
###
|
|
307
|
+
### url
|
|
308
308
|
|
|
309
|
-
Returns **[
|
|
309
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** github https url
|
|
310
310
|
|
|
311
311
|
### issuesURL
|
|
312
312
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.30.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"content-entry": "^5.0.1",
|
|
34
34
|
"fetch-link-util": "^1.0.8",
|
|
35
|
-
"fetch-rate-limit-util": "^3.0.
|
|
35
|
+
"fetch-rate-limit-util": "^3.0.4",
|
|
36
36
|
"matching-iterator": "^2.0.4",
|
|
37
37
|
"node-fetch": "^3.2.4",
|
|
38
38
|
"one-time-execution-method": "^3.0.1",
|
|
39
|
-
"repository-provider": "^31.
|
|
39
|
+
"repository-provider": "^31.2.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"ava": "^4.2.0",
|
|
43
43
|
"c8": "^7.11.3",
|
|
44
44
|
"documentation": "^13.2.5",
|
|
45
|
-
"repository-provider-test-support": "^2.1.
|
|
45
|
+
"repository-provider-test-support": "^2.1.27",
|
|
46
46
|
"semantic-release": "^19.0.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
package/src/github-provider.mjs
CHANGED
|
@@ -92,32 +92,25 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
fetch(url, options = {}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
responseHandler,
|
|
107
|
-
actions,
|
|
108
|
-
(url, ...args) => this.trace(url.toString(), ...args)
|
|
109
|
-
);
|
|
95
|
+
fetch(url, options = {}) {
|
|
96
|
+
options.reporter = (url, ...args) => this.trace(url.toString(), ...args);
|
|
97
|
+
options.cache = this.cache;
|
|
98
|
+
|
|
99
|
+
return stateActionHandler(fetch, new URL(url, this.api), {
|
|
100
|
+
...options,
|
|
101
|
+
headers: {
|
|
102
|
+
authorization: `token ${this.authentication.token}`,
|
|
103
|
+
...options.headers
|
|
104
|
+
}
|
|
105
|
+
});
|
|
110
106
|
}
|
|
111
107
|
|
|
112
|
-
fetchJSON(url, options
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
actions
|
|
120
|
-
);
|
|
108
|
+
fetchJSON(url, options={}) {
|
|
109
|
+
options.postprocess = async response => {
|
|
110
|
+
return { response, json: await response.json() };
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return this.fetch(url, options);
|
|
121
114
|
}
|
|
122
115
|
|
|
123
116
|
/**
|
|
@@ -162,8 +162,7 @@ export class GithubRepository extends Repository {
|
|
|
162
162
|
|
|
163
163
|
const { response, json } = await this.provider.fetchJSON(
|
|
164
164
|
`${this.api}/git/ref/${ref}`,
|
|
165
|
-
|
|
166
|
-
conflictErrorActions
|
|
165
|
+
{ stateActions: conflictErrorActions }
|
|
167
166
|
);
|
|
168
167
|
// TODO why does this happen ?
|
|
169
168
|
if (!response.ok || !json.object.sha) {
|