Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community, org: generate yaml with list of users access levels #3500

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

dhiller
Copy link
Contributor

@dhiller dhiller commented Jun 28, 2024

What this PR does / why we need it:

Adds a tool robots/cmd/org-access-check that generates three yaml
documents with the access levels all the users have per a repository.

Each of the yaml files will enable looking from a different angle:

  1. accessPermissions To Repositories To Collaborators
  2. repositories To AccessPermissions To Collaborators
  3. collaborators To AccessPermissions To Repositories

The first yaml is basically structured like this:

{access-level}:
    {repository}:
        - {user1}
        - ...

where access level is (admin|write|maintain)

Others are structured likewise.

See explanations on repository roles here 1

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note:


@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 28, 2024
@kubevirt-bot kubevirt-bot requested review from enp0s3 and xpivarc June 28, 2024 14:27
@dhiller dhiller force-pushed the check-repo-and-team-org-access branch from 3c78c89 to 008ce84 Compare July 3, 2024 15:34
@dhiller
Copy link
Contributor Author

dhiller commented Jul 5, 2024

See also kubevirt/community#239

@dhiller dhiller force-pushed the check-repo-and-team-org-access branch from 008ce84 to 5c53877 Compare July 8, 2024 15:50
@dhiller dhiller changed the title community, org: prototype checking access levels community, org: generate yaml with list of users access levels Jul 23, 2024
Adds a tool robots/cmd/org-access-check that generates a yaml document
with the access levels all the users have per a repository.

The yaml is structured like this:

```yaml
{access-level}:
    {repository}:
        - {user1}
        - ...

where access level is (admin|write|maintain)

See explanations on repository roles here [1]

[1]: https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#repository-roles-for-organizations

Signed-off-by: Daniel Hiller <[email protected]>
@dhiller dhiller force-pushed the check-repo-and-team-org-access branch from 5c53877 to 064ef5a Compare July 23, 2024 10:27
@dhiller dhiller marked this pull request as ready for review July 23, 2024 10:31
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 23, 2024
Will actually output three yaml files, looking from different angles:

* accessPermissions To Repositories To Collaborators
* repositories To AccessPermissions To Collaborators
* collaborators To AccessPermissions To Repositories

Signed-off-by: Daniel Hiller <[email protected]>
@dhiller dhiller force-pushed the check-repo-and-team-org-access branch from 064ef5a to d1b9230 Compare July 23, 2024 11:24
@dhiller
Copy link
Contributor Author

dhiller commented Aug 22, 2024

/uncc @aglitke @tiraboschi

@dhiller
Copy link
Contributor Author

dhiller commented Aug 22, 2024

/approve

Self overriding since there's no impact

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhiller

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 22, 2024
@dhiller dhiller added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 22, 2024
@kubevirt-bot kubevirt-bot merged commit 7fd0de4 into kubevirt:main Aug 22, 2024
6 checks passed
chandramerla pushed a commit to chandramerla/project-infra that referenced this pull request Aug 26, 2024
…irt#3500)

* community, org: generate yaml with list of users access levels

Adds a tool robots/cmd/org-access-check that generates a yaml document
with the access levels all the users have per a repository.

The yaml is structured like this:

```yaml
{access-level}:
    {repository}:
        - {user1}
        - ...

where access level is (admin|write|maintain)

See explanations on repository roles here [1]

[1]: https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#repository-roles-for-organizations

Signed-off-by: Daniel Hiller <[email protected]>

* community, access: output yaml files with access

Will actually output three yaml files, looking from different angles:

* accessPermissions To Repositories To Collaborators
* repositories To AccessPermissions To Collaborators
* collaborators To AccessPermissions To Repositories

Signed-off-by: Daniel Hiller <[email protected]>

---------

Signed-off-by: Daniel Hiller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants