MCPcopy Create free account
hub / github.com/bytebase/bytebase / listPlanUpdateEvents

Function listPlanUpdateEvents

backend/tests/plan_update_test.go:119–133  ·  view source on GitHub ↗

listPlanUpdateEvents returns the PlanUpdate event payloads from the issue's comment list, in the order the API returned them.

(t *testing.T, f *planUpdateFixture)

Source from the content-addressed store, hash-verified

117// listPlanUpdateEvents returns the PlanUpdate event payloads from the
118// issue's comment list, in the order the API returned them.
119func listPlanUpdateEvents(t *testing.T, f *planUpdateFixture) []*v1pb.IssueComment_PlanUpdate {
120 t.Helper()
121 a := require.New(t)
122 resp, err := f.ctl.issueServiceClient.ListIssueComments(f.ctx, connect.NewRequest(&v1pb.ListIssueCommentsRequest{
123 Parent: f.issue.Name,
124 }))
125 a.NoError(err)
126 var out []*v1pb.IssueComment_PlanUpdate
127 for _, c := range resp.Msg.IssueComments {
128 if x := c.GetPlanUpdate(); x != nil {
129 out = append(out, x)
130 }
131 }
132 return out
133}
134
135// TestPlanSpecUpdate_SheetChange_EmitsIssueComment is the original test from
136// PR #20032: changing a spec's sheet emits a single PlanSpecUpdate row.

Calls 2

ListIssueCommentsMethod · 0.65
GetPlanUpdateMethod · 0.45

Tested by

no test coverage detected