mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-26 16:35:39 +00:00
Add fixed bugs tab to versions
This commit is contained in:
@@ -18,6 +18,7 @@ const latestVersion = __LATEST_VERSION__ ?? ''
|
||||
const mcmetaUrl = 'https://raw.githubusercontent.com/misode/mcmeta'
|
||||
const mcmetaTarballUrl = 'https://github.com/misode/mcmeta/tarball'
|
||||
const changesUrl = 'https://raw.githubusercontent.com/misode/technical-changes'
|
||||
const fixesUrl = 'https://raw.githubusercontent.com/misode/mcfixes'
|
||||
|
||||
type McmetaTypes = 'summary' | 'data' | 'data-json' | 'assets' | 'assets-json' | 'registries' | 'atlas'
|
||||
|
||||
@@ -235,6 +236,31 @@ export async function fetchChangelogs(): Promise<Change[]> {
|
||||
}
|
||||
}
|
||||
|
||||
export interface Bugfix {
|
||||
id: string,
|
||||
summary: string,
|
||||
labels: string[],
|
||||
status: string,
|
||||
confirmation_status: string,
|
||||
categories: string[],
|
||||
priority: string,
|
||||
fix_versions: string[],
|
||||
creation_date: string,
|
||||
resolution_date: string,
|
||||
updated_date: string,
|
||||
watches: number,
|
||||
votes: number,
|
||||
}
|
||||
|
||||
export async function fetchBugfixes(version: VersionId): Promise<Bugfix[]> {
|
||||
try {
|
||||
const fixes = await cachedFetch<Bugfix[]>(`${fixesUrl}/main/versions/${version}.json`, { refresh: true })
|
||||
return fixes
|
||||
} catch (e) {
|
||||
throw new Error(`Error occured while fetching bugfixes: ${message(e)}`)
|
||||
}
|
||||
}
|
||||
|
||||
interface FetchOptions<D> {
|
||||
decode?: (r: Response) => Promise<D>
|
||||
refresh?: boolean
|
||||
|
||||
Reference in New Issue
Block a user