mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 12:22:17 +01:00
test: Add integration testing (#131)
* docs: Update description * deps: Add nock * chore: Add resolveJsonModule * test: Add integration testing * chore: Add @typescript-eslint/eslint-plugin * refactor: Fix lint errors * chore: Add eslint-plugin-jest * refactor: Fix lint errors * test: Add remove working files * ci: Comment out cache steps
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
export function getURL(org: string, repo: string, api: string): string {
|
||||
let url: string = '';
|
||||
let url = '';
|
||||
|
||||
if (api === 'brew') {
|
||||
url = `https://formulae.brew.sh/api/formula/${repo}.json`;
|
||||
@@ -21,7 +21,7 @@ export async function getLatestVersion(
|
||||
const url = getURL(org, repo, api);
|
||||
const response = await fetch(url);
|
||||
const json = await response.json();
|
||||
let latestVersion: string = '';
|
||||
let latestVersion = '';
|
||||
if (api === 'brew') {
|
||||
latestVersion = json.versions.stable;
|
||||
} else if (api === 'github') {
|
||||
|
||||
Reference in New Issue
Block a user