Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Octokit.Tests.Integration/Clients/CheckRunsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public async Task GetsCheckRun()
using (var repoContext = await _github.CreateRepositoryContext(new NewRepository(Helper.MakeNameWithTimestamp("public-repo")) { AutoInit = true }))
{
// Create a new feature branch
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "master");
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "main");
var featureBranch = await Helper.CreateFeatureBranch(repoContext.RepositoryOwner, repoContext.RepositoryName, headCommit.Sha, "my-feature");

// Create a check run for the feature branch
Expand All @@ -349,6 +349,7 @@ public async Task GetsCheckRun()
Assert.Equal(featureBranch.Object.Sha, checkRun.HeadSha);
Assert.Equal("name", checkRun.Name);
Assert.Equal(CheckStatus.InProgress, checkRun.Status);
Assert.Equal(created.DetailsUrl, checkRun.DetailsUrl);
}
}

Expand All @@ -358,7 +359,7 @@ public async Task GetsCheckRunWithRepositoryId()
using (var repoContext = await _github.CreateRepositoryContext(new NewRepository(Helper.MakeNameWithTimestamp("public-repo")) { AutoInit = true }))
{
// Create a new feature branch
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "master");
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "main");
var featureBranch = await Helper.CreateFeatureBranch(repoContext.RepositoryOwner, repoContext.RepositoryName, headCommit.Sha, "my-feature");

// Create a check run for the feature branch
Expand All @@ -375,6 +376,7 @@ public async Task GetsCheckRunWithRepositoryId()
Assert.Equal(featureBranch.Object.Sha, checkRun.HeadSha);
Assert.Equal("name", checkRun.Name);
Assert.Equal(CheckStatus.InProgress, checkRun.Status);
Assert.Equal(created.DetailsUrl, checkRun.DetailsUrl);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public async Task GetsCheckRun()
using (var repoContext = await _github.CreateRepositoryContext(new NewRepository(Helper.MakeNameWithTimestamp("public-repo")) { AutoInit = true }))
{
// Create a new feature branch
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "master");
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "main");
var featureBranch = await Helper.CreateFeatureBranch(repoContext.RepositoryOwner, repoContext.RepositoryName, headCommit.Sha, "my-feature");

// Create a check run for the feature branch
Expand All @@ -350,6 +350,7 @@ public async Task GetsCheckRun()
Assert.Equal(featureBranch.Object.Sha, checkRun.HeadSha);
Assert.Equal("name", checkRun.Name);
Assert.Equal(CheckStatus.InProgress, checkRun.Status);
Assert.Equal(created.DetailsUrl, checkRun.DetailsUrl);
}
}

Expand All @@ -359,7 +360,7 @@ public async Task GetsCheckRunWithRepositoryId()
using (var repoContext = await _github.CreateRepositoryContext(new NewRepository(Helper.MakeNameWithTimestamp("public-repo")) { AutoInit = true }))
{
// Create a new feature branch
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "master");
var headCommit = await _github.Repository.Commit.Get(repoContext.RepositoryId, "main");
var featureBranch = await Helper.CreateFeatureBranch(repoContext.RepositoryOwner, repoContext.RepositoryName, headCommit.Sha, "my-feature");

// Create a check run for the feature branch
Expand All @@ -376,6 +377,7 @@ public async Task GetsCheckRunWithRepositoryId()
Assert.Equal(featureBranch.Object.Sha, checkRun.HeadSha);
Assert.Equal("name", checkRun.Name);
Assert.Equal(CheckStatus.InProgress, checkRun.Status);
Assert.Equal(created.DetailsUrl, checkRun.DetailsUrl);
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion Octokit/Models/Response/CheckRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ public CheckRun()
{
}

public CheckRun(long id, string headSha, string externalId, string url, string htmlUrl, CheckStatus status, CheckConclusion? conclusion, DateTimeOffset startedAt, DateTimeOffset? completedAt, CheckRunOutputResponse output, string name, CheckSuite checkSuite, GitHubApp app, IReadOnlyList<PullRequest> pullRequests)
public CheckRun(long id, string headSha, string externalId, string url, string htmlUrl, string detailsUrl, CheckStatus status, CheckConclusion? conclusion, DateTimeOffset startedAt, DateTimeOffset? completedAt, CheckRunOutputResponse output, string name, CheckSuite checkSuite, GitHubApp app, IReadOnlyList<PullRequest> pullRequests)
{
Id = id;
HeadSha = headSha;
ExternalId = externalId;
Url = url;
HtmlUrl = htmlUrl;
DetailsUrl = detailsUrl;
Status = status;
Conclusion = conclusion;
StartedAt = startedAt;
Expand Down Expand Up @@ -55,6 +56,11 @@ public CheckRun(long id, string headSha, string externalId, string url, string h
/// </summary>
public string HtmlUrl { get; protected set; }

/// <summary>
/// The URL of the integrator's site that has the full details of the check.
/// </summary>
public string DetailsUrl { get; protected set; }

/// <summary>
/// The check run status
/// </summary>
Expand Down