Remove logs and add error when the tag name is empty

This commit is contained in:
Oliver 2025-11-16 11:10:09 -07:00
parent 6c150b9b0e
commit caf6dfa4a3

View file

@ -7,10 +7,14 @@ const {
FORGEJO_TOKEN: TOKEN, FORGEJO_TOKEN: TOKEN,
} = process.env; } = process.env;
console.log(process.env);
console.log({ TAG_NAME, API_URL, REPO, });
async function main() { async function main() {
if (!TAG_NAME) {
console.log(`Tag name must not be blank`);
process.exit(1);
};
const requestURL = `${API_URL}/repos/${REPO}/tags/${TAG_NAME}`; const requestURL = `${API_URL}/repos/${REPO}/tags/${TAG_NAME}`;
const response = await axios.get( const response = await axios.get(