Skip to content

feat: increase viewable PRs in Expert Mode from 30 to 100#132

Merged
pfeerick merged 2 commits intomainfrom
copilot/update-per-page-parameter
Jan 14, 2026
Merged

feat: increase viewable PRs in Expert Mode from 30 to 100#132
pfeerick merged 2 commits intomainfrom
copilot/update-per-page-parameter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 14, 2026

The edgeTxPrs GraphQL query was limited to GitHub's default 30 PRs per page, restricting visibility in the PrTargetForm component.

Changes

  • Added per_page: 100 parameter to the GitHub API call in edgeTxPrs resolver
  • Updated test fixture to match the new API request path
const prs = await github("GET /repos/{owner}/{repo}/pulls", {
  owner: config.github.organization,
  repo: config.github.repos.firmware,
  sort: "created",
  state: "open",
  direction: "desc",
  per_page: 100,  // Added
});

This aligns with the existing pattern used in the commits resolver (line 202) and increases the PR limit to GitHub's maximum for non-paginated requests.

Original prompt

Problem

The edgeTxPrs GraphQL query in src/shared/backend/graph/firmware/github.ts currently fetches pull requests from the GitHub API without specifying the per_page parameter. This means it uses GitHub's default of 30 PRs, limiting the number of pull requests shown in the PrTargetForm component.

Solution

Add the per_page: 100 parameter to the GitHub API call in the edgeTxPrs query resolver to increase the limit from 30 to 100 pull requests.

File to Modify

File: src/shared/backend/graph/firmware/github.ts

Location: In the edgeTxPrs field resolver, around line 127

Current code:

edgeTxPrs: t.field({
  type: [EdgeTxPr],
  resolve: async (_, __, { github }) => {
    const prs = await github("GET /repos/{owner}/{repo}/pulls", {
      owner: config.github.organization,
      repo: config.github.repos.firmware,
      sort: "created",
      state: "open",
      direction: "desc",
    });

    return prs.data.map((pr) => ({
      id: pr.number,
      name: pr.head.label,
      headCommitId: pr.head.sha,
      title: pr.title,
      description: pr.body ?? null,
    }));
  },
}),

Required change:
Add per_page: 100, to the parameters object passed to the GitHub API call, after the direction: "desc", line.

This will allow users to see up to 100 open pull requests instead of just 30.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Jan 14, 2026
Co-authored-by: pfeerick <5500713+pfeerick@users.noreply.github.com>
Copilot AI changed the title [WIP] Add per_page parameter to edgeTxPrs query Increase edgeTxPrs query limit from 30 to 100 pull requests Jan 14, 2026
Copilot AI requested a review from pfeerick January 14, 2026 06:25
@pfeerick pfeerick changed the title Increase edgeTxPrs query limit from 30 to 100 pull requests feat: increase viewable PRs in Expert Mode from 30 to 100 Jan 14, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 44.43%. Comparing base (4be5e23) to head (1c0cdf7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/shared/backend/graph/firmware/github.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
- Coverage   44.44%   44.43%   -0.01%     
==========================================
  Files         108      108              
  Lines       12689    12690       +1     
  Branches      597      597              
==========================================
  Hits         5639     5639              
- Misses       7042     7043       +1     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying buddy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1c0cdf7
Status: ✅  Deploy successful!
Preview URL: https://904e4d4b.buddy-7a6.pages.dev
Branch Preview URL: https://head.buddy-7a6.pages.dev

View logs

@github-actions
Copy link
Copy Markdown

EdgeTX Buddy has been automatically deployed to Cloudflare.
✅ Preview: https://904e4d4b.buddy-7a6.pages.dev
✅ Storybook: https://904e4d4b.buddy-7a6.pages.dev/storybook

@pfeerick pfeerick marked this pull request as ready for review January 14, 2026 06:35
Copy link
Copy Markdown
Member

@pfeerick pfeerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, targeted and preview works perfectly. If we need more than 100, that is possible with a little more work, but unlikely to be needed for the foreseeable future.

@pfeerick pfeerick merged commit 6f8bbab into main Jan 14, 2026
17 of 18 checks passed
@pfeerick pfeerick deleted the copilot/update-per-page-parameter branch January 14, 2026 06:38
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.

2 participants