Add team_permissions support to repository#612
Conversation
|
@WolfgangFischerEtas can you allow maintainers to edit the PR? |
Unfortunately, we cannot do that. We have to use So “maintainers can fix the PR” is not possible in this setup. We can use whatever workaround you prefer, e.g.:
|
|
ok I see, then I will test it out differently and provide my review comments. |
|
I tested the PR and it works fine, a few small remarks to get this PR ready to be merged:
|
|
@netomi:
While integrating this, I also had to deal with a few typing-related edge cases around _Unset. In particular, once _Unset became part of the effective union type, mypy required explicit type narrowing before accessing dict methods. The final solution uses an explicit isinstance(..., dict) check, which keeps mypy and Ruff both happy. Please let me know if you see anything else that should be adjusted — otherwise I believe this PR should be ready to merge now. |
|
you should not add |
This pull request introduces first‑class support for managing GitHub team permissions directly within the Repository model in Otterdog. A new optional field has been added:
team_permissions: dict[str, str] | NonePurpose and Scope
The new team_permissions attribute allows repository configurations to define which teams should have which permission levels on a repository. This makes team–repository permission management a declarative part of the repository specification and aligns Otterdog more closely with GitHub’s permission model.
Behavior During Repository Creation and Updates
GitHub API Integration
Schema and JSONNET Output Enhancements
Example configuration entry as part of repository: