kentaro-m / auto-assign

🤖 A Probot app that adds reviewers to pull requests when pull requests are opened.
https://probot.github.io/apps/auto-assign/
ISC License
249 stars 55 forks source link

Cannot configure teams (despite following guide) #138

Open richardst89 opened 3 years ago

richardst89 commented 3 years ago

Describe the bug After configuring the auto_assign file, the "assignee" part is working, but the "reviewer" part (with regards to a team), is not.

To Reproduce

  1. Create PR
  2. Author automatically assigned
  3. Team NOT assigned

Expected behavior

Specific Scenario:

@kentaro-m, @mrlubos - I followed the ReadMe and looked through the PR to verify my understanding:

I've set this up within one of my repos, but can't get the team to be invited :-S

Github Setup:

Code Owners File

* @org/owners

auto_assign.yml

addReviewers: true
addAssignees: author
reviewers:
  - @org/collaborators

The owners bit is working fine. I can add the "collaborators" manually, and the round-robin works fine too. With the bot enabled, the Auto-assign to author is working. But the team review is not...

Debugging attempts I've also tried /collaborators, org/collaborators... I've also tried without the round-robin on the 'collaborators' group.

Any ideas?

richardst89 commented 3 years ago

Deployed my own copy, and can't see anything in the logs.

Tried "@org/collaborators" - and there were errors in the logs about YAML, but I think that's a different issue relating to the @ symbol

richardst89 commented 3 years ago

Just found the problem - missing permission. I think you need to be able to 'view' the team in order to assign it...

I added:

Repository/Administration - Read-Only Organisation/Members - Read-Only


Can we add this as a required permission?

mrlubos commented 3 years ago

@richardst89 Does adding the permission resolve the issue with team auto-assign?

richardst89 commented 3 years ago

@richardst89 Does adding the permission resolve the issue with team auto-assign?

Yep:

image

DiagJuanma commented 3 years ago

How can I change the permission using the github app from the marketplace? Or I need to host my own?

richardst89 commented 3 years ago

How can I change the permission using the github app from the marketplace? Or I need to host my own?

Once installed (marketplace or private) - you can tweak the application permissions in your organisation settings!

cboiam commented 3 years ago

Same here, couldn't find were I can change these permissions. :disappointed:

cboiam commented 3 years ago

I've managed to configure the copy of the app and tested the permissions, it worked only with the permision Members read-only.

allanpaiste commented 2 years ago

I'm also a bit confused on where one can change the permissions for the installed app. What I do see is that it claims specific hard-coded list of permissions on install but that's about it. There's clearly a possibility to do that for new apps (https://docs.github.com/en/developers/apps/managing-github-apps/editing-a-github-apps-permissions), but how exactly are you doing that for apps installed from Marketplace?

Maybe @richardst89 can shed some light on this.

Considering that the answer is relatively old, I can only take that GitHub used to have this as a possibility which has since been removed.

richardst89 commented 2 years ago

Maybe @richardst89 can shed some light on this.

I currently use the "private" installed version (rather than from the market place). https://github.com/settings/apps/$MYAPPNAME$/permissions

I cannot see how it's possible to do it for a marketplace app (the "AppSettings" button only appears if you own the app) - didn't realise!

allanpaiste commented 2 years ago

Aha! Okay then I'm not crazy :) I'd take we'd have to go private version as well then for now :3

gabriel-miranda commented 2 years ago

Could we update the permissions the app in the marketplace is having? So we can do this. The feature by itself seems to be working but only if you host it and change the permissions yourself

mrlubos commented 2 years ago

cc @kentaro-m