From ebbe5eeb89b7864d6d08f08406089a8bb5348ea3 Mon Sep 17 00:00:00 2001 From: Christian Hemminghaus <15739060+chemmi@users.noreply.github.com> Date: Thu, 15 May 2025 06:56:15 +0200 Subject: [PATCH 1/2] Add branch pattern example to repository_ruleset documentation The pattern can be confusing since Github API and UI differ in this point. See also: https://github.com/orgs/community/discussions/119797 --- website/docs/r/repository_ruleset.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/repository_ruleset.html.markdown b/website/docs/r/repository_ruleset.html.markdown index 173ffcf234..3f4f8e1fb9 100644 --- a/website/docs/r/repository_ruleset.html.markdown +++ b/website/docs/r/repository_ruleset.html.markdown @@ -27,7 +27,7 @@ resource "github_repository_ruleset" "example" { conditions { ref_name { - include = ["~ALL"] + include = ["~ALL", "ref/heads/main"] exclude = [] } } From d13347b56e5ba40a4a948985b5682e0afd5ea512 Mon Sep 17 00:00:00 2001 From: Christian Hemminghaus <15739060+chemmi@users.noreply.github.com> Date: Thu, 15 May 2025 08:44:27 +0200 Subject: [PATCH 2/2] Fix ruleset branch pattern --- website/docs/r/repository_ruleset.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/repository_ruleset.html.markdown b/website/docs/r/repository_ruleset.html.markdown index 3f4f8e1fb9..c65b2861bc 100644 --- a/website/docs/r/repository_ruleset.html.markdown +++ b/website/docs/r/repository_ruleset.html.markdown @@ -27,7 +27,7 @@ resource "github_repository_ruleset" "example" { conditions { ref_name { - include = ["~ALL", "ref/heads/main"] + include = ["~ALL", "refs/heads/main"] exclude = [] } }