Skip to content

Commit d613a73

Browse files
yankunnmklotas
authored andcommitted
Fixed critical issue (#28)
* Added methods to upload a file to gitlab for later use in markdown aware fields. * Fixed typo caused by ReSharpers refactoring. * Form-part name ist now set as required. * Moved projectId property to Request model to ensure that pattern is the same verywhere. * Resolved critical issue, setting the wrong property, fixed documentation. * Update README.md * Reveretd changes done to Package config. * Restored package id.
1 parent 3e5046d commit d613a73

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/GitLabApiClient/GitLabApiClient.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<RepositoryUrl>https://github.com/nmklotas/GitLabApiClient</RepositoryUrl>
1515
<RepositoryType />
1616
<PackageTags>GitLab REST API CI Client</PackageTags>
17+
<PackageId>GitLabApiClient</PackageId>
18+
<Company>nmklotas</Company>
1719
</PropertyGroup>
1820

1921
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

src/GitLabApiClient/Models/Uploads/Requests/CreateUploadRequest.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@ namespace GitLabApiClient.Models.Uploads.Requests
1010
/// </summary>
1111
public sealed class CreateUploadRequest
1212
{
13+
/// <summary>
14+
/// Creates a new instance if the create upload request
15+
/// </summary>
16+
/// <param name="projectId">The id of the project, the file should be uploaded to</param>
17+
/// <param name="stream">The stream to be uploaded</param>
18+
/// <param name="fileName">The name of the file being uploaded</param>
1319
public CreateUploadRequest(string projectId, Stream stream, string fileName)
1420
{
15-
projectId = projectId;
21+
ProjectId = projectId;
1622
Stream = stream;
1723
FileName = fileName;
1824
}
1925

26+
/// <summary>
27+
/// The id of the project, the file should be uploaded to
28+
/// </summary>
2029
public string ProjectId { get; }
2130

2231
/// <summary>

src/GitLabApiClient/UploadsClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ internal UploadsClient(GitLabHttpFacade httpFacade) =>
2020
_httpFacade = httpFacade;
2121

2222
/// <summary>
23-
/// Uploadses a file for the provided project.
23+
/// Uploads a file for the provided project.
2424
/// </summary>
25-
/// <param name="projectId">The id of the project</param>
2625
/// <param name="uploadRequest">The upload request containing the filename and stream to be uploaded</param>
2726
/// <returns>A <see cref="Upload"/> object.
2827
/// Use the <see cref="Upload.Markdown"/> property to place the image in your markdown text.

0 commit comments

Comments
 (0)