@iobroker/repochecker 4.0.0-alpha.2 → 4.0.0-alpha.4
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/lib/common.js +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/common.js
CHANGED
|
@@ -130,6 +130,20 @@ async function getFilesList(context) {
|
|
|
130
130
|
}
|
|
131
131
|
} catch (e) {
|
|
132
132
|
error(`Cannot download ${url} ${e}`);
|
|
133
|
+
info(`will retry using github api`);
|
|
134
|
+
|
|
135
|
+
const url2 = `https://api.github.com/repos/${context.repository}/git/trees/${context.lastCommitSha}?recursive=1`;
|
|
136
|
+
debug(`Download ${url} [RETRY]`);
|
|
137
|
+
try {
|
|
138
|
+
const response = await axios(url2);
|
|
139
|
+
debug(`download succeded [RETRY]`);
|
|
140
|
+
if (response.data?.tree) {
|
|
141
|
+
response.data.tree.forEach(fileInfo => filesList.push(fileInfo.path));
|
|
142
|
+
}
|
|
143
|
+
} catch (e) {
|
|
144
|
+
error(`Cannot download ${url} ${e}`);
|
|
145
|
+
throw 'Cannot download files listing.'; // ABORT
|
|
146
|
+
}
|
|
133
147
|
}
|
|
134
148
|
|
|
135
149
|
debug('Files detected at repository:');
|
package/package.json
CHANGED