Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add various project related fields #827

Closed
wants to merge 4 commits into from

Conversation

TimoTegtmeier
Copy link

I added various missing settings to Project and ProjectUpdate to allow setting the access levels on these features.

@TimoTegtmeier TimoTegtmeier requested a review from a team as a code owner January 12, 2025 12:14
@TimoTegtmeier TimoTegtmeier requested review from louis-z and removed request for a team January 12, 2025 12:14
Copy link
Member

@louis-z louis-z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

We usually add properties as needed. Is that the case for you? If so, can you add tests to make sure that the added GitLab "attributes" do indeed exist and that JSON serialization/deserialization work as expected (e.g. I noticed that one of the GitLab "attributes" could actually be null and so, with the current code, deserialization would throw)?

@@ -85,6 +85,9 @@ public class Project
[JsonPropertyName("repository_access_level")]
public RepositoryAccessLevel RepositoryAccessLevel { get; set; }

[JsonPropertyName("packages_enabled")]
public bool PackagesEnabled { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on my side and it can be null. Please make it a nullable bool.

[JsonPropertyName("infrastructure_access_level")]
public string InfrastructureAccessLevel { get; set; }

[JsonPropertyName("model_experiments_access_level")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT these properties are not part of a project response

model_experiments_access_level
model_registry_access_level

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