Skip to content

fix(page): build the PR search link from the program's repos - #102

Closed
bfs2021 wants to merge 1 commit into
codercops:developfrom
bfs2021:fix/101-prs-link-repos
Closed

bfs2021 wants to merge 1 commit into
codercops:developfrom
bfs2021:fix/101-prs-link-repos

Conversation

@bfs2021

@bfs2021 bfs2021 commented Oct 26, 2026

Copy link
Copy Markdown

Problem

On a contributor card page, "See 's merged pull requests on GitHub" links to a GitHub search built with org:codercops (src/index.ts). The number on the card comes from searchMergedPrs (src/github.ts), which only searches the program's repos (repo:codercops/<repo> for each one). So the link can list PRs the card didn't count — it already does for any program with its own repos list. Fixes #101.

Fix

prsQuery is now built from program.repos the same way searchMergedPrs builds its query: same author, label and merged-date window, but repo:codercops/<repo> per program repo instead of org:codercops.

Testing

  • test/card.test.ts:
    • the existing route-level assertion is updated to the new repos-scoped query (it asserted the old org:codercops shape);
    • new renders the prs link it is given, repos-qualified not org-wide asserts the page renders a repos-qualified link and no org: qualifier.
  • npm run typecheck → clean.
  • npm test → 378 passed.
  • The updated assertion fails on the previous src/index.ts (verified by stashing it).

…ps#101)

The contributor page linked to an org-wide search while the count came
from a repos-scoped one, so the link could list PRs the card didn't
count. Build the query the same way searchMergedPrs does.
@anurag629 anurag629 added the spam Low-effort or spam PR, does not count for Hacktoberfest label Oct 26, 2026
@anurag629

Copy link
Copy Markdown
Member

Hey @bfs2021, closing this one too and labeling it spam. #101 was opened for sank8-2 (that's the first comment on it), sank8-2 claimed it there before you opened this, and it was never assigned to you.

That's your second spam PR, after toolbelt #346 earlier today. Per the ground rules in CONTRIBUTING.md, two spam PRs means no more issue assignments this month and you're out of the CODERCOPS goodies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spam Low-effort or spam PR, does not count for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The contributor page links to an org-wide PR search instead of the program's repos

2 participants