diff --git a/src/Tgstation.Server.Api/Models/Repository.cs b/src/Tgstation.Server.Api/Models/Repository.cs index 83f610ba5a..ee50701502 100644 --- a/src/Tgstation.Server.Api/Models/Repository.cs +++ b/src/Tgstation.Server.Api/Models/Repository.cs @@ -23,9 +23,14 @@ namespace Tgstation.Server.Api.Models public RevisionInformation RevisionInformation { get; set; } /// - /// If the repository was cloned from GitHub.com. If this enables test merge functionality + /// If the repository was cloned from GitHub.com this will be set with the owner of the repository /// - public bool? IsGitHub { get; set; } + public string GitHubOwner { get; set; } + + /// + /// If the repository was cloned from GitHub.com this will be set with the name of the repository + /// + public string GitHubName { get; set; } /// /// The started by the if any diff --git a/src/Tgstation.Server.Host/Controllers/RepositoryController.cs b/src/Tgstation.Server.Host/Controllers/RepositoryController.cs index 1d1d26b4e8..358437032b 100644 --- a/src/Tgstation.Server.Host/Controllers/RepositoryController.cs +++ b/src/Tgstation.Server.Host/Controllers/RepositoryController.cs @@ -94,7 +94,11 @@ namespace Tgstation.Server.Host.Controllers static async Task PopulateApi(Repository model, Components.Repository.IRepository repository, IDatabaseContext databaseContext, Models.Instance instance, CancellationToken cancellationToken) { - model.IsGitHub = repository.IsGitHubRepository; + if (repository.IsGitHubRepository) + { + model.GitHubOwner = repository.GitHubOwner; + model.GitHubName = repository.GitHubRepoName; + } model.Origin = repository.Origin; model.Reference = repository.Reference; @@ -187,7 +191,6 @@ namespace Tgstation.Server.Host.Controllers api.Origin = model.Origin; api.Reference = model.Reference; - api.IsGitHub = model.Origin.ToUpperInvariant().Contains(uiGitHub); api.ActiveJob = job.ToApi(); return StatusCode((int)HttpStatusCode.Created, api);