mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
added opt-in header for passing Context to API
This commit is contained in:
@@ -34,7 +34,12 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||
|
||||
return ApiConnection.GetAll<CommitStatus>(ApiUrls.CommitStatus(owner, name, reference), null);
|
||||
// This is currently a preview feature of the API and is subject to change
|
||||
// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
|
||||
return ApiConnection.GetAll<CommitStatus>(
|
||||
ApiUrls.CommitStatus(owner, name, reference),
|
||||
null,
|
||||
"application/vnd.github.she-hulk-preview+json");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +57,12 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||
Ensure.ArgumentNotNull(commitStatus, "commitStatus");
|
||||
|
||||
return ApiConnection.Post<CommitStatus>(ApiUrls.CommitStatus(owner, name, reference), commitStatus);
|
||||
// This is currently a preview feature of the API and is subject to change
|
||||
// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
|
||||
return ApiConnection.Post<CommitStatus>(
|
||||
ApiUrls.CommitStatus(owner, name, reference),
|
||||
commitStatus,
|
||||
"application/vnd.github.she-hulk-preview+json");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,11 @@ namespace Octokit
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A string label to differentiate this status from the status of other systems.
|
||||
/// </summary>
|
||||
public string Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The unique identifier of the status.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user