Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
shouldTest: opts => !!getGitHubRepoSlug() && (!!opts.target || !!opts.serverBaseUrl),
test: opts => Boolean(opts.githubToken || opts.githubAppToken),
async function runGithubStatusCheck(options, targetUrlMap) {
const hash = getCurrentHash();
const slug = getGitHubRepoSlug();
const {githubToken, githubAppToken} = options;
if (!githubToken && !githubAppToken) return print('No GitHub token set, skipping.\n');
print('GitHub token found, attempting to set status...\n');
if (!slug) return print(`No GitHub remote found, skipping.\n`);
if (!slug.includes('/')) return print(`Invalid repo slug "${slug}", skipping.\n`);
if (!hash) return print(`Invalid hash "${hash}"\n, skipping.`);
const assertionResults = loadAssertionResults();
const groupedResults = _.groupBy(assertionResults, result => result.url).sort(
(a, b) => a[0].url.length - b[0].url.length
);
if (groupedResults.length) {
for (const group of groupedResults) {
const rawUrl = group[0].url;