Skip to content

Remove maintain permissions #68

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

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Remove maintain permissions #68

merged 1 commit into from
Feb 20, 2025

Conversation

GrantBirki
Copy link
Member

There is no maintain permission on GitHub. Removing it from code base because it can bring confusion with maintain role.

Official documentation: https://docs.github.com/en/enterprise-cloud@latest/rest/collaborators/collaborators?apiVersion=2022-11-28#get-repository-permissions-for-a-user

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

Note: The permission attribute provides the legacy base roles of admin, write, read, and none, where the maintain role is mapped to write and the triage role is mapped to read. To determine the role assigned to the collaborator, see the role_name attribute, which will provide the full role name, including custom roles. The permissions hash can also be used to determine which base level of access the collaborator has to the repository.

related: github/branch-deploy#351

@GrantBirki GrantBirki added the bug Something isn't working label Feb 20, 2025
@GrantBirki GrantBirki self-assigned this Feb 20, 2025
@Copilot Copilot AI review requested due to automatic review settings February 20, 2025 19:51
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR removes the unsupported "maintain" permission from the codebase for clarity and to align with GitHub's official permissions.

  • Updated documentation in README.md to remove "maintain" permission references
  • Adjusted unit tests in tests/functions/prechecks.test.js and valid-permissions.test.js to reflect the change
  • Modified action.yml default and description accordingly

Reviewed Changes

File Description
README.md Updated examples and parameter definitions to remove the "maintain" permission
tests/functions/prechecks.test.js Revised environment variable input for permissions to align with allowed permissions
tests/functions/valid-permissions.test.js Updated test case and error message to remove references to "maintain"
action.yml Changed default and documentation string to exclude "maintain"

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@GrantBirki GrantBirki merged commit 0c64b49 into main Feb 20, 2025
4 checks passed
@GrantBirki GrantBirki deleted the remove-maintain branch February 20, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant