Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on May 30, 2024. It is now read-only.
Enhance the notification message - #414
Merged
Merged
Conversation
noahinghforce-pushed
the
enhance-notification
branch
from
April 18, 2022 13:19
b07a106 to
122d281Comparenoahinghforce-pushed
the
enhance-notification
branch
from
April 23, 2022 11:06
122d281 to
54e3a27Comparenoahinghforce-pushed
the
enhance-notification
branch
from
April 23, 2022 11:07
54e3a27 to
b926519Comparenoahinghforce-pushed
the
enhance-notification
branch
from
April 23, 2022 11:20
703c817 to
61b1763Comparenoahingh
commented
Apr 23, 2022
Comment on lines
+259
to
+275
| func (i *DeploymentInteractor) CreateDeploymentStatus(ctx context.Context, ds *ent.DeploymentStatus) (*ent.DeploymentStatus, error) { | ||
| ds, err := i.store.CreateEntDeploymentStatus(ctx, ds) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| if _, err := i.store.CreateEvent(ctx, &ent.Event{ | ||
| Kind: event.KindDeploymentStatus, | ||
| Type: event.TypeCreated, | ||
| DeploymentStatusID: ds.ID, | ||
| }); err != nil { | ||
| i.log.Error("Failed to dispatch the event.", zap.Error(err)) | ||
| } | ||
| return ds, nil | ||
| } | ||
MemberAuthor
There was a problem hiding this comment.
Add CreateDeploymentStatus method and create a event internally.
noahingh
marked this pull request as ready for review
April 23, 2022 11:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When an event includes only a deployment, it isn't easy to get the status, description, and log_url of deployment status. To resolve this, we should add deployment_status as an event type and build a detailed notification message with a deployment status.
Schema
The schema contains two changes: 1) By adding
deployment_statusas an event type, a notification can include status and description of deployment when fired. 2) Denormalizerepo_idinDeploymentStatusto retrieve repository information.