Skip to content

fix(forge): use search_prs for View current branch PR (N v)#114

Merged
actionshrimp merged 1 commit intomainfrom
fix/view-current-pr-search
Feb 24, 2026
Merged

fix(forge): use search_prs for View current branch PR (N v)#114
actionshrimp merged 1 commit intomainfrom
fix/view-current-pr-search

Conversation

@actionshrimp
Copy link
Owner

Summary

  • N v ("View current branch PR") previously fetched the 50 most recently updated open PRs via list_prs and filtered client-side by branch name. In large repos with many open PRs, the user's PR could fall outside the top 50, causing a false "No open PR found" message.
  • Now uses search_prs with a targeted head:<branch> GitHub search query to find the PR server-side, matching the existing pattern in pr_list.lua.

Test plan

  • Unit test verifies search_prs is called with correct GraphQL query and head:<branch> filter
  • E2E test verifies _view_current_pr passes correct query string and limit
  • E2E test verifies pr_detail.open is called with correct PR number when search returns results
  • All 1540 unit tests pass
  • All 627 E2E tests pass
  • Lint passes

Previously, N v fetched the 50 most recently updated open PRs and
filtered client-side, so it silently failed in repos with many PRs.
Now uses search_prs with a targeted `head:<branch>` query to find the
PR server-side, matching the pattern already used by pr_list.lua.
@actionshrimp actionshrimp merged commit 1ea0b91 into main Feb 24, 2026
3 checks passed
@actionshrimp actionshrimp deleted the fix/view-current-pr-search branch February 24, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant