integrations / integrations/terraform-provider-github

[FEAT]: github_organization_custom_properties - support regex validation

Open
#3,503 1 comment 0 reactions 0 assignees View on GitHub
r/organization_custom_properties Status: Triage Type: Feature
Dominant language
Go
Stars
1.2k
Forks
1k
Avg merge
1d 14h
Merged PRs (30d)
8

Description

### Describe the need

As of April 9th, 2025 [github_organization_custom_properties](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_custom_properties) now has support for [Regular Expression Matching](https://github.blog/changelog/2025-04-09-push-rule-delegated-bypass-and-custom-property-regex-support-are-generally-available-and-repository-policy-delegated-bypass-is-in-preview/#custom-properties-regular-expression-matching)

It's only possible for `Text` types, and is the suggested workaround for people who would use single/multi-select save for the limitation of 200 possible values in the list.

**For what it's worth** The schema has not been updated as of `GitHub-Api-Version 2026-03-10` so Data types as well as Resources won't have the ability to read the current values **but**

```bash
curl -L -X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN}" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG_NAME/properties/schema/PROPERTY_NAME \
-d '{"value_type":"string","required":false,"description":"SOME_DESCRIPTION","values_editable_by":"org_actors","require_explicit_values":false,"regex":"^\\d{5}$"}
```

creates/updates the regex values currently, without any issues.

### GitHub Installation Type

- [x] GitHub.com (Free, Pro, or Team)
- [ ] GitHub Enterprise Server (on-premises)
- [ ] GitHub Enterprise Cloud with Personal Accounts (github.com)
- [x] GitHub Enterprise Cloud with Managed Users/EMU (github.com)
- [ ] GitHub Enterprise Cloud with Data Residency (*.ghe.com)
- [ ] I don't know

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start at the github_organization_custom_properties resource and trace its schema update path to the /orgs/ORG_NAME/properties/schema/PROPERTY_NAME endpoint shown in the report. Check how Text properties are represented and where this resource’s existing tests live; done means regex validation can be configured for Text types without affecting other property types.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go, terraform
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.