Skip to content

Commit

Permalink
revert change of artifact event
Browse files Browse the repository at this point in the history
fixes #20897
Signed-off-by: wang yan <[email protected]>
  • Loading branch information
wy65701436 committed Dec 9, 2024
1 parent 529375f commit 3a7a129
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/controller/artifact/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,16 @@ func (c *controller) Ensure(ctx context.Context, repository, digest string, opti
}
}
}
if created {
// fire event for create
e := &metadata.PushArtifactEventMetadata{
Ctx: ctx,
Artifact: artifact,
}
// fire event for create
e := &metadata.PushArtifactEventMetadata{
Ctx: ctx,
Artifact: artifact,
}

if option != nil && len(option.Tags) > 0 {
e.Tag = option.Tags[0]
}
notification.AddEvent(ctx, e)
if option != nil && len(option.Tags) > 0 {
e.Tag = option.Tags[0]
}
notification.AddEvent(ctx, e)
return created, artifact.ID, nil
}

Expand Down

0 comments on commit 3a7a129

Please sign in to comment.