gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

Expose repository_object_format via Project API

Open slonopotamus opened this issue 1 year ago • 4 comments
trafficstars

GitLab 16.9 introduced an option to create repositories with SHA256 instead of SHA1.

This commit exposes object format used by particular repository via Project API.

See https://gitlab.com/gitlab-org/gitlab/-/issues/419887

slonopotamus avatar May 16 '24 15:05 slonopotamus

@jmini is it ok that repositoryObjectFormat is a string? Or it would be better if it was a enum, like project vsibility?

slonopotamus avatar May 17 '24 10:05 slonopotamus

is it ok that repositoryObjectFormat is a string? Or it would be better if it was a enum, like project vsibility?

I am always not really sure about the String vs enum… In the docs they just mention sha1 being the default value but they do not say it is sha1 or sha256. So I think String is OK.

jmini avatar May 17 '24 11:05 jmini

In the docs they just mention sha1 being the default value but they do not say it is sha1 or sha256

Yes, sha1 is default. The repository can either be created with sha1 or sha256. It cannot be changed after repository ws created. And it is very unlikely any new values will emerge in nearest 10 years or so.

So I think String is OK.

Ok.

slonopotamus avatar May 17 '24 12:05 slonopotamus

Converting to draft until I fix test issues.

slonopotamus avatar May 17 '24 12:05 slonopotamus