Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FSH Finder URL for regression script #1523

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions regression/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from 'axios';
import { remove, uniqBy, padEnd } from 'lodash';
import { axiosGet } from '../src/utils/axiosUtils';

const FSH_FINDER_URL = 'https://fshschool.org/fsh-finder/fshy_repos.json';
const FSH_FINDER_URL = 'https://fshschool.github.io/fsh-finder/fshy_repos.json';
const BUILD_URL_RE = /^([^/]+)\/([^/]+)\/branches\/([^/]+)\/qa\.json$/;
const FSHY_PATHS = ['sushi-config.yaml', 'input/fsh', 'fsh'];
const ORGANIZATIONS = [
Expand All @@ -27,9 +27,15 @@ const ORGANIZATIONS = [
export async function findReposUsingFSHFinder(
options: { count?: number; lookback?: number } = {}
): Promise<string> {
const res = await axiosGet(FSH_FINDER_URL);
const lines = [`# FSH Finder last Updated: ${res?.data?.updated}`];
let repoData: any[] = res?.data?.repos ?? [];
const lines: string[] = [];
let repoData: any[];
try {
const res = await axiosGet(FSH_FINDER_URL);
lines.push(`# FSH Finder last Updated: ${res?.data?.updated}`);
repoData = res?.data?.repos ?? [];
} catch (e) {
throw new Error(`Failed to load repo data from ${FSH_FINDER_URL}: ${e.message}`);
}
if (options.lookback != null || options.count != null) {
lines.push(
`# Limited to${options.count ? ` last ${options.count}` : ''} repositories${
Expand Down
Loading