Skip to content

Commit

Permalink
add parent commit to the create commit (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: Alireza Eiji <[email protected]>
  • Loading branch information
AlirezaEijiProgrammer and Alireza Eiji authored Aug 13, 2024
1 parent f54efb7 commit 39116f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Newtonsoft.Json;

namespace Mohaymen.GiteaClient.Gitea.Commit.Common.Dtos;

public sealed class ParentCommitDto
{
[JsonProperty("sha")]
public required string CommitSha { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Newtonsoft.Json;
using System.Collections.Generic;
using Mohaymen.GiteaClient.Gitea.Commit.Common.Dtos;
using Newtonsoft.Json;

namespace Mohaymen.GiteaClient.Gitea.Commit.CreateCommit.Dtos.Response;

Expand All @@ -9,4 +11,7 @@ public class CommitResponseDto

[JsonProperty("url")]
public required string CommitUrl { get; init; }

[JsonProperty("parents")]
public required List<ParentCommitDto> ParentCommitDtos { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Mohaymen.GiteaClient.Gitea.Commit.Common.Dtos;
using Newtonsoft.Json;

namespace Mohaymen.GiteaClient.Gitea.Commit.GetBranchCommits.Dtos;
Expand All @@ -22,10 +23,4 @@ public sealed class CommitDto
{
[JsonProperty("message")]
public required string CommitMessage { get; init; }
}

public sealed class ParentCommitDto
{
[JsonProperty("sha")]
public required string CommitSha { get; init; }
}

0 comments on commit 39116f9

Please sign in to comment.