Skip to content

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

Open
gdams wants to merge 3 commits 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 3 commits into
eclipse-csi:mainfrom
gdams:feat/custom-property-values-editable-by

Conversation

@gdams

@gdams gdams commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

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

@heurtematte

Copy link
Copy Markdown
Contributor

Link to this PR: EclipseFdn/otterdog-defaults#13

@heurtematte
heurtematte force-pushed the feat/custom-property-values-editable-by branch from 7b40112 to a1ab917 Compare August 4, 2026 10:11
@eclipsewebmaster
eclipsewebmaster force-pushed the feat/custom-property-values-editable-by branch from a1ab917 to 3e40cab Compare August 4, 2026 10:16
@heurtematte
heurtematte force-pushed the feat/custom-property-values-editable-by branch from 6b18084 to f55492b Compare August 4, 2026 10:44
@heurtematte
heurtematte requested review from lukpueh and netomi August 4, 2026 10:49
@heurtematte

Copy link
Copy Markdown
Contributor

This PR is ready to be merged!

gdams and others added 3 commits August 6, 2026 17:04
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

Assisted-by: Copilot: Claude Sonnet 4.6
Signed-off-by: sebastien.heurtematte <sebastien.heurtematte@eclipse-foundation.org>
Assisted-by: Copilot: Claude Sonnet 4.6
Signed-off-by: sebastien.heurtematte <sebastien.heurtematte@eclipse-foundation.org>
Assisted-by: Copilot: Claude Sonnet 4.6
@heurtematte
heurtematte force-pushed the feat/custom-property-values-editable-by branch from f55492b to b996d4c Compare August 6, 2026 15:04
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

2 participants