34 lines
899 B
C#
34 lines
899 B
C#
using ExtensiblePortfolioSite.SDK.Git;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.Json.Serialization;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace GithubPlugin
|
|
{
|
|
public class GithubCommit : ICommit
|
|
{
|
|
[JsonIgnore]
|
|
public IReadOnlyCollection<string> ModifiedFiles { get; internal set; }
|
|
|
|
[JsonIgnore]
|
|
public IRepository? Repository { get; internal set; }
|
|
|
|
[JsonIgnore]
|
|
public IGitProvider? Provider { get; internal set; }
|
|
|
|
[JsonPropertyName("sha")]
|
|
public string? Hash { get; private set; }
|
|
|
|
[JsonPropertyName("message")]
|
|
public string? Description { get; private set; }
|
|
|
|
public GitReference GetReference()
|
|
{
|
|
return new GitReference(GitReferenceKind.Commit, $"{Repository.Owner}/{Repository.Name}/{Hash}");
|
|
}
|
|
}
|
|
}
|