Skip to content

Feature Request: Add The Ability to Create GitHub Repository Pattern Based Branch Protection Rules  #312

Closed
@X-Guardian

Description

@X-Guardian

Feature Idea Summary

The current GitHubRepositoryBranchProtectionRule functions do not allow the management of GitHub repository pattern based branch protection rules. e.g. a branch protection rule for all branches matching the release/**/* pattern. This is due to a limitation in the GitHub REST API in that the REST branch protection APIs do not support branch patterns.

The GitHub GraphQL createbranchprotectionrule and deletebranchprotectionrule APIs do support branch patterns, so functions could be built to achieve this using these these GraphQL APIs.

Feature Idea Additional Details

Create the following additional functions that use the GraphQL API:

  • New-GitHubRepositoryBranchPatternProtectionRule
  • Get-GitHubRepositoryBranchPatternProtectionRule
  • Remove-GitHubRepositoryBranchPatternProtectionRule

A new wrapper function Invoke-GHGraphQL would also need to be developed to call the GitHub GraphQL API.

Requested Assignment

  • If possible, I would like to implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn issue or pull request introducing new functionality to the project.in progressWork on this issue is already underway. Please don't work start new work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions