mirror of
https://github.com/goharbor/harbor
synced 2025-04-27 16:57:18 +00:00
revert change of artifact event (#21278)
fixes #20897 Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
b72b5cec13
commit
cdb0d2fc31
@ -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,
|
||||
}
|
||||
|
||||
if option != nil && len(option.Tags) > 0 {
|
||||
e.Tag = option.Tags[0]
|
||||
}
|
||||
notification.AddEvent(ctx, e)
|
||||
// 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)
|
||||
return created, artifact.ID, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user