Data Request API helper #10

Merged
Oliver merged 94 commits from feat/data-requests into main 2025-11-22 02:51:15 +00:00
Showing only changes of commit 9723ea8bdc - Show all commits

View file

@ -7,22 +7,24 @@ const {
FORGEJO_TOKEN: TOKEN, FORGEJO_TOKEN: TOKEN,
} = process.env; } = process.env;
async function main() { console.log(process.env);
const requestURL = `${API_URL}/repos/${REPO}/tags/${TAG_NAME}`;
const response = await axios.get( // async function main() {
requestURL, // const requestURL = `${API_URL}/repos/${REPO}/tags/${TAG_NAME}`;
{
headers: { Authorization: `token ${TOKEN}` },
validateStatus: () => true,
},
);
// We actually *want* an error when the tag exists, instead of when // const response = await axios.get(
// it doesn't // requestURL,
if (response.status === 200) { // {
process.exit(1); // headers: { Authorization: `token ${TOKEN}` },
}; // validateStatus: () => true,
}; // },
// );
main(); // // We actually *want* an error when the tag exists, instead of when
// // it doesn't
// if (response.status === 200) {
// process.exit(1);
// };
// };
// main();