Skip to content

Commit

Permalink
Merge pull request #8 from MikeAmputer/kravtsov/fix-options
Browse files Browse the repository at this point in the history
Fix options
  • Loading branch information
MikeAmputer authored Aug 23, 2024
2 parents 216c9a5 + 88dafa1 commit 2005d29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Engine/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class Options
public string GitHubToken { get; set; } = string.Empty;

[Option("test-mode", Default = true)]
public bool TestMode { get; set; }
public bool? TestMode { get; set; }

[Option("period-hours", Default = 24)]
public int PeriodHours { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/Engine/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

var stateBody = character.ToStateCommentBody();

if (options.TestMode)
if (options.TestMode.GetValueOrDefault(true))
{
Logging.LogInfo(stateBody);
continue;
Expand All @@ -77,7 +77,7 @@
ServerState.Instance.PrepareForSave(characters.Select(t => t.Character));
var stateIssueBody = ServerState.Instance.ToStateIssueBody();

if (!options.TestMode)
if (!options.TestMode.GetValueOrDefault(true))
{

if (ServerState.Instance.IssueNumber != null)
Expand Down

0 comments on commit 2005d29

Please sign in to comment.