added opt-in header for passing Context to API

This commit is contained in:
Brendan Forster
2014-05-17 12:22:20 +10:00
parent 6c0df1eee4
commit 37d75c7748
2 changed files with 17 additions and 2 deletions
+12 -2
View File
@@ -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");
}
}
}
+5
View File
@@ -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>