@aspruyt/xfg 3.9.6 → 3.9.8
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.
|
@@ -167,6 +167,7 @@ async function processRulesets(repos, config, options, processor, repoProcessor,
|
|
|
167
167
|
}
|
|
168
168
|
else {
|
|
169
169
|
logger.error(i + 1, repoName, result.message);
|
|
170
|
+
collector.appendError(repoName, result.message);
|
|
170
171
|
}
|
|
171
172
|
results.push({
|
|
172
173
|
repoName,
|
|
@@ -240,6 +241,7 @@ async function processRepoSettings(repos, config, options, processorFactory, res
|
|
|
240
241
|
}
|
|
241
242
|
else {
|
|
242
243
|
logger.error(current, repoName, result.message);
|
|
244
|
+
collector.appendError(repoName, result.message);
|
|
243
245
|
}
|
|
244
246
|
if (!result.skipped) {
|
|
245
247
|
const existing = results.find((r) => r.repoName === repoName);
|
|
@@ -156,9 +156,18 @@ export class GitHubRepoSettingsStrategy {
|
|
|
156
156
|
}
|
|
157
157
|
async getPrivateVulnerabilityReporting(github, options) {
|
|
158
158
|
const endpoint = `/repos/${github.owner}/${github.repo}/private-vulnerability-reporting`;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
try {
|
|
160
|
+
const result = await this.ghApi("GET", endpoint, undefined, options);
|
|
161
|
+
const data = JSON.parse(result);
|
|
162
|
+
return data.enabled === true;
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
166
|
+
if (message.includes("HTTP 404")) {
|
|
167
|
+
return false; // 404 = not available (e.g. private repos)
|
|
168
|
+
}
|
|
169
|
+
throw error; // Re-throw other errors
|
|
170
|
+
}
|
|
162
171
|
}
|
|
163
172
|
validateGitHub(repoInfo) {
|
|
164
173
|
if (!isGitHubRepo(repoInfo)) {
|
package/package.json
CHANGED