Skip to content

Conversation

@GrantBirki
Copy link
Contributor

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

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

CopilotAI 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

FileDescription
README.mdUpdated examples and parameter definitions to remove the "maintain" permission
tests/functions/prechecks.test.jsRevised environment variable input for permissions to align with allowed permissions
tests/functions/valid-permissions.test.jsUpdated test case and error message to remove references to "maintain"
action.ymlChanged 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

@GrantBirkiGrantBirki merged commit 0c64b49 into mainFeb 20, 2025
4 checks passed
@GrantBirkiGrantBirki deleted the remove-maintain branch February 20, 2025 19:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@GrantBirki