Skip to content

Commit

Permalink
Also implement cleanup rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Nov 1, 2024
1 parent 4cc99a1 commit 4642140
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/build/repo-prs.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ func (this *repoPr) deleteRelatedArtifacts(ctx context.Context) error {
return fmt.Errorf("cannot delete artifacts for %v: %w", this, err)
}

docsTag := fmt.Sprintf("docs/pr-%d", this.GetID())
docsTag := fmt.Sprintf("docs/pr-%d", this.GetNumber())
if err := this.parent.execute(ctx, "git", "push", "--delete", "origin", docsTag).
do(); err != nil {
log.With("pr", this.GetID()).
log.With("pr", this.GetNumber()).
With("tag", docsTag).
WithError(err).
Info("cannot delete tag in Git; this can be a problem or simply mean that the tag does not exist; ignoring...")
Expand All @@ -198,7 +198,7 @@ func (this *repoPr) deleteRelatedArtifacts(ctx context.Context) error {
return this.parent.actions.packages.deleteVersionsWithTags(ctx, tag)
}

mainTag := fmt.Sprintf("pr-%d", this.GetID())
mainTag := fmt.Sprintf("pr-%d", this.GetNumber())

if err := do(mainTag); err != nil {
return fail(err)
Expand Down

0 comments on commit 4642140

Please sign in to comment.