Update test to check values

This commit is contained in:
Liam Newman
2020-12-28 20:17:43 -08:00
parent 15f748358d
commit cf9caa6af5
10 changed files with 611 additions and 427 deletions

View File

@@ -672,6 +672,10 @@ public class AppTest extends AbstractGitHubWireMockTest {
assertEquals(commit.getCommitShortInfo().getMessage(), "doc");
assertFalse(commit.getCommitShortInfo().getVerification().isVerified());
assertEquals(commit.getCommitShortInfo().getVerification().getReason(), GHVerification.Reason.UNSIGNED);
assertThat(commit.getCommitShortInfo().getAuthor().getDate().toInstant().getEpochSecond(),
equalTo(1271650361L));
assertThat(commit.getCommitShortInfo().getCommitter().getDate().toInstant().getEpochSecond(),
equalTo(1271650361L));
}
@Ignore("Needs mocking check")

View File

@@ -7,6 +7,8 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import static org.hamcrest.Matchers.equalTo;
/**
* @author Kohsuke Kawaguchi
*/
@@ -124,9 +126,13 @@ public class CommitTest extends AbstractGitHubWireMockTest {
@Test // issue 883
public void commitDateNotNull() throws Exception {
GHRepository repo = gitHub.getRepository("hub4j/github-api");
GHCommit commit = repo.getCommit("ed4f9c8176866977677c99ac9668a8ce10231bc8");
GHCommit commit = repo.getCommit("865a49d2e86c24c5777985f0f103e975c4b765b9");
assertNotNull(commit.getCommitShortInfo().getAuthoredDate());
assertNotNull(commit.getCommitShortInfo().getAuthor().getDate());
assertThat(commit.getCommitShortInfo().getAuthoredDate().toInstant().getEpochSecond(), equalTo(1609207093L));
assertThat(commit.getCommitShortInfo().getAuthoredDate(),
equalTo(commit.getCommitShortInfo().getAuthor().getDate()));
assertThat(commit.getCommitShortInfo().getCommitDate().toInstant().getEpochSecond(), equalTo(1609207652L));
assertThat(commit.getCommitShortInfo().getCommitDate(),
equalTo(commit.getCommitShortInfo().getCommitter().getDate()));
}
}

View File

@@ -65,27 +65,27 @@
"releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}",
"deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments",
"created_at": "2010-04-19T04:13:03Z",
"updated_at": "2020-11-28T05:59:13Z",
"pushed_at": "2020-11-27T17:23:57Z",
"updated_at": "2020-12-29T03:54:49Z",
"pushed_at": "2020-12-29T03:54:45Z",
"git_url": "git://github.com/hub4j/github-api.git",
"ssh_url": "git@github.com:hub4j/github-api.git",
"clone_url": "https://github.com/hub4j/github-api.git",
"svn_url": "https://github.com/hub4j/github-api",
"homepage": "https://github-api.kohsuke.org/",
"size": 25463,
"stargazers_count": 714,
"watchers_count": 714,
"size": 25580,
"stargazers_count": 725,
"watchers_count": 725,
"language": "Java",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": true,
"forks_count": 511,
"forks_count": 514,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 79,
"open_issues_count": 74,
"license": {
"key": "mit",
"name": "MIT License",
@@ -93,16 +93,20 @@
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"forks": 511,
"open_issues": 79,
"watchers": 714,
"forks": 514,
"open_issues": 74,
"watchers": 725,
"default_branch": "master",
"permissions": {
"admin": false,
"push": false,
"admin": true,
"push": true,
"pull": true
},
"temp_clone_token": "",
"allow_squash_merge": true,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"delete_branch_on_merge": false,
"organization": {
"login": "hub4j",
"id": 54909825,
@@ -123,6 +127,6 @@
"type": "Organization",
"site_admin": false
},
"network_count": 511,
"subscribers_count": 47
"network_count": 514,
"subscribers_count": 50
}

View File

@@ -1,307 +0,0 @@
{
"sha": "ed4f9c8176866977677c99ac9668a8ce10231bc8",
"node_id": "MDY6Q29tbWl0NjE3MjEwOmVkNGY5YzgxNzY4NjY5Nzc2NzdjOTlhYzk2NjhhOGNlMTAyMzFiYzg=",
"commit": {
"author": {
"name": "Liam Newman",
"email": "bitwiseman@gmail.com",
"date": "2020-11-25T14:37:36Z"
},
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"date": "2020-11-25T14:37:36Z"
},
"message": "Merge pull request #960 from marcoferrer/update-deployments-api\n\n Implement deployment API support for ant-man and flash previews",
"tree": {
"sha": "dfdecab4d57e29357a6d6cdb372b1d458a0e50a0",
"url": "https://api.github.com/repos/hub4j/github-api/git/trees/dfdecab4d57e29357a6d6cdb372b1d458a0e50a0"
},
"url": "https://api.github.com/repos/hub4j/github-api/git/commits/ed4f9c8176866977677c99ac9668a8ce10231bc8",
"comment_count": 0,
"verification": {
"verified": true,
"reason": "valid",
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfvmwwCRBK7hj4Ov3rIwAAdHIIADT6wOXK2CWloa9co2iqK4MF\nvVBhjVjww/PyPQs77ASLzHDOShsw/4kjj7eSrMVabBJsA5a8EYXr1FGzJIfOJDyx\n/IW1Nlvl7U3T9NNFjye1m9LZwkWUl2V0e9ccWisSk1+VMxdt4VI8hoaL0yJdamw5\nhex9FGdHgrsizs1RRYWPU4FNEz5573xpQrFin+rqtDI+mWxniBj3YdqLvY7U92JL\ni1NhVNuO2RbQf3Xo7gHl7Wmx4YKwgB+jQ5G232toy+I35ditZ2PKdF5ZRV7o0ToD\na8g8nX4p/vQy943ZY6UpyqDskMq9bYLGonZQ8dmoq+4Q5k5XKPMlYfsPKt1EAPU=\n=OSY6\n-----END PGP SIGNATURE-----\n",
"payload": "tree dfdecab4d57e29357a6d6cdb372b1d458a0e50a0\nparent fdbbd2e563d1642e72ab45b477eaad20ef936f20\nparent bbb46e88b0828747ccd03bebf20a00d9ba7fc86d\nauthor Liam Newman <bitwiseman@gmail.com> 1606315056 -0800\ncommitter GitHub <noreply@github.com> 1606315056 -0800\n\nMerge pull request #960 from marcoferrer/update-deployments-api\n\n Implement deployment API support for ant-man and flash previews"
}
},
"url": "https://api.github.com/repos/hub4j/github-api/commits/ed4f9c8176866977677c99ac9668a8ce10231bc8",
"html_url": "https://github.com/hub4j/github-api/commit/ed4f9c8176866977677c99ac9668a8ce10231bc8",
"comments_url": "https://api.github.com/repos/hub4j/github-api/commits/ed4f9c8176866977677c99ac9668a8ce10231bc8/comments",
"author": {
"login": "bitwiseman",
"id": 1958953,
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bitwiseman",
"html_url": "https://github.com/bitwiseman",
"followers_url": "https://api.github.com/users/bitwiseman/followers",
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
"repos_url": "https://api.github.com/users/bitwiseman/repos",
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "web-flow",
"id": 19864447,
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/web-flow",
"html_url": "https://github.com/web-flow",
"followers_url": "https://api.github.com/users/web-flow/followers",
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
"organizations_url": "https://api.github.com/users/web-flow/orgs",
"repos_url": "https://api.github.com/users/web-flow/repos",
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
"received_events_url": "https://api.github.com/users/web-flow/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "fdbbd2e563d1642e72ab45b477eaad20ef936f20",
"url": "https://api.github.com/repos/hub4j/github-api/commits/fdbbd2e563d1642e72ab45b477eaad20ef936f20",
"html_url": "https://github.com/hub4j/github-api/commit/fdbbd2e563d1642e72ab45b477eaad20ef936f20"
},
{
"sha": "bbb46e88b0828747ccd03bebf20a00d9ba7fc86d",
"url": "https://api.github.com/repos/hub4j/github-api/commits/bbb46e88b0828747ccd03bebf20a00d9ba7fc86d",
"html_url": "https://github.com/hub4j/github-api/commit/bbb46e88b0828747ccd03bebf20a00d9ba7fc86d"
}
],
"stats": {
"total": 321,
"additions": 307,
"deletions": 14
},
"files": [
{
"sha": "a1b65fa7c401f39c1f4f30ef8f97b6a657c865b8",
"filename": "src/main/java/org/kohsuke/github/GHDeployment.java",
"status": "modified",
"additions": 45,
"deletions": 0,
"changes": 45,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeployment.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeployment.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/GHDeployment.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -24,6 +24,9 @@\n protected String statuses_url;\n protected String repository_url;\n protected GHUser creator;\n+ protected String original_environment;\n+ protected boolean transient_environment;\n+ protected boolean production_environment;\n \n GHDeployment wrap(GHRepository owner) {\n this.owner = owner;\n@@ -89,6 +92,19 @@ public Object getPayloadObject() {\n return payload;\n }\n \n+ /**\n+ * The environment defined when the deployment was first created.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @return the original deployment environment\n+ */\n+ @Deprecated\n+ @Preview(Previews.FLASH)\n+ public String getOriginalEnvironment() {\n+ return original_environment;\n+ }\n+\n /**\n * Gets environment.\n *\n@@ -98,6 +114,33 @@ public String getEnvironment() {\n return environment;\n }\n \n+ /**\n+ * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the\n+ * future.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @return the environment is transient\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public boolean isTransientEnvironment() {\n+ return transient_environment;\n+ }\n+\n+ /**\n+ * Specifies if the given environment is one that end-users directly interact with.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @return the environment is used by end-users directly\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public boolean isProductionEnvironment() {\n+ return production_environment;\n+ }\n+\n /**\n * Gets creator.\n *\n@@ -154,6 +197,8 @@ public GHDeploymentStatusBuilder createStatus(GHDeploymentState state) {\n public PagedIterable<GHDeploymentStatus> listStatuses() {\n return root.createRequest()\n .withUrlPath(statuses_url)\n+ .withPreview(Previews.ANT_MAN)\n+ .withPreview(Previews.FLASH)\n .toIterable(GHDeploymentStatus[].class, item -> item.wrap(owner));\n }\n "
},
{
"sha": "6a34c1079c9fefd25ca23f8c85feddc7e8881772",
"filename": "src/main/java/org/kohsuke/github/GHDeploymentBuilder.java",
"status": "modified",
"additions": 47,
"deletions": 1,
"changes": 48,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/GHDeploymentBuilder.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -19,7 +19,10 @@\n */\n public GHDeploymentBuilder(GHRepository repo) {\n this.repo = repo;\n- this.builder = repo.root.createRequest().method(\"POST\");\n+ this.builder = repo.root.createRequest()\n+ .withPreview(Previews.ANT_MAN)\n+ .withPreview(Previews.FLASH)\n+ .method(\"POST\");\n }\n \n /**\n@@ -40,6 +43,7 @@ public GHDeploymentBuilder(GHRepository repo, String ref) {\n *\n * @param branch\n * the branch\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder ref(String branch) {\n@@ -52,6 +56,7 @@ public GHDeploymentBuilder ref(String branch) {\n *\n * @param task\n * the task\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder task(String task) {\n@@ -64,6 +69,7 @@ public GHDeploymentBuilder task(String task) {\n *\n * @param autoMerge\n * the auto merge\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder autoMerge(boolean autoMerge) {\n@@ -76,6 +82,7 @@ public GHDeploymentBuilder autoMerge(boolean autoMerge) {\n *\n * @param requiredContexts\n * the required contexts\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder requiredContexts(List<String> requiredContexts) {\n@@ -88,6 +95,7 @@ public GHDeploymentBuilder requiredContexts(List<String> requiredContexts) {\n *\n * @param payload\n * the payload\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder payload(String payload) {\n@@ -100,18 +108,55 @@ public GHDeploymentBuilder payload(String payload) {\n *\n * @param environment\n * the environment\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder environment(String environment) {\n builder.with(\"environment\", environment);\n return this;\n }\n \n+ /**\n+ * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the\n+ * future.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @param transientEnvironment\n+ * the environment is transient\n+ *\n+ * @return the gh deployment builder\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) {\n+ builder.with(\"transient_environment\", transientEnvironment);\n+ return this;\n+ }\n+\n+ /**\n+ * Specifies if the given environment is one that end-users directly interact with.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @param productionEnvironment\n+ * the environment is used by end-users directly\n+ *\n+ * @return the gh deployment builder\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public GHDeploymentBuilder productionEnvironment(boolean productionEnvironment) {\n+ builder.with(\"production_environment\", productionEnvironment);\n+ return this;\n+ }\n+\n /**\n * Description gh deployment builder.\n *\n * @param description\n * the description\n+ *\n * @return the gh deployment builder\n */\n public GHDeploymentBuilder description(String description) {\n@@ -123,6 +168,7 @@ public GHDeploymentBuilder description(String description) {\n * Create gh deployment.\n *\n * @return the gh deployment\n+ *\n * @throws IOException\n * the io exception\n */"
},
{
"sha": "fa3a8156dda49cdee950742dfcf58ff1bd938d6c",
"filename": "src/main/java/org/kohsuke/github/GHDeploymentState.java",
"status": "modified",
"additions": 31,
"deletions": 1,
"changes": 32,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentState.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentState.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/GHDeploymentState.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -4,5 +4,35 @@\n * Represents the state of deployment\n */\n public enum GHDeploymentState {\n- PENDING, SUCCESS, ERROR, FAILURE\n+ PENDING,\n+ SUCCESS,\n+ ERROR,\n+ FAILURE,\n+\n+ /**\n+ * The state of the deployment currently reflects it's in progress.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ */\n+ @Deprecated\n+ @Preview(Previews.FLASH)\n+ IN_PROGRESS,\n+\n+ /**\n+ * The state of the deployment currently reflects it's queued up for processing.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ */\n+ @Deprecated\n+ @Preview(Previews.FLASH)\n+ QUEUED,\n+\n+ /**\n+ * The state of the deployment currently reflects it's no longer active.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ INACTIVE\n }"
},
{
"sha": "de423a8e33008a103f358e7852a7efa46a32f67d",
"filename": "src/main/java/org/kohsuke/github/GHDeploymentStatus.java",
"status": "modified",
"additions": 34,
"deletions": 0,
"changes": 34,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentStatus.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentStatus.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/GHDeploymentStatus.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -13,14 +13,17 @@\n protected String state;\n protected String description;\n protected String target_url;\n+ protected String log_url;\n protected String deployment_url;\n protected String repository_url;\n+ protected String environment_url;\n \n /**\n * Wrap gh deployment status.\n *\n * @param owner\n * the owner\n+ *\n * @return the gh deployment status\n */\n public GHDeploymentStatus wrap(GHRepository owner) {\n@@ -34,12 +37,30 @@ public GHDeploymentStatus wrap(GHRepository owner) {\n /**\n * Gets target url.\n *\n+ * @deprecated Target url is deprecated in favor of {@link #getLogUrl() getLogUrl}\n+ *\n * @return the target url\n */\n+ @Deprecated\n public URL getTargetUrl() {\n return GitHubClient.parseURL(target_url);\n }\n \n+ /**\n+ * Gets target url.\n+ * <p>\n+ * This method replaces {@link #getTargetUrl() getTargetUrl}}.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @return the target url\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public URL getLogUrl() {\n+ return GitHubClient.parseURL(log_url);\n+ }\n+\n /**\n * Gets deployment url.\n *\n@@ -49,6 +70,19 @@ public URL getDeploymentUrl() {\n return GitHubClient.parseURL(deployment_url);\n }\n \n+ /**\n+ * Gets deployment environment url.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @return the deployment environment url\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public URL getEnvironmentUrl() {\n+ return GitHubClient.parseURL(environment_url);\n+ }\n+\n /**\n * Gets repository url.\n *"
},
{
"sha": "9ade2c7d777c3dff4bde78a38492f3e070bb13ff",
"filename": "src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java",
"status": "modified",
"additions": 83,
"deletions": 1,
"changes": 84,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -21,6 +21,7 @@\n * the deployment id\n * @param state\n * the state\n+ *\n * @deprecated Use {@link GHDeployment#createStatus(GHDeploymentState)}\n */\n @Deprecated\n@@ -31,29 +32,109 @@ public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeployme\n GHDeploymentStatusBuilder(GHRepository repo, long deploymentId, GHDeploymentState state) {\n this.repo = repo;\n this.deploymentId = deploymentId;\n- this.builder = repo.root.createRequest().method(\"POST\");\n+ this.builder = repo.root.createRequest()\n+ .withPreview(Previews.ANT_MAN)\n+ .withPreview(Previews.FLASH)\n+ .method(\"POST\");\n+\n this.builder.with(\"state\", state);\n }\n \n+ /**\n+ * Add an inactive status to all prior non-transient, non-production environment deployments with the same\n+ * repository and environment name as the created status's deployment.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @param autoInactive\n+ * Add inactive status flag\n+ *\n+ * @return the gh deployment status builder\n+ */\n+ @Deprecated\n+ @Preview({ Previews.ANT_MAN, Previews.FLASH })\n+ public GHDeploymentStatusBuilder autoInactive(boolean autoInactive) {\n+ this.builder.with(\"auto_inactive\", autoInactive);\n+ return this;\n+ }\n+\n /**\n * Description gh deployment status builder.\n *\n * @param description\n * the description\n+ *\n * @return the gh deployment status builder\n */\n public GHDeploymentStatusBuilder description(String description) {\n this.builder.with(\"description\", description);\n return this;\n }\n \n+ /**\n+ * Name for the target deployment environment, which can be changed when setting a deploy status.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @param environment\n+ * the environment name\n+ *\n+ * @return the gh deployment status builder\n+ */\n+ @Deprecated\n+ @Preview(Previews.FLASH)\n+ public GHDeploymentStatusBuilder environment(String environment) {\n+ this.builder.with(\"environment\", environment);\n+ return this;\n+ }\n+\n+ /**\n+ * The URL for accessing the environment\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @param environmentUrl\n+ * the environment url\n+ *\n+ * @return the gh deployment status builder\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) {\n+ this.builder.with(\"environment_url\", environmentUrl);\n+ return this;\n+ }\n+\n+ /**\n+ * The full URL of the deployment's output.\n+ * <p>\n+ * This method replaces {@link #targetUrl(String) targetUrl}.\n+ *\n+ * @deprecated until preview feature has graduated to stable\n+ *\n+ * @param logUrl\n+ * the deployment output url\n+ *\n+ * @return the gh deployment status builder\n+ */\n+ @Deprecated\n+ @Preview(Previews.ANT_MAN)\n+ public GHDeploymentStatusBuilder logUrl(String logUrl) {\n+ this.builder.with(\"log_url\", logUrl);\n+ return this;\n+ }\n+\n /**\n * Target url gh deployment status builder.\n *\n+ * @deprecated Target url is deprecated in favor of {@link #logUrl(String) logUrl}\n+ *\n * @param targetUrl\n * the target url\n+ *\n * @return the gh deployment status builder\n */\n+ @Deprecated\n public GHDeploymentStatusBuilder targetUrl(String targetUrl) {\n this.builder.with(\"target_url\", targetUrl);\n return this;\n@@ -63,6 +144,7 @@ public GHDeploymentStatusBuilder targetUrl(String targetUrl) {\n * Create gh deployment status.\n *\n * @return the gh deployment status\n+ *\n * @throws IOException\n * the io exception\n */"
},
{
"sha": "c472b4669f6f8026b856a6d3f8ff9b15d3374f28",
"filename": "src/main/java/org/kohsuke/github/GHRepository.java",
"status": "modified",
"additions": 4,
"deletions": 0,
"changes": 4,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHRepository.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/GHRepository.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/GHRepository.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -163,6 +163,8 @@ public GHDeploymentBuilder createDeployment(String ref) {\n .with(\"task\", task)\n .with(\"environment\", environment)\n .withUrlPath(getApiTailUrl(\"deployments\"))\n+ .withPreview(ANT_MAN)\n+ .withPreview(FLASH)\n .toIterable(GHDeployment[].class, item -> item.wrap(this));\n }\n \n@@ -178,6 +180,8 @@ public GHDeploymentBuilder createDeployment(String ref) {\n public GHDeployment getDeployment(long id) throws IOException {\n return root.createRequest()\n .withUrlPath(getApiTailUrl(\"deployments/\" + id))\n+ .withPreview(ANT_MAN)\n+ .withPreview(FLASH)\n .fetch(GHDeployment.class)\n .wrap(this);\n }"
},
{
"sha": "4d3ccd50383fe6cd9f498a0158259e773485bcd1",
"filename": "src/main/java/org/kohsuke/github/Preview.java",
"status": "modified",
"additions": 13,
"deletions": 1,
"changes": 14,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/Preview.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/Preview.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/Preview.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -8,11 +8,23 @@\n * Indicates that the method/class/etc marked maps to GitHub API in the preview period.\n * <p>\n * These APIs are subject to change and not a part of the backward compatibility commitment. Always used in conjunction\n- * with 'deprecated' to raise awareness to clients.\n+ * with 'deprecated' to raise awareness to clients. In addition, it's advised to update the targets documentation to\n+ * signify that the deprecation is required until preview feature being used is promoted to stable.\n *\n * @author Kohsuke Kawaguchi\n */\n @Retention(RetentionPolicy.RUNTIME)\n @Documented\n public @interface Preview {\n+\n+ /**\n+ * An optional field defining what API media types must be set inorder to support the usage of this annotations\n+ * target.\n+ * <p>\n+ * This value should be set using the existing constants defined in {@link Previews}\n+ *\n+ * @return The API preview media type.\n+ */\n+ public String[] value() default {};\n+\n }"
},
{
"sha": "3be4ee57b2eb368eef90223d030b8be9c55add2b",
"filename": "src/main/java/org/kohsuke/github/Previews.java",
"status": "modified",
"additions": 14,
"deletions": 0,
"changes": 14,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/Previews.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/main/java/org/kohsuke/github/Previews.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/main/java/org/kohsuke/github/Previews.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -15,6 +15,13 @@\n */\n static final String ANTIOPE = \"application/vnd.github.antiope-preview+json\";\n \n+ /**\n+ * Enhanced Deployments\n+ *\n+ * @see <a href=\"https://developer.github.com/v3/previews/#enhanced-deployments\">GitHub API Previews</a>\n+ */\n+ static final String ANT_MAN = \"application/vnd.github.ant-man-preview+json\";\n+\n /**\n * Create repository from template repository\n *\n@@ -30,6 +37,13 @@\n */\n static final String CLOAK = \"application/vnd.github.cloak-preview+json\";\n \n+ /**\n+ * New deployment statuses and support for updating deployment status environment\n+ *\n+ * @see <a href=\"https://developer.github.com/v3/previews/#deployment-statuses\">GitHub API Previews</a>\n+ */\n+ static final String FLASH = \"application/vnd.github.flash-preview+json\";\n+\n /**\n * Owners of GitHub Apps can now uninstall an app using the Apps API\n *"
},
{
"sha": "1e499309df90d32b5d3a44ab016a18851f05bc45",
"filename": "src/test/java/org/kohsuke/github/AppTest.java",
"status": "modified",
"additions": 14,
"deletions": 2,
"changes": 16,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/java/org/kohsuke/github/AppTest.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/java/org/kohsuke/github/AppTest.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/java/org/kohsuke/github/AppTest.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -180,6 +180,9 @@ public void testCreateAndListDeployments() throws IOException {\n assertFalse(Iterables.isEmpty(deployments));\n GHDeployment unitTestDeployment = deployments.get(0);\n assertEquals(\"unittest\", unitTestDeployment.getEnvironment());\n+ assertEquals(\"unittest\", unitTestDeployment.getOriginalEnvironment());\n+ assertEquals(false, unitTestDeployment.isProductionEnvironment());\n+ assertEquals(true, unitTestDeployment.isTransientEnvironment());\n assertEquals(\"master\", unitTestDeployment.getRef());\n }\n \n@@ -191,14 +194,23 @@ public void testGetDeploymentStatuses() throws IOException {\n .description(\"question\")\n .payload(\"{\\\"user\\\":\\\"atmos\\\",\\\"room_id\\\":123456}\")\n .create();\n- GHDeploymentStatus ghDeploymentStatus = deployment.createStatus(GHDeploymentState.SUCCESS)\n+ GHDeploymentStatus ghDeploymentStatus = deployment.createStatus(GHDeploymentState.QUEUED)\n .description(\"success\")\n .targetUrl(\"http://www.github.com\")\n+ .logUrl(\"http://www.github.com/logurl\")\n+ .environmentUrl(\"http://www.github.com/envurl\")\n+ .environment(\"new-ci-env\")\n .create();\n Iterable<GHDeploymentStatus> deploymentStatuses = deployment.listStatuses();\n assertNotNull(deploymentStatuses);\n assertEquals(1, Iterables.size(deploymentStatuses));\n- assertEquals(ghDeploymentStatus.getId(), Iterables.get(deploymentStatuses, 0).getId());\n+ GHDeploymentStatus actualStatus = Iterables.get(deploymentStatuses, 0);\n+ assertEquals(ghDeploymentStatus.getId(), actualStatus.getId());\n+ assertEquals(ghDeploymentStatus.getState(), actualStatus.getState());\n+ assertEquals(ghDeploymentStatus.getLogUrl(), actualStatus.getLogUrl());\n+ // Target url was deprecated and replaced with log url. The gh api will\n+ // prefer the log url value and return it in place of target url.\n+ assertEquals(ghDeploymentStatus.getTargetUrl(), actualStatus.getLogUrl());\n }\n \n @Test"
},
{
"sha": "4fa7cac71a79d0189ee1b2acc62f4cf630a8eeb1",
"filename": "src/test/java/org/kohsuke/github/GHDeploymentTest.java",
"status": "modified",
"additions": 6,
"deletions": 0,
"changes": 6,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/java/org/kohsuke/github/GHDeploymentTest.java",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/java/org/kohsuke/github/GHDeploymentTest.java",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/java/org/kohsuke/github/GHDeploymentTest.java?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -23,6 +23,9 @@ public void testGetDeploymentByIdStringPayload() throws IOException {\n assertEquals(\"master\", deployment.getRef());\n assertEquals(\"3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353\", deployment.getSha());\n assertEquals(\"deploy\", deployment.getTask());\n+ assertEquals(\"production\", deployment.getOriginalEnvironment());\n+ assertEquals(false, deployment.isProductionEnvironment());\n+ assertEquals(true, deployment.isTransientEnvironment());\n }\n \n @Test\n@@ -41,6 +44,9 @@ public void testGetDeploymentByIdObjectPayload() throws IOException {\n assertEquals(\"two\", payload.get(\"custom2\"));\n assertEquals(Arrays.asList(\"3\", 3, \"three\"), payload.get(\"custom3\"));\n assertNull(payload.get(\"custom4\"));\n+ assertEquals(\"production\", deployment.getOriginalEnvironment());\n+ assertEquals(false, deployment.isProductionEnvironment());\n+ assertEquals(true, deployment.isTransientEnvironment());\n }\n \n protected GHRepository getRepository() throws IOException {"
},
{
"sha": "d656c99eaeba5315070e23507dcd899e3d9731ff",
"filename": "src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-3.json",
"status": "modified",
"additions": 3,
"deletions": 1,
"changes": 4,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-3.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-3.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-3.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -32,5 +32,7 @@\n \"created_at\": \"2019-10-03T18:57:57Z\",\n \"updated_at\": \"2019-10-03T18:57:57Z\",\n \"statuses_url\": \"http://localhost:62379/repos/hub4j-test-org/github-api-test/deployments/173089055/statuses\",\n- \"repository_url\": \"http://localhost:62379/repos/hub4j-test-org/github-api-test\"\n+ \"repository_url\": \"http://localhost:62379/repos/hub4j-test-org/github-api-test\",\n+ \"transient_environment\": true,\n+ \"production_environment\": false\n }\n\\ No newline at end of file"
},
{
"sha": "91f8bbbe2e8790b634dce811a2fe54d29d9fa517",
"filename": "src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-4.json",
"status": "modified",
"additions": 3,
"deletions": 1,
"changes": 4,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-4.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-4.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/__files/repos_hub4j-test-org_github-api-test_deployments-4.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -33,6 +33,8 @@\n \"created_at\": \"2019-10-03T18:57:57Z\",\n \"updated_at\": \"2019-10-03T18:57:57Z\",\n \"statuses_url\": \"https://api.github.com/repos/hub4j-test-org/github-api-test/deployments/173089055/statuses\",\n- \"repository_url\": \"https://api.github.com/repos/hub4j-test-org/github-api-test\"\n+ \"repository_url\": \"https://api.github.com/repos/hub4j-test-org/github-api-test\",\n+ \"transient_environment\": true,\n+ \"production_environment\": false\n }\n ]\n\\ No newline at end of file"
},
{
"sha": "4724728b2b654fbb82648c4ec11a14d4d86e731e",
"filename": "src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-3.json",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-3.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-3.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-3.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -13,7 +13,7 @@\n ],\n \"headers\": {\n \"Accept\": {\n- \"equalTo\": \"text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\"\n+ \"equalTo\": \"application/vnd.github.ant-man-preview+json, application/vnd.github.flash-preview+json\"\n }\n }\n },"
},
{
"sha": "71d47185b00942459c266943a660927a80ea85cc",
"filename": "src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-4.json",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-4.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-4.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/AppTest/wiremock/testCreateAndListDeployments/mappings/repos_hub4j-test-org_github-api-test_deployments-4.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -6,7 +6,7 @@\n \"method\": \"GET\",\n \"headers\": {\n \"Accept\": {\n- \"equalTo\": \"text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\"\n+ \"equalTo\": \"application/vnd.github.ant-man-preview+json, application/vnd.github.flash-preview+json\"\n }\n }\n },"
},
{
"sha": "ea8585e620f0c57b69b73eca5ce75b564e554847",
"filename": "src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"status": "modified",
"additions": 3,
"deletions": 1,
"changes": 4,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -37,5 +37,7 @@\n \"created_at\": \"2019-10-30T00:03:34Z\",\n \"updated_at\": \"2019-10-30T00:03:34Z\",\n \"statuses_url\": \"https://api.github.com/repos/hub4j-test-org/github-api/deployments/178653229/statuses\",\n- \"repository_url\": \"https://api.github.com/repos/hub4j-test-org/github-api\"\n+ \"repository_url\": \"https://api.github.com/repos/hub4j-test-org/github-api\",\n+ \"transient_environment\": true,\n+ \"production_environment\": false\n }\n\\ No newline at end of file"
},
{
"sha": "4e539265575598d79dcc43a7bcbb33ebf4d9d86f",
"filename": "src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdObjectPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -6,7 +6,7 @@\n \"method\": \"GET\",\n \"headers\": {\n \"Accept\": {\n- \"equalTo\": \"text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\"\n+ \"equalTo\": \"application/vnd.github.ant-man-preview+json, application/vnd.github.flash-preview+json\"\n }\n }\n },"
},
{
"sha": "dede6d12e09b3ab4035513b8257a4a36debe4590",
"filename": "src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"status": "modified",
"additions": 3,
"deletions": 1,
"changes": 4,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/__files/repos_hub4j-test-org_github-api_deployments_178653229-3.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -32,5 +32,7 @@\n \"created_at\": \"2019-10-30T00:03:34Z\",\n \"updated_at\": \"2019-10-30T00:03:34Z\",\n \"statuses_url\": \"https://api.github.com/repos/hub4j-test-org/github-api/deployments/178653229/statuses\",\n- \"repository_url\": \"https://api.github.com/repos/hub4j-test-org/github-api\"\n+ \"repository_url\": \"https://api.github.com/repos/hub4j-test-org/github-api\",\n+ \"transient_environment\": true,\n+ \"production_environment\": false\n }\n\\ No newline at end of file"
},
{
"sha": "4e539265575598d79dcc43a7bcbb33ebf4d9d86f",
"filename": "src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/hub4j/github-api/blob/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"raw_url": "https://github.com/hub4j/github-api/raw/ed4f9c8176866977677c99ac9668a8ce10231bc8/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json",
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/src/test/resources/org/kohsuke/github/GHDeploymentTest/wiremock/testGetDeploymentByIdStringPayload/mappings/repos_hub4j-test-org_github-api_deployments_178653229-3.json?ref=ed4f9c8176866977677c99ac9668a8ce10231bc8",
"patch": "@@ -6,7 +6,7 @@\n \"method\": \"GET\",\n \"headers\": {\n \"Accept\": {\n- \"equalTo\": \"text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\"\n+ \"equalTo\": \"application/vnd.github.ant-man-preview+json, application/vnd.github.flash-preview+json\"\n }\n }\n },"
}
]
}

View File

@@ -1,34 +1,46 @@
{
"login": "lower-case",
"id": 8265616,
"node_id": "MDQ6VXNlcjgyNjU2MTY=",
"avatar_url": "https://avatars2.githubusercontent.com/u/8265616?v=4",
"login": "bitwiseman",
"id": 1958953,
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lower-case",
"html_url": "https://github.com/lower-case",
"followers_url": "https://api.github.com/users/lower-case/followers",
"following_url": "https://api.github.com/users/lower-case/following{/other_user}",
"gists_url": "https://api.github.com/users/lower-case/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lower-case/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lower-case/subscriptions",
"organizations_url": "https://api.github.com/users/lower-case/orgs",
"repos_url": "https://api.github.com/users/lower-case/repos",
"events_url": "https://api.github.com/users/lower-case/events{/privacy}",
"received_events_url": "https://api.github.com/users/lower-case/received_events",
"url": "https://api.github.com/users/bitwiseman",
"html_url": "https://github.com/bitwiseman",
"followers_url": "https://api.github.com/users/bitwiseman/followers",
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
"repos_url": "https://api.github.com/users/bitwiseman/repos",
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
"type": "User",
"site_admin": false,
"name": "Lovekesh Garg",
"company": "IIT Kharagpur",
"name": "Liam Newman",
"company": "Cloudbees, Inc.",
"blog": "",
"location": "Gurgaon, India",
"email": null,
"hireable": true,
"bio": "404 NOT FOUND",
"twitter_username": null,
"public_repos": 3,
"public_gists": 0,
"followers": 14,
"following": 19,
"created_at": "2014-07-25T08:33:03Z",
"updated_at": "2020-11-28T06:12:48Z"
"location": "Seattle, WA, USA",
"email": "bitwiseman@gmail.com",
"hireable": null,
"bio": null,
"twitter_username": "bitwiseman",
"public_repos": 199,
"public_gists": 7,
"followers": 174,
"following": 11,
"created_at": "2012-07-11T20:38:33Z",
"updated_at": "2020-12-23T22:23:08Z",
"private_gists": 19,
"total_private_repos": 17,
"owned_private_repos": 0,
"disk_usage": 33700,
"collaborators": 0,
"two_factor_authentication": true,
"plan": {
"name": "free",
"space": 976562499,
"collaborators": 0,
"private_repos": 10000
}
}

View File

@@ -1,5 +1,5 @@
{
"id": "50636dee-5323-45da-991b-65655816c2ab",
"id": "87ba83b3-361d-4fbe-a4c0-1a92c73911e0",
"name": "repos_hub4j_github-api",
"request": {
"url": "/repos/hub4j/github-api",
@@ -14,7 +14,7 @@
"status": 200,
"bodyFileName": "repos_hub4j_github-api-2.json",
"headers": {
"Date": "Sat, 28 Nov 2020 06:55:47 GMT",
"Date": "Tue, 29 Dec 2020 04:17:02 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
@@ -24,25 +24,25 @@
"Accept-Encoding, Accept, X-Requested-With",
"Accept-Encoding"
],
"ETag": "W/\"7a660bdf9608771ebc092a07a9d0e098af6bf6d670cde3147fb3dc6f4a46e65f\"",
"Last-Modified": "Sat, 28 Nov 2020 05:59:13 GMT",
"X-OAuth-Scopes": "repo, workflow",
"ETag": "W/\"6fc2ccdf4af0f89cf88fddff7099dd479f7a15b5551d5ced73e3e4e0384b24c6\"",
"Last-Modified": "Tue, 29 Dec 2020 03:54:49 GMT",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "unknown, github.v3",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4957",
"X-RateLimit-Reset": "1606547736",
"X-RateLimit-Used": "43",
"X-RateLimit-Remaining": "4966",
"X-RateLimit-Reset": "1609216145",
"X-RateLimit-Used": "34",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "CD16:2B8B:308B5B:3E3446:5FC1F473"
"X-GitHub-Request-Id": "DEAA:85CA:20A7397:284A8E0:5FEAADBD"
}
},
"uuid": "50636dee-5323-45da-991b-65655816c2ab",
"uuid": "87ba83b3-361d-4fbe-a4c0-1a92c73911e0",
"persistent": true,
"insertionIndex": 2
}

View File

@@ -1,8 +1,8 @@
{
"id": "58ab9e92-a0cc-465f-9c04-61b15729cd30",
"name": "repos_hub4j_github-api_commits_ed4f9c8176866977677c99ac9668a8ce10231bc8",
"id": "5c1536ce-299a-40b4-ad5a-a21777294471",
"name": "repos_hub4j_github-api_commits_865a49d2e86c24c5777985f0f103e975c4b765b9",
"request": {
"url": "/repos/hub4j/github-api/commits/ed4f9c8176866977677c99ac9668a8ce10231bc8",
"url": "/repos/hub4j/github-api/commits/865a49d2e86c24c5777985f0f103e975c4b765b9",
"method": "GET",
"headers": {
"Accept": {
@@ -12,9 +12,9 @@
},
"response": {
"status": 200,
"bodyFileName": "repos_hub4j_github-api_commits_ed4f9c8176866977677c99ac9668a8ce10231bc8-4.json",
"bodyFileName": "repos_hub4j_github-api_commits_865a49d2e86c24c5777985f0f103e975c4b765b9-3.json",
"headers": {
"Date": "Sat, 28 Nov 2020 06:57:53 GMT",
"Date": "Tue, 29 Dec 2020 04:17:02 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
@@ -24,25 +24,25 @@
"Accept-Encoding, Accept, X-Requested-With",
"Accept-Encoding"
],
"ETag": "W/\"4fbc6c7518df46925561f8fa37edf044e9482be4b916416e82991493110d6001\"",
"Last-Modified": "Wed, 25 Nov 2020 14:37:36 GMT",
"X-OAuth-Scopes": "repo, workflow",
"ETag": "W/\"329c39539737a3ce25b0c6fece22145a13b9b0d69604f0fe77d71f562a9130ab\"",
"Last-Modified": "Tue, 29 Dec 2020 02:07:32 GMT",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
"X-Accepted-OAuth-Scopes": "",
"X-GitHub-Media-Type": "unknown, github.v3",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4943",
"X-RateLimit-Reset": "1606547736",
"X-RateLimit-Used": "57",
"X-RateLimit-Remaining": "4965",
"X-RateLimit-Reset": "1609216145",
"X-RateLimit-Used": "35",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "CF73:2B8A:A8D9A:E0943:5FC1F4F1"
"X-GitHub-Request-Id": "DEAA:85CA:20A73A6:284A912:5FEAADBE"
}
},
"uuid": "58ab9e92-a0cc-465f-9c04-61b15729cd30",
"uuid": "5c1536ce-299a-40b4-ad5a-a21777294471",
"persistent": true,
"insertionIndex": 4
"insertionIndex": 3
}

View File

@@ -1,41 +0,0 @@
{
"id": "a381d6e5-9111-443d-8caa-ee9a3f6dc440",
"name": "repos_hub4j_github-api_commits_86a2e245aa6d71d54923655066049d9e21a15f01",
"request": {
"url": "/repos/hub4j/github-api/commits/86a2e245aa6d71d54923655066049d9e21a15f01",
"method": "GET",
"headers": {
"Accept": {
"equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
}
}
},
"response": {
"status": 422,
"body": "{\"message\":\"No commit found for SHA: 86a2e245aa6d71d54923655066049d9e21a15f01\",\"documentation_url\":\"https://docs.github.com/rest/reference/repos#get-a-commit\"}",
"headers": {
"Date": "Sat, 28 Nov 2020 06:55:48 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "422 Unprocessable Entity",
"X-OAuth-Scopes": "repo, workflow",
"X-Accepted-OAuth-Scopes": "",
"X-GitHub-Media-Type": "unknown, github.v3",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4956",
"X-RateLimit-Reset": "1606547736",
"X-RateLimit-Used": "44",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"Vary": "Accept-Encoding, Accept, X-Requested-With",
"X-GitHub-Request-Id": "CD16:2B8B:308B68:3E345B:5FC1F473"
}
},
"uuid": "a381d6e5-9111-443d-8caa-ee9a3f6dc440",
"persistent": true,
"insertionIndex": 3
}

View File

@@ -1,5 +1,5 @@
{
"id": "7aac800a-e6b0-46b9-9e6a-17bb85b6b030",
"id": "2d8f404b-6b92-43f5-9edd-a0ecc00dc866",
"name": "user",
"request": {
"url": "/user",
@@ -14,7 +14,7 @@
"status": 200,
"bodyFileName": "user-1.json",
"headers": {
"Date": "Sat, 28 Nov 2020 06:55:47 GMT",
"Date": "Tue, 29 Dec 2020 04:17:01 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
@@ -24,25 +24,25 @@
"Accept-Encoding, Accept, X-Requested-With",
"Accept-Encoding"
],
"ETag": "W/\"14aa5672b664d3be9ebec04b4fece56643332a058e940bb5676847bb385a2b10\"",
"Last-Modified": "Sat, 28 Nov 2020 06:12:48 GMT",
"X-OAuth-Scopes": "repo, workflow",
"ETag": "W/\"bb2babcbd8a6f75f8e5bbf778f169fdb662bf030c0f4a81ed94fde38b7c93347\"",
"Last-Modified": "Wed, 23 Dec 2020 22:23:08 GMT",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow, write:discussion",
"X-Accepted-OAuth-Scopes": "",
"X-GitHub-Media-Type": "unknown, github.v3",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4959",
"X-RateLimit-Reset": "1606547736",
"X-RateLimit-Used": "41",
"X-RateLimit-Remaining": "4968",
"X-RateLimit-Reset": "1609216145",
"X-RateLimit-Used": "32",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "CD16:2B8B:308B51:3E3441:5FC1F472"
"X-GitHub-Request-Id": "DEAA:85CA:20A736D:284A8D5:5FEAADBD"
}
},
"uuid": "7aac800a-e6b0-46b9-9e6a-17bb85b6b030",
"uuid": "2d8f404b-6b92-43f5-9edd-a0ecc00dc866",
"persistent": true,
"insertionIndex": 1
}