Implements parameters for RepositoryClient.GetArchive#659
Conversation
93889b4 to
359668b
Compare
|
@louis-z can this PR now be merged or are there further outstanding changes you'd like me to make? |
|
@steve85, this PR is stale. Is there a plan to resurrect it any time soon? If not, we'll consider closing it. |
359668b to
309ce90
Compare
|
Hi @louis-z - I was originally waiting on a follow up review from you, hence the lack of activity on this. I have rebased the branch and made some changes to fix some minor things. Please take a look and let me know if there are any further issues that need addressing. |
| var actual = NGitLab.Impl.Utils.AppendSegmentToUrl<string>(url, value: null, includeSegmentSeparator: false); | ||
|
|
||
| // Assert | ||
| Assert.That(expected, Is.EqualTo(actual)); |
There was a problem hiding this comment.
Please invert actual and expected, in conformance with the NUnit Constraint Model's API + do the same where applicable.
I wrote a comment back in 2024 but forgot to submit it... 🙄 Sorry about that. It's this one. |
| [EnumMember(Value = ".bz2")] | ||
| Bz2, | ||
|
|
||
| [EnumMember(Value = ".gz")] |
There was a problem hiding this comment.
Is the .gz format truly supported? I don't see it mentioned in the GitLab doc, but then again it may be outdated...
There was a problem hiding this comment.
It's been so long since I wrote the original code I'm not sure what I was referencing when I added .gz. I have removed it.
| if (value is null) | ||
| return url; | ||
|
|
||
| // Don't allow segments to a url which already has parameters present |
There was a problem hiding this comment.
| // Don't allow segments to a url which already has parameters present | |
| // Don't allow appending segments to a url which already has parameters present |
| return url + parameter; | ||
| } | ||
|
|
||
| private static string GetEnumMemberValue<T>(string valueString) |
There was a problem hiding this comment.
Do you really need this method? I have a feeling you could use ToValueString<T>(T value) instead.
There was a problem hiding this comment.
You're right, this method wasn't needed. I've removed it.
| Assert.That(url, Is.EqualTo($"{basePath}?event_action={expectedQueryParamValue}")); | ||
| } | ||
|
|
||
| [TestCase] |
There was a problem hiding this comment.
Use [Test] here instead and for any other non-parameterized test method.
adb18c4 to
be79730
Compare
Adds a new overload to IRepository.GetArchive which accepts a query object in order to allow additional parameters to be passed to the the archive endpoint without breaking the existing implementation.
be79730 to
301f853
Compare
Implements the
format,pathandshaoptions for RepositoryClient.GetArchive().https://docs.gitlab.com/ee/api/repositories.html#get-file-archive
Allows us to retrieve the archive for a particular SHA/ref and specify the required download format.