ptsochantaris / trailer

Managing Pull Requests and Issues For GitHub & GitHub Enterprise
https://github.com/ptsochantaris/trailer
Other
1.17k stars 67 forks source link

Only(?) direct groups used for filtering PRs #490

Open SevereOverfl0w opened 12 months ago

SevereOverfl0w commented 12 months ago

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:

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
verebes1 commented 12 months ago

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.

ptsochantaris commented 9 months ago

@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 commented 9 months ago

@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.

SevereOverfl0w commented 9 months ago

@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.

ptsochantaris commented 9 months ago

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 :)

SevereOverfl0w commented 9 months ago

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