Skip to content

fix: resolve forked repos to upstream correctly in issues filter (#315)#338

Open
Sujini-kudupudi wants to merge 2 commits into
Coder-s-OG-s:mainfrom
Sujini-kudupudi:fix-repo-filter-fork
Open

fix: resolve forked repos to upstream correctly in issues filter (#315)#338
Sujini-kudupudi wants to merge 2 commits into
Coder-s-OG-s:mainfrom
Sujini-kudupudi:fix-repo-filter-fork

Conversation

@Sujini-kudupudi

Copy link
Copy Markdown
Contributor

Summary

Replaces the ephemeral Supabase provider_token with the stable GitHub App installation token to authenticate GitHub API calls when detecting forked repositories in the Browse Issues filter. The previous token expired during live sessions causing the GitHub API checks to fail and return zero issues for forks.

Type of Change

  • Bug fix
  • New feature
  • UI / UX improvement
  • Refactor
  • Documentation
  • Other

Related Issue

Closes #315

What was changed?

  • Extended the installation_repositories query in src/app/actions/issues.ts to include installation_id.
  • Replaced sb.auth.getSession() and provider_token usage with getInstallOctokit(installation_id) to authenticate API requests using the GitHub App token.
  • Switched to using octokit.repos.get({ owner, repo }) for reliably checking if a repository is a fork and safely returning the upstream parent.full_name.

Screenshots

N/A

Checklist

  • My code follows the project structure and conventions
  • I tested this locally (npm run dev)
  • No hardcoded secrets or credentials
  • I have updated documentation if needed

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@Sujini-kudupudi is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mergeship Ready Ready Preview, Comment Jun 18, 2026 1:01pm

@Ayush-Patel-56 Ayush-Patel-56 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Logic looks solid and tests/lint passes. One thing before merge - getRepoOptions has no test covering the fork-resolution path itself (the exact thing #315 was about), just the empty-installs case. Can we add one mocking getInstallOctokit/repos.get for the fork-found + error-fallback cases? Don't want this regressing silently again.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo filter on Browse Issues returns no results when the repo is a fork

2 participants