-
Notifications
You must be signed in to change notification settings - Fork 38
feat: add project create event #2348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b3b3b9d
db17b90
d29cf87
dbb7765
14d9eb0
601513f
e3fc000
c675713
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"ActionType": "ProjectCreated", | ||
"TargetType": "Project", | ||
"TargetID": "3089bb36-e27b-428b-8009-d015c8737c56", | ||
"ActorType": "USER", | ||
"ActorID": "1089bb36-e27b-428b-8009-d015c8737c54", | ||
"ActorEmail": "john@cyberdyne.io", | ||
"ActorName": "John Connor", | ||
"OrgID": "1089bb36-e27b-428b-8009-d015c8737c54", | ||
"Description": "John Connor has created the project 'test-project'", | ||
"Info": { | ||
"project_id": "3089bb36-e27b-428b-8009-d015c8737c56", | ||
"project_name": "test-project" | ||
}, | ||
"Digest": "sha256:4d72f70e3f7311eecbb72451c71c6dceec3d38f8304cd1a064288148959a3991" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"ActionType": "ProjectVersionCreated", | ||
"TargetType": "Project", | ||
"TargetID": "3089bb36-e27b-428b-8009-d015c8737c56", | ||
"ActorType": "USER", | ||
"ActorID": "1089bb36-e27b-428b-8009-d015c8737c54", | ||
"ActorEmail": "john@cyberdyne.io", | ||
"ActorName": "John Connor", | ||
"OrgID": "1089bb36-e27b-428b-8009-d015c8737c54", | ||
"Description": "John Connor has created release version 'v1.0.0' for project 'test-project'", | ||
"Info": { | ||
"project_id": "3089bb36-e27b-428b-8009-d015c8737c56", | ||
"project_name": "test-project", | ||
"version_id": "5089bb36-e27b-428b-8009-d015c8737c58", | ||
"version": "v1.0.0", | ||
"prerelease": false | ||
}, | ||
"Digest": "sha256:4cd962168303a29e0a3adb668b37086e50b15a92548d93a569eccf9a63db5122" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,12 +73,14 @@ func (uc *AuditorUseCase) Dispatch(ctx context.Context, entry auditor.LogEntry, | |
|
||
payload, err := auditor.GenerateAuditEvent(entry, opts...) | ||
if err != nil { | ||
uc.log.Error("failed to generate audit event", "error", err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and the system was not logging auditing errors |
||
sentry.CaptureException(fmt.Errorf("failed to generate audit event: %w", err)) | ||
return | ||
} | ||
|
||
// Send event to event bus | ||
if err := uc.publisher.Publish(payload); err != nil { | ||
uc.log.Error("failed to publish event", "error", err) | ||
sentry.CaptureException(fmt.Errorf("failed to publish event: %w", err)) | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fixing this on purpose