Skip to content

Commit

Permalink
Use html_url instead of url for PRs.
Browse files Browse the repository at this point in the history
Whoops that was an API URL.
  • Loading branch information
PJB3005 committed Dec 21, 2023
1 parent 200af6b commit 064fb7c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions SS14.Changelog.Tests/ChangelogParseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Did stuff!
Assert.That(parsed, Is.Not.Null);
Assert.That(parsed.Author, Is.EqualTo("Ev1__l P-JB2323"));
Assert.That(parsed.Time, Is.EqualTo(time));
Assert.That(parsed.Url, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.HtmlUrl, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.Changes, Is.EquivalentTo(new[]
{
(ChangelogEntryType.Add, "Did the thing"),
Expand Down Expand Up @@ -57,7 +57,7 @@ Did stuff!
Assert.That(parsed, Is.Not.Null);
Assert.That(parsed.Author, Is.EqualTo("Swept"));
Assert.That(parsed.Time, Is.EqualTo(time));
Assert.That(parsed.Url, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.HtmlUrl, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.Changes, Is.EquivalentTo(new[]
{
(ChangelogEntryType.Add, "Did the thing"),
Expand Down Expand Up @@ -86,7 +86,7 @@ Did stuff!
Assert.That(parsed, Is.Not.Null);
Assert.That(parsed.Author, Is.EqualTo("Swept"));
Assert.That(parsed.Time, Is.EqualTo(time));
Assert.That(parsed.Url, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.HtmlUrl, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.Changes, Is.EquivalentTo(new[]
{
(ChangelogEntryType.Add, "Did the thing"),
Expand All @@ -107,7 +107,7 @@ public void TestBroke()
Assert.That(parsed, Is.Not.Null);
Assert.That(parsed.Author, Is.EqualTo("AJCM"));
Assert.That(parsed.Time, Is.EqualTo(time));
Assert.That(parsed.Url, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.HtmlUrl, Is.EqualTo("https://www.example.com"));
Assert.That(parsed.Changes, Is.EquivalentTo(new[]
{
(ChangelogEntryType.Add, "Makes gravity generator and windows repairable with a lit welding tool")
Expand Down
2 changes: 1 addition & 1 deletion SS14.Changelog/ChangelogData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public ChangelogData(string author, ImmutableArray<(ChangelogEntryType, string)>
public ImmutableArray<(ChangelogEntryType, string)> Changes { get; }
public DateTimeOffset Time { get; }
public int Number { get; init; }
public required string Url { get; init; }
public required string HtmlUrl { get; init; }
}

public enum ChangelogEntryType
Expand Down
2 changes: 1 addition & 1 deletion SS14.Changelog/Controllers/WebhookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private void HandlePullRequest(GHPullRequestEvent eventData)
return new ChangelogData(author, entries.ToImmutableArray(), pr.MergedAt ?? DateTimeOffset.Now)
{
Number = pr.Number,
Url = pr.Url
HtmlUrl = pr.Url
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion SS14.Changelog/Services/ChangelogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ private void WriteChangelogPart(ChangelogData data)
{
{"author", Quoted(data.Author)},
{"time", Quoted(data.Time.ToString("O"))},
{"url", Quoted(data.Url)},
{"url", Quoted(data.HtmlUrl)},
{
"changes",
new YamlSequenceNode(
Expand Down

0 comments on commit 064fb7c

Please sign in to comment.