Skip to content

Commit

Permalink
chore(): chat merge conflict interface
Browse files Browse the repository at this point in the history
  • Loading branch information
alyfinder committed Dec 5, 2024
1 parent 06084fa commit 324fccf
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api
Submodule api updated from 5fa7d1 to c6bab4
7 changes: 6 additions & 1 deletion internal/core/kernel/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ type (
// NotifyLinesExceed sends a message indicating a line exceed message.
//
// This method must not be called from the workflow.
NotifyLinesExceed(ctx context.Context, event *events.Event[eventsv1.ChatHook, eventsv1.Diff]) error // TODO - need to handle branch
NotifyLinesExceed(ctx context.Context, event *events.Event[eventsv1.ChatHook, eventsv1.Diff]) error

// NotifyMergeConflict sends a message indicating a merge conflict.
//
// This method must not be called from the workflow.
NotifyMergeConflict(ctx context.Context, event *events.Event[eventsv1.ChatHook, eventsv1.Merge]) error
}
)
3 changes: 2 additions & 1 deletion internal/events/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type (
eventsv1.Push |
eventsv1.Rebase |
eventsv1.Diff |
eventsv1.PullRequest
eventsv1.PullRequest |
eventsv1.Merge
}
)
6 changes: 6 additions & 0 deletions internal/hooks/slack/activities/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ func (k *Kernel) NotifyLinesExceed(
return fns.SendMessage(client, target, attachment)
}

func (k *Kernel) NotifyMergeConflict(
ctx context.Context, event *events.Event[eventsv1.ChatHook, eventsv1.Merge],
) error {
return nil
}

func (k *Kernel) to_user(ctx context.Context, link_to uuid.UUID) (string, string, error) {
msg, err := db.Queries().GetMessagesByLinkTo(ctx, link_to)
if err != nil {
Expand Down
171 changes: 171 additions & 0 deletions internal/proto/ctrlplane/events/v1/merge.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 324fccf

Please sign in to comment.