feat(custom-property): add values_editable_by support#642
Open
gdams wants to merge 1 commit into
Open
Conversation
Adds the 'values_editable_by' field to custom properties. This controls which actors can update the property value on individual repositories after it is defined at the organisation level. Allowed values: - 'org_actors' — only organization actors can update the value - 'org_and_repo_actors' — both organization and repository actors - null (default) — not settable at the repository level Changes: - new 'values_editable_by: str | None' field on CustomProperty model - validation for allowed enum values - default value 'null' in the libsonnet template - schema: 'anyOf' with enum or null - unit and integration tests updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
values_editable_byfield to organization custom properties. This controls which actors can update a property's value on individual repositories once it has been defined at the org level.Allowed values
org_actors— only organization actors can update the valueorg_and_repo_actors— both organization and repository actors can updatenull(default) — not settable at the repository levelExample
Changes
otterdog/models/custom_property.py— newvalues_editable_by: str | Nonefield with enum validation.examples/template/otterdog-defaults.libsonnet— defaultvalues_editable_by: nullonnewCustomProperty.otterdog/resources/schemas/custom-property.json—anyOfenum-or-null schema.tests/models/test_custom_property.py+tests/providers/github/integration/test_org_custom_properties.py— updated to cover the new field.Testing
poetry run pytest tests/→ 243 passed, 2 skipped, 0 failurespoetry run mypy otterdog→ cleanpoetry run ruff check/ruff format --check→ clean