fix: Made github token optional
Some checks failed
Build Gameflow Site / build (push) Failing after 1m5s
Some checks failed
Build Gameflow Site / build (push) Failing after 1m5s
This commit is contained in:
parent
e8395a832e
commit
cb0ef9207d
4 changed files with 15 additions and 23 deletions
|
|
@ -1,37 +1,29 @@
|
|||
const githubHeaders = import.meta.env.GITHUB_TOKEN
|
||||
? {
|
||||
headers: {
|
||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
export const repoData = await fetch(
|
||||
"https://api.github.com/repos/simeonradivoev/gameflow-deck",
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
||||
},
|
||||
},
|
||||
githubHeaders,
|
||||
).then((res) => res.json());
|
||||
|
||||
export const releaseData = await fetch(
|
||||
"https://api.github.com/repos/simeonradivoev/gameflow-deck/releases/latest",
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
||||
},
|
||||
},
|
||||
githubHeaders,
|
||||
).then((res) => res.json());
|
||||
|
||||
export const appContributorsData = await fetch(
|
||||
"https://api.github.com/repos/simeonradivoev/gameflow-deck/contributors",
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
||||
},
|
||||
},
|
||||
githubHeaders,
|
||||
).then((res) => res.json());
|
||||
|
||||
export const storeContributorsData = await fetch(
|
||||
"https://api.github.com/repos/simeonradivoev/gameflow-store/contributors",
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
||||
},
|
||||
},
|
||||
githubHeaders,
|
||||
).then((res) => res.json());
|
||||
|
||||
export const emulators = await fetch(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue