Skip to content

feat(custom-property): add values_editable_by support#642

Open
gdams wants to merge 1 commit into
eclipse-csi:mainfrom
gdams:feat/custom-property-values-editable-by
Open

feat(custom-property): add values_editable_by support#642
gdams wants to merge 1 commit into
eclipse-csi:mainfrom
gdams:feat/custom-property-values-editable-by

Conversation

@gdams
Copy link
Copy Markdown
Contributor

@gdams gdams commented Apr 21, 2026

Summary

Adds the values_editable_by field 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 value
  • org_and_repo_actors — both organization and repository actors can update
  • null (default) — not settable at the repository level

Example

settings+: {
  custom_properties+: [
    orgs.newCustomProperty('cost_center') {
      value_type: 'string',
      required: true,
      default_value: 'platform',
      values_editable_by: 'org_and_repo_actors',
    },
  ],
},

Changes

  • otterdog/models/custom_property.py — new values_editable_by: str | None field with enum validation.
  • examples/template/otterdog-defaults.libsonnet — default values_editable_by: null on newCustomProperty.
  • otterdog/resources/schemas/custom-property.jsonanyOf enum-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 failures
  • poetry run mypy otterdog → clean
  • poetry run ruff check / ruff format --check → clean

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant