Skip to content

branch comment: add end-to-end test scripts - #1164

Closed
ed-irl wants to merge 6 commits into
branch-comment-commandsfrom
branch-comment-tests
Closed

branch comment: add end-to-end test scripts#1164
ed-irl wants to merge 6 commits into
branch-comment-commandsfrom
branch-comment-tests

Conversation

@ed-irl

@ed-irl ed-irl commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Add test scripts covering the core comment workflows:

  • stage and submit staged comments as a review
  • add an inline comment immediately
  • list comments (text and --json output)
  • resolve a review thread
  • edit a staged comment

Also fixes a nil pointer dereference when no staged comments
exist for a branch, and includes thread IDs in list output
for use with resolve/unresolve commands.

@ed-irl
ed-irl force-pushed the branch-comment-commands branch from 75c2b68 to bed2fb1 Compare June 2, 2026 18:58
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 47a7eed to d42cd46 Compare June 2, 2026 18:58
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from bed2fb1 to 55e79ed Compare June 2, 2026 20:17
@ed-irl
ed-irl force-pushed the branch-comment-tests branch 2 times, most recently from e683e4f to bc2d528 Compare June 2, 2026 22:31
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from c1b7235 to 631867a Compare June 2, 2026 22:33
@ed-irl ed-irl added the skip changelog PRs that don't need a changelog. label Jun 6, 2026
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from cc6ba9a to a4057f6 Compare June 8, 2026 10:18
@ed-irl
ed-irl force-pushed the branch-comment-tests branch 2 times, most recently from d270ec2 to 0a8ca42 Compare June 8, 2026 11:15
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from fa75bd3 to b8b5295 Compare June 12, 2026 20:07
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 0a8ca42 to 03fafd4 Compare June 12, 2026 20:07
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from b8b5295 to 6f87470 Compare June 13, 2026 13:39
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 03fafd4 to 1f477e3 Compare June 13, 2026 13:39
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from 6f87470 to f6588c8 Compare June 15, 2026 09:52
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 1f477e3 to 7241e23 Compare June 15, 2026 09:52
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from 7170265 to f86efce Compare June 19, 2026 01:03
@ed-irl ed-irl changed the title branch comment: add inline review comment commands and forge support feat: add worktree management commands, per-worktree trunks, and worktree-aware filtering Jun 19, 2026
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from f84f05d to c2cb662 Compare June 19, 2026 01:03
ed-irl and others added 4 commits June 23, 2026 11:38
Introduces restack.Options{AutoResolve} and threads an opts *Options
parameter through the high-level restack entry points (RestackBranch,
RestackStack, RestackDownstack) and the merge/sync RestackHandler
interfaces, with all current callers passing nil.

This is foundational plumbing for the restack auto-resolve feature.
Landing it on a branch below the consuming stacks lets every branch
inherit the 3-arg signature, rather than the signature change living
on a branch parallel to its callers.
Add inline comment infrastructure across all forges (GitHub, GitLab,
Bitbucket, ShamHub) with three optional interfaces:

- WithInlineComments: list, post, and batch-submit inline comments
- WithThreadResolution: resolve/unresolve review threads
- WithCommentEdit: edit existing review comments

Refactor Bitbucket and GitLab implementations to use typed gateway
client methods (CommentCreate, CommentResolve,
MergeRequestDiscussionCreate, etc.) in place of raw HTTP calls, and
add reply support for Bitbucket inline comments via the Parent field
on CommentCreateRequest.

Introduce the diffmap package for mapping working-tree line numbers
to diff coordinates, and staged comment storage in the spice state
for local comment management before batch submission.

Regenerate forge mocks to reflect the updated MergeChange signature
and the new inline-comment interfaces.
Add `gs branch comment` subcommand group with six commands:

- list: show inline comments and staged comments,
  with `--json` for NDJSON output
- stage: stage an inline comment for batch submission
- add: post an inline comment immediately
- submit-staged: submit all staged comments as a review
- resolve: resolve or unresolve a review thread
- edit: edit a staged or forge comment

Also adds DiffBranchBytes to git.Worktree for programmatic
diff access needed by comment coordinate mapping.
autofix-ci Bot and others added 2 commits June 23, 2026 11:43
Add test scripts covering the core comment workflows:
- stage and submit staged comments as a review
- add an inline comment immediately
- list comments (text and `--json` output)
- resolve a review thread
- edit a staged comment

Also fixes a nil pointer dereference when no staged comments
exist for a branch, and includes thread IDs in list output
for use with resolve/unresolve commands.
@ed-irl
ed-irl force-pushed the branch-comment-commands branch from f86efce to 112367a Compare June 24, 2026 01:32
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from c2cb662 to 63cfc0c Compare June 24, 2026 01:32
@abhinav abhinav changed the title feat: add worktree management commands, per-worktree trunks, and worktree-aware filtering branch comment: add end-to-end test scripts Aug 12, 2026
@abhinav
abhinav force-pushed the branch-comment-commands branch from 112367a to 916ca7d Compare August 24, 2026 05:15
@abhinav

abhinav commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Closing because these test scripts have been folded into #1163 so the commands and their end-to-end coverage are reviewed together.

@abhinav abhinav closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog PRs that don't need a changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants