Skip to content

Commit 9bfeb42

Browse files
authored
Let assignments notify people with --notify (#1034)
* Bump basecamp-sdk to v0.36.0 v0.36.0 (basecamp/basecamp-sdk#1091) adds UpdateCardRequest.Notify and CreateCardRequest.AssigneeIDs. The vendored MCP model is synced to the same tag, as TestCatalogModelProvenance requires. * Let assignments notify people with --notify Basecamp tells a newly assigned person only when the request sends notify: true, and the CLI sent it only from todos update --notify. Add the same opt-in flag to todos create, cards create, cards update and assign (to-dos and cards). Card steps always notify, so assign --step accepts --notify and changes nothing. cards create --assignee now sends assignee_ids (and notify) on the create request itself instead of a follow-up update, which removes the "card created but assignment failed" path. cards update --notify alone is accepted like todos update --notify: it changes nothing, and since BC3 refuses a card update with no card field, the card is read rather than written. The basecamp skill tells agents to pass --notify when they assign work. * Fit the --notify line within the basecamp skill's size cap * Update the Nix vendorHash for basecamp-sdk v0.36.0 * Scope the --notify guidance to to-dos and cards
1 parent 75fc13a commit 9bfeb42

15 files changed

Lines changed: 265 additions & 75 deletions

File tree

‎.surface‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,7 @@ FLAG basecamp assign --markdown type=bool
18881888
FLAG basecamp assign --md type=bool
18891889
FLAG basecamp assign --no-hints type=bool
18901890
FLAG basecamp assign --no-stats type=bool
1891+
FLAG basecamp assign --notify type=bool
18911892
FLAG basecamp assign --profile type=string
18921893
FLAG basecamp assign --project type=string
18931894
FLAG basecamp assign --quiet type=bool
@@ -3536,6 +3537,7 @@ FLAG basecamp cards create --markdown type=bool
35363537
FLAG basecamp cards create --md type=bool
35373538
FLAG basecamp cards create --no-hints type=bool
35383539
FLAG basecamp cards create --no-stats type=bool
3540+
FLAG basecamp cards create --notify type=bool
35393541
FLAG basecamp cards create --profile type=string
35403542
FLAG basecamp cards create --project type=string
35413543
FLAG basecamp cards create --quiet type=bool
@@ -3935,6 +3937,7 @@ FLAG basecamp cards update --markdown type=bool
39353937
FLAG basecamp cards update --md type=bool
39363938
FLAG basecamp cards update --no-hints type=bool
39373939
FLAG basecamp cards update --no-stats type=bool
3940+
FLAG basecamp cards update --notify type=bool
39383941
FLAG basecamp cards update --profile type=string
39393942
FLAG basecamp cards update --project type=string
39403943
FLAG basecamp cards update --quiet type=bool
@@ -17937,6 +17940,7 @@ FLAG basecamp todos create --markdown type=bool
1793717940
FLAG basecamp todos create --md type=bool
1793817941
FLAG basecamp todos create --no-hints type=bool
1793917942
FLAG basecamp todos create --no-stats type=bool
17943+
FLAG basecamp todos create --notify type=bool
1794017944
FLAG basecamp todos create --notify-on-completion type=string
1794117945
FLAG basecamp todos create --profile type=string
1794217946
FLAG basecamp todos create --project type=string

‎API-COVERAGE.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ Out-of-scope sections are excluded from parity totals and scripts: chatbots (dif
9090
9191
**SDK version:** the pin in `go.mod`, with
9292
`internal/version/sdk-provenance.json` authoritative for the exact commit. That
93-
pin is basecamp-sdk v0.23.0, which sends a check-in question's time as
94-
`time_of_day` (basecamp/basecamp-sdk#968). v0.22.0 shipped
93+
pin is basecamp-sdk v0.36.0, which adds `assignee_ids` to card create and
94+
`notify` to card update (basecamp/basecamp-sdk#1091). v0.23.0 sends a check-in
95+
question's time as `time_of_day` (basecamp/basecamp-sdk#968). v0.22.0 shipped
9596
`Recordings().MoveToVault` (basecamp/basecamp-sdk#960). v0.21.0 shipped the Subtasks service
9697
(basecamp/basecamp-sdk#883). v0.19.0 shipped the event-feed operations.
9798
The command surface below largely dates to the v0.12.0 bump, which added 20 exported
@@ -256,7 +257,7 @@ cannot faithfully cover at least one endpoint for a reason outside the CLI. A
256257
| spotlights | 2 | `spotlight`, `unspotlight` | ✅ | BC5 | - | `POST`/`DELETE /recordings/{id}/spotlight.json` put a recording's card on, or take it off, its project or template home page; both idempotent. No endpoint reads spotlight state or lists spotlights, so there is no `check` or list. Reordering spotlights (`PUT /recordings/:id/spotlight/position`) has no SDK operation, so it is not covered |
257258
| **Cards (Kanban)** |
258259
| card_tables | 3 | `cards` | ✅ | BC4 | - | Accessed via project dock |
259-
| card_table_cards | 9 | `cards` | ✅ | BC4 | - | list, show, create, update, move |
260+
| card_table_cards | 9 | `cards` | ✅ | BC4 | - | list, show, create, update, move. `cards create --assignee` assigns in the create request (`assignee_ids`, SDK v0.36.0, basecamp/basecamp-sdk#1091); `--notify` is sent as `notify: true` on create and card-update writes, including `assign --card`, so Basecamp tells the people newly assigned; `cards update --notify` alone only reads the card |
260261
| card_table_columns | 11 | `cards columns` | ✅ | BC4 | - | list columns. SDK v0.12.0 added `Subscribe`/`Unsubscribe`; `cards column watch\|unwatch` already performs the same action through the generic recording-subscription endpoint and returns the resulting subscription details the specific endpoint does not, so the CLI keeps one spelling |
261262
| card_table_steps | 4 | `cards steps` | ✅ | BC4 | - | Workflow steps on cards. The card-scoped aliases of `subtasks`, which bc3 keeps serving; `cards step move --position` is 1-based (the SDK refuses 0 since basecamp/basecamp-sdk#883) |
262263
| card_table_wormholes | 3 | `cards wormholes` | ✅ | BC5 | - | list (via `wormholes[]` on card table), create, update, delete; `cards move --to-wormhole` teleports a card across projects and reports the new card once it lands |

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
charm.land/bubbles/v2 v2.2.1
99
charm.land/bubbletea/v2 v2.1.0
1010
charm.land/lipgloss/v2 v2.0.6
11-
github.com/basecamp/basecamp-sdk/go v0.35.0
11+
github.com/basecamp/basecamp-sdk/go v0.36.0
1212
github.com/basecamp/cli v0.2.2-0.20261023171439-c9bce8206df9
1313
github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d
1414
github.com/basecamp/surfguard/go v0.1.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP
8989
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
9090
github.com/basecamp/actioncable-go v1.2.0 h1:t0MxlfMTcmaGXZ5ztgKRs7ZiY1MwXtBRwSSSAh1ofVg=
9191
github.com/basecamp/actioncable-go v1.2.0/go.mod h1:ezaV5z1GXQAsqyejqTs6wCFl2D8Wj+COLQkHc/kwoRs=
92-
github.com/basecamp/basecamp-sdk/go v0.35.0 h1:iIwIKJwV0BRK0l6BpYgZsHf/Z/zX4RJLmSk3uK/mg4c=
93-
github.com/basecamp/basecamp-sdk/go v0.35.0/go.mod h1:mUm/MQGMyg1E1cddyxdG7tQHiq0NsYee2zUeAUT5VjU=
92+
github.com/basecamp/basecamp-sdk/go v0.36.0 h1:mkAcJQlh+5Vz64OmpImSda/pfa/usWPJ6gDTuZYVaTI=
93+
github.com/basecamp/basecamp-sdk/go v0.36.0/go.mod h1:ynVJME8mVV3UHMUMnzBgygTnMtadQFxz1iYg7fqwUeM=
9494
github.com/basecamp/cli v0.2.2-0.20261023171439-c9bce8206df9 h1:3NfGs+zx23Tp6cf+97+UewrJHlzZMLzmvEXOmOJyQAk=
9595
github.com/basecamp/cli v0.2.2-0.20261023171439-c9bce8206df9/go.mod h1:iTBTaWvsPEFIcZfkxQHEfISyJ6sZ7036K6bNx0RY3EE=
9696
github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d h1:zEQVGq1x1nhKMZ2TudFAcSJ32CHT8richI1vQakIKz4=

‎internal/commands/assign.go‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func NewAssignCmd() *cobra.Command {
2121
var project string
2222
var isCard bool
2323
var isStep bool
24+
var notify bool
2425

2526
cmd := &cobra.Command{
2627
Use: "assign <id|url>...",
@@ -34,9 +35,14 @@ func NewAssignCmd() *cobra.Command {
3435
- A numeric person ID
3536
- An email address (will be resolved to ID)
3637
38+
Basecamp tells the person about a to-do or card only with --notify, and
39+
only where this command newly assigns them. It always notifies a person
40+
assigned to a card step, so --notify changes nothing there.
41+
3742
Examples:
3843
basecamp assign 123 --to me # Assign to-do
3944
basecamp assign 123 456 --to me # Assign multiple to-dos
45+
basecamp assign 123 --to "Annie Bryan" --notify # Assign and notify
4046
basecamp assign 456 --card --to me # Assign card
4147
basecamp assign 789 --step --to me # Assign card step`,
4248
RunE: func(cmd *cobra.Command, args []string) error {
@@ -46,7 +52,7 @@ func NewAssignCmd() *cobra.Command {
4652
if isCard && isStep {
4753
return output.ErrUsage("Cannot use --card and --step together")
4854
}
49-
return assignItems(cmd, args, &assignee, project, isCard, isStep)
55+
return assignItems(cmd, args, &assignee, project, isCard, isStep, notify)
5056
},
5157
}
5258

@@ -55,6 +61,7 @@ func NewAssignCmd() *cobra.Command {
5561
cmd.Flags().StringVar(&project, "in", "", "Project ID (alias for --project)")
5662
cmd.Flags().BoolVar(&isCard, "card", false, "Assign to a card instead of a to-do")
5763
cmd.Flags().BoolVar(&isStep, "step", false, "Assign to a card step instead of a to-do")
64+
cmd.Flags().BoolVar(&notify, "notify", false, "Notify the person newly assigned (card steps always notify)")
5865

5966
completer := completion.NewCompleter(nil)
6067
_ = cmd.RegisterFlagCompletionFunc("to", completer.PeopleNameCompletion())
@@ -128,7 +135,7 @@ type assignResult struct {
128135
breadcrumbs []output.Breadcrumb
129136
}
130137

131-
func assignItems(cmd *cobra.Command, args []string, assignee *string, project string, isCard, isStep bool) error {
138+
func assignItems(cmd *cobra.Command, args []string, assignee *string, project string, isCard, isStep, notify bool) error {
132139
app := appctx.FromContext(cmd.Context())
133140
if err := ensureAccount(cmd, app); err != nil {
134141
return err
@@ -159,7 +166,7 @@ func assignItems(cmd *cobra.Command, args []string, assignee *string, project st
159166
var assigneeIDInt int64
160167

161168
for _, itemID := range extractedIDs {
162-
res, err := assignOneItem(cmd, app, itemID, isCard, isStep, resolvedProjectID,
169+
res, err := assignOneItem(cmd, app, itemID, isCard, isStep, notify, resolvedProjectID,
163170
assignee, &assigneeResolved, &assigneeID, &assigneeIDInt)
164171
if err != nil {
165172
var fatal *fatalAssignError
@@ -347,7 +354,7 @@ func batchFailError(action string, failed []string, firstErr error) error {
347354
// assignOneItem validates one item and assigns it. The assignee is resolved
348355
// lazily on the first call where *assigneeResolved is false, preserving
349356
// PR #279 ordering (validate before person picker).
350-
func assignOneItem(cmd *cobra.Command, app *appctx.App, itemID string, isCard, isStep bool, resolvedProjectID string,
357+
func assignOneItem(cmd *cobra.Command, app *appctx.App, itemID string, isCard, isStep, notify bool, resolvedProjectID string,
351358
assignee *string, assigneeResolved *bool, assigneeID *string, assigneeIDInt *int64) (*assignResult, error) {
352359

353360
switch {
@@ -364,7 +371,7 @@ func assignOneItem(cmd *cobra.Command, app *appctx.App, itemID string, isCard, i
364371
}
365372
*assigneeID, *assigneeIDInt, *assigneeResolved = aID, aIDInt, true
366373
}
367-
return doAssignCard(cmd, app, itemID, *assigneeID, *assigneeIDInt, resolvedProjectID, card)
374+
return doAssignCard(cmd, app, itemID, *assigneeID, *assigneeIDInt, resolvedProjectID, card, notify)
368375
case isStep:
369376
step, err := validateStep(cmd, app, itemID)
370377
if err != nil {
@@ -392,7 +399,7 @@ func assignOneItem(cmd *cobra.Command, app *appctx.App, itemID string, isCard, i
392399
}
393400
*assigneeID, *assigneeIDInt, *assigneeResolved = aID, aIDInt, true
394401
}
395-
return doAssignTodo(cmd, app, itemID, *assigneeID, *assigneeIDInt, resolvedProjectID, todo)
402+
return doAssignTodo(cmd, app, itemID, *assigneeID, *assigneeIDInt, resolvedProjectID, todo, notify)
396403
}
397404
}
398405

@@ -546,7 +553,7 @@ func notFoundOrConvert(err error, typeName, itemIDStr string) error {
546553
}
547554

548555
// doAssignTodo assigns a person to a to-do.
549-
func doAssignTodo(cmd *cobra.Command, app *appctx.App, todoIDStr, assigneeID string, assigneeIDInt int64, resolvedProjectID string, todo *basecamp.Todo) (*assignResult, error) {
556+
func doAssignTodo(cmd *cobra.Command, app *appctx.App, todoIDStr, assigneeID string, assigneeIDInt int64, resolvedProjectID string, todo *basecamp.Todo, notify bool) (*assignResult, error) {
550557
todoID, err := strconv.ParseInt(todoIDStr, 10, 64)
551558
if err != nil {
552559
return nil, output.ErrUsage("Invalid to-do ID")
@@ -565,6 +572,7 @@ func doAssignTodo(cmd *cobra.Command, app *appctx.App, todoIDStr, assigneeID str
565572

566573
updated, err := app.Account().Todos().Update(cmd.Context(), todoID, &basecamp.UpdateTodoRequest{
567574
AssigneeIDs: assigneeIDs,
575+
Notify: notify,
568576
})
569577
if err != nil {
570578
return nil, convertSDKError(err)
@@ -595,7 +603,7 @@ func doAssignTodo(cmd *cobra.Command, app *appctx.App, todoIDStr, assigneeID str
595603
}
596604

597605
// doAssignCard assigns a person to a card.
598-
func doAssignCard(cmd *cobra.Command, app *appctx.App, cardIDStr, assigneeID string, assigneeIDInt int64, resolvedProjectID string, card *basecamp.Card) (*assignResult, error) {
606+
func doAssignCard(cmd *cobra.Command, app *appctx.App, cardIDStr, assigneeID string, assigneeIDInt int64, resolvedProjectID string, card *basecamp.Card, notify bool) (*assignResult, error) {
599607
cardID, err := strconv.ParseInt(cardIDStr, 10, 64)
600608
if err != nil {
601609
return nil, output.ErrUsage("Invalid card ID")
@@ -614,6 +622,7 @@ func doAssignCard(cmd *cobra.Command, app *appctx.App, cardIDStr, assigneeID str
614622

615623
updated, err := app.Account().Cards().Update(cmd.Context(), cardID, &basecamp.UpdateCardRequest{
616624
AssigneeIDs: assigneeIDs,
625+
Notify: notify,
617626
})
618627
if err != nil {
619628
return nil, convertSDKError(err)
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
package commands
2+
3+
import (
4+
"bytes"
5+
"encoding/json"
6+
"io"
7+
"net/http"
8+
"testing"
9+
10+
"github.com/spf13/cobra"
11+
"github.com/stretchr/testify/assert"
12+
"github.com/stretchr/testify/require"
13+
)
14+
15+
// writeRecordingTransport plays Basecamp as assigneeEchoTransport does and
16+
// keeps every POST and PUT it was sent, so a test can read the request body.
17+
type writeRecordingTransport struct {
18+
assigneeEchoTransport
19+
writes []recordedWrite
20+
}
21+
22+
type recordedWrite struct {
23+
method string
24+
path string
25+
body map[string]any
26+
}
27+
28+
func (m *writeRecordingTransport) RoundTrip(req *http.Request) (*http.Response, error) {
29+
if req.Method == http.MethodPost || req.Method == http.MethodPut {
30+
raw, err := io.ReadAll(req.Body)
31+
if err != nil {
32+
return nil, err
33+
}
34+
var body map[string]any
35+
if err := json.Unmarshal(raw, &body); err != nil {
36+
return nil, err
37+
}
38+
m.writes = append(m.writes, recordedWrite{req.Method, req.URL.Path, body})
39+
req.Body = io.NopCloser(bytes.NewReader(raw))
40+
}
41+
return m.assigneeEchoTransport.RoundTrip(req)
42+
}
43+
44+
// Every command that assigns a to-do or card, where --notify asks Basecamp to
45+
// tell the person.
46+
var notifyingAssigneeWrites = []assigneeWrite{
47+
{"todos create", NewTodosCmd, []string{"create", "Thing", "--list", "555", "--assignee", "42"}},
48+
{"todos update", NewTodosCmd, []string{"update", "999", "--assignee", "42"}},
49+
{"cards create", NewCardsCmd, []string{"create", "Thing", "--column", "111", "--assignee", "42"}},
50+
{"cards update", NewCardsCmd, []string{"update", "999", "--assignee", "42"}},
51+
{"assign", NewAssignCmd, []string{"999", "--to", "42"}},
52+
{"assign --card", NewAssignCmd, []string{"999", "--card", "--to", "42"}},
53+
}
54+
55+
func runRecordingWrite(t *testing.T, cmd *cobra.Command, args ...string) []recordedWrite {
56+
t.Helper()
57+
transport := &writeRecordingTransport{}
58+
app := setupCardsMockApp(t, transport)
59+
require.NoError(t, executeCommand(cmd, app, args...))
60+
require.Len(t, transport.writes, 1, "want exactly one write")
61+
return transport.writes
62+
}
63+
64+
func TestAssigneeWritesSendNotifyOnlyWithTheFlag(t *testing.T) {
65+
for _, w := range notifyingAssigneeWrites {
66+
t.Run(w.name+" --notify", func(t *testing.T) {
67+
writes := runRecordingWrite(t, w.cmd(), append(w.args, "--notify")...)
68+
69+
assert.Equal(t, true, writes[0].body["notify"])
70+
assert.Contains(t, writes[0].body["assignee_ids"], float64(42))
71+
})
72+
t.Run(w.name, func(t *testing.T) {
73+
writes := runRecordingWrite(t, w.cmd(), w.args...)
74+
75+
assert.NotEqual(t, true, writes[0].body["notify"], "notify must not be sent as true without --notify")
76+
})
77+
}
78+
}
79+
80+
// A card is created already assigned, in one request, rather than created and
81+
// then assigned with a second.
82+
func TestCardsCreateAssignsAndNotifiesInOneRequest(t *testing.T) {
83+
writes := runRecordingWrite(t, NewCardsCmd(), "create", "Thing", "--column", "111", "--assignee", "42", "--notify")
84+
85+
assert.Equal(t, http.MethodPost, writes[0].method)
86+
assert.Equal(t, "/99999/card_tables/lists/111/cards.json", writes[0].path)
87+
assert.Equal(t, []any{float64(42)}, writes[0].body["assignee_ids"])
88+
assert.Equal(t, true, writes[0].body["notify"])
89+
}
90+
91+
func TestCardsCreateWithoutAssigneeSendsNoAssignees(t *testing.T) {
92+
writes := runRecordingWrite(t, NewCardsCmd(), "create", "Thing", "--column", "111")
93+
94+
_, sent := writes[0].body["assignee_ids"]
95+
assert.False(t, sent)
96+
}
97+
98+
// --notify without an assignee change is accepted and sent, as todos update
99+
// has always done: Basecamp notifies only people a request newly assigns, so
100+
// it tells nobody.
101+
func TestNotifyWithoutAssigneeIsAccepted(t *testing.T) {
102+
cases := []assigneeWrite{
103+
{"todos update", NewTodosCmd, []string{"update", "999", "--notify"}},
104+
{"cards create", NewCardsCmd, []string{"create", "Thing", "--column", "111", "--notify"}},
105+
}
106+
for _, c := range cases {
107+
t.Run(c.name, func(t *testing.T) {
108+
writes := runRecordingWrite(t, c.cmd(), c.args...)
109+
110+
assert.Equal(t, true, writes[0].body["notify"])
111+
if c.name != "todos update" { // it writes back the assignees it read
112+
_, sent := writes[0].body["assignee_ids"]
113+
assert.False(t, sent)
114+
}
115+
})
116+
}
117+
}
118+
119+
// Basecamp always notifies a person assigned to a card step, so assign --step
120+
// accepts --notify and the step write needs no flag to carry it.
121+
func TestAssignStepAcceptsNotify(t *testing.T) {
122+
writes := runRecordingWrite(t, NewAssignCmd(), "999", "--step", "--to", "42", "--notify")
123+
124+
assert.Equal(t, http.MethodPut, writes[0].method)
125+
assert.Contains(t, writes[0].body["assignee_ids"], float64(42))
126+
}
127+
128+
// A person already assigned is not assigned again, so nothing is written and
129+
// nobody is notified.
130+
func TestAssignNotifyLeavesAnExistingAssigneeAlone(t *testing.T) {
131+
transport := &writeRecordingTransport{}
132+
transport.existing = `{"id": 42, "name": "Annie Bryan"}`
133+
app := setupCardsMockApp(t, transport)
134+
135+
require.NoError(t, executeCommand(NewAssignCmd(), app, "999", "--card", "--to", "42", "--notify"))
136+
assert.Empty(t, transport.writes)
137+
}
138+
139+
// cards update --notify alone succeeds like todos update --notify, but reads
140+
// the card: BC3 answers a card update with no card field with a 400.
141+
func TestCardsUpdateNotifyAloneReadsTheCard(t *testing.T) {
142+
transport := &writeRecordingTransport{}
143+
app := setupCardsMockApp(t, transport)
144+
145+
require.NoError(t, executeCommand(NewCardsCmd(), app, "update", "999", "--notify"))
146+
assert.Empty(t, transport.writes)
147+
}
148+
149+
func TestCardsUpdateNotifyWithAnotherFieldSendsIt(t *testing.T) {
150+
writes := runRecordingWrite(t, NewCardsCmd(), "update", "999", "--title", "New", "--notify")
151+
152+
assert.Equal(t, "New", writes[0].body["title"])
153+
assert.Equal(t, true, writes[0].body["notify"])
154+
_, sent := writes[0].body["assignee_ids"]
155+
assert.False(t, sent)
156+
}

‎internal/commands/assignees_saved_test.go‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import (
2424
// A record takes its ID from the request path, #999 when the path has none. A
2525
// write answers with the assignee_ids it was sent, or, when drop matches the
2626
// path, with none of them: what Basecamp does with an ID it cannot assign,
27-
// such as a card column's.
27+
// such as a card column's. A read answers with existing as its assignees.
2828
type assigneeEchoTransport struct {
29-
drop func(path string) bool
29+
drop func(path string) bool
30+
existing string
3031
}
3132

3233
var trailingRecordID = regexp.MustCompile(`/(\d+)(\.json)?$`)
@@ -58,7 +59,7 @@ func (m *assigneeEchoTransport) RoundTrip(req *http.Request) (*http.Response, er
5859
case strings.HasSuffix(path, "/people.json"):
5960
return respond(200, `[{"id": 42, "name": "Annie Bryan"}]`)
6061
}
61-
return respond(200, recordJSON(path, ""))
62+
return respond(200, recordJSON(path, m.existing))
6263
case http.MethodPost, http.MethodPut:
6364
var body struct {
6465
AssigneeIDs []int64 `json:"assignee_ids"`

0 commit comments

Comments
 (0)