Skip to content

Commit

Permalink
- waah
Browse files Browse the repository at this point in the history
  • Loading branch information
KinNeko-De committed Aug 3, 2024
1 parent 8591c0f commit ef0df51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
})).data.map(branch => branch.name);
console.log("Existing feature branches:", existingFeatureBranches);
const tags = await github.rest.git.listMatchingRefs({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/v',
});
for (const tag of tags.data) {
const tagName = tag.ref.replace('refs/tags/', '');
console.log("Tag:", tagName);
const tagParts = /^v[0-9]*\.[0-9]*\.[0-9]*-(.*)\.([0-9]*)$/.exec(tagName);
if (tagParts) {
const featureBranchName = tagParts[1];
console.log("Feature branch name:", featureBranchName);
if (!existingFeatureBranches.includes(`feature/${featureBranchName}`)) {
console.log(`Branch ${featureBranchName} does not exist, so deleting tag ${tagName}`);
await github.rest.git.deleteRef({
Expand Down

0 comments on commit ef0df51

Please sign in to comment.