This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const GITLAB_URL = "https://gitlab.com"; // Replace with your GitLab instance URL | |
const PROJECT_ID = "<project_id>"; // Replace with your project ID | |
const PRIVATE_TOKEN = "<token>"; // Replace with your personal access token (needs api read and write scope) | |
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); | |
const deleteTag = async (tagName) => { | |
try { | |
const response = await fetch(`${GITLAB_URL}/api/v4/projects/${PROJECT_ID}/repository/tags/${tagName}`, { | |
method: 'DELETE', |