You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(err.cause?.response?.status==403&&err.cause?.response?.data?.message?.includes("Advanced Security must be enabled for this repository to use code scanning")){
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Code scanning is not configured, so marking backfill task complete");
62
60
return{
63
61
edges: [],
64
62
jiraPayload: undefined
65
63
};
64
+
}elseif(err.cause?.response?.status==404){
65
+
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Repo not found, so marking backfill task complete");
66
+
return{
67
+
edges: [],
68
+
jiraPayload: undefined
69
+
};
70
+
}elseif(err.cause?.response?.status==451){
71
+
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Code scanning not available due to legal reasons, so marking backfill task complete");
if(err.cause?.response?.status==403&&err.cause?.response?.data?.message?.includes("Dependabot alerts are disabled for this repository")){
45
45
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Dependabot alerts disabled, so marking backfill task complete");
46
46
return{
47
47
edges: [],
48
48
jiraPayload: undefined
49
49
};
50
50
}elseif(err.cause?.response?.status==403&&err.cause?.response?.data?.message?.includes("Dependabot alerts are not available for archived repositories")){
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Archived repository, so marking backfill task complete");
52
+
return{
53
+
edges: [],
54
+
jiraPayload: undefined
55
+
};
56
+
}elseif(err.cause?.response?.status==404){
57
+
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Repo not found, so marking backfill task complete");
58
+
return{
59
+
edges: [],
60
+
jiraPayload: undefined
61
+
};
62
+
}elseif(err.cause?.response?.status==451){
63
+
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Repo not available due to legal reasons, so marking backfill task complete");
if(err.cause?.response?.status==404&&err.cause?.response?.data?.message?.includes("Secret scanning is disabled on this repository")){
41
41
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Secret scanning disabled, so marking backfill task complete");
42
42
return{
43
43
edges: [],
44
44
jiraPayload: undefined
45
45
};
46
+
}elseif(err.cause?.response?.status==404){
47
+
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Repo not found, so marking backfill task complete");
48
+
return{
49
+
edges: [],
50
+
jiraPayload: undefined
51
+
};
52
+
}elseif(err.cause?.response?.status==451){
53
+
logger.info({ err,githubInstallationId: gitHubClient.githubInstallationId},"Repo not available due to legal reasons, so marking backfill task complete");
0 commit comments