Repository navigation
Closed
Labels
Description
Describe the need
Currently only a static repository list are allowed.
With this it would be possible to define dynamic lists of repositories based on properties of repositories in the organization
The following will apply a rule to all repositories which are not public
JSON representation of such a ruleset
{
"id": 1111111,
"name": "test",
"target": "branch",
"source_type": "Organization",
"source": "foo",
"enforcement": "evaluate",
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"~DEFAULT_BRANCH"
]
},
"repository_property": {
"exclude": [
{
"name": "visibility",
"source": "system",
"property_values": [
"public"
]
}
],
"include": []
}
},
"rules": [
{
"type": "workflows",
"parameters": {
"do_not_enforce_on_create": true,
"workflows": [
{
"repository_id": 0000000,
"path": ".github/workflows/bar.yml",
"ref": "refs/heads/main"
}
]
}
}
],
"node_id": "xxxxxxxxxxxx",
"created_at": "2025-03-13T16:27:00.269+01:00",
"updated_at": "2025-03-13T16:27:00.269+01:00",
"bypass_actors": [],
"_links": {
"self": {
"href": "https://api.github.com/orgs/n26/rulesets/1111111"
},
"html": {
"href": "http://github.com/organizations/n26/settings/rules/1111111"
}
}
}SDK Version
No response
API Version
2022-11-28
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
Reacted by Jim Sheldon, Mark Johnson, Alexandra de Wit, Deji Osagie, Nathan Sullivan, Duke Cerna, Adam Stevenson, Thibaut Charry, Robin Lightfoot, Ruben Gommers and 11 more
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields✅ Done
- StatusShow more project fieldsDone
Activity
AlexaDeWit commentedon Jul 24, 2025
Seconded. We've started rolling out organization wide policies but can't migrate some of them to TF, as we require use of the
Repositories matching a filterpattern, which would allow us to enforce this policy only on our internal and private repositories.Your example around project visibility is coincidentally the exact same filter of interest for us
rubengommers commentedon Nov 12, 2025
+1
mperehinets-hacken commentedon Nov 14, 2025
+1
feat: add repository_property condition support for org rulesets
alexef commentedon May 22, 2026
fixed in #2356 ?