Skip to content

fix(dc): use activities endpoint for PR comments#109

Merged
avivsinai merged 1 commit intoavivsinai:masterfrom
ivulub:fix/pr-comments-endpoint
Apr 2, 2026
Merged

fix(dc): use activities endpoint for PR comments#109
avivsinai merged 1 commit intoavivsinai:masterfrom
ivulub:fix/pr-comments-endpoint

Conversation

@ivulub
Copy link
Copy Markdown
Contributor

@ivulub ivulub commented Apr 1, 2026

Summary

  • bkt pr comments on DC fails with 400 Bad Request: The path query parameter is required because it uses the /comments endpoint (file-level only)
  • Switch to /activities endpoint, filter for action == "COMMENTED" — returns both general and inline comments

Fixes #107

Test plan

  • Existing tests updated and passing (go test ./pkg/bbdc/...)
  • Manual: bkt pr comments <id> on a DC PR with comments

🤖 Generated with Claude Code

The /comments endpoint requires a path parameter and only returns
file-level comments. Switch to /activities, which returns all
comment types without requiring a path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Owner

@avivsinai avivsinai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for chasing this down. I did one last pass against the Data Center PR APIs and a clean worktree, and this change looks right to me. The switch to /activities matches Atlassian's guidance for retrieving PR comments, the mapping fits the surrounding DC client conventions, and the branch passes go test ./... cleanly. Happy to merge.

@avivsinai avivsinai merged commit 90bfdd3 into avivsinai:master Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: bkt pr comments fails on Data Center with 400 Bad Request

2 participants