github-repository-provider 7.25.8 → 7.25.12
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 +6 -6
- package/src/github-provider.mjs +9 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.25.
|
|
3
|
+
"version": "7.25.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"content-entry": "^
|
|
33
|
+
"content-entry": "^4.1.0",
|
|
34
34
|
"fetch-link-util": "^1.0.4",
|
|
35
|
-
"fetch-rate-limit-util": "^2.4.
|
|
35
|
+
"fetch-rate-limit-util": "^2.4.6",
|
|
36
36
|
"matching-iterator": "^2.0.0",
|
|
37
37
|
"node-fetch": "3.1.0",
|
|
38
38
|
"one-time-execution-method": "^2.0.9",
|
|
39
39
|
"repository-provider": "^26.1.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"ava": "^4.0.
|
|
42
|
+
"ava": "^4.0.1",
|
|
43
43
|
"c8": "^7.11.0",
|
|
44
44
|
"documentation": "^13.2.5",
|
|
45
|
-
"repository-provider-test-support": "^1.9.
|
|
45
|
+
"repository-provider-test-support": "^1.9.4",
|
|
46
46
|
"semantic-release": "^18.0.1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
|
-
"node": ">=14.18.
|
|
49
|
+
"node": ">=14.18.3"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
package/src/github-provider.mjs
CHANGED
|
@@ -51,7 +51,7 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
51
51
|
host: {
|
|
52
52
|
type: "string",
|
|
53
53
|
env: ["{{instanceIdentifier}}HOST", "GH_HOST"],
|
|
54
|
-
default:
|
|
54
|
+
default: host
|
|
55
55
|
},
|
|
56
56
|
ssh: {
|
|
57
57
|
type: "url",
|
|
@@ -97,17 +97,7 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
97
97
|
return GithubOwner;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
fetch(url, options = {}) {
|
|
101
|
-
return stateActionHandler(fetch, new URL(url, this.api), {
|
|
102
|
-
...options,
|
|
103
|
-
headers: {
|
|
104
|
-
authorization: `token ${this.authentication.token}`,
|
|
105
|
-
...options.headers
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
fetchJSON(url, options = {}) {
|
|
100
|
+
fetch(url, options = {}, responseHandler) {
|
|
111
101
|
return stateActionHandler(
|
|
112
102
|
fetch,
|
|
113
103
|
new URL(url, this.api),
|
|
@@ -118,12 +108,16 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
118
108
|
...options.headers
|
|
119
109
|
}
|
|
120
110
|
},
|
|
121
|
-
|
|
122
|
-
return { response, json: await response.json() };
|
|
123
|
-
}
|
|
111
|
+
responseHandler
|
|
124
112
|
);
|
|
125
113
|
}
|
|
126
114
|
|
|
115
|
+
fetchJSON(url, options) {
|
|
116
|
+
return this.fetch(url, options, async response => {
|
|
117
|
+
return { response, json: await response.json() };
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
127
121
|
/**
|
|
128
122
|
* {@link https://developer.github.com/v3/repos/#list-repositories-for-the-authenticated-user}
|
|
129
123
|
*/
|