Home > front end >  GitHub search results do not return all repos for team
GitHub search results do not return all repos for team

Time:01-27

I have a URL for accessing all open PRs for my team. URL: https://github.com/pulls?q=is:open is:pr archived:false team:corp-name/team-name

Query: is:open is:pr archived:false team:corp-name/team-name

This has always worked fine but the last few repos I created are not found by this query and I can't tell why. The team has the same write access on all repos and if I go to github.com/orgs/corp-name/teams/team-name/repositories they are all listed there. I don't see anything in the settings to determine which team is the owner. All settings are the same as other repos that do show up in the search results.

An alternative would be to use repo: but I don't think wildcards are an option and there's too many repos to list separately.

CodePudding user response:

I think I unexpectedly stumbled across the answer to this. For GitHub to consider a PR to be under a team, the team needs to be referenced in a comment on the PR. Our old repos had a template that included ###### @corp-name/team-name on the bottom of the PR description. New repos don't have that.

The other strange thing: if you add it and then edit/remove it, GitHub has it cached somewhere because the search results retain it. You can't remove it as far as I can tell.

GitHub will link a PR to a team mentioned in the initial description or any comment, prepended with a "@".

  • Related