From e8e87b4d887505371e8c6eb0bfc3a15e9cf2af3d Mon Sep 17 00:00:00 2001 From: Edmund Kohlwey Date: Mon, 1 Jun 2026 14:27:33 -0400 Subject: [PATCH] branch comment: compute outdated/stale from diff state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now shamhub's inline comments hard-coded Outdated:false; the boolean flowed through to the JSON output but never told the truth. Real forges (GitHub, GitLab) compute outdated as "the line this comment was anchored to no longer matches the current head diff" — without that, the VSCode extension's stale-comment surface has nothing to render against in tests. Plumb the same shape end-to-end in shamhub: - shamComment.CommitSHA: captured at post time via 'git rev-parse' on the change's head branch. The forge now knows the exact commit each comment was anchored to. - diffmap.Mapper.LineModified: given an already-parsed unified diff, ask whether a path:line on the LEFT or RIGHT side was touched. The RIGHT/OLD mapping is documented inline — comment anchors are on the RIGHT side of the original PR diff (the post-commit's version), which becomes the OLD side of the post-commit..head diff used for stale detection. - handleListInlineComments: for each comment, run 'git diff --unified=0 commitSHA..head -- path' against the bare repo, parse the result with diffmap, and report stale if the anchored line falls into a modified hunk. Comments without a captured CommitSHA fall through to the existing Outdated override (test seeds + the new shamhub -outdated flag). - shamhub 'comment edit -outdated=true|false' force-sets the stale flag for tests that don't want to set up divergent commits. The new test script (branch_comment_stale.txt) covers the full flow: post two comments on the same head, amend the file so one anchor line changes and the other doesn't, push the new head, and verify only the touched comment reports outdated. This is the prerequisite the extension-json commit's stale field was waiting on. --- .../unreleased/Added-20260601-142716.yaml | 3 + internal/diffmap/mapper.go | 37 ++++ internal/forge/shamhub/cli.go | 5 +- internal/forge/shamhub/comment.go | 20 ++ internal/forge/shamhub/inline_comment.go | 122 ++++++++++- .../ChangeChecksState/Failed/branch | 2 +- .../ChangeChecksState/Failed/headHash | 2 +- .../ChangeChecksState/Passed/branch | 2 +- .../ChangeChecksState/Passed/headHash | 2 +- .../ChangeChecksState/Pending/branch | 2 +- .../ChangeChecksState/Pending/headHash | 2 +- .../UpdateComment/updated-comment | 2 +- .../TestIntegration/ChangeComments/branch | 2 +- .../TestIntegration/ChangeComments/comments | 20 +- .../ChangesStates/closedBranch | 2 +- .../ChangesStates/mergedBranch | 2 +- .../TestIntegration/ChangesStates/openBranch | 2 +- .../CommentCountsByChange/branch | 2 +- .../TemplatesPresent/empty-template | 2 +- .../TemplatesPresent/non-empty-template | 2 +- .../SubmitBaseDoesNotExist/base-branch | 2 +- .../SubmitBaseDoesNotExist/branch | 2 +- .../fork-branch | 2 +- .../forkCommitHash | 2 +- .../AddAssignee/branch-no-assignee | 2 +- .../branch-no-assignee-one-by-one | 2 +- .../SubmitWithAssignee/branch-with-assignee | 2 +- .../TestIntegration/SubmitEditBase/base | 2 +- .../TestIntegration/SubmitEditBase/branch | 2 +- .../TestIntegration/SubmitEditChange/branch | 2 +- .../SubmitEditChange/firstCommitHash | 2 +- .../TestIntegration/SubmitEditDraft/branch | 2 +- .../TestIntegration/SubmitEditLabels/branch | 2 +- .../TestIntegration/SubmitEditLabels/label1 | 2 +- .../TestIntegration/SubmitEditLabels/label2 | 2 +- .../TestIntegration/SubmitEditLabels/label3 | 2 +- .../AddReviewer/branch-no-reviewer | 2 +- .../branch-no-reviewer-one-by-one | 2 +- .../SubmitWithReviewer/branch-with-reviewer | 2 +- .../shamhub/testdata/TestIntegration/apiURL | 2 +- .../shamhub/testdata/TestIntegration/gitURL | 2 +- .../testdata/TestIntegration/pushRepoURL | 2 +- .../shamhub/testdata/TestIntegration/repoURL | 2 +- .../shamhub/testdata/TestIntegration/token | 2 +- .../ChangeChecksState/Failed.yaml | 22 +- .../ChangeChecksState/Passed.yaml | 28 +-- .../ChangeChecksState/Pending.yaml | 24 +-- .../TestIntegration/ChangeComments.yaml | 204 +++++++++--------- .../TestIntegration/ChangesStates.yaml | 46 ++-- .../CommentCountsByChange.yaml | 20 +- .../FindChangesByBranchDoesNotExist.yaml | 6 +- .../ListChangeTemplates/NoTemplates.yaml | 6 +- .../ListChangeTemplates/TemplatesPresent.yaml | 14 +- .../SubmitBaseDoesNotExist.yaml | 16 +- .../SubmitChangeFromPushRepository.yaml | 66 +++--- .../SubmitEditAssignees/AddAssignee.yaml | 54 ++--- .../AddAssigneesOneByOne.yaml | 50 ++--- .../SubmitWithAssignee.yaml | 60 +++--- .../TestIntegration/SubmitEditBase.yaml | 50 ++--- .../TestIntegration/SubmitEditChange.yaml | 48 ++--- .../TestIntegration/SubmitEditDraft.yaml | 78 +++---- .../TestIntegration/SubmitEditLabels.yaml | 72 +++---- .../SubmitEditReviewers/AddReviewer.yaml | 54 ++--- .../AddReviewersOneByOne.yaml | 60 +++--- .../SubmitWithReviewer.yaml | 38 ++-- testdata/script/branch_comment_stale.txt | 74 +++++++ 66 files changed, 813 insertions(+), 560 deletions(-) create mode 100644 .changes/unreleased/Added-20260601-142716.yaml create mode 100644 testdata/script/branch_comment_stale.txt diff --git a/.changes/unreleased/Added-20260601-142716.yaml b/.changes/unreleased/Added-20260601-142716.yaml new file mode 100644 index 000000000..6c4ff78c3 --- /dev/null +++ b/.changes/unreleased/Added-20260601-142716.yaml @@ -0,0 +1,3 @@ +kind: Added +body: '''branch comment'': Inline comments now report ''outdated'' automatically when the anchored line is modified between the comment''s commit and the change''s current head (shamhub forge); previously a static field.' +time: 2026-06-01T14:27:16.137838-04:00 diff --git a/internal/diffmap/mapper.go b/internal/diffmap/mapper.go index d309eae77..39cc6e8ec 100644 --- a/internal/diffmap/mapper.go +++ b/internal/diffmap/mapper.go @@ -208,6 +208,43 @@ func (m *Mapper) Files() []string { return files } +// LineModified reports whether the given file:line was changed +// by this diff. side selects which side of the diff to inspect: +// "LEFT" (or "left") tests the NEW range of each hunk (the diff's +// "+" side), "RIGHT" (or "right", and the default) tests the OLD +// range (the diff's "-" side). +// +// The "RIGHT"-tests-OLD convention exists because callers ask +// stale-style questions: "this comment was anchored to line N on +// the RIGHT side of the original PR diff (i.e., the post-commit +// version of the file). I am now looking at the diff between the +// post-commit and the current head — has line N been touched in +// the post-commit's frame of reference?" That frame is the OLD +// side of the post-commit..head diff. +func (m *Mapper) LineModified(file string, line int, side string) bool { + fd, ok := m.files[file] + if !ok { + return false + } + useNewRange := strings.EqualFold(side, "LEFT") + for _, h := range fd.hunks { + if useNewRange { + if h.newCount > 0 && + line >= h.newStart && + line < h.newStart+h.newCount { + return true + } + } else { + if h.oldCount > 0 && + line >= h.oldStart && + line < h.oldStart+h.oldCount { + return true + } + } + } + return false +} + // parseHunkHeader parses "@@ -old,count +new,count @@". func parseHunkHeader(line string) (hunk, error) { // Strip "@@ " prefix and " @@..." suffix. diff --git a/internal/forge/shamhub/cli.go b/internal/forge/shamhub/cli.go index 8cd3547a7..940375937 100644 --- a/internal/forge/shamhub/cli.go +++ b/internal/forge/shamhub/cli.go @@ -115,11 +115,13 @@ runCommand: flag := flag.NewFlagSet("shamhub comment edit", flag.ContinueOnError) flag.SetOutput(logw) flag.Usage = func() { - fmt.Fprintln(logw, "usage: shamhub comment edit [-resolved=true|false] ") + fmt.Fprintln(logw, "usage: shamhub comment edit [-resolved=true|false] [-outdated=true|false] ") } var resolved optionalBoolFlag + var outdated optionalBoolFlag flag.Var(&resolved, "resolved", "set whether the comment is resolved") + flag.Var(&outdated, "outdated", "force the comment to be reported as outdated/stale") ts.Check(flag.Parse(args[1:])) args = flag.Args() if len(args) != 1 { @@ -135,6 +137,7 @@ runCommand: ts.Check(sh.EditComment(EditCommentRequest{ ID: id, Resolved: resolved.Ptr(), + Outdated: outdated.Ptr(), })) case "delete": diff --git a/internal/forge/shamhub/comment.go b/internal/forge/shamhub/comment.go index 899192c36..65e3b41ce 100644 --- a/internal/forge/shamhub/comment.go +++ b/internal/forge/shamhub/comment.go @@ -94,6 +94,12 @@ type EditCommentRequest struct { // Resolved optionally updates the resolved state. // Nil leaves the field unchanged. Resolved *bool + + // Outdated optionally forces the outdated/stale flag, bypassing + // the diff-based computation on list. Nil leaves the field + // unchanged; tests use this to assert the stale path renders + // correctly without setting up a real divergent commit. + Outdated *bool } // EditComment updates the state of a comment. @@ -110,6 +116,9 @@ func (sh *ShamHub) EditComment(req EditCommentRequest) error { if req.Resolved != nil { updated.Resolved = *req.Resolved } + if req.Outdated != nil { + updated.Outdated = *req.Outdated + } if err := validateCommentState(updated.Resolvable, updated.Resolved); err != nil { return err @@ -157,6 +166,17 @@ type shamComment struct { // ThreadID groups inline comments into threads. ThreadID string + // CommitSHA is the head SHA of the change at the time the + // comment was posted. Used to compute whether the comment is + // stale relative to the change's current head. + // Empty for legacy or test-seeded comments. + CommitSHA string + + // Outdated, if true, forces the comment to be reported as + // outdated regardless of git state. Tests use this to drive + // the stale path without setting up actual diff history. + Outdated bool + // Author is the comment author username. Author string diff --git a/internal/forge/shamhub/inline_comment.go b/internal/forge/shamhub/inline_comment.go index b9d64781d..a9160ad12 100644 --- a/internal/forge/shamhub/inline_comment.go +++ b/internal/forge/shamhub/inline_comment.go @@ -4,9 +4,12 @@ import ( "context" "fmt" "strconv" + "strings" "time" + "go.abhg.dev/gs/internal/diffmap" "go.abhg.dev/gs/internal/forge" + "go.abhg.dev/gs/internal/xec" ) var ( @@ -69,17 +72,40 @@ type inlineCommentItem struct { } func (sh *ShamHub) handleListInlineComments( - _ context.Context, + ctx context.Context, req *listInlineCommentsRequest, ) (*listInlineCommentsResponse, error) { sh.mu.RLock() defer sh.mu.RUnlock() + // Locate the change once so the per-comment stale check has a + // reference to compare each comment's anchor SHA against. + var change *shamChange + for i, c := range sh.changes { + if c.Base.Owner == req.Owner && + c.Base.Repo == req.Repo && + c.Number == req.Change { + change = &sh.changes[i] + break + } + } + var items []inlineCommentItem for _, c := range sh.comments { if c.Change != req.Change || c.Path == "" { continue } + outdated := c.Outdated + if !outdated && change != nil { + stale, err := sh.commentIsStale(ctx, &c, change) + if err != nil { + sh.log.Warn("compute stale", + "comment", c.ID, + "error", err) + } else { + outdated = stale + } + } items = append(items, inlineCommentItem{ ID: c.ID, ThreadID: c.ThreadID, @@ -88,7 +114,7 @@ func (sh *ShamHub) handleListInlineComments( Body: c.Body, Author: c.Author, Resolved: c.Resolved, - Outdated: false, + Outdated: outdated, CreatedAt: c.CreatedAt, }) } @@ -96,6 +122,67 @@ func (sh *ShamHub) handleListInlineComments( return &listInlineCommentsResponse{Items: items}, nil } +// commentIsStale reports whether the comment's anchored line has +// been touched between the comment's recorded CommitSHA and the +// change's current head. Comments without a recorded CommitSHA +// (e.g. test-seeded entries) are never considered stale by this +// path; tests can still force stale via the Outdated override. +func (sh *ShamHub) commentIsStale( + ctx context.Context, c *shamComment, change *shamChange, +) (bool, error) { + if c.CommitSHA == "" { + return false, nil + } + headSHA, err := sh.resolveBranchSHA( + ctx, change.Head.Owner, change.Head.Repo, change.Head.Name, + ) + if err != nil { + return false, err + } + if headSHA == c.CommitSHA { + return false, nil + } + + out, err := xec.Command(ctx, sh.log, sh.gitExe, + "diff", "--unified=0", + c.CommitSHA+".."+headSHA, "--", c.Path). + WithDir(sh.repoDir(change.Head.Owner, change.Head.Repo)). + Output() + if err != nil { + // If the file is gone or the diff fails, treat as stale: + // the comment's anchor can no longer be located cleanly. + return true, nil + } + if len(out) == 0 { + return false, nil + } + + mapper, err := diffmap.New(out) + if err != nil { + return false, fmt.Errorf("parse diff: %w", err) + } + side := c.Side + if side == "" { + side = "RIGHT" + } + return mapper.LineModified(c.Path, c.Line, side), nil +} + +// resolveBranchSHA returns the current SHA of the named branch in +// the given owner/repo's worktree. +func (sh *ShamHub) resolveBranchSHA( + ctx context.Context, owner, repo, branch string, +) (string, error) { + out, err := xec.Command(ctx, sh.log, sh.gitExe, "rev-parse", branch). + WithDir(sh.repoDir(owner, repo)). + Output() + if err != nil { + return "", fmt.Errorf( + "resolve %s/%s:%s: %w", owner, repo, branch, err) + } + return strings.TrimSpace(string(out)), nil +} + func (r *forgeRepository) ListInlineComments( ctx context.Context, id forge.ChangeID, @@ -148,9 +235,37 @@ type postInlineCommentResponse struct { } func (sh *ShamHub) handlePostInlineComment( - _ context.Context, + ctx context.Context, req *postInlineCommentRequest, ) (*postInlineCommentResponse, error) { + // Look up the change's head branch BEFORE taking the write lock + // so the rev-parse subprocess doesn't fight other writers. + sh.mu.RLock() + var headOwner, headRepo, headBranch string + for _, c := range sh.changes { + if c.Base.Owner == req.Owner && + c.Base.Repo == req.Repo && + c.Number == req.Change { + headOwner = c.Head.Owner + headRepo = c.Head.Repo + headBranch = c.Head.Name + break + } + } + sh.mu.RUnlock() + + var commitSHA string + if headBranch != "" { + sha, err := sh.resolveBranchSHA(ctx, headOwner, headRepo, headBranch) + if err != nil { + sh.log.Warn("capture comment commitSHA", + "change", req.Change, + "error", err) + } else { + commitSHA = sha + } + } + sh.mu.Lock() defer sh.mu.Unlock() @@ -168,6 +283,7 @@ func (sh *ShamHub) handlePostInlineComment( Path: req.Path, Line: req.Line, Side: req.Side, + CommitSHA: commitSHA, ThreadID: threadID, Resolvable: true, Author: "test-user", diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/branch b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/branch index c01dc85f3..70b749799 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/branch @@ -1 +1 @@ -"qP4Hn8gu" \ No newline at end of file +"uHIDcrYL" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/headHash b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/headHash index beb4afa19..ff8b9c0fa 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/headHash +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Failed/headHash @@ -1 +1 @@ -"f0eef766af05db1a4fc90e3cb591833890bcf68a" \ No newline at end of file +"15391373338bc6a82a0651e01f652227d9191290" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/branch b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/branch index 61c3c1b4f..8af68de0c 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/branch @@ -1 +1 @@ -"f0XMOiaa" \ No newline at end of file +"k4zrtaRh" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/headHash b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/headHash index 08638008a..1dc822051 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/headHash +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Passed/headHash @@ -1 +1 @@ -"f2923f5d9162ba6ddd3fec6f1725a3ee39c4c5c1" \ No newline at end of file +"a71e4aeb3b665e8dac451ceef812e96b4eff03c9" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/branch b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/branch index 502ef233f..6aad4380b 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/branch @@ -1 +1 @@ -"MGWUNTrV" \ No newline at end of file +"cJsX3FJK" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/headHash b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/headHash index c3bdf4602..f589ea484 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/headHash +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeChecksState/Pending/headHash @@ -1 +1 @@ -"9bd48588e29fbb9251bc614b2c23d84830937d61" \ No newline at end of file +"8d0f240a2e3e002b41dfcca2afa097d21e915b50" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/UpdateComment/updated-comment b/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/UpdateComment/updated-comment index dda3adda6..29865e094 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/UpdateComment/updated-comment +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/UpdateComment/updated-comment @@ -1 +1 @@ -"YJgNsP025jRY5hQX6mh2mIfiwifvz6G8" \ No newline at end of file +"YMe9aJMz4aqUY4rVvw532jIfsSSTreOJ" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/branch b/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/branch index 0bc036d75..e759cd6c1 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/branch @@ -1 +1 @@ -"pmwWlNhh" \ No newline at end of file +"7mErjxxx" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/comments b/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/comments index cb58610d5..57ce96583 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/comments +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangeComments/comments @@ -1,12 +1,12 @@ [ - "K067WOW7dQdrliaKS0tKylcfDgP5GhVp", - "dsCMPgmyz0KVBG501PPi2ocxE5sq7UfQ", - "3zyUZ2FZcxkOgp4FBvJfBKTnh9fdpNa3", - "im86H34osfgrDc7E4gdx7gE3XXcTXmPX", - "fgt7AG4rAoQp1gGEw8G2U2lbe0qWrTmp", - "KMuajrgxFADVDZhIFdzUBVzpAm9ee7xR", - "6El2lmQr5Ea5Hq9L0fLVfCSATL6qaGJl", - "ha2n0xHKCbk6xogserVQ8vOR2o2gbNH8", - "Dr8DblxCuohfDzo0gUkdZdTuRxz8uIfz", - "lr6i3eENW1lJd9i6NNxcjZCditYNWUqF" + "FCgADRGdIZcrVYez2B8APK7uyf6Kmtdr", + "VWmW0L0uDTP0Q9cMI96o2gNnUDsRABWS", + "7by1x9Ush3S1y941rHMW8xvGc2rNQ4he", + "mUAjd5pbzgWDb2SrHi3Efjpz8TujeX4s", + "Et7KqGtqa759eh41czPBc46bG547kRE9", + "YDNh4mIUmwxZe9InmwrY4R7xaEVse4hs", + "32yAezCNEUVSicsVX8D32u9fIDO4MIZl", + "SohUv71g1Q5xNJVyqUpkbk3iRX4MoMPP", + "O8cmsKWcEe4lpKhRxTy6x1UoD8IWdh0c", + "2wnRAXQTfc805ScPAeYlGcHJcGU3Amkt" ] \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/closedBranch b/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/closedBranch index 6f5fee334..6afb07a80 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/closedBranch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/closedBranch @@ -1 +1 @@ -"mzMsv5Rh" \ No newline at end of file +"KwrN8QQb" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/mergedBranch b/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/mergedBranch index 3d9a25268..83d30cea1 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/mergedBranch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/mergedBranch @@ -1 +1 @@ -"gvgMWiD8" \ No newline at end of file +"pr9Y043X" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/openBranch b/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/openBranch index 7e77aa963..e8203a066 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/openBranch +++ b/internal/forge/shamhub/testdata/TestIntegration/ChangesStates/openBranch @@ -1 +1 @@ -"QohFltlh" \ No newline at end of file +"pxiFIJDP" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/CommentCountsByChange/branch b/internal/forge/shamhub/testdata/TestIntegration/CommentCountsByChange/branch index 1b0a87a96..8905c8117 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/CommentCountsByChange/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/CommentCountsByChange/branch @@ -1 +1 @@ -"wleC7vBI" \ No newline at end of file +"tnZADrHv" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/empty-template b/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/empty-template index 305090d1d..bc6d959a0 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/empty-template +++ b/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/empty-template @@ -1 +1 @@ -"np6KTBsj.md" \ No newline at end of file +"F1beiU7a.md" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/non-empty-template b/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/non-empty-template index ef691a56a..362149eaa 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/non-empty-template +++ b/internal/forge/shamhub/testdata/TestIntegration/ListChangeTemplates/TemplatesPresent/non-empty-template @@ -1 +1 @@ -"aW2r2kGY.md" \ No newline at end of file +"QImY0Kkg.md" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/base-branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/base-branch index 4d6f27de3..321707ef4 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/base-branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/base-branch @@ -1 +1 @@ -"ExQcEmr1" \ No newline at end of file +"kUuiVvZg" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/branch index a8a9575a0..72c60f63a 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitBaseDoesNotExist/branch @@ -1 +1 @@ -"bcKIEKS3" \ No newline at end of file +"V3D6AmVM" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/fork-branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/fork-branch index 4bc253db7..7f204f07d 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/fork-branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/fork-branch @@ -1 +1 @@ -"QDezbUVv" \ No newline at end of file +"KdVqyYju" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/forkCommitHash b/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/forkCommitHash index 8846db890..42a258b3c 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/forkCommitHash +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitChangeFromPushRepository/forkCommitHash @@ -1 +1 @@ -"eae86575792255a697dad42dac57206c639e7777" \ No newline at end of file +"814cd4b6ffc700397f1e0ac8b1e7e9e2a33fef81" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssignee/branch-no-assignee b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssignee/branch-no-assignee index 93c1210d2..7a6341374 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssignee/branch-no-assignee +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssignee/branch-no-assignee @@ -1 +1 @@ -"4D8sFmyC" \ No newline at end of file +"cLBCoQhN" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne/branch-no-assignee-one-by-one b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne/branch-no-assignee-one-by-one index 97d4a3716..43703fdf2 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne/branch-no-assignee-one-by-one +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne/branch-no-assignee-one-by-one @@ -1 +1 @@ -"lEG1MUxo" \ No newline at end of file +"mrsfBxAT" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/SubmitWithAssignee/branch-with-assignee b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/SubmitWithAssignee/branch-with-assignee index 6aba0ca56..012919553 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/SubmitWithAssignee/branch-with-assignee +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditAssignees/SubmitWithAssignee/branch-with-assignee @@ -1 +1 @@ -"UQDEDpcg" \ No newline at end of file +"ZYtweGBY" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/base b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/base index bd79f7cc0..5d9abfef0 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/base +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/base @@ -1 +1 @@ -"P2inVOao" \ No newline at end of file +"j1D9uHlF" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/branch index 39462bd3d..f78ce4d17 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditBase/branch @@ -1 +1 @@ -"mKnU8EV4" \ No newline at end of file +"nG59l9x1" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/branch index d5094a646..c3d48403e 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/branch @@ -1 +1 @@ -"cI6Rfmnn" \ No newline at end of file +"0wsY1klc" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/firstCommitHash b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/firstCommitHash index 7e986537e..baf558565 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/firstCommitHash +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditChange/firstCommitHash @@ -1 +1 @@ -"1e2c32dc4f5cfec9674dac2d9d7d0274a63c15b0" \ No newline at end of file +"2f5334f9ac9693f4bf1a461d3557e5329b0ba945" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditDraft/branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditDraft/branch index 3bd5a7d4f..1f1c9a64b 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditDraft/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditDraft/branch @@ -1 +1 @@ -"R4gPQ4SL" \ No newline at end of file +"GpHW7An5" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/branch b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/branch index d24723898..16275db4c 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/branch +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/branch @@ -1 +1 @@ -"4HOIehwu" \ No newline at end of file +"UG4HySXr" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label1 b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label1 index ca667f6f4..0c76b9dcd 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label1 +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label1 @@ -1 +1 @@ -"2VGRqO7j" \ No newline at end of file +"0x4swduw" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label2 b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label2 index 2939cac77..f0db396d5 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label2 +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label2 @@ -1 +1 @@ -"dF2bQUKv" \ No newline at end of file +"UuuqeMhM" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label3 b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label3 index 5a7982702..9de895454 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label3 +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditLabels/label3 @@ -1 +1 @@ -"bSgDWsqi" \ No newline at end of file +"51m2IGvx" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewer/branch-no-reviewer b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewer/branch-no-reviewer index d834b007c..be55452c4 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewer/branch-no-reviewer +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewer/branch-no-reviewer @@ -1 +1 @@ -"BXaFutk3" \ No newline at end of file +"RKj6xubp" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne/branch-no-reviewer-one-by-one b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne/branch-no-reviewer-one-by-one index c34fa70ab..21bb7a300 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne/branch-no-reviewer-one-by-one +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne/branch-no-reviewer-one-by-one @@ -1 +1 @@ -"EwqrlAsh" \ No newline at end of file +"EcVgr6NN" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/SubmitWithReviewer/branch-with-reviewer b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/SubmitWithReviewer/branch-with-reviewer index ad68d67bc..36f88ae57 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/SubmitWithReviewer/branch-with-reviewer +++ b/internal/forge/shamhub/testdata/TestIntegration/SubmitEditReviewers/SubmitWithReviewer/branch-with-reviewer @@ -1 +1 @@ -"df7WoDco" \ No newline at end of file +"3wsEeIkE" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/apiURL b/internal/forge/shamhub/testdata/TestIntegration/apiURL index 4103c7885..c99f3f978 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/apiURL +++ b/internal/forge/shamhub/testdata/TestIntegration/apiURL @@ -1 +1 @@ -"http://127.0.0.1:53569" \ No newline at end of file +"http://127.0.0.1:65023" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/gitURL b/internal/forge/shamhub/testdata/TestIntegration/gitURL index 01ae293af..26183c311 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/gitURL +++ b/internal/forge/shamhub/testdata/TestIntegration/gitURL @@ -1 +1 @@ -"http://127.0.0.1:53570" \ No newline at end of file +"http://127.0.0.1:65024" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/pushRepoURL b/internal/forge/shamhub/testdata/TestIntegration/pushRepoURL index ed207937f..bf546e3fa 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/pushRepoURL +++ b/internal/forge/shamhub/testdata/TestIntegration/pushRepoURL @@ -1 +1 @@ -"http://127.0.0.1:53570/abhinav-fork/test-repo.git" \ No newline at end of file +"http://127.0.0.1:65024/abhinav-fork/test-repo.git" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/repoURL b/internal/forge/shamhub/testdata/TestIntegration/repoURL index 4c5e37538..470da529f 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/repoURL +++ b/internal/forge/shamhub/testdata/TestIntegration/repoURL @@ -1 +1 @@ -"http://127.0.0.1:53570/abhinav/test-repo.git" \ No newline at end of file +"http://127.0.0.1:65024/abhinav/test-repo.git" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/TestIntegration/token b/internal/forge/shamhub/testdata/TestIntegration/token index 8e0625d81..c5ba4720f 100644 --- a/internal/forge/shamhub/testdata/TestIntegration/token +++ b/internal/forge/shamhub/testdata/TestIntegration/token @@ -1 +1 @@ -"1ec8a66d2ad7f057" \ No newline at end of file +"9a4b742ea9c515db" \ No newline at end of file diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Failed.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Failed.yaml index b345987f7..cc3bee684 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Failed.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Failed.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 88 - host: 127.0.0.1:53569 - body: '{"subject":"Checks qP4Hn8gu","body":"Checks state test","base":"main","head":"qP4Hn8gu"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Checks uHIDcrYL","body":"Checks state test","base":"main","head":"uHIDcrYL"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -19,7 +19,7 @@ interactions: body: | { "number": 19, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/19" + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/19" } headers: Content-Length: @@ -28,16 +28,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 40.153542ms + duration: 23.820875ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 18 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"state":"failed"}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/19/checks + url: http://127.0.0.1:65023/abhinav/test-repo/change/19/checks method: POST response: proto: HTTP/1.1 @@ -53,15 +53,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 10.451959ms + duration: 224.917µs - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/19/checks + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/19/checks method: GET response: proto: HTTP/1.1 @@ -79,4 +79,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 264.458µs + duration: 150.333µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Passed.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Passed.yaml index aa5b9649a..ac94b38b8 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Passed.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Passed.yaml @@ -7,37 +7,37 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 88 - host: 127.0.0.1:53569 - body: '{"subject":"Checks f0XMOiaa","body":"Checks state test","base":"main","head":"f0XMOiaa"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Checks k4zrtaRh","body":"Checks state test","base":"main","head":"k4zrtaRh"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 80 + content_length: 82 body: | { - "number": 9, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/9" + "number": 13, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/13" } headers: Content-Length: - - "80" + - "82" Content-Type: - application/json status: 200 OK code: 200 - duration: 27.135375ms + duration: 35.531334ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 18 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"state":"passed"}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/9/checks + url: http://127.0.0.1:65023/abhinav/test-repo/change/13/checks method: POST response: proto: HTTP/1.1 @@ -53,15 +53,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 2.757584ms + duration: 180.583µs - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/9/checks + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/13/checks method: GET response: proto: HTTP/1.1 @@ -79,4 +79,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 1.189959ms + duration: 153.5µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Pending.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Pending.yaml index 5ed5de929..c5772a1f2 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Pending.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeChecksState/Pending.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 88 - host: 127.0.0.1:53569 - body: '{"subject":"Checks MGWUNTrV","body":"Checks state test","base":"main","head":"MGWUNTrV"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Checks cJsX3FJK","body":"Checks state test","base":"main","head":"cJsX3FJK"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 80 body: | { - "number": 3, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/3" + "number": 6, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/6" } headers: Content-Length: @@ -28,16 +28,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 27.517959ms + duration: 43.340916ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 19 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"state":"pending"}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/3/checks + url: http://127.0.0.1:65023/abhinav/test-repo/change/6/checks method: POST response: proto: HTTP/1.1 @@ -53,15 +53,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 161.792µs + duration: 665.667µs - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/3/checks + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/6/checks method: GET response: proto: HTTP/1.1 @@ -79,4 +79,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 207.709µs + duration: 862.792µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeComments.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeComments.yaml index edfe47a02..8b55ec86d 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeComments.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangeComments.yaml @@ -7,37 +7,37 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 92 - host: 127.0.0.1:53569 - body: '{"subject":"Testing pmwWlNhh","body":"Test PR for comments","base":"main","head":"pmwWlNhh"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing 7mErjxxx","body":"Test PR for comments","base":"main","head":"7mErjxxx"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 80 + content_length: 82 body: | { - "number": 5, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/5" + "number": 10, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/10" } headers: Content-Length: - - "80" + - "82" Content-Type: - application/json status: 200 OK code: 200 - duration: 43.473041ms + duration: 34.230625ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"K067WOW7dQdrliaKS0tKylcfDgP5GhVp"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"FCgADRGdIZcrVYez2B8APK7uyf6Kmtdr"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -55,16 +55,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 345.417µs + duration: 877.667µs - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"dsCMPgmyz0KVBG501PPi2ocxE5sq7UfQ"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"VWmW0L0uDTP0Q9cMI96o2gNnUDsRABWS"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -82,16 +82,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 158.667µs + duration: 191.042µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"3zyUZ2FZcxkOgp4FBvJfBKTnh9fdpNa3"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"7by1x9Ush3S1y941rHMW8xvGc2rNQ4he"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -109,16 +109,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 417.5µs + duration: 97.792µs - id: 4 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"im86H34osfgrDc7E4gdx7gE3XXcTXmPX"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"mUAjd5pbzgWDb2SrHi3Efjpz8TujeX4s"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -136,16 +136,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 224µs + duration: 83.791µs - id: 5 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"fgt7AG4rAoQp1gGEw8G2U2lbe0qWrTmp"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"Et7KqGtqa759eh41czPBc46bG547kRE9"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -163,16 +163,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 361.833µs + duration: 286.375µs - id: 6 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"KMuajrgxFADVDZhIFdzUBVzpAm9ee7xR"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"YDNh4mIUmwxZe9InmwrY4R7xaEVse4hs"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -190,16 +190,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 699.25µs + duration: 69.458µs - id: 7 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"6El2lmQr5Ea5Hq9L0fLVfCSATL6qaGJl"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"32yAezCNEUVSicsVX8D32u9fIDO4MIZl"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -217,16 +217,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 261.167µs + duration: 286.75µs - id: 8 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"ha2n0xHKCbk6xogserVQ8vOR2o2gbNH8"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"SohUv71g1Q5xNJVyqUpkbk3iRX4MoMPP"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -244,16 +244,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 164.25µs + duration: 73.75µs - id: 9 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"Dr8DblxCuohfDzo0gUkdZdTuRxz8uIfz"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"O8cmsKWcEe4lpKhRxTy6x1UoD8IWdh0c"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -271,16 +271,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 562.292µs + duration: 119.583µs - id: 10 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 - host: 127.0.0.1:53569 - body: '{"changeNumber":5,"body":"lr6i3eENW1lJd9i6NNxcjZCditYNWUqF"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments + content_length: 61 + host: 127.0.0.1:65023 + body: '{"changeNumber":10,"body":"2wnRAXQTfc805ScPAeYlGcHJcGU3Amkt"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments method: POST response: proto: HTTP/1.1 @@ -298,16 +298,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 373.291µs + duration: 64.208µs - id: 11 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 43 - host: 127.0.0.1:53569 - body: '{"body":"YJgNsP025jRY5hQX6mh2mIfiwifvz6G8"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments/1 + host: 127.0.0.1:65023 + body: '{"body":"YMe9aJMz4aqUY4rVvw532jIfsSSTreOJ"}' + url: http://127.0.0.1:65023/abhinav/test-repo/comments/1 method: PATCH response: proto: HTTP/1.1 @@ -325,15 +325,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 1.350167ms + duration: 70.875µs - id: 12 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/comments/2 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/comments/2 method: DELETE response: proto: HTTP/1.1 @@ -349,16 +349,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 287.416µs + duration: 164.291µs - id: 13 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 22 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"body":"should fail"}' - url: http://127.0.0.1:53569/abhinav/test-repo/comments/2 + url: http://127.0.0.1:65023/abhinav/test-repo/comments/2 method: PATCH response: proto: HTTP/1.1 @@ -374,22 +374,22 @@ interactions: - text/plain; charset=utf-8 status: 404 Not Found code: 404 - duration: 821.25µs + duration: 255.208µs - id: 14 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: change: - - "5" + - "10" limit: - "3" offset: - "0" - url: http://127.0.0.1:53569/abhinav/test-repo/comments?change=5&limit=3&offset=0 + url: http://127.0.0.1:65023/abhinav/test-repo/comments?change=10&limit=3&offset=0 method: GET response: proto: HTTP/1.1 @@ -401,15 +401,15 @@ interactions: "items": [ { "id": 1, - "body": "YJgNsP025jRY5hQX6mh2mIfiwifvz6G8" + "body": "YMe9aJMz4aqUY4rVvw532jIfsSSTreOJ" }, { "id": 3, - "body": "3zyUZ2FZcxkOgp4FBvJfBKTnh9fdpNa3" + "body": "7by1x9Ush3S1y941rHMW8xvGc2rNQ4he" }, { "id": 4, - "body": "im86H34osfgrDc7E4gdx7gE3XXcTXmPX" + "body": "mUAjd5pbzgWDb2SrHi3Efjpz8TujeX4s" } ], "offset": 3, @@ -422,22 +422,22 @@ interactions: - application/json status: 200 OK code: 200 - duration: 583.25µs + duration: 98.334µs - id: 15 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: change: - - "5" + - "10" limit: - "3" offset: - "3" - url: http://127.0.0.1:53569/abhinav/test-repo/comments?change=5&limit=3&offset=3 + url: http://127.0.0.1:65023/abhinav/test-repo/comments?change=10&limit=3&offset=3 method: GET response: proto: HTTP/1.1 @@ -449,15 +449,15 @@ interactions: "items": [ { "id": 5, - "body": "fgt7AG4rAoQp1gGEw8G2U2lbe0qWrTmp" + "body": "Et7KqGtqa759eh41czPBc46bG547kRE9" }, { "id": 6, - "body": "KMuajrgxFADVDZhIFdzUBVzpAm9ee7xR" + "body": "YDNh4mIUmwxZe9InmwrY4R7xaEVse4hs" }, { "id": 7, - "body": "6El2lmQr5Ea5Hq9L0fLVfCSATL6qaGJl" + "body": "32yAezCNEUVSicsVX8D32u9fIDO4MIZl" } ], "offset": 6, @@ -470,22 +470,22 @@ interactions: - application/json status: 200 OK code: 200 - duration: 311.417µs + duration: 589.666µs - id: 16 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: change: - - "5" + - "10" limit: - "3" offset: - "6" - url: http://127.0.0.1:53569/abhinav/test-repo/comments?change=5&limit=3&offset=6 + url: http://127.0.0.1:65023/abhinav/test-repo/comments?change=10&limit=3&offset=6 method: GET response: proto: HTTP/1.1 @@ -497,15 +497,15 @@ interactions: "items": [ { "id": 8, - "body": "ha2n0xHKCbk6xogserVQ8vOR2o2gbNH8" + "body": "SohUv71g1Q5xNJVyqUpkbk3iRX4MoMPP" }, { "id": 9, - "body": "Dr8DblxCuohfDzo0gUkdZdTuRxz8uIfz" + "body": "O8cmsKWcEe4lpKhRxTy6x1UoD8IWdh0c" }, { "id": 10, - "body": "lr6i3eENW1lJd9i6NNxcjZCditYNWUqF" + "body": "2wnRAXQTfc805ScPAeYlGcHJcGU3Amkt" } ], "offset": 9 @@ -517,22 +517,22 @@ interactions: - application/json status: 200 OK code: 200 - duration: 210.416µs + duration: 317.334µs - id: 17 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: change: - - "5" + - "10" limit: - "10" offset: - "0" - url: http://127.0.0.1:53569/abhinav/test-repo/comments?change=5&limit=10&offset=0 + url: http://127.0.0.1:65023/abhinav/test-repo/comments?change=10&limit=10&offset=0 method: GET response: proto: HTTP/1.1 @@ -544,39 +544,39 @@ interactions: "items": [ { "id": 1, - "body": "YJgNsP025jRY5hQX6mh2mIfiwifvz6G8" + "body": "YMe9aJMz4aqUY4rVvw532jIfsSSTreOJ" }, { "id": 3, - "body": "3zyUZ2FZcxkOgp4FBvJfBKTnh9fdpNa3" + "body": "7by1x9Ush3S1y941rHMW8xvGc2rNQ4he" }, { "id": 4, - "body": "im86H34osfgrDc7E4gdx7gE3XXcTXmPX" + "body": "mUAjd5pbzgWDb2SrHi3Efjpz8TujeX4s" }, { "id": 5, - "body": "fgt7AG4rAoQp1gGEw8G2U2lbe0qWrTmp" + "body": "Et7KqGtqa759eh41czPBc46bG547kRE9" }, { "id": 6, - "body": "KMuajrgxFADVDZhIFdzUBVzpAm9ee7xR" + "body": "YDNh4mIUmwxZe9InmwrY4R7xaEVse4hs" }, { "id": 7, - "body": "6El2lmQr5Ea5Hq9L0fLVfCSATL6qaGJl" + "body": "32yAezCNEUVSicsVX8D32u9fIDO4MIZl" }, { "id": 8, - "body": "ha2n0xHKCbk6xogserVQ8vOR2o2gbNH8" + "body": "SohUv71g1Q5xNJVyqUpkbk3iRX4MoMPP" }, { "id": 9, - "body": "Dr8DblxCuohfDzo0gUkdZdTuRxz8uIfz" + "body": "O8cmsKWcEe4lpKhRxTy6x1UoD8IWdh0c" }, { "id": 10, - "body": "lr6i3eENW1lJd9i6NNxcjZCditYNWUqF" + "body": "2wnRAXQTfc805ScPAeYlGcHJcGU3Amkt" } ], "offset": 9 @@ -588,4 +588,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 956.5µs + duration: 134.042µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangesStates.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangesStates.yaml index 63f60dabf..bced78a16 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangesStates.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ChangesStates.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 80 - host: 127.0.0.1:53569 - body: '{"subject":"Open QohFltlh","body":"Open change","base":"main","head":"QohFltlh"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Open pxiFIJDP","body":"Open change","base":"main","head":"pxiFIJDP"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -19,7 +19,7 @@ interactions: body: | { "number": 9, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/9" + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/9" } headers: Content-Length: @@ -28,16 +28,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 29.667375ms + duration: 34.57975ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 84 - host: 127.0.0.1:53569 - body: '{"subject":"Merged gvgMWiD8","body":"Merged change","base":"main","head":"gvgMWiD8"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Merged pr9Y043X","body":"Merged change","base":"main","head":"pr9Y043X"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -46,8 +46,8 @@ interactions: content_length: 82 body: | { - "number": 11, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/11" + "number": 12, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/12" } headers: Content-Length: @@ -56,16 +56,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 29.907541ms + duration: 33.688208ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 84 - host: 127.0.0.1:53569 - body: '{"subject":"Closed mzMsv5Rh","body":"Closed change","base":"main","head":"mzMsv5Rh"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Closed KwrN8QQb","body":"Closed change","base":"main","head":"KwrN8QQb"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -75,7 +75,7 @@ interactions: body: | { "number": 15, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/15" + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/15" } headers: Content-Length: @@ -84,16 +84,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 27.266959ms + duration: 35.364167ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 17 - host: 127.0.0.1:53569 - body: '{"ids":[9,11,15]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/states + host: 127.0.0.1:65023 + body: '{"ids":[9,12,15]}' + url: http://127.0.0.1:65023/abhinav/test-repo/change/states method: POST response: proto: HTTP/1.1 @@ -105,15 +105,15 @@ interactions: "statuses": [ { "state": "open", - "headHash": "df17da0bd1722f06dbd75d8948417dded7a12d77" + "headHash": "411602011d0832845f106ef2be6495abfbe5c5fc" }, { "state": "merged", - "headHash": "fae1a4a757b2259632acb5eb5926849f125dc594" + "headHash": "c8603b621c2670b7556ddbf0f69b1208d1338700" }, { "state": "closed", - "headHash": "145f79d936fdcaf9ccd165ed6be52de6eaba9895" + "headHash": "f5b57e73454624ea19608329201c67e155c50995" } ] } @@ -124,4 +124,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 27.146958ms + duration: 31.633125ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/CommentCountsByChange.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/CommentCountsByChange.yaml index b98cc5b46..3aac36dca 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/CommentCountsByChange.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/CommentCountsByChange.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 98 - host: 127.0.0.1:53569 - body: '{"subject":"Testing wleC7vBI","body":"Test PR for comment counts","base":"main","head":"wleC7vBI"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing tnZADrHv","body":"Test PR for comment counts","base":"main","head":"tnZADrHv"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 80 body: | { - "number": 1, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/1" + "number": 4, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/4" } headers: Content-Length: @@ -28,16 +28,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 46.254708ms + duration: 41.79475ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 11 - host: 127.0.0.1:53569 - body: '{"ids":[1]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/comment-counts + host: 127.0.0.1:65023 + body: '{"ids":[4]}' + url: http://127.0.0.1:65023/abhinav/test-repo/change/comment-counts method: POST response: proto: HTTP/1.1 @@ -61,4 +61,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 3.071583ms + duration: 414.417µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/FindChangesByBranchDoesNotExist.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/FindChangesByBranchDoesNotExist.yaml index 931a943e7..bf85d6175 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/FindChangesByBranchDoesNotExist.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/FindChangesByBranchDoesNotExist.yaml @@ -7,13 +7,13 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: limit: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/does-not-exist?limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/does-not-exist?limit=10&state=all method: GET response: proto: HTTP/1.1 @@ -29,4 +29,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 570µs + duration: 474.458µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/NoTemplates.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/NoTemplates.yaml index 970786aee..b0a04f880 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/NoTemplates.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/NoTemplates.yaml @@ -7,8 +7,8 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change-template + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change-template method: GET response: proto: HTTP/1.1 @@ -24,4 +24,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 270.632708ms + duration: 589.82275ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/TemplatesPresent.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/TemplatesPresent.yaml index 490f41621..808142485 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/TemplatesPresent.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/ListChangeTemplates/TemplatesPresent.yaml @@ -7,8 +7,8 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change-template + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change-template method: GET response: proto: HTTP/1.1 @@ -18,12 +18,12 @@ interactions: body: | [ { - "filename": "aW2r2kGY.md", - "body": "This is a test template\n" + "filename": "F1beiU7a.md", + "body": "\n" }, { - "filename": "np6KTBsj.md", - "body": "\n" + "filename": "QImY0Kkg.md", + "body": "This is a test template\n" } ] headers: @@ -33,4 +33,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 309.049ms + duration: 293.78125ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitBaseDoesNotExist.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitBaseDoesNotExist.yaml index a9463e3d0..c63023f2c 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitBaseDoesNotExist.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitBaseDoesNotExist.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 106 - host: 127.0.0.1:53569 - body: '{"subject":"Testing bcKIEKS3","body":"Test PR with non-existent base","base":"ExQcEmr1","head":"bcKIEKS3"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing V3D6AmVM","body":"Test PR with non-existent base","base":"kUuiVvZg","head":"V3D6AmVM"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -25,16 +25,16 @@ interactions: - text/plain; charset=utf-8 status: 400 Bad Request code: 400 - duration: 18.86725ms + duration: 27.279292ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 29 - host: 127.0.0.1:53569 - body: '{"ref":"refs/heads/ExQcEmr1"}' - url: http://127.0.0.1:53569/abhinav/test-repo/ref/exists + host: 127.0.0.1:65023 + body: '{"ref":"refs/heads/kUuiVvZg"}' + url: http://127.0.0.1:65023/abhinav/test-repo/ref/exists method: POST response: proto: HTTP/1.1 @@ -52,4 +52,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 20.495625ms + duration: 18.243167ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitChangeFromPushRepository.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitChangeFromPushRepository.yaml index 7c6944ecc..85759ee33 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitChangeFromPushRepository.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitChangeFromPushRepository.yaml @@ -7,48 +7,48 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 138 - host: 127.0.0.1:53569 - body: '{"subject":"Testing fork QDezbUVv","body":"Test fork change request","base":"main","head":"QDezbUVv","head_repo":"abhinav-fork/test-repo"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing fork KdVqyYju","body":"Test fork change request","base":"main","head":"KdVqyYju","head_repo":"abhinav-fork/test-repo"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 82 + content_length: 80 body: | { - "number": 12, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/12" + "number": 7, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/7" } headers: Content-Length: - - "82" + - "80" Content-Type: - application/json status: 200 OK code: 200 - duration: 22.375459ms + duration: 43.112125ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/12 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/7 method: GET response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 527 + content_length: 525 body: | { - "number": 12, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/12", + "number": 7, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/7", "state": "open", - "title": "Testing fork QDezbUVv", + "title": "Testing fork KdVqyYju", "body": "Test fork change request", "base": { "repository": { @@ -56,32 +56,32 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "71012226be854d2a77b193ca779abba5cc84cca0" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav-fork", "name": "test-repo" }, - "ref": "QDezbUVv", - "sha": "eae86575792255a697dad42dac57206c639e7777" + "ref": "KdVqyYju", + "sha": "814cd4b6ffc700397f1e0ac8b1e7e9e2a33fef81" } } headers: Content-Length: - - "527" + - "525" Content-Type: - application/json status: 200 OK code: 200 - duration: 20.375916ms + duration: 40.957666ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: head_repo: - abhinav-fork/test-repo @@ -89,20 +89,20 @@ interactions: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/QDezbUVv?head_repo=abhinav-fork%2Ftest-repo&limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/KdVqyYju?head_repo=abhinav-fork%2Ftest-repo&limit=10&state=all method: GET response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 577 + content_length: 575 body: | [ { - "number": 12, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/12", + "number": 7, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/7", "state": "open", - "title": "Testing fork QDezbUVv", + "title": "Testing fork KdVqyYju", "body": "Test fork change request", "base": { "repository": { @@ -110,39 +110,39 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "71012226be854d2a77b193ca779abba5cc84cca0" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav-fork", "name": "test-repo" }, - "ref": "QDezbUVv", - "sha": "eae86575792255a697dad42dac57206c639e7777" + "ref": "KdVqyYju", + "sha": "814cd4b6ffc700397f1e0ac8b1e7e9e2a33fef81" } } ] headers: Content-Length: - - "577" + - "575" Content-Type: - application/json status: 200 OK code: 200 - duration: 18.822042ms + duration: 42.115584ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: limit: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/QDezbUVv?limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/KdVqyYju?limit=10&state=all method: GET response: proto: HTTP/1.1 @@ -158,4 +158,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 455.042µs + duration: 840.667µs diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssignee.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssignee.yaml index fbafc7661..ada5af010 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssignee.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssignee.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 97 - host: 127.0.0.1:53569 - body: '{"subject":"Testing 4D8sFmyC","body":"Test PR without assignees","base":"main","head":"4D8sFmyC"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing cLBCoQhN","body":"Test PR without assignees","base":"main","head":"cLBCoQhN"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 82 body: | { - "number": 10, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/10" + "number": 17, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/17" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 29.755416ms + duration: 89.386125ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/10 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/17 method: GET response: proto: HTTP/1.1 @@ -45,10 +45,10 @@ interactions: content_length: 518 body: | { - "number": 10, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/10", + "number": 17, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/17", "state": "open", - "title": "Testing 4D8sFmyC", + "title": "Testing cLBCoQhN", "body": "Test PR without assignees", "base": { "repository": { @@ -56,15 +56,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "822b12d04865ab61606efc7c3b21439c79070762" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "4D8sFmyC", - "sha": "3dce9a05f05fb11263d1482ecd4125949e747389" + "ref": "cLBCoQhN", + "sha": "02f7e188612cb6aa664f90fd772316a73cee2a5e" } } headers: @@ -74,16 +74,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 27.52675ms + duration: 31.104791ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 39 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"assignees":["assignee1","assignee2"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/10 + url: http://127.0.0.1:65023/abhinav/test-repo/change/17 method: PATCH response: proto: HTTP/1.1 @@ -99,15 +99,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 224.75µs + duration: 219.083µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/10 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/17 method: GET response: proto: HTTP/1.1 @@ -116,10 +116,10 @@ interactions: content_length: 573 body: | { - "number": 10, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/10", + "number": 17, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/17", "state": "open", - "title": "Testing 4D8sFmyC", + "title": "Testing cLBCoQhN", "body": "Test PR without assignees", "base": { "repository": { @@ -127,15 +127,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "822b12d04865ab61606efc7c3b21439c79070762" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "4D8sFmyC", - "sha": "3dce9a05f05fb11263d1482ecd4125949e747389" + "ref": "cLBCoQhN", + "sha": "02f7e188612cb6aa664f90fd772316a73cee2a5e" }, "assignees": [ "assignee1", @@ -149,4 +149,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 29.249833ms + duration: 26.232292ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne.yaml index 23e87958b..9055b6649 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/AddAssigneesOneByOne.yaml @@ -7,37 +7,37 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 97 - host: 127.0.0.1:53569 - body: '{"subject":"Testing lEG1MUxo","body":"Test PR without assignees","base":"main","head":"lEG1MUxo"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing mrsfBxAT","body":"Test PR without assignees","base":"main","head":"mrsfBxAT"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 80 + content_length: 82 body: | { - "number": 4, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/4" + "number": 18, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/18" } headers: Content-Length: - - "80" + - "82" Content-Type: - application/json status: 200 OK code: 200 - duration: 42.64775ms + duration: 103.338917ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 27 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"assignees":["assignee1"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/4 + url: http://127.0.0.1:65023/abhinav/test-repo/change/18 method: PATCH response: proto: HTTP/1.1 @@ -53,16 +53,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 631.583µs + duration: 2.698958ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 27 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"assignees":["assignee2"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/4 + url: http://127.0.0.1:65023/abhinav/test-repo/change/18 method: PATCH response: proto: HTTP/1.1 @@ -78,27 +78,27 @@ interactions: - application/json status: 200 OK code: 200 - duration: 129.958µs + duration: 757.208µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/4 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/18 method: GET response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 571 + content_length: 573 body: | { - "number": 4, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/4", + "number": 18, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/18", "state": "open", - "title": "Testing lEG1MUxo", + "title": "Testing mrsfBxAT", "body": "Test PR without assignees", "base": { "repository": { @@ -106,15 +106,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "822b12d04865ab61606efc7c3b21439c79070762" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "lEG1MUxo", - "sha": "c95d303c96fd553536f0b20c74bbf7cb19087f37" + "ref": "mrsfBxAT", + "sha": "037decf9634d9ef000d3338a1118a12c30f508f9" }, "assignees": [ "assignee1", @@ -123,9 +123,9 @@ interactions: } headers: Content-Length: - - "571" + - "573" Content-Type: - application/json status: 200 OK code: 200 - duration: 37.717625ms + duration: 28.944958ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/SubmitWithAssignee.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/SubmitWithAssignee.yaml index 9e3a5f5c2..b3a050d14 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/SubmitWithAssignee.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditAssignees/SubmitWithAssignee.yaml @@ -7,48 +7,48 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 131 - host: 127.0.0.1:53569 - body: '{"subject":"Testing UQDEDpcg","body":"Test PR with assignee","base":"main","head":"UQDEDpcg","assignees":["assignee1","assignee2"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing ZYtweGBY","body":"Test PR with assignee","base":"main","head":"ZYtweGBY","assignees":["assignee1","assignee2"]}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 80 + content_length: 82 body: | { - "number": 2, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/2" + "number": 16, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/16" } headers: Content-Length: - - "80" + - "82" Content-Type: - application/json status: 200 OK code: 200 - duration: 38.620583ms + duration: 81.944208ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/2 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/16 method: GET response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 567 + content_length: 569 body: | { - "number": 2, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/2", + "number": 16, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/16", "state": "open", - "title": "Testing UQDEDpcg", + "title": "Testing ZYtweGBY", "body": "Test PR with assignee", "base": { "repository": { @@ -56,15 +56,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "822b12d04865ab61606efc7c3b21439c79070762" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "UQDEDpcg", - "sha": "0970719d4527d7008b38d05e15c0e92f6acfb25b" + "ref": "ZYtweGBY", + "sha": "253d95da5d88d073346425a49d45eb9782970118" }, "assignees": [ "assignee1", @@ -73,38 +73,38 @@ interactions: } headers: Content-Length: - - "567" + - "569" Content-Type: - application/json status: 200 OK code: 200 - duration: 38.749042ms + duration: 30.625ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: limit: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/UQDEDpcg?limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/ZYtweGBY?limit=10&state=all method: GET response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 625 + content_length: 627 body: | [ { - "number": 2, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/2", + "number": 16, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/16", "state": "open", - "title": "Testing UQDEDpcg", + "title": "Testing ZYtweGBY", "body": "Test PR with assignee", "base": { "repository": { @@ -112,15 +112,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "822b12d04865ab61606efc7c3b21439c79070762" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "UQDEDpcg", - "sha": "0970719d4527d7008b38d05e15c0e92f6acfb25b" + "ref": "ZYtweGBY", + "sha": "253d95da5d88d073346425a49d45eb9782970118" }, "assignees": [ "assignee1", @@ -130,9 +130,9 @@ interactions: ] headers: Content-Length: - - "625" + - "627" Content-Type: - application/json status: 200 OK code: 200 - duration: 33.967333ms + duration: 34.062209ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditBase.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditBase.yaml index 33cf7f1c6..fdfa5d144 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditBase.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditBase.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 100 - host: 127.0.0.1:53569 - body: '{"subject":"Testing mKnU8EV4","body":"Test PR with custom base","base":"P2inVOao","head":"mKnU8EV4"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing nG59l9x1","body":"Test PR with custom base","base":"j1D9uHlF","head":"nG59l9x1"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -19,7 +19,7 @@ interactions: body: | { "number": 8, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/8" + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/8" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 41.197167ms + duration: 41.339125ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/8 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/8 method: GET response: proto: HTTP/1.1 @@ -46,25 +46,25 @@ interactions: body: | { "number": 8, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/8", + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/8", "state": "open", - "title": "Testing mKnU8EV4", + "title": "Testing nG59l9x1", "body": "Test PR with custom base", "base": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "P2inVOao", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "ref": "j1D9uHlF", + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "mKnU8EV4", - "sha": "cd26b16c292f00fa0b6a5f5f710c461474950344" + "ref": "nG59l9x1", + "sha": "180b09561cd0af2092dd3f6f1686a9424e9e308c" } } headers: @@ -74,16 +74,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 44.502708ms + duration: 38.256041ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 15 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"base":"main"}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/8 + url: http://127.0.0.1:65023/abhinav/test-repo/change/8 method: PATCH response: proto: HTTP/1.1 @@ -99,15 +99,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 129.75µs + duration: 668.042µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/8 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/8 method: GET response: proto: HTTP/1.1 @@ -117,9 +117,9 @@ interactions: body: | { "number": 8, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/8", + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/8", "state": "open", - "title": "Testing mKnU8EV4", + "title": "Testing nG59l9x1", "body": "Test PR with custom base", "base": { "repository": { @@ -127,15 +127,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "mKnU8EV4", - "sha": "cd26b16c292f00fa0b6a5f5f710c461474950344" + "ref": "nG59l9x1", + "sha": "180b09561cd0af2092dd3f6f1686a9424e9e308c" } } headers: @@ -145,4 +145,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 32.452916ms + duration: 41.808834ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditChange.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditChange.yaml index 7faddd99f..585ecd78e 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditChange.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditChange.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 79 - host: 127.0.0.1:53569 - body: '{"subject":"Testing cI6Rfmnn","body":"Test PR","base":"main","head":"cI6Rfmnn"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing 0wsY1klc","body":"Test PR","base":"main","head":"0wsY1klc"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 80 body: | { - "number": 7, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/7" + "number": 5, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/5" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 45.201167ms + duration: 43.865291ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/7 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/5 method: GET response: proto: HTTP/1.1 @@ -45,10 +45,10 @@ interactions: content_length: 498 body: | { - "number": 7, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/7", + "number": 5, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/5", "state": "open", - "title": "Testing cI6Rfmnn", + "title": "Testing 0wsY1klc", "body": "Test PR", "base": { "repository": { @@ -56,15 +56,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "cI6Rfmnn", - "sha": "1e2c32dc4f5cfec9674dac2d9d7d0274a63c15b0" + "ref": "0wsY1klc", + "sha": "2f5334f9ac9693f4bf1a461d3557e5329b0ba945" } } headers: @@ -74,20 +74,20 @@ interactions: - application/json status: 200 OK code: 200 - duration: 39.789833ms + duration: 38.726167ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: limit: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/cI6Rfmnn?limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/0wsY1klc?limit=10&state=all method: GET response: proto: HTTP/1.1 @@ -97,10 +97,10 @@ interactions: body: | [ { - "number": 7, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/7", + "number": 5, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/5", "state": "open", - "title": "Testing cI6Rfmnn", + "title": "Testing 0wsY1klc", "body": "Test PR", "base": { "repository": { @@ -108,15 +108,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "cI6Rfmnn", - "sha": "1e2c32dc4f5cfec9674dac2d9d7d0274a63c15b0" + "ref": "0wsY1klc", + "sha": "2f5334f9ac9693f4bf1a461d3557e5329b0ba945" } } ] @@ -127,4 +127,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 40.238416ms + duration: 35.607083ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditDraft.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditDraft.yaml index 9371286e1..951987eba 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditDraft.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditDraft.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 98 - host: 127.0.0.1:53569 - body: '{"subject":"Testing R4gPQ4SL","body":"Test draft PR","base":"main","head":"R4gPQ4SL","draft":true}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing GpHW7An5","body":"Test draft PR","base":"main","head":"GpHW7An5","draft":true}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 80 body: | { - "number": 3, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/3" + "number": 1, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/1" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 37.971ms + duration: 45.313583ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/3 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/1 method: GET response: proto: HTTP/1.1 @@ -45,11 +45,11 @@ interactions: content_length: 521 body: | { - "number": 3, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/3", + "number": 1, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/1", "draft": true, "state": "open", - "title": "Testing R4gPQ4SL", + "title": "Testing GpHW7An5", "body": "Test draft PR", "base": { "repository": { @@ -57,15 +57,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "R4gPQ4SL", - "sha": "965286a9aa45336455161a7b2a4db1e34f9ac98d" + "ref": "GpHW7An5", + "sha": "b894d2c9f962f8770923a81e9754e60d1de4cb3d" } } headers: @@ -75,16 +75,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 36.908792ms + duration: 34.389375ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 15 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"draft":false}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/3 + url: http://127.0.0.1:65023/abhinav/test-repo/change/1 method: PATCH response: proto: HTTP/1.1 @@ -100,15 +100,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 213.667µs + duration: 829.916µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/3 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/1 method: GET response: proto: HTTP/1.1 @@ -117,10 +117,10 @@ interactions: content_length: 504 body: | { - "number": 3, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/3", + "number": 1, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/1", "state": "open", - "title": "Testing R4gPQ4SL", + "title": "Testing GpHW7An5", "body": "Test draft PR", "base": { "repository": { @@ -128,15 +128,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "R4gPQ4SL", - "sha": "965286a9aa45336455161a7b2a4db1e34f9ac98d" + "ref": "GpHW7An5", + "sha": "b894d2c9f962f8770923a81e9754e60d1de4cb3d" } } headers: @@ -146,16 +146,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 43.281167ms + duration: 33.882208ms - id: 4 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 14 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"draft":true}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/3 + url: http://127.0.0.1:65023/abhinav/test-repo/change/1 method: PATCH response: proto: HTTP/1.1 @@ -171,15 +171,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 484.75µs + duration: 2.1145ms - id: 5 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/3 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/1 method: GET response: proto: HTTP/1.1 @@ -188,11 +188,11 @@ interactions: content_length: 521 body: | { - "number": 3, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/3", + "number": 1, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/1", "draft": true, "state": "open", - "title": "Testing R4gPQ4SL", + "title": "Testing GpHW7An5", "body": "Test draft PR", "base": { "repository": { @@ -200,15 +200,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "R4gPQ4SL", - "sha": "965286a9aa45336455161a7b2a4db1e34f9ac98d" + "ref": "GpHW7An5", + "sha": "b894d2c9f962f8770923a81e9754e60d1de4cb3d" } } headers: @@ -218,4 +218,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 37.233416ms + duration: 43.7375ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditLabels.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditLabels.yaml index 351de0b08..7f8628fff 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditLabels.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditLabels.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 113 - host: 127.0.0.1:53569 - body: '{"subject":"Testing 4HOIehwu","body":"Test PR with labels","base":"main","head":"4HOIehwu","labels":["2VGRqO7j"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing UG4HySXr","body":"Test PR with labels","base":"main","head":"UG4HySXr","labels":["0x4swduw"]}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 80 body: | { - "number": 6, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/6" + "number": 2, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/2" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 41.998125ms + duration: 40.484416ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/6 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/2 method: GET response: proto: HTTP/1.1 @@ -45,10 +45,10 @@ interactions: content_length: 544 body: | { - "number": 6, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/6", + "number": 2, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/2", "state": "open", - "title": "Testing 4HOIehwu", + "title": "Testing UG4HySXr", "body": "Test PR with labels", "base": { "repository": { @@ -56,18 +56,18 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "4HOIehwu", - "sha": "b324fe0ca7ab1155f6db68bb6738b3a35c706c3f" + "ref": "UG4HySXr", + "sha": "c3959e60265d742a896e1f7234252545b773f499" }, "labels": [ - "2VGRqO7j" + "0x4swduw" ] } headers: @@ -77,16 +77,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 36.385333ms + duration: 38.69275ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 23 - host: 127.0.0.1:53569 - body: '{"labels":["dF2bQUKv"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/6 + host: 127.0.0.1:65023 + body: '{"labels":["UuuqeMhM"]}' + url: http://127.0.0.1:65023/abhinav/test-repo/change/2 method: PATCH response: proto: HTTP/1.1 @@ -102,16 +102,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 398.042µs + duration: 176.042µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 34 - host: 127.0.0.1:53569 - body: '{"labels":["dF2bQUKv","bSgDWsqi"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/6 + host: 127.0.0.1:65023 + body: '{"labels":["UuuqeMhM","51m2IGvx"]}' + url: http://127.0.0.1:65023/abhinav/test-repo/change/2 method: PATCH response: proto: HTTP/1.1 @@ -127,20 +127,20 @@ interactions: - application/json status: 200 OK code: 200 - duration: 421.083µs + duration: 1.794542ms - id: 4 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: limit: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/4HOIehwu?limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/UG4HySXr?limit=10&state=all method: GET response: proto: HTTP/1.1 @@ -150,10 +150,10 @@ interactions: body: | [ { - "number": 6, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/6", + "number": 2, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/2", "state": "open", - "title": "Testing 4HOIehwu", + "title": "Testing UG4HySXr", "body": "Test PR with labels", "base": { "repository": { @@ -161,20 +161,20 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "4HOIehwu", - "sha": "b324fe0ca7ab1155f6db68bb6738b3a35c706c3f" + "ref": "UG4HySXr", + "sha": "c3959e60265d742a896e1f7234252545b773f499" }, "labels": [ - "2VGRqO7j", - "dF2bQUKv", - "bSgDWsqi" + "0x4swduw", + "UuuqeMhM", + "51m2IGvx" ] } ] @@ -185,4 +185,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 41.2895ms + duration: 40.419084ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewer.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewer.yaml index ca892789d..c6e505c70 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewer.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewer.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 97 - host: 127.0.0.1:53569 - body: '{"subject":"Testing BXaFutk3","body":"Test PR without reviewers","base":"main","head":"BXaFutk3"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing RKj6xubp","body":"Test PR without reviewers","base":"main","head":"RKj6xubp"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 82 body: | { - "number": 13, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/13" + "number": 14, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/14" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 30.130458ms + duration: 31.390084ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/13 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/14 method: GET response: proto: HTTP/1.1 @@ -45,10 +45,10 @@ interactions: content_length: 518 body: | { - "number": 13, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/13", + "number": 14, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/14", "state": "open", - "title": "Testing BXaFutk3", + "title": "Testing RKj6xubp", "body": "Test PR without reviewers", "base": { "repository": { @@ -56,15 +56,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "BXaFutk3", - "sha": "4423dce906b5fddf7ddd3a536c3ffc2a2627a245" + "ref": "RKj6xubp", + "sha": "16c9bd545f8fa8474c3ed93d0216d68613f9d800" } } headers: @@ -74,16 +74,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 27.700542ms + duration: 28.493791ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 39 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"reviewers":["reviewer1","reviewer2"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/13 + url: http://127.0.0.1:65023/abhinav/test-repo/change/14 method: PATCH response: proto: HTTP/1.1 @@ -99,15 +99,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 35.203875ms + duration: 43.250208ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/13 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/14 method: GET response: proto: HTTP/1.1 @@ -116,10 +116,10 @@ interactions: content_length: 583 body: | { - "number": 13, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/13", + "number": 14, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/14", "state": "open", - "title": "Testing BXaFutk3", + "title": "Testing RKj6xubp", "body": "Test PR without reviewers", "base": { "repository": { @@ -127,15 +127,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "935a1736c1d0abc559194d26342e46a76e102069" + "sha": "822b12d04865ab61606efc7c3b21439c79070762" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "BXaFutk3", - "sha": "4423dce906b5fddf7ddd3a536c3ffc2a2627a245" + "ref": "RKj6xubp", + "sha": "16c9bd545f8fa8474c3ed93d0216d68613f9d800" }, "requested_reviewers": [ "reviewer1", @@ -149,4 +149,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 55.48225ms + duration: 31.47775ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne.yaml index 567791f79..ccec1e120 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/AddReviewersOneByOne.yaml @@ -7,9 +7,9 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 97 - host: 127.0.0.1:53569 - body: '{"subject":"Testing EwqrlAsh","body":"Test PR without reviewers","base":"main","head":"EwqrlAsh"}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing EcVgr6NN","body":"Test PR without reviewers","base":"main","head":"EcVgr6NN"}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 @@ -18,8 +18,8 @@ interactions: content_length: 82 body: | { - "number": 14, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/14" + "number": 11, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/11" } headers: Content-Length: @@ -28,15 +28,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 30.532125ms + duration: 32.204334ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/14 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/11 method: GET response: proto: HTTP/1.1 @@ -45,10 +45,10 @@ interactions: content_length: 518 body: | { - "number": 14, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/14", + "number": 11, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/11", "state": "open", - "title": "Testing EwqrlAsh", + "title": "Testing EcVgr6NN", "body": "Test PR without reviewers", "base": { "repository": { @@ -56,15 +56,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "EwqrlAsh", - "sha": "6ee3f5e3004c4d74580c42ea3b0f85d0fcf5f0f8" + "ref": "EcVgr6NN", + "sha": "a73e953fe762e464b24ad0d9f18f855c86c6e24f" } } headers: @@ -74,16 +74,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 27.463625ms + duration: 34.215333ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 27 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"reviewers":["reviewer1"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/14 + url: http://127.0.0.1:65023/abhinav/test-repo/change/11 method: PATCH response: proto: HTTP/1.1 @@ -99,16 +99,16 @@ interactions: - application/json status: 200 OK code: 200 - duration: 35.209625ms + duration: 401.625µs - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 27 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 body: '{"reviewers":["reviewer2"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/change/14 + url: http://127.0.0.1:65023/abhinav/test-repo/change/11 method: PATCH response: proto: HTTP/1.1 @@ -124,15 +124,15 @@ interactions: - application/json status: 200 OK code: 200 - duration: 26.211ms + duration: 458.334µs - id: 4 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 - url: http://127.0.0.1:53569/abhinav/test-repo/change/14 + host: 127.0.0.1:65023 + url: http://127.0.0.1:65023/abhinav/test-repo/change/11 method: GET response: proto: HTTP/1.1 @@ -141,10 +141,10 @@ interactions: content_length: 583 body: | { - "number": 14, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/14", + "number": 11, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/11", "state": "open", - "title": "Testing EwqrlAsh", + "title": "Testing EcVgr6NN", "body": "Test PR without reviewers", "base": { "repository": { @@ -152,15 +152,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "935a1736c1d0abc559194d26342e46a76e102069" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "EwqrlAsh", - "sha": "6ee3f5e3004c4d74580c42ea3b0f85d0fcf5f0f8" + "ref": "EcVgr6NN", + "sha": "a73e953fe762e464b24ad0d9f18f855c86c6e24f" }, "requested_reviewers": [ "reviewer1", @@ -174,4 +174,4 @@ interactions: - application/json status: 200 OK code: 200 - duration: 28.57575ms + duration: 30.902541ms diff --git a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/SubmitWithReviewer.yaml b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/SubmitWithReviewer.yaml index 6d9e90d43..2686b249e 100644 --- a/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/SubmitWithReviewer.yaml +++ b/internal/forge/shamhub/testdata/fixtures/TestIntegration/SubmitEditReviewers/SubmitWithReviewer.yaml @@ -7,54 +7,54 @@ interactions: proto_major: 1 proto_minor: 1 content_length: 131 - host: 127.0.0.1:53569 - body: '{"subject":"Testing df7WoDco","body":"Test PR with reviewer","base":"main","head":"df7WoDco","reviewers":["reviewer1","reviewer2"]}' - url: http://127.0.0.1:53569/abhinav/test-repo/changes + host: 127.0.0.1:65023 + body: '{"subject":"Testing 3wsEeIkE","body":"Test PR with reviewer","base":"main","head":"3wsEeIkE","reviewers":["reviewer1","reviewer2"]}' + url: http://127.0.0.1:65023/abhinav/test-repo/changes method: POST response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 82 + content_length: 80 body: | { - "number": 12, - "url": "http://127.0.0.1:53570/abhinav/test-repo/change/12" + "number": 3, + "url": "http://127.0.0.1:65024/abhinav/test-repo/change/3" } headers: Content-Length: - - "82" + - "80" Content-Type: - application/json status: 200 OK code: 200 - duration: 30.764459ms + duration: 43.853542ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 content_length: 0 - host: 127.0.0.1:53569 + host: 127.0.0.1:65023 form: limit: - "10" state: - all - url: http://127.0.0.1:53569/abhinav/test-repo/changes/by-branch/df7WoDco?limit=10&state=all + url: http://127.0.0.1:65023/abhinav/test-repo/changes/by-branch/3wsEeIkE?limit=10&state=all method: GET response: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 637 + content_length: 635 body: | [ { - "number": 12, - "html_url": "http://127.0.0.1:53570/abhinav/test-repo/change/12", + "number": 3, + "html_url": "http://127.0.0.1:65024/abhinav/test-repo/change/3", "state": "open", - "title": "Testing df7WoDco", + "title": "Testing 3wsEeIkE", "body": "Test PR with reviewer", "base": { "repository": { @@ -62,15 +62,15 @@ interactions: "name": "test-repo" }, "ref": "main", - "sha": "c17a304a06b281e76d193f8a86a8ab71585b64e3" + "sha": "3f0e08369ff67b1c0df49de949a61a36b0f0d258" }, "head": { "repository": { "owner": "abhinav", "name": "test-repo" }, - "ref": "df7WoDco", - "sha": "6cca56449280db9fd8954bd6d01d3b30ca7a474c" + "ref": "3wsEeIkE", + "sha": "5fab980ca1556d04c0dcbb005c5372ba48534139" }, "requested_reviewers": [ "reviewer1", @@ -80,9 +80,9 @@ interactions: ] headers: Content-Length: - - "637" + - "635" Content-Type: - application/json status: 200 OK code: 200 - duration: 28.513791ms + duration: 38.093459ms diff --git a/testdata/script/branch_comment_stale.txt b/testdata/script/branch_comment_stale.txt new file mode 100644 index 000000000..3864fe37a --- /dev/null +++ b/testdata/script/branch_comment_stale.txt @@ -0,0 +1,74 @@ +# Verifies that the 'outdated' flag on inline comments is computed +# automatically from the diff between the comment's commit and the +# change's current head — not just a static seed value. +# +# A comment becomes outdated when the line it was anchored to is +# changed in a subsequent commit. Comments on other lines stay live. + +as 'Test ' +at '2024-04-05T16:40:32Z' + +cd repo +git init +git commit --allow-empty -m 'Initial commit' + +shamhub init +shamhub new origin alice/example.git +shamhub register alice +git push origin main + +env SHAMHUB_USERNAME=alice +gs auth login + +git add main.go +gs bc -m 'Add main' feature1 +gs branch submit --fill +stderr 'Created #' + +# Two inline comments at different lines on the same head commit. +gs branch comment add main.go:4 -m 'Comment on line 4.' +stderr 'Posted comment' +gs branch comment add main.go:5 -m 'Comment on line 5.' +stderr 'Posted comment' + +# Both comments are fresh: neither is outdated yet. +gs branch comment list +! stderr 'outdated' + +# Amend the file so line 4 changes but line 5 does not, then +# update the change with 'gs ca' + 'gs branch submit --force'. +cp $WORK/extra/main-edited.go main.go +git add main.go +gs ca --no-edit +gs branch submit --force + +# Comment 1 (on line 4) is now outdated; comment 2 (on line 5) +# is not. The list output reflects this: +gs branch comment list +stderr 'Comment on line 4' +stderr 'outdated' +stderr 'Comment on line 5' + +# Sanity: the JSON list (used by the VSCode extension) reports +# outdated as the per-comment status. Comment 1 outdated, comment +# 2 still open. +gs branch comment list --json +stdout '"body":"Comment on line 4\."' +stdout '"body":"Comment on line 5\."' +stdout '"status":"outdated"' +stdout '"status":"open"' + +-- repo/main.go -- +package main + +func main() { + println("hello") + println("world") +} +-- extra/main-edited.go -- +package main + +func main() { + println("greetings") + println("world") +}