Skip to content

Commit f98b153

Browse files
Merge pull request #18 from nullinside-development-group/chore/updates
chore: update log message and save magic number in constants file
2 parents f9fbf71 + 82ac5b8 commit f98b153

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Nullinside.Cicd.GitHub/Constants.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ public static class Constants {
2323
/// The github project's unique identifier on github.
2424
/// </summary>
2525
public const int GITHUB_PROJECT_NUM = 1;
26+
27+
/// <summary>
28+
/// The unique identifier on GitHub for the "done" status of items.
29+
/// </summary>
30+
/// <remarks>This was found by manually querying the API. It's a nightmare to pull. Hence the hardcoding.</remarks>
31+
public const string GITHUB_PROJECT_DONE_SINGLE_SELECT_ID = "98236657";
2632
}

src/Nullinside.Cicd.GitHub/Rule/MoveClosedToDone.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ from projects in issueInfo.ProjectItems.Nodes
3838
continue;
3939
}
4040

41-
_log.Info($"{repo.Name}: Associating issue #{issue.IssueNumber}");
41+
_log.Info($"{repo.Name}: Moving issue to done column (issue #{issue.IssueNumber})");
4242

43-
var mutation = new MutateIssueProjectStatuses(projectId.Value, issue.ProjectIssueId, issue.FieldId, "98236657");
43+
var mutation = new MutateIssueProjectStatuses(projectId.Value, issue.ProjectIssueId, issue.FieldId, Constants.GITHUB_PROJECT_DONE_SINGLE_SELECT_ID);
4444
await mutation.SendAsync();
4545
}
4646
}

0 commit comments

Comments
 (0)