Skip to content

Commit b30f26b

Browse files
committed
Fixes due to recent rebase
1 parent c7a8045 commit b30f26b

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

src/GitReleaseManager.Core/Provider/GitHubProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public string GetIssueType(Issue issue)
413413
{
414414
return issue.IsPullRequest ? "Pull Request" : "Issue";
415415
}
416-
416+
417417
public async Task<Issue> GetLinkedIssueAsync(string owner, string repository, int issueNumber)
418418
{
419419
var graphQLQuery = string.Format(CultureInfo.InvariantCulture, CONNECT_AND_DISCONNECT_EVENTS_GRAPHQL_QUERY,

src/GitReleaseManager.Core/Provider/GitLabProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ public string GetIssueType(Issue issue)
391391
return issue.IsPullRequest ? "Merge Request" : "Issue";
392392
}
393393

394+
public async Task<Issue> GetLinkedIssueAsync(string owner, string repository, int issueNumber)
395+
{
396+
// This is a placeholder until I figure out if GitLab has a something equivalent to GitHub's "linked issue"
397+
throw new NotImplementedException();
398+
}
399+
394400
private int GetGitLabProjectId(string owner, string repository)
395401
{
396402
if (_projectId.HasValue)

src/GitReleaseManager.Core/ReleaseNotes/ReleaseNotesBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public async Task<string> BuildReleaseNotesAsync(string user, string repository,
7676
{
7777
foreach (var issue in kvp.Value)
7878
{
79-
issue.LinkedIssue = await _vcsProvider.GetLinkedIssueAsync(_user, _repository, issue.Number).ConfigureAwait(false);
79+
issue.LinkedIssue = await _vcsProvider.GetLinkedIssueAsync(_user, _repository, issue.PublicNumber).ConfigureAwait(false);
8080
}
8181
}
8282

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
__{{ issue_label }}__
22

33
{{ for issue in issues.items[issue_label]
4-
if issue.is_pull_request
5-
include 'pullrequest-note'
6-
else
7-
include 'issue-note'
8-
end
4+
include 'issue-note'
95
end }}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{
22
if issue.is_pull_request
3-
}}- [__!{{ issue.public_number }}__]({{ issue.html_url }}) {{ issue.title }}{{ if issue.user }} by [{{ issue.user.login }}]({{ issue.user.html_url }}){{ end }}{{ if issue.linked_issue }} raised in [#{{ issue.linked_issue.public_number }}]({{ issue.linked_issue.html_url }}) by [{{ issue.linked_issue.user.login }}]({{ issue.linked_issue.user.html_url }}){{ end }}
3+
}}- [__!{{ issue.public_number }}__]({{ issue.html_url }}) {{ issue.title }}{{ if issue.user }} by [{{ issue.user.login }}]({{ issue.user.html_url }}){{ end }}{{ if issue.linked_issue }} raised in [#{{ issue.linked_issue.public_number }}]({{ issue.linked_issue.html_url }}){{ if issue.linked_issue.user }} by [{{ issue.linked_issue.user.login }}]({{ issue.linked_issue.user.html_url }}){{ end }}{{ end }}
44
{{ else
5-
}}- [__#{{ issue.public_number }}__]({{ issue.html_url }}) {{ issue.title }}{{ if issue.user }} raised by [{{ issue.user.login }}]({{ issue.user.html_url }}){{ end }}{{ if issue.linked_issue }} resolved in [#{{ issue.linked_issue.public_number }}]({{ issue.linked_issue.html_url }}) by [{{ issue.linked_issue.user.login }}]({{ issue.linked_issue.user.html_url }}){{ end }}
5+
}}- [__#{{ issue.public_number }}__]({{ issue.html_url }}) {{ issue.title }}{{ if issue.user }} raised by [{{ issue.user.login }}]({{ issue.user.html_url }}){{ end }}{{ if issue.linked_issue }} resolved in [#{{ issue.linked_issue.public_number }}]({{ issue.linked_issue.html_url }}){{ if issue.linked_issue.user }} by [{{ issue.linked_issue.user.login }}]({{ issue.linked_issue.user.html_url }}){{ end }}{{ end }}
66
{{ end -}}

src/GitReleaseManager.Core/Templates/default/pullrequest-note.sbn

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/GitReleaseManager.IntegrationTests/GitHubProviderIntegrationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ public async Task GetLinkedIssue()
107107
{
108108
// Assert that issue 43 is linked to pull request 108
109109
var result1 = await _gitHubProvider.GetLinkedIssueAsync("jericho", "_testing", 43).ConfigureAwait(false);
110-
Assert.AreEqual(108, result1.Number);
110+
Assert.AreEqual(108, result1.PublicNumber);
111111

112112
// Assert that pull request 108 is linked to issue 43
113113
var result2 = await _gitHubProvider.GetLinkedIssueAsync("jericho", "_testing", 108).ConfigureAwait(false);
114-
Assert.AreEqual(43, result2.Number);
114+
Assert.AreEqual(43, result2.PublicNumber);
115115
}
116116
}
117117
}

0 commit comments

Comments
 (0)