Open jimwins opened 3 months ago
Ha, my first version of this script actually output Markdown but I changed it to DokuWiki syntax. Changing it isn't a problem.
I'll look at what repository information it can generate, a problem is that I'm just a regular member of the GH organization so my access is limited. Maybe the API will let me access the information for the repos I do have access to.
I think the way to use this eventually might be in a GitHub Action that runs periodically and commits and pushes the generated files to the systems repo when they change. That would result in diffs being sent to systems@php.net.
I think API access will in that case have to be done with a specific token that has access to all of this information. Mine does, but I don't think we should use user tokens to run this script (daily). There is https://github.com/organizations/php/settings/personal-access-tokens-onboarding, but I am not 100% on how all of this works. Perhaps you can investigate on how to do this best too?
Okay, switched to Markdown output and now it should print all of the Organization Roles as well as Repositories with their Collaborators (people who have access to that repository). It should list both people with direct access and teams with access.
Not 100% sure this all actually works, since I don't have enough access to the PHP organization to dump the roles and repository members.
For the access token, it looks like there is a way to expose one to this script running as a GitHub Action, but I haven't untangled all that would be required. Looks like it requires creating an "App" for the PHP organization.
Would it be much work to change this to Markdown format? Right now, that's useless for the wiki, but I'm investigating whether we can support Markdown there, instead of this slightly-awkward dokuwiki format.
It would also be mega useful if it could list which teams have access to which repositories, and perhaps also for each organisation member?