From 4642140c9e4867ea39c051bbacbf612dc64bc1fd Mon Sep 17 00:00:00 2001 From: Gregor Noczinski Date: Sat, 2 Nov 2024 00:10:52 +0100 Subject: [PATCH] Also implement cleanup rule. --- cmd/build/repo-prs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/build/repo-prs.go b/cmd/build/repo-prs.go index 38593cd..4d66ce5 100644 --- a/cmd/build/repo-prs.go +++ b/cmd/build/repo-prs.go @@ -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...") @@ -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)