Remove logs and add error when the tag name is empty
This commit is contained in:
parent
6c150b9b0e
commit
caf6dfa4a3
1 changed files with 6 additions and 2 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue