diff --git a/src/lib/links.ts b/src/lib/links.ts index dc9311c..cb78416 100644 --- a/src/lib/links.ts +++ b/src/lib/links.ts @@ -1,3 +1,3 @@ -export const gitHubLink = "javascript:(async () => {const repoOwner = 'Rectify11'; const repoName = 'Installer'; const workflowFileName = 'build.yml'; try {const runsResponse = await fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/actions/workflows/${workflowFileName}/runs`); const runsData = await runsResponse.json(); const latestSuccessfulRun = runsData.workflow_runs.find(run => run.conclusion === 'success'); if (!latestSuccessfulRun) throw new Error('No successful runs found'); const artifactsResponse = await fetch(latestSuccessfulRun.artifacts_url); const artifactsData = await artifactsResponse.json(); const latestArtifact = artifactsData.artifacts[0]; if (!latestArtifact) throw new Error('No artifacts found for the latest successful run'); window.location.href = `https://nightly.link/${repoOwner}/${repoName}/actions/runs/${latestArtifact.workflow_run.id}/artifacts/${latestArtifact.id}`; } catch (error) { console.error('Error fetching artifact:', error); alert('Failed to fetch the latest artifact. See console for details.'); } })()"; +export const gitHubLink = "javascript:(async () => {const repoOwner = 'Rectify11'; const repoName = 'Installer'; const workflowFileName = 'build.yml'; try {const runsResponse = await fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/actions/workflows/${workflowFileName}/runs`); const runsData = await runsResponse.json(); const latestSuccessfulRun = runsData.workflow_runs.find(run => run.conclusion === 'success'); if (!latestSuccessfulRun) throw new Error('No successful runs found'); const artifactsResponse = await fetch(latestSuccessfulRun.artifacts_url); const artifactsData = await artifactsResponse.json(); const latestArtifact = artifactsData.artifacts[0]; if (!latestArtifact) throw new Error('No artifacts found for the latest successful run'); window.location.href = `https://nightly.link/${repoOwner}/${repoName}/suites/${latestArtifact.workflow_run.id}/artifacts/${latestArtifact.id}`; } catch (error) { console.error('Error fetching artifact:', error); alert('Failed to fetch the latest artifact. See console for details.'); } })()"; export const gitHubSrcLink = "https://github.com/Rectify11/Installer"; export const discordLink = "https://discord.gg/rectify11-community-1077324213142175744"; \ No newline at end of file