Skip to content

highlight-non-default-base-branch doesn't run on global PR/issue lists (/pulls, /issues) #9167

Closed

Description

@SeongJaeSong

Description

highlight-non-default-base-branch works on per-repo PR/issue lists (e.g. https://github.com/owner/repo/pulls) but does not run on the global PR/issue dashboards (/pulls, /issues, /pulls?author=@me, etc.).

In source/features/highlight-non-default-base-branch.tsx the only include is pageDetect.isRepoIssueOrPRList, so the feature is never registered on the global lists. The badge that would tell me "this PR targets a non-default branch" is exactly what I want most on /pulls?author=@me, where I review my own PRs across many repos and have no other quick way to spot one that targets a release/feature branch.

Note: extending to global lists is not a one-line include change — buildQuery, getDefaultBranch(), and buildRepoUrl() all assume a single-repo context, so the query needs to be grouped per repo (parsed from each row's href) and fetch each repo's defaultBranchRef alongside the PRs. Row markup would also need the React selectors used by open-all-conversations (a[data-testid="issue-pr-title-link"]).

Happy to send a PR if you confirm this is in scope.

How to replicate the issue + URL

  1. Open https://github.com/pulls?q=is%3Apr+is%3Aopen+author%3A%40fregante (any global PR list with a PR that targets a non-default base branch)
  2. Observe: no "To " badge appears on any row
  3. Compare with a per-repo list, e.g. https://github.com/refined-github/sandbox/pulls?q=is%3Apr+is%3Aopen+pr+branch — badge appears as expected

Extension version

26.4.4

Browser(s) used

Chrome 146.0.7680.178

Activity

  1. fregante commented on Apr 7, 2026

    @fregante
    Member

    Thanks for looking into this. As described that seems to be excessive as it would require a number of HTTP requests to be made every time you open the PR list, as opposed to just one in the repo PR list.

    However from what I can tell there's room for improvement to the feature that would make it possible to make a single query.

    We can get the default branch in the same query we get the PR data, we don't need the getDefaultBranch call at all.

    Then buildRepoUrl is just a simple helper but we can build the URL from the user/repo combination we use to build the GQL query. There might be a small chance we can also get this URL from the query but this is less likely.

    If you can send a PR exploring these improvements first, a followup PR can implement support for the global PR/issue list. I think the first PR would be quite small

  2. fregante commented on Apr 7, 2026

    @fregante
    Member

    so the query needs to be grouped per repo

    It would reduce the query and response size, but if it's too annoying don't worry about it. Simpler code is almost always preferable to tiny optimization.

  3. added a commit that references this issue on Apr 7, 2026
    1f601d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions