Repository navigation
fix(#1833): compare GitHub owner logins case-insensitively in PR recovery - #1836
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
…very REPO_FULL_NAME takes its owner spelling from ISSUE_URL, while the GitHub API returns the canonical login. Owner logins are case-insensitive, but _forge_resolve_existing_pr_url and forge_list_prs_for_branch compared headRepositoryOwner.login with case-sensitive equality. A mixed-case issue URL owner therefore dropped the matching same-repo PR, and post-code reported a creation failure for a PR that existed. Both jq filters now compare owner logins with ascii_downcase, the same approach review-ops.lib.sh uses for reviewers. Head and base branch matching stays exact because git refs are case-sensitive. GitLab is unchanged. Bundled scripts (post-code.sh, pre-code.sh, pre-code-jira.sh) were regenerated with scripts/bundle-sh.sh. The PR-recovery test harness now accepts an optional REPO_FULL_NAME, and a new fixture checks that recovery succeeds when the owner differs only by case. forge_list_prs_for_branch has no direct test, so none was added. Note: make could not run in the sandbox (/bin/sh not permitted), so the bundles were regenerated and checked by calling bundle-sh.sh directly. pre-commit could not fetch its hook repos (TLS error). shellcheck v0.10.0 (the pinned rev) passed when run directly, and so did lint-release-cases. The whitespace and line-ending checks were done by hand, and scan-secrets covered gitleaks. make lint (skillsaw) could not run because uvx is unavailable, but it lints only skills and agent docs, which this change does not touch. post-code-test.sh passes in source and bundled modes, except for 3 signed-commits checks that also fail on unmodified main. Closes #1833 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 11:17 AM UTC · Completed 11:25 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.30 |
|
<!-- fullsend:risk-assessment --> DetailsSmall, well-specified bugfix with complete acceptance criteria coverage and matching scope, moderated to score 2 by protected script modifications and high recent churn across touched files. |
ReviewFindingsMedium
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This changes
scripts/lib/github-code-ops.lib.shso that both_forge_resolve_existing_pr_urlandforge_list_prs_for_branchcompare GitHub owner logins case-insensitively (jqascii_downcase). The bundled scripts that inline the lib (post-code.sh,pre-code.sh,pre-code-jira.sh) are regenerated.Why
REPO_FULL_NAMEtakes its owner spelling fromISSUE_URL, butgh pr listreturns the canonicalheadRepositoryOwner.login. With an issue URL likehttps://github.com/Fullsend-Ai/agents/issues/123, the case-sensitive check dropped the matching same-repo PR. Recovery then failed closed, and post-code reported a creation failure for a PR that existed.Head and base branch matching (
headRefName,baseRefName,--head,--base) stays exact because git refs are case-sensitive. GitLab is unchanged.Testing
run_gh_create_pr_recover_testinscripts/post-code-test.shnow accepts an optionalREPO_FULL_NAME(defaultorg/repo).create-pr-already-exists-owner-case-mismatch-recovers:REPO_FULL_NAME=Org/repo, the API login isorg, and there is one matching PR. Recovery returns its URL. This test fails without the lib change.forge_list_prs_for_branchhas no direct test, so none was added. I checked its jq filter by hand against mixed-case input.scripts/post-code-test.shpasses in source and bundled modes, except for 3 signed-commits checks (code-harness-signed-commits-default-off,eval-code-harness-signed-commits-on,signed-commits-off-plain-push). Those 3 also fail on unmodifiedmain.Caveats
makecannot run in the sandbox (/bin/shis not permitted). I regenerated the bundles and checked them for staleness by runningscripts/bundle-sh.shdirectly overBUNDLE_SRCS. Please confirm withmake check-bundlein CI.pre-commitcould not fetch its hook repos (TLS error). shellcheck v0.10.0 (the pinned rev, with the configured args) passed when run directly, and so didlint-release-cases. scan-secrets covered gitleaks.make lint(skillsaw) did not run becauseuvxis unavailable. It lints only skills and agent docs, which this change does not touch.🤖 Generated with Claude Code
Closes #1833
Post-script verification
agent/1833-owner-case-insensitive)f4acd0350dc9445112f4a0a6f781c02a31a64636..HEAD)