34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
|
|
using ln.json;
|
|
|
|
namespace ln.build.repositories.gitea
|
|
{
|
|
public class GiteaRelease : Release
|
|
{
|
|
public override Repository Repository => GiteaRepository;
|
|
public GiteaRepository GiteaRepository { get; }
|
|
public GiteaRelease(GiteaRepository repository)
|
|
{
|
|
GiteaRepository = repository;
|
|
}
|
|
public GiteaRelease(GiteaRepository repository,JSONObject jsonRelease) : this(repository)
|
|
{
|
|
Id = (int)jsonRelease["id"].ToNative();
|
|
Name = jsonRelease["name"].ToNative().ToString();
|
|
TagName = jsonRelease["tag_name"].ToNative().ToString();
|
|
Body = jsonRelease["body"].ToNative().ToString();
|
|
IsDraft = (bool)jsonRelease["draft"].ToNative();
|
|
IsPreRelease = (bool)jsonRelease["prerelease"].ToNative();
|
|
}
|
|
|
|
public override void AddAttachement(Attachement attachement, string localPath)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
public override Attachement[] GetAttachements()
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
}
|
|
} |