trstringer / manual-approval

Pause your GitHub Actions workflow and request manual approval from set approvers before continuing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation on "Org team approver" is misleading

semmelbroesel opened this issue · comments

Hi.

I just spent 2 weeks trying to get manual-approval to work with a Github Team instead of a manual list of users.

When I read "Org team approver", I assumed that it was possible to directly assign a group of people AS A GROUP to the approval process. My hope was that this would circumvent the 10 assignee limit AND allow me to add this Team to every code repo instead of having to manually add 10 users one by one.

After checking with some more advanced users, we discovered that the Github UI does not allow adding a Team to the list of assignees. I could not find an entry in the API documentation that talks about Teams, either.

Plus, I added our Team to the code repo and ran manual-approval (with the correct token), and it successfully picked apart the Team - but it failed creating the issue because it submitted the expanded user list to the Issue, and some of the users were not listed as users in the repo - they were only listed as part of the Team, and apparently Github didn't like that.

Basically, I am not certain what the benefit is for adding an Org Team here.

Please correct me if I'm wrong on anything here.

If I'm correct, I ask that the Readme be updated to clarify that using a Team does NOT:

  • Circumvent the 10 assignee limit
  • Allow directly assigning a Team to an Issue
  • Allow a shortcut in the code repo user list by adding the Team there

This just cost me 2 weeks before I finally found the right page that said "this isn't possible".

Thanks

@semmelbroesel - I agree that the docs have few hick-ups...
I just configured the "group approval" and it works nicely..

  1. Create group (aka Team) in your org settings... if you name it "Approval Group" you will use approval-group in the config
  2. Make sure you create GitHub App with these permissions Read access to members and metadata and Read and write access to issues... besides reading members of your org the app also needs to be able to create tickets
image

Thanks for the reply - I tried all that :-(

I created a group and an app with the permissions you listed, and painstakingly researched code to create an installation token (because the pre-made Actions I found for this were blocked by our company firewall, of course). The resulting token seemed to have the right permissions - it was able to read the member list and create issues.

What happens for me, though, is that the group is being read by manual-approval and split up into its users, and then the list of users is submitted to the Issue as approvers instead of the group name - at least that's what it looks like in the log output.

So in my tests, it looks as if manual-approval was submitting a comma separated list of users to Issues, not a group name.

When I manually create an Issue using the web UI, I don't get an option to enter a group name, and I couldn't find a reference to using groups as approver lists anywhere, either.

So can you confirm that if you used a list of more than 10 users as a group and submitted that, it would allow all those users to be added as approvers instead of the official limit of 10?

Thanks!

Yeah I tried that also and not working for me :(