Skip to content

Commit

Permalink
chore(): creation and deletion event for branches
Browse files Browse the repository at this point in the history
  • Loading branch information
debuggerpk committed Dec 4, 2024
1 parent a714faa commit 2dfc6fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func New[H Hook, P Payload]() *Event[H, P] {
Version: EventVersionDefault,
ID: MustUUID(),
Timestamp: time.Now(),
Context: Context[H]{},
Context: Context[H]{Parents: make([]uuid.UUID, 0)},
Subject: Subject{},
}

Expand Down
3 changes: 2 additions & 1 deletion internal/hooks/github/activities/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ func HydrateRepoEvent(ctx context.Context, payload *defs.HydrateRepoEventPayload
parent, err := durable.
OnCore().
QueryWorkflow(ctx, hydrated.RepoWorkflowOptions(), repos.QueryRepoForEventParent, payload.Branch)

if err == nil {
_ = parent.Get(hydrated.ParentID)
_ = parent.Get(&hydrated.ParentID)
}
}

Expand Down
4 changes: 2 additions & 2 deletions internal/hooks/github/activities/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ type (
)

func (p *Push) HydrateGithubPushEvent(ctx context.Context, params *defs.HydrateRepoEventPayload) (*defs.HydratedRepoEvent, error) {
time.Sleep(2 * time.Second) // FIXME: this is a quick hack to get the parent id.

return HydrateRepoEvent(ctx, params)
}

func (p *Push) SignalRepoWithGithubPush(ctx context.Context, hydrated *defs.HydratedQuantmEvent[eventsv1.Push]) error {
time.Sleep(2 * time.Second) // FIXME: this is a quick hack.

return SignalRepo(ctx, hydrated)

Check failure on line 23 in internal/hooks/github/activities/push.go

View workflow job for this annotation

GitHub Actions / golangci-lint

in call to SignalRepo, cannot infer P (internal/hooks/github/activities/common.go:146:17) (typecheck)
}

0 comments on commit 2dfc6fd

Please sign in to comment.