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

Branch protection wildcards #982

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ctoestreich
Copy link

Add Support for Wildcard Repository Management

Summary

This pull request introduces the capability to manage repositories using wildcard patterns via the GitHub GraphQL API. This enhancement simplifies the process of updating repository settings, particularly for organizations with numerous repositories that follow a specific naming convention.

Some changes were required how data and items are identified to match the new required formats of data via https://docs.github.com/en/graphql/reference/input-objects#createbranchprotectionruleinput

Changes

  • Updated branch protection settings to handle repositories matching wildcard patterns.
  • Implemented graphql calls to updateBranchProtectionRule to allow creation of protections with * in the pattern
  • Implemented graphql to get branchProtectionRules
  • Implemented graphql to get user and teams IDs for the usage in the graphql update branch protection rule call
  • Added rest call for get app by slug for usage in the graphql update branch protection rule call

Copy link

vercel bot commented Jul 15, 2024

@ctoestreich is attempting to deploy a commit to the Repository Settings Team on Vercel.

A member of the Team first needs to authorize it.

@ctoestreich ctoestreich changed the title SPIKE: Branch protection wildcards WIP: Branch protection wildcards Jul 15, 2024
@ctoestreich ctoestreich changed the title WIP: Branch protection wildcards Branch protection wildcards Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant