mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Merge branch 'master' into dev
This commit is contained in:
@@ -257,6 +257,7 @@ namespace Tgstation.Server.Host.Components.Deployment
|
||||
.Select(x => new Models.RepositorySettings
|
||||
{
|
||||
AccessToken = x.AccessToken,
|
||||
AccessUser = x.AccessUser,
|
||||
ShowTestMergeCommitters = x.ShowTestMergeCommitters,
|
||||
PushTestMergeCommits = x.PushTestMergeCommits,
|
||||
PostTestMergeComment = x.PostTestMergeComment,
|
||||
@@ -513,7 +514,7 @@ namespace Tgstation.Server.Host.Components.Deployment
|
||||
cancellationToken)
|
||||
;
|
||||
|
||||
logger.LogTrace("Deployment will timeout at {0}", DateTimeOffset.Now + dreamMakerSettings.Timeout.Value);
|
||||
logger.LogTrace("Deployment will timeout at {timeoutTime}", DateTimeOffset.UtcNow + dreamMakerSettings.Timeout.Value);
|
||||
using var timeoutTokenSource = new CancellationTokenSource(dreamMakerSettings.Timeout.Value);
|
||||
var timeoutToken = timeoutTokenSource.Token;
|
||||
using (timeoutToken.Register(() => logger.LogWarning("Deployment timed out!")))
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
/// <param name="repositorySettings">The <see cref="RepositorySettings"/>.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> resulting in the <see cref="Models.TestMerge"/> of the <paramref name="parameters"/>.</returns>
|
||||
/// <remarks><see cref="TestMergeApiBase.MergedAt"/> and <see cref="Models.TestMerge.MergedBy"/> will be unset.</remarks>
|
||||
Task<Models.TestMerge> GetTestMerge(
|
||||
TestMergeParameters parameters,
|
||||
RepositorySettings repositorySettings,
|
||||
|
||||
@@ -538,6 +538,7 @@ namespace Tgstation.Server.Host.Controllers
|
||||
}
|
||||
|
||||
testMergeToAdd.MergedBy = mergedBy;
|
||||
testMergeToAdd.MergedAt = DateTimeOffset.UtcNow;
|
||||
|
||||
foreach (var activeTestMerge in previousRevInfo.ActiveTestMerges)
|
||||
lastRevisionInfo.ActiveTestMerges.Add(activeTestMerge);
|
||||
@@ -839,7 +840,6 @@ namespace Tgstation.Server.Host.Controllers
|
||||
{
|
||||
Author = ex.Message,
|
||||
BodyAtMerge = ex.Message,
|
||||
MergedAt = DateTimeOffset.UtcNow,
|
||||
TitleAtMerge = ex.Message,
|
||||
Comment = newTestMerge.Comment,
|
||||
Number = newTestMerge.Number,
|
||||
|
||||
@@ -221,6 +221,9 @@ namespace Tgstation.Server.Host.Controllers
|
||||
|
||||
if (model.Password != null)
|
||||
{
|
||||
if (model.SystemIdentifier != null)
|
||||
return BadRequest(new ErrorMessageResponse(ErrorCode.UserMismatchPasswordSid));
|
||||
|
||||
var result = TrySetPassword(originalUser, model.Password, false);
|
||||
if (result != null)
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user