Skip to content

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

@SeongJaeSong

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

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