Apply fixes from PR 664 - #665
Conversation
…#663) Manage GitHub immutable release settings at both repository and organization level, including selected repository enforcement. Coerce repo settings against org policy during diff/apply and add schema, docs and test updates for the new configuration fields. Signed-off-by: Dan Calavrezo <195309321+dcalavrezo-qorix@users.noreply.github.com>
Distinguish 404 (feature not enabled) from genuine errors (5xx, 403) in _fill_immutable_releases, and gracefully degrade when the org-level immutable releases endpoint returns 404 instead of raising RuntimeError. Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Mikaël Barbero <mikael.barbero@eclipse-foundation.org>
There was a problem hiding this comment.
Pull request overview
This PR incorporates follow-up fixes from #664 and completes support for GitHub “immutable releases” at both repository and organization settings levels, including provider/client behavior, model coercion/validation, schemas, docs, and tests.
Changes:
- Add repo-level immutable releases read/update support in the REST repo client and cover rename + post-update ordering in tests.
- Add org-level immutable releases policy read/update support in the REST org client, including selected-repository enforcement support and tests.
- Extend models/schemas/docs to include new configuration keys and ensure org policy coercion/validation is reflected in diffs/live patches.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/providers/github/rest/test_repo_client.py | Adds tests for repo immutable releases fill behavior and update ordering when repo is renamed. |
| tests/providers/github/rest/test_org_client.py | Adds tests for org immutable releases policy retrieval, updates, and 404 fallback behavior. |
| tests/models/test_repository.py | Updates repository model tests to include immutable_releases_enabled and provider payload size. |
| tests/models/test_org_settings.py | Updates org settings model tests to include immutable releases policy fields and provider payload size. |
| tests/models/resources/otterdog-repo.json | Adds immutable_releases_enabled to model fixture data. |
| tests/models/resources/otterdog-org-settings.json | Adds immutable releases policy fields to model fixture data. |
| tests/models/resources/github-repo.json | Adds immutable_releases_enabled to provider fixture data. |
| tests/models/resources/github-org-settings.json | Adds immutable releases policy fields to provider fixture data. |
| otterdog/resources/schemas/settings.json | Extends org settings schema with immutable releases policy fields. |
| otterdog/resources/schemas/repository.json | Extends repository schema with immutable_releases_enabled. |
| otterdog/providers/github/rest/repo_client.py | Implements repo immutable releases fill/update and wires it into repo data retrieval/update/apply flow. |
| otterdog/providers/github/rest/org_client.py | Implements org immutable releases policy retrieval and update endpoints integration. |
| otterdog/models/repository.py | Adds repository field + org-policy coercion/validation and live-patch handling for immutable releases. |
| otterdog/models/organization_settings.py | Adds org settings fields + diff/validation rules for immutable releases policy fields. |
| docs/userguide/unsupported.md | Fixes/clarifies a bullet in the unsupported features list. |
| docs/reference/organization/settings.md | Documents new org-level immutable releases settings and validation warning behavior. |
| docs/reference/organization/repository/index.md | Documents new repo-level immutable_releases_enabled field and its interaction with org policy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| immutable_releases_enforced_repositories = data.pop("immutable_releases_enforced_repositories", None) | ||
| immutable_releases_selected_repositories = data.pop("immutable_releases_selected_repositories", None) | ||
|
|
||
| try: | ||
| await self.requester.request_json("PATCH", f"/orgs/{org_id}", data) | ||
| if len(data) > 0: |
|
@mbarbero @kairoaraujo what's your release cycle? I've pushed the initial code changes > 1 month ago |
|
The release cycle is currently chaotic due to conflicting priorities. We will merge and deploy the changes as soon as possible. We appreciate your patience. |
|



Based on #664, with additional fix commits.