mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 16:39:21 +01:00
Nullify IRepositoryManager
This commit is contained in:
@@ -159,7 +159,7 @@ namespace Tgstation.Server.Host.Components.Engine
|
||||
Logger.LogTrace("OD repo seems to already exist, attempting load and fetch...");
|
||||
repo = await repositoryManager.LoadRepository(cancellationToken);
|
||||
|
||||
await repo.FetchOrigin(
|
||||
await repo!.FetchOrigin(
|
||||
progressSection1,
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -514,6 +514,9 @@ namespace Tgstation.Server.Host.Components
|
||||
Job compileProcessJob;
|
||||
using (var repo = await RepositoryManager.LoadRepository(cancellationToken))
|
||||
{
|
||||
if (repo == null)
|
||||
throw new JobException(Api.Models.ErrorCode.RepoMissing);
|
||||
|
||||
var deploySha = repo.Head;
|
||||
if (deploySha == null)
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ using System.Threading.Tasks;
|
||||
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Repository
|
||||
{
|
||||
/// <summary>
|
||||
@@ -28,25 +26,25 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
|
||||
/// <returns>A <see cref="ValueTask{TResult}"/> resulting in the loaded <see cref="IRepository"/> if it exists, <see langword="null"/> otherwise.</returns>
|
||||
ValueTask<IRepository> LoadRepository(CancellationToken cancellationToken);
|
||||
ValueTask<IRepository?> LoadRepository(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Clone the repository at <paramref name="url"/>.
|
||||
/// </summary>
|
||||
/// <param name="url">The <see cref="Uri"/> of the remote repository to clone.</param>
|
||||
/// <param name="initialBranch">The branch to clone.</param>
|
||||
/// <param name="username">The username to clone from <paramref name="url"/>.</param>
|
||||
/// <param name="password">The password to clone from <paramref name="url"/>.</param>
|
||||
/// <param name="initialBranch">The optional branch to clone.</param>
|
||||
/// <param name="username">The optional username to clone from <paramref name="url"/>.</param>
|
||||
/// <param name="password">The optional password to clone from <paramref name="url"/>.</param>
|
||||
/// <param name="progressReporter">The optional <see cref="JobProgressReporter"/> for progress of the clone.</param>
|
||||
/// <param name="recurseSubmodules">If submodules should be recusively cloned and initialized.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
|
||||
/// <returns>A <see cref="ValueTask{TResult}"/> resulting i the newly cloned <see cref="IRepository"/>, <see langword="null"/> if one already exists.</returns>
|
||||
ValueTask<IRepository> CloneRepository(
|
||||
ValueTask<IRepository?> CloneRepository(
|
||||
Uri url,
|
||||
string initialBranch,
|
||||
string username,
|
||||
string password,
|
||||
JobProgressReporter progressReporter,
|
||||
string? initialBranch,
|
||||
string? username,
|
||||
string? password,
|
||||
JobProgressReporter? progressReporter,
|
||||
bool recurseSubmodules,
|
||||
CancellationToken cancellationToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user