Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .surface
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ARG basecamp campfire delete 00 <id|url>
ARG basecamp campfire line 00 <id|url>
ARG basecamp campfire post 00 <message>
ARG basecamp campfire show 00 <id|url>
ARG basecamp campfire update 00 <id|url>
ARG basecamp campfire update 01 [content]
ARG basecamp campfire upload 00 <file>
ARG basecamp cards archive 00 <id|url>
ARG basecamp cards column color 00 <id|url>
Expand Down Expand Up @@ -62,6 +64,8 @@ ARG basecamp chat delete 00 <id|url>
ARG basecamp chat line 00 <id|url>
ARG basecamp chat post 00 <message>
ARG basecamp chat show 00 <id|url>
ARG basecamp chat update 00 <id|url>
ARG basecamp chat update 01 [content]
ARG basecamp chat upload 00 <file>
ARG basecamp checkin answer 00 <id|url>
ARG basecamp checkin answer create 00 <question-id>
Expand Down Expand Up @@ -467,6 +471,7 @@ CMD basecamp campfire list
CMD basecamp campfire messages
CMD basecamp campfire post
CMD basecamp campfire show
CMD basecamp campfire update
CMD basecamp campfire upload
CMD basecamp cards
CMD basecamp cards archive
Expand Down Expand Up @@ -505,6 +510,7 @@ CMD basecamp chat list
CMD basecamp chat messages
CMD basecamp chat post
CMD basecamp chat show
CMD basecamp chat update
CMD basecamp chat upload
CMD basecamp checkin
CMD basecamp checkin answer
Expand Down Expand Up @@ -2343,6 +2349,30 @@ FLAG basecamp campfire show --stats type=bool
FLAG basecamp campfire show --styled type=bool
FLAG basecamp campfire show --todolist type=string
FLAG basecamp campfire show --verbose type=count
FLAG basecamp campfire update --account type=string
FLAG basecamp campfire update --agent type=bool
FLAG basecamp campfire update --cache-dir type=string
FLAG basecamp campfire update --content type=string
FLAG basecamp campfire update --content-type type=string
FLAG basecamp campfire update --count type=bool
FLAG basecamp campfire update --help type=bool
FLAG basecamp campfire update --hints type=bool
FLAG basecamp campfire update --ids-only type=bool
FLAG basecamp campfire update --in type=string
FLAG basecamp campfire update --jq type=string
FLAG basecamp campfire update --json type=bool
FLAG basecamp campfire update --markdown type=bool
FLAG basecamp campfire update --md type=bool
FLAG basecamp campfire update --no-hints type=bool
FLAG basecamp campfire update --no-stats type=bool
FLAG basecamp campfire update --profile type=string
FLAG basecamp campfire update --project type=string
FLAG basecamp campfire update --quiet type=bool
FLAG basecamp campfire update --room type=string
FLAG basecamp campfire update --stats type=bool
FLAG basecamp campfire update --styled type=bool
FLAG basecamp campfire update --todolist type=string
FLAG basecamp campfire update --verbose type=count
FLAG basecamp campfire upload --account type=string
FLAG basecamp campfire upload --agent type=bool
FLAG basecamp campfire upload --cache-dir type=string
Expand Down Expand Up @@ -3233,6 +3263,30 @@ FLAG basecamp chat show --stats type=bool
FLAG basecamp chat show --styled type=bool
FLAG basecamp chat show --todolist type=string
FLAG basecamp chat show --verbose type=count
FLAG basecamp chat update --account type=string
FLAG basecamp chat update --agent type=bool
FLAG basecamp chat update --cache-dir type=string
FLAG basecamp chat update --content type=string
FLAG basecamp chat update --content-type type=string
FLAG basecamp chat update --count type=bool
FLAG basecamp chat update --help type=bool
FLAG basecamp chat update --hints type=bool
FLAG basecamp chat update --ids-only type=bool
FLAG basecamp chat update --in type=string
FLAG basecamp chat update --jq type=string
FLAG basecamp chat update --json type=bool
FLAG basecamp chat update --markdown type=bool
FLAG basecamp chat update --md type=bool
FLAG basecamp chat update --no-hints type=bool
FLAG basecamp chat update --no-stats type=bool
FLAG basecamp chat update --profile type=string
FLAG basecamp chat update --project type=string
FLAG basecamp chat update --quiet type=bool
FLAG basecamp chat update --room type=string
FLAG basecamp chat update --stats type=bool
FLAG basecamp chat update --styled type=bool
FLAG basecamp chat update --todolist type=string
FLAG basecamp chat update --verbose type=count
FLAG basecamp chat upload --account type=string
FLAG basecamp chat upload --agent type=bool
FLAG basecamp chat upload --cache-dir type=string
Expand Down Expand Up @@ -16037,6 +16091,7 @@ SUB basecamp campfire list
SUB basecamp campfire messages
SUB basecamp campfire post
SUB basecamp campfire show
SUB basecamp campfire update
SUB basecamp campfire upload
SUB basecamp cards
SUB basecamp cards archive
Expand Down Expand Up @@ -16075,6 +16130,7 @@ SUB basecamp chat list
SUB basecamp chat messages
SUB basecamp chat post
SUB basecamp chat show
SUB basecamp chat update
SUB basecamp chat upload
SUB basecamp checkin
SUB basecamp checkin answer
Expand Down
4 changes: 2 additions & 2 deletions API-COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Out-of-scope sections are excluded from parity totals and scripts: chatbots (dif

> Note: the per-row `Endpoints` column in the Coverage by Section table sums higher than the Summary totals above. The discrepancy predates the BC5 baseline; the row count (47 sections) is authoritative for the `Since` column. Reconciling endpoint counts is pre-existing maintenance, tracked separately.

**SDK version:** v0.7.4 (`f2086f5e`) — reshapes `Tools.Create` to the BC5 bucket-scoped create-by-type endpoint (`POST /buckets/{id}/dock/tools.json` with `{tool_type, title?}`), replacing the removed account-scoped clone call. API date advanced to 2026-07-22.
**SDK version:** v0.8.0 — adds `Campfires.UpdateLine` (`PUT /chats/{c}/lines/{l}`, basecamp/basecamp-sdk#295), consumed by `chat update`; also carries the BC5 `Tools.Create` create-by-type reshape. API date advanced to 2026-07-22.

## Coverage by Section

Expand All @@ -38,7 +38,7 @@ The **Since** column tags each row with the Basecamp version that introduced its
| messages | 10 | `messages`, `message` | ✅ | BC4 | - | list, show, create, update, publish, pin, unpin. Create supports `--subscribe`/`--no-subscribe` and `--draft`. Publish promotes drafts to active |
| message_boards | 3 | `messageboards` | ✅ | BC4 | - | Container, accessed via project dock |
| message_types | 5 | `messagetypes` | ✅ | BC4 | - | list, show, create, update, delete |
| campfires | 14 | `chat` | ✅ | BC4 | - | list, messages, post, line show/delete. @mentions in content |
| campfires | 14 | `chat` | ✅ | BC4 | - | list, messages, post, line show/update/delete. @mentions in content |
Comment thread
nnemirovsky marked this conversation as resolved.
| comments | 8 | `comment`, `comments` | ✅ | BC4 | - | list, show, create, update. @mentions in content |
| boosts | 6 | `boost`, `react` | ✅ | BC4 | - | list (recording + event), show, create (recording + event), delete |
| notifications | 2 | `notifications` | ✅ | BC4 | - | list, mark as read (BC5: `bubble_ups`/`scheduled_bubble_ups` sections; `memories` is BC4-only) |
Expand Down
13 changes: 13 additions & 0 deletions e2e/chat.bats
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ load test_helper
assert_output_contains "ID required"
}

@test "chat update without args shows error" {
create_credentials
create_global_config '{"account_id": 99999, "project_id": 123}'

run basecamp chat update
assert_failure
Comment thread
nnemirovsky marked this conversation as resolved.
# Command-specific arg name (JSON-escapes < > to < >, so match the
# inner "id|url"), and never the generic "Todo ID(s) required" that root.go
# would rewrite a Cobra arg-count error into.
assert_output_contains "id|url"
assert_output_not_contains "Todo ID(s)"
}


# Help flag

Expand Down
22 changes: 22 additions & 0 deletions e2e/smoke/smoke_campfire.bats
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ setup_file() {
assert_json_not_null '.data.id'
}

@test "campfire update edits a message" {
local id_file="$BATS_FILE_TMPDIR/campfire_line_id"
[[ -f "$id_file" ]] || mark_unverifiable "No campfire line created in prior test"
local line_id new_content
line_id=$(<"$id_file")
new_content="Edited smoke test $(date +%s)"

run_smoke basecamp campfire update "$line_id" "$new_content" \
--room "$QA_CAMPFIRE" -p "$QA_PROJECT" --json
assert_success
assert_json_value '.ok' 'true'
assert_json_not_null '.data.id'
Comment thread
nnemirovsky marked this conversation as resolved.

# Re-fetch the line and verify its content actually changed (guards against
# a no-op update silently passing).
run_smoke basecamp campfire line "$line_id" \
--room "$QA_CAMPFIRE" -p "$QA_PROJECT" --json
assert_success
echo "$output" | jq -e --arg expected "$new_content" '.data.content | contains($expected)' >/dev/null \
|| fail "expected updated line content to contain '$new_content', got: $(echo "$output" | jq -r '.data.content')"
}

@test "campfire delete deletes a message" {
local id_file="$BATS_FILE_TMPDIR/campfire_line_id"
[[ -f "$id_file" ]] || mark_unverifiable "No campfire line created in prior test"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
charm.land/bubbles/v2 v2.1.1
charm.land/bubbletea/v2 v2.0.8
charm.land/lipgloss/v2 v2.0.5
github.com/basecamp/basecamp-sdk/go v0.7.4-0.20260722082856-f2086f5e57f6
github.com/basecamp/basecamp-sdk/go v0.8.0
github.com/basecamp/cli v0.2.1
github.com/charmbracelet/bubbles v1.0.0
github.com/charmbracelet/glamour v1.0.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ
github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/basecamp/basecamp-sdk/go v0.7.4-0.20260722082856-f2086f5e57f6 h1:JFKzHPWkDq0I9nSheEYxaxIBzL+WvJKFg0j/A3n2t9s=
github.com/basecamp/basecamp-sdk/go v0.7.4-0.20260722082856-f2086f5e57f6/go.mod h1:eX5mEKCdtxSfEL4P/n5AwOl21JVA/K+gRPic/Hd8W/Y=
github.com/basecamp/basecamp-sdk/go v0.8.0 h1:ZxrNTyGTMcGocGE582ZMmpjyodvODD2+fZMjISokTYY=
github.com/basecamp/basecamp-sdk/go v0.8.0/go.mod h1:eX5mEKCdtxSfEL4P/n5AwOl21JVA/K+gRPic/Hd8W/Y=
github.com/basecamp/cli v0.2.1 h1:8GyehPVtsTXla0oOPu4QgXRjwwzJ99prlByvyi+0HRQ=
github.com/basecamp/cli v0.2.1/go.mod h1:p8tt/DatJ2LAzWO6N6tNfV8x3gF5T3IxDTo+U8FfWPo=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
Expand Down
Loading
Loading