github-repository-provider 7.24.6 → 7.24.7
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 +1 -1
- package/package.json +2 -2
- package/src/github-provider.mjs +8 -3
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ Writes content into the branch
|
|
|
97
97
|
|
|
98
98
|
* `entry` **ConentEntry**
|
|
99
99
|
|
|
100
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
|
|
100
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ConentEntry>** written content with sha values set
|
|
101
101
|
|
|
102
102
|
### baseTreeSha
|
|
103
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.24.
|
|
3
|
+
"version": "7.24.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"ava": "^3.15.0",
|
|
43
|
-
"c8": "^7.
|
|
43
|
+
"c8": "^7.11.0",
|
|
44
44
|
"documentation": "^13.2.5",
|
|
45
45
|
"repository-provider-test-support": "^1.8.15",
|
|
46
46
|
"semantic-release": "^18.0.1"
|
package/src/github-provider.mjs
CHANGED
|
@@ -117,16 +117,21 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
async fetchJSON(url, options) {
|
|
120
|
-
|
|
120
|
+
let i = 1;
|
|
121
|
+
while (true) {
|
|
121
122
|
try {
|
|
122
123
|
const response = await this.fetch(url, options);
|
|
123
124
|
if (!response.ok) {
|
|
124
|
-
throw new Error(
|
|
125
|
+
throw new Error(
|
|
126
|
+
`Unable to fetch ${response.url} (${response.status}) try #${i}`
|
|
127
|
+
);
|
|
125
128
|
}
|
|
126
129
|
return await response.json();
|
|
127
130
|
} catch (e) {
|
|
131
|
+
if (i++ >= 3) {
|
|
132
|
+
throw e;
|
|
133
|
+
}
|
|
128
134
|
this.error(e);
|
|
129
|
-
throw e;
|
|
130
135
|
}
|
|
131
136
|
}
|
|
132
137
|
}
|