Skip to content

[FEAT]: github_repository_ruleset to support push target #2714

Closed

Description

@simonnpassiv

Describe the need

github_repository_ruleset to gain support for target = "push" so that push controls can be added.

This would also imply rule support for file_path_restriction, max_file_path_length, file_extension_restriction and max_file_size. The push rules don't support the normal branch and tag rules, and vice-versa.

One can use https://docs.github.com/en/rest/repos/rules?apiVersion=2022-11-28#get-a-repository-ruleset on a web created push based target ruleset for an easier view of the data structure.

SDK Version

No response

API Version

2022-11-28

Relevant log output

│ Error: expected target to be one of ["branch" "tag"], got push
│
│   with github_repository_ruleset.controls,
│   on repository.tf line 81, in resource "github_repository_ruleset" "controls":
│   81:   target      = "push"

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Feature
    Status: Triage
    on Jul 29, 2025
  2. tewing-pm commented on Aug 12, 2025

    @tewing-pm

    I found this issue while writing a duplicate issue. push rulesets are available via the api but not the terraform resource.

  3. mdemartinis commented on Aug 22, 2025

    @mdemartinis

    I need to protect a workflow from changes, that checks that only PRs to main are created from develop branch. It would be great to have push rulesets implemented in the provider.

  4. moved this from Backlog to On Deck in Terraform Provideron Oct 14, 2025
  5. moved this from On Deck to In Progress in Terraform Provideron Oct 27, 2025
  6. moved this from In Progress to In Review in Terraform Provideron Oct 27, 2025
  7. moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Activeon Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageType: Feature

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions