mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Merge pull request #723 from XiongKezhi/complete-checks-api
Complete checks api
This commit is contained in:
@@ -4,13 +4,13 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Represents a check run.
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v3/checks/runs/">documentation</a>
|
||||
*/
|
||||
|
||||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD" },
|
||||
justification = "JSON API")
|
||||
public class GHCheckRun extends GHObject {
|
||||
@@ -21,7 +21,16 @@ public class GHCheckRun extends GHObject {
|
||||
private String conclusion;
|
||||
private String name;
|
||||
private String headSha;
|
||||
private String nodeId;
|
||||
private String externalId;
|
||||
private String startedAt;
|
||||
private String completedAt;
|
||||
private URL htmlUrl;
|
||||
private URL detailsUrl;
|
||||
private Output output;
|
||||
private GHApp app;
|
||||
private GHPullRequest[] pullRequests;
|
||||
private GHCheckSuite checkSuite;
|
||||
|
||||
GHCheckRun wrap(GHRepository owner) {
|
||||
this.owner = owner;
|
||||
@@ -41,14 +50,30 @@ public class GHCheckRun extends GHObject {
|
||||
return pullRequests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status of the check run. It can be one of "queue", "in_progress", or "completed"
|
||||
*
|
||||
* @return Status of the check run
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets conclusion of a completed check run. It can be one of "success", "failure", "neutral", "cancelled",
|
||||
* "time_out", or "action_required".
|
||||
*
|
||||
* @return Status of the check run
|
||||
*/
|
||||
public String getConclusion() {
|
||||
return conclusion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the custom name of this check run.
|
||||
*
|
||||
* @return Name of the check run
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -62,6 +87,11 @@ public class GHCheckRun extends GHObject {
|
||||
return headSha;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the pull requests participated in this check run.
|
||||
*
|
||||
* @return Pull requests of this check run
|
||||
*/
|
||||
GHPullRequest[] getPullRequests() throws IOException {
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
@@ -72,11 +102,145 @@ public class GHCheckRun extends GHObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This object has no HTML URL.
|
||||
* Gets the HTML URL: https://github.com/[owner]/[repo-name]/runs/[check-run-id], usually an GitHub Action page of
|
||||
* the check run.
|
||||
*
|
||||
* @return HTML URL
|
||||
*/
|
||||
@Override
|
||||
public URL getHtmlUrl() {
|
||||
return null;
|
||||
return htmlUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the global node id to access most objects in GitHub.
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v4/guides/using-global-node-ids/">documentation</a>
|
||||
* @return Global node id
|
||||
*/
|
||||
public String getNodeId() {
|
||||
return nodeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a reference for the check run on the integrator's system.
|
||||
*
|
||||
* @return Reference id
|
||||
*/
|
||||
public String getExternalId() {
|
||||
return externalId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the details URL from which to find full details of the check run on the integrator's site.
|
||||
*
|
||||
* @return Details URL
|
||||
*/
|
||||
public URL getDetailsUrl() {
|
||||
return detailsUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the start time of the check run in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
|
||||
*
|
||||
* @return Timestamp of the start time
|
||||
*/
|
||||
public Date getStartedAt() {
|
||||
return GitHubClient.parseDate(startedAt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the completed time of the check run in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
|
||||
*
|
||||
* @return Timestamp of the completed time
|
||||
*/
|
||||
public Date getCompletedAt() {
|
||||
return GitHubClient.parseDate(completedAt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the GitHub app this check run belongs to, included in response.
|
||||
*
|
||||
* @return GitHub App
|
||||
*/
|
||||
public GHApp getApp() {
|
||||
return app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the check suite this check run belongs to
|
||||
*
|
||||
* @return Check suite
|
||||
*/
|
||||
public GHCheckSuite getCheckSuite() {
|
||||
return checkSuite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an output for a check run.
|
||||
*
|
||||
* @return Output of a check run
|
||||
*/
|
||||
public Output getOutput() {
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an output in a check run to include summary and other results.
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v3/checks/runs/#output-object">documentation</a>
|
||||
*/
|
||||
public static class Output {
|
||||
private String title;
|
||||
private String summary;
|
||||
private String text;
|
||||
private int annotationsCount;
|
||||
private URL annotationsUrl;
|
||||
|
||||
/**
|
||||
* Gets the title of check run.
|
||||
*
|
||||
* @return title of check run
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the summary of the check run, note that it supports Markdown.
|
||||
*
|
||||
* @return summary of check run
|
||||
*/
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the details of the check run, note that it supports Markdown.
|
||||
*
|
||||
* @return Details of the check run
|
||||
*/
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the annotation count of a check run.
|
||||
*
|
||||
* @return annotation count of a check run
|
||||
*/
|
||||
public int getAnnotationsCount() {
|
||||
return annotationsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL of annotations.
|
||||
*
|
||||
* @return URL of annotations
|
||||
*/
|
||||
public URL getAnnotationsUrl() {
|
||||
return annotationsUrl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
239
src/main/java/org/kohsuke/github/GHCheckSuite.java
Normal file
239
src/main/java/org/kohsuke/github/GHCheckSuite.java
Normal file
@@ -0,0 +1,239 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Represents a check suite.
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v3/checks/suites/">documentation</a>
|
||||
*/
|
||||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD" },
|
||||
justification = "JSON API")
|
||||
public class GHCheckSuite extends GHObject {
|
||||
GHRepository owner;
|
||||
GitHub root;
|
||||
|
||||
private String nodeId;
|
||||
private String headBranch;
|
||||
private String headSha;
|
||||
private String status;
|
||||
private String conclusion;
|
||||
private String before;
|
||||
private String after;
|
||||
private int latestCheckRunsCount;
|
||||
private URL checkRunsUrl;
|
||||
private HeadCommit headCommit;
|
||||
private GHApp app;
|
||||
private GHPullRequest[] pullRequests;
|
||||
|
||||
GHCheckSuite wrap(GHRepository owner) {
|
||||
this.owner = owner;
|
||||
this.root = owner.root;
|
||||
return this;
|
||||
}
|
||||
|
||||
GHCheckSuite wrap(GitHub root) {
|
||||
this.root = root;
|
||||
if (owner != null) {
|
||||
owner.wrap(root);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
GHPullRequest[] wrap() {
|
||||
return pullRequests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the global node id to access most objects in GitHub.
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v4/guides/using-global-node-ids/">documentation</a>
|
||||
* @return global node id
|
||||
*/
|
||||
public String getNodeId() {
|
||||
return nodeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* The head branch name the changes are on.
|
||||
*
|
||||
* @return head branch name
|
||||
*/
|
||||
public String getHeadBranch() {
|
||||
return headBranch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HEAD SHA.
|
||||
*
|
||||
* @return sha for the HEAD commit
|
||||
*/
|
||||
public String getHeadSha() {
|
||||
return headSha;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status of the check suite. It can be one of request, in_progress, or completed.
|
||||
*
|
||||
* @return status of the check suite
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets conclusion of a completed check suite. It can be one of success, failure, neutral, cancelled, time_out,
|
||||
* action_required, or stale. The check suite will report the highest priority check run conclusion in the check
|
||||
* suite's conclusion.
|
||||
*
|
||||
* @return conclusion of the check suite
|
||||
*/
|
||||
public String getConclusion() {
|
||||
return conclusion;
|
||||
}
|
||||
|
||||
/**
|
||||
* The SHA of the most recent commit on ref before the push.
|
||||
*
|
||||
* @return sha of a commit
|
||||
*/
|
||||
public String getBefore() {
|
||||
return before;
|
||||
}
|
||||
|
||||
/**
|
||||
* The SHA of the most recent commit on ref after the push.
|
||||
*
|
||||
* @return sha of a commit
|
||||
*/
|
||||
public String getAfter() {
|
||||
return after;
|
||||
}
|
||||
|
||||
/**
|
||||
* The quantity of check runs that had run as part of the latest push.
|
||||
*
|
||||
* @return sha of the most recent commit
|
||||
*/
|
||||
public int getLatestCheckRunsCount() {
|
||||
return latestCheckRunsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* The url used to list all the check runs belonged to this suite.
|
||||
*
|
||||
* @return url containing all check runs
|
||||
*/
|
||||
public URL getCheckRunsUrl() {
|
||||
return checkRunsUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* The commit of current head.
|
||||
*
|
||||
* @return head commit
|
||||
*/
|
||||
public HeadCommit getHeadCommit() {
|
||||
return headCommit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the GitHub app this check suite belongs to, included in response.
|
||||
*
|
||||
* @return GitHub App
|
||||
*/
|
||||
public GHApp getApp() {
|
||||
return app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the pull requests participated in this check suite.
|
||||
*
|
||||
* @return Pull requests
|
||||
*/
|
||||
GHPullRequest[] getPullRequests() throws IOException {
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
singlePull.refresh();
|
||||
}
|
||||
}
|
||||
return pullRequests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check suite doesn't have a HTML URL.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
public URL getHtmlUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class HeadCommit {
|
||||
private String id;
|
||||
private String treeId;
|
||||
private String message;
|
||||
private String timestamp;
|
||||
private GitUser author;
|
||||
private GitUser committer;
|
||||
|
||||
/**
|
||||
* Gets id of the commit, used by {@link GHCheckSuite} when a {@link GHEvent#CHECK_SUITE} comes
|
||||
*
|
||||
* @return id of the commit
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id of the tree.
|
||||
*
|
||||
* @return id of the tree
|
||||
*/
|
||||
public String getTreeId() {
|
||||
return treeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message.
|
||||
*
|
||||
* @return commit message.
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets timestamp of the commit.
|
||||
*
|
||||
* @return timestamp of the commit
|
||||
*/
|
||||
public Date getTimestamp() {
|
||||
return GitHubClient.parseDate(timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets author.
|
||||
*
|
||||
* @return the author
|
||||
*/
|
||||
public GitUser getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets committer.
|
||||
*
|
||||
* @return the committer
|
||||
*/
|
||||
public GitUser getCommitter() {
|
||||
return committer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,6 +132,7 @@ public abstract class GHEventPayload {
|
||||
* @return the repository
|
||||
*/
|
||||
public GHRepository getRepository() {
|
||||
repository.root = root;
|
||||
return repository;
|
||||
}
|
||||
|
||||
@@ -150,6 +151,48 @@ public abstract class GHEventPayload {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A check suite event has been requested, rerequested or completed.
|
||||
*
|
||||
* @see <a href="https://developer.github.com/v3/activity/events/types/#checkrunevent">authoritative source</a>
|
||||
*/
|
||||
@SuppressFBWarnings(
|
||||
value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD" },
|
||||
justification = "JSON API")
|
||||
public static class CheckSuite extends GHEventPayload {
|
||||
private String action;
|
||||
private GHCheckSuite checkSuite;
|
||||
private GHRepository repository;
|
||||
|
||||
/**
|
||||
* Gets action.
|
||||
*
|
||||
* @return the action
|
||||
*/
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Check Suite object
|
||||
*
|
||||
* @return the Check Suite object
|
||||
*/
|
||||
public GHCheckSuite getCheckSuite() {
|
||||
return checkSuite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets repository.
|
||||
*
|
||||
* @return the repository
|
||||
*/
|
||||
public GHRepository getRepository() {
|
||||
repository.root = root;
|
||||
return repository;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A pull request status has changed.
|
||||
*
|
||||
|
||||
@@ -3,6 +3,9 @@ package org.kohsuke.github;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
@@ -319,9 +322,74 @@ public class GHEventPayloadTest {
|
||||
GHEventPayload.CheckRun event = GitHub.offline()
|
||||
.parseEventPayload(payload.asReader(), GHEventPayload.CheckRun.class);
|
||||
assertThat(event.getRepository().getName(), is("Hello-World"));
|
||||
assertThat(event.getRepository().getOwner().getLogin(), is("Codertocat"));
|
||||
assertThat(event.getAction(), is("created"));
|
||||
assertThat(event.getCheckRun().getName(), is("Octocoders-linter"));
|
||||
assertThat(event.getCheckRun().getHeadSha(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
|
||||
// Checks the deserialization of check_run
|
||||
GHCheckRun checkRun = event.getCheckRun();
|
||||
assertThat(checkRun.getName(), is("Octocoders-linter"));
|
||||
assertThat(checkRun.getHeadSha(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
assertThat(checkRun.getStatus(), is("completed"));
|
||||
assertThat(checkRun.getNodeId(), is("MDg6Q2hlY2tSdW4xMjg2MjAyMjg="));
|
||||
assertThat(checkRun.getExternalId(), is(""));
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
assertThat(formatter.format(checkRun.getStartedAt()), is("2019-05-15T15:21:12Z"));
|
||||
assertThat(formatter.format(checkRun.getCompletedAt()), is("2019-05-15T20:22:22Z"));
|
||||
|
||||
assertThat(checkRun.getConclusion(), is("success"));
|
||||
assertThat(checkRun.getUrl().toString(),
|
||||
is("https://api.github.com/repos/Codertocat/Hello-World/check-runs/128620228"));
|
||||
assertThat(checkRun.getHtmlUrl().toString(), is("https://github.com/Codertocat/Hello-World/runs/128620228"));
|
||||
assertThat(checkRun.getDetailsUrl().toString(), is("https://octocoders.io"));
|
||||
assertThat(checkRun.getApp().getId(), is(29310L));
|
||||
assertThat(checkRun.getCheckSuite().getId(), is(118578147L));
|
||||
assertThat(checkRun.getOutput().getTitle(), is("check-run output"));
|
||||
assertThat(checkRun.getOutput().getSummary(), nullValue());
|
||||
assertThat(checkRun.getOutput().getText(), nullValue());
|
||||
assertThat(checkRun.getOutput().getAnnotationsCount(), is(0));
|
||||
assertThat(checkRun.getOutput().getAnnotationsUrl().toString(),
|
||||
is("https://api.github.com/repos/Codertocat/Hello-World/check-runs/128620228/annotations"));
|
||||
|
||||
// Checks the deserialization of sender
|
||||
assertThat(event.getSender().getId(), is(21031067L));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Payload("check-suite")
|
||||
public void checkSuiteEvent() throws Exception {
|
||||
GHEventPayload.CheckSuite event = GitHub.offline()
|
||||
.parseEventPayload(payload.asReader(), GHEventPayload.CheckSuite.class);
|
||||
|
||||
assertThat(event.getRepository().getName(), is("Hello-World"));
|
||||
assertThat(event.getRepository().getOwner().getLogin(), is("Codertocat"));
|
||||
assertThat(event.getAction(), is("completed"));
|
||||
assertThat(event.getSender().getId(), is(21031067L));
|
||||
|
||||
// Checks the deserialization of check_suite
|
||||
GHCheckSuite checkSuite = event.getCheckSuite();
|
||||
assertThat(checkSuite.getNodeId(), is("MDEwOkNoZWNrU3VpdGUxMTg1NzgxNDc="));
|
||||
assertThat(checkSuite.getHeadBranch(), is("changes"));
|
||||
assertThat(checkSuite.getHeadSha(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
assertThat(checkSuite.getStatus(), is("completed"));
|
||||
assertThat(checkSuite.getConclusion(), is("success"));
|
||||
assertThat(checkSuite.getBefore(), is("6113728f27ae82c7b1a177c8d03f9e96e0adf246"));
|
||||
assertThat(checkSuite.getAfter(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
assertThat(checkSuite.getLatestCheckRunsCount(), is(1));
|
||||
assertThat(checkSuite.getCheckRunsUrl().toString(),
|
||||
is("https://api.github.com/repos/Codertocat/Hello-World/check-suites/118578147/check-runs"));
|
||||
assertThat(checkSuite.getHeadCommit().getMessage(), is("Update README.md"));
|
||||
assertThat(checkSuite.getHeadCommit().getId(), is("ec26c3e57ca3a959ca5aad62de7213c562f8c821"));
|
||||
assertThat(checkSuite.getHeadCommit().getTreeId(), is("31b122c26a97cf9af023e9ddab94a82c6e77b0ea"));
|
||||
assertThat(checkSuite.getHeadCommit().getAuthor().getName(), is("Codertocat"));
|
||||
assertThat(checkSuite.getHeadCommit().getCommitter().getName(), is("Codertocat"));
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
assertThat(formatter.format(checkSuite.getHeadCommit().getTimestamp()), is("2019-05-15T15:20:30Z"));
|
||||
|
||||
assertThat(checkSuite.getApp().getId(), is(29310L));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
"url": "https://api.github.com/repos/Codertocat/Hello-World/check-runs/128620228",
|
||||
"html_url": "https://github.com/Codertocat/Hello-World/runs/128620228",
|
||||
"details_url": "https://octocoders.io",
|
||||
"status": "queued",
|
||||
"conclusion": null,
|
||||
"status": "completed",
|
||||
"conclusion": "success",
|
||||
"started_at": "2019-05-15T15:21:12Z",
|
||||
"completed_at": null,
|
||||
"completed_at": "2019-05-15T20:22:22Z",
|
||||
"output": {
|
||||
"title": null,
|
||||
"title": "check-run output",
|
||||
"summary": null,
|
||||
"text": null,
|
||||
"annotations_count": 0,
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
{
|
||||
"action": "completed",
|
||||
"check_suite": {
|
||||
"id": 118578147,
|
||||
"node_id": "MDEwOkNoZWNrU3VpdGUxMTg1NzgxNDc=",
|
||||
"head_branch": "changes",
|
||||
"head_sha": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
|
||||
"status": "completed",
|
||||
"conclusion": "success",
|
||||
"url": "https://api.github.com/repos/Codertocat/Hello-World/check-suites/118578147",
|
||||
"before": "6113728f27ae82c7b1a177c8d03f9e96e0adf246",
|
||||
"after": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
|
||||
"pull_requests": [
|
||||
{
|
||||
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
|
||||
"id": 279147437,
|
||||
"number": 2,
|
||||
"head": {
|
||||
"ref": "changes",
|
||||
"sha": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
|
||||
"repo": {
|
||||
"id": 186853002,
|
||||
"url": "https://api.github.com/repos/Codertocat/Hello-World",
|
||||
"name": "Hello-World"
|
||||
}
|
||||
},
|
||||
"base": {
|
||||
"ref": "master",
|
||||
"sha": "f95f852bd8fca8fcc58a9a2d6c842781e32a215e",
|
||||
"repo": {
|
||||
"id": 186853002,
|
||||
"url": "https://api.github.com/repos/Codertocat/Hello-World",
|
||||
"name": "Hello-World"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"app": {
|
||||
"id": 29310,
|
||||
"node_id": "MDM6QXBwMjkzMTA=",
|
||||
"owner": {
|
||||
"login": "Octocoders",
|
||||
"id": 38302899,
|
||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/Octocoders",
|
||||
"html_url": "https://github.com/Octocoders",
|
||||
"followers_url": "https://api.github.com/users/Octocoders/followers",
|
||||
"following_url": "https://api.github.com/users/Octocoders/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/Octocoders/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/Octocoders/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/Octocoders/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/Octocoders/orgs",
|
||||
"repos_url": "https://api.github.com/users/Octocoders/repos",
|
||||
"events_url": "https://api.github.com/users/Octocoders/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/Octocoders/received_events",
|
||||
"type": "Organization",
|
||||
"site_admin": false
|
||||
},
|
||||
"name": "octocoders-linter",
|
||||
"description": "",
|
||||
"external_url": "https://octocoders.io",
|
||||
"html_url": "https://github.com/apps/octocoders-linter",
|
||||
"created_at": "2019-04-19T19:36:24Z",
|
||||
"updated_at": "2019-04-19T19:36:56Z",
|
||||
"permissions": {
|
||||
"administration": "write",
|
||||
"checks": "write",
|
||||
"contents": "write",
|
||||
"deployments": "write",
|
||||
"issues": "write",
|
||||
"members": "write",
|
||||
"metadata": "read",
|
||||
"organization_administration": "write",
|
||||
"organization_hooks": "write",
|
||||
"organization_plan": "read",
|
||||
"organization_projects": "write",
|
||||
"organization_user_blocking": "write",
|
||||
"pages": "write",
|
||||
"pull_requests": "write",
|
||||
"repository_hooks": "write",
|
||||
"repository_projects": "write",
|
||||
"statuses": "write",
|
||||
"team_discussions": "write",
|
||||
"vulnerability_alerts": "read"
|
||||
},
|
||||
"events": [
|
||||
|
||||
]
|
||||
},
|
||||
"created_at": "2019-05-15T15:20:31Z",
|
||||
"updated_at": "2019-05-15T15:21:14Z",
|
||||
"latest_check_runs_count": 1,
|
||||
"check_runs_url": "https://api.github.com/repos/Codertocat/Hello-World/check-suites/118578147/check-runs",
|
||||
"head_commit": {
|
||||
"id": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
|
||||
"tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea",
|
||||
"message": "Update README.md",
|
||||
"timestamp": "2019-05-15T15:20:30Z",
|
||||
"author": {
|
||||
"name": "Codertocat",
|
||||
"email": "21031067+Codertocat@users.noreply.github.com"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Codertocat",
|
||||
"email": "21031067+Codertocat@users.noreply.github.com"
|
||||
}
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 186853002,
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=",
|
||||
"name": "Hello-World",
|
||||
"full_name": "Codertocat/Hello-World",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "Codertocat",
|
||||
"id": 21031067,
|
||||
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/Codertocat",
|
||||
"html_url": "https://github.com/Codertocat",
|
||||
"followers_url": "https://api.github.com/users/Codertocat/followers",
|
||||
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
|
||||
"repos_url": "https://api.github.com/users/Codertocat/repos",
|
||||
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/Codertocat/Hello-World",
|
||||
"description": null,
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/Codertocat/Hello-World",
|
||||
"forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks",
|
||||
"keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams",
|
||||
"hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/Codertocat/Hello-World/events",
|
||||
"assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags",
|
||||
"blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription",
|
||||
"commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges",
|
||||
"archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads",
|
||||
"issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments",
|
||||
"created_at": "2019-05-15T15:19:25Z",
|
||||
"updated_at": "2019-05-15T15:21:14Z",
|
||||
"pushed_at": "2019-05-15T15:20:57Z",
|
||||
"git_url": "git://github.com/Codertocat/Hello-World.git",
|
||||
"ssh_url": "git@github.com:Codertocat/Hello-World.git",
|
||||
"clone_url": "https://github.com/Codertocat/Hello-World.git",
|
||||
"svn_url": "https://github.com/Codertocat/Hello-World",
|
||||
"homepage": null,
|
||||
"size": 0,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": "Ruby",
|
||||
"has_issues": true,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": true,
|
||||
"forks_count": 0,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 2,
|
||||
"license": null,
|
||||
"forks": 0,
|
||||
"open_issues": 2,
|
||||
"watchers": 0,
|
||||
"default_branch": "master"
|
||||
},
|
||||
"sender": {
|
||||
"login": "Codertocat",
|
||||
"id": 21031067,
|
||||
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/Codertocat",
|
||||
"html_url": "https://github.com/Codertocat",
|
||||
"followers_url": "https://api.github.com/users/Codertocat/followers",
|
||||
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
|
||||
"repos_url": "https://api.github.com/users/Codertocat/repos",
|
||||
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user