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

fix: add parent commit to the create commit #29

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; }
}
Loading