Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/backend/src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,17 @@ const getReposOwnedByUsers = async (users: string[], octokit: Octokit, signal: A

const { durationMs, data } = await measure(async () => {
const fetchFn = async () => {
let query = `user:${user}`;
// To include forks in the search results, we will need to add fork:true
// see: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories
query += ' fork:true';
Comment thread
brendan-kellam marked this conversation as resolved.
// @note: We need to use GitHub's search API here since it is the only way
// to get all repositories (private and public) owned by a user that supports
// the username as a parameter.
// @see: https://github.com/orgs/community/discussions/24382#discussioncomment-3243958
// @see: https://api.github.com/search/repositories?q=user:USERNAME
const searchResults = await octokit.paginate(octokit.rest.search.repos, {
q: `user:${user}`,
q: query,
per_page: 100,
request: {
signal,
Expand Down