trailer icon indicating copy to clipboard operation
trailer copied to clipboard

Only(?) direct groups used for filtering PRs

Open SevereOverfl0w opened this issue 1 year ago • 6 comments

I have configured "When a PR is assigned for review...to my teams - Move To Mentioned". But I recently noticed a couple of PRs were missing from my list.

I think it's because a "parent" team was requested for review, rather than a team that I'm directly a member of.

So the team parent/child layout is:

  • All Developers
    • Special Developers
      • @SevereOverfl0w

I'm a member of "Special Developers". "All Developers" was requested for review, and GitHub shows that as being assigned to a team I'm a member of. Trailer doesn't show the PR in my list though 😢


I've just discovered the "Hidden Items" section, here's the line for this PR:

[org/repo #9999]: Title of PR -- Repo setting: Only Mine and Participated sections allowed

SevereOverfl0w avatar Nov 06 '23 11:11 SevereOverfl0w

I noticed a lot of issues since the upgrade from 1.8.9 onwards. Try reverting to that version to see if it will work again.

verebes1 avatar Nov 08 '23 12:11 verebes1

@SevereOverfl0w Thanks for the detailed report, and sorry for the slow reply. From the hiding log it does indeed sound like the PR was not promoted to those sections as Trailer was unable to read "All Developers" from the GH API as part of your team memberships. Since I don't have a lot of experience with nested team structures, do you by any chance know where in the GH API this info might exist? I can happily add this capability, if GH offers the info.

ptsochantaris avatar Jan 19 '24 21:01 ptsochantaris

@verebes1 If you create issues for things you have encountered they are far more likely to be noticed and fixed. PRs and/or API info that may be related to issues is also super helpful, if you can provide it as part of an issue.

ptsochantaris avatar Jan 19 '24 21:01 ptsochantaris

@SevereOverfl0w Thanks for the detailed report, and sorry for the slow reply. From the hiding log it does indeed sound like the PR was not promoted to those sections as Trailer was unable to read "All Developers" from the GH API as part of your team memberships. Since I don't have a lot of experience with nested team structures, do you by any chance know where in the GH API this info might exist? I can happily add this capability, if GH offers the info.

Just had a look, when you list teams there's a "parent" attribute which tells you the parent of that team: https://docs.github.com/en/rest/teams/teams?apiVersion=2022-11-28#list-teams

You'd need to follow that recursively to build up the whole tree, as parents can have parents, etc.

SevereOverfl0w avatar Jan 20 '24 14:01 SevereOverfl0w

Thanks! Do you know of some account that is publicly queryable and which would provide some nested levels of teams? It sounds like a relatively simple issue to fix in Trailer, but I just need to be able to test it with real-world API :)

ptsochantaris avatar Jan 21 '24 20:01 ptsochantaris

Do you have a test organisation you use for testing trailer? I believe you should be able to set this up there.

SevereOverfl0w avatar Jan 22 '24 08:01 SevereOverfl0w