peter-murray / inactive-users-action

GitHub Action for generating a report on user activity in a GitHub Enterprise Organization.
MIT License
70 stars 32 forks source link

Question about Multiple Organisations #2

Open Aristocrat-jt opened 3 years ago

Aristocrat-jt commented 3 years ago

Hello!

Is there an issue if the workflow is set up on one organisation, but run against another? I'm keen on this since I administer multiple organisations under an Enterprise org. It worked in the org where the workflow was created, but when I attempted to run against another org, all users said no activity.

As far as I can tell my token was properly granted access to the other organisation.

peter-murray commented 3 years ago

It would be dependant on the token and the organization name provided.

If the token provided has the necessary access permissions for the specified organization you should be able to run it from anywhere.

If you run it on an organization that the provided token for the user is not a member of or an organization or has lower than admin permissions (depending upon the restrictions you have in place for visibility on repos and access, so you may need to tweak the permissions up in these cases) then you are only going to get the publicly visible metrics back, which is usually very limited.

emexelem commented 3 years ago

Hi,

I'm facing the same issue, the action works fine for the repositories of the org where the workflow is created, but not for other organizations, even if they are authorized.

During the first run, i had an error message indicating that i had to grant SSO access on the organization (SSO is mandatory on all orgs of my github enterprise). After doing so, the action could properly find the repositories and analyze activity.

The thing that is kind of weird is that i did not have the same error message on the other orgs after i added them in the workflow, the action just says that there's 0 repository to process. Same thing after granting the SSO access on the additional orgs. No error message, 0 repository processed.

@peter-murray Can you please try on your end to run the action on multiple orgs to see if it works? @Aristocrat-jt Have you managed to make it work on multiple orgs?

Thanks, M