24 lines
No EOL
568 B
C#
24 lines
No EOL
568 B
C#
using System;
|
|
using Website.Data.States.Git;
|
|
|
|
namespace Website.Models.Git {
|
|
public class Commit {
|
|
public Commit(CommitState commit) {
|
|
Id = commit.id;
|
|
Message = commit.message;
|
|
Timestamp = commit.timestamp;
|
|
}
|
|
|
|
public Commit(CommitDetailsState commit) {
|
|
Id = commit.sha;
|
|
Message = commit.commit.message;
|
|
Timestamp = commit.commit.author.date;
|
|
Url = commit.html_url.Replace("/commits/", "/commit/");
|
|
}
|
|
|
|
public string Id { get; }
|
|
public string Message { get; }
|
|
public DateTimeOffset Timestamp { get; }
|
|
public string Url { get; }
|
|
}
|
|
} |