Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Jul 20, 2017
1 parent c3c02ef commit 40eb716
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 7 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generic Webhook Plugin Changelog
Changelog of Generic Webhook Plugin.
## Unreleased
## 1.14 (2017-07-17 16:06:52)
### GitHub [#10](https://github.com/jenkinsci/generic-webhook-trigger-plugin/issues/10) replace "-" characters on header variable names

**#10: replace "-" characters on header variable names**
Expand All @@ -24,6 +24,12 @@ Changelog of Generic Webhook Plugin.

### No issue

**Avoiding NPE after upgrade**

* As a result of headers and request parameters not being read from existing config.

[ad2317275276a5b](https://github.com/jenkinsci/generic-webhook-trigger-plugin/commit/ad2317275276a5b) Tomas Bjerre *2017-07-17 16:02:38*

**small typo: flatternJson -> flattenJson**


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void testJSONPathGetSeveralMixedListItems() throws Exception {

@Test
public void testJSONPathGetAllVariable() throws Exception {
String resourceName = "gital-mergerequest-comment.json";
String resourceName = "gitlab-mergerequest-comment.json";
String postContent = getContent(resourceName);

String regexpFilter = "";
Expand Down Expand Up @@ -163,7 +163,7 @@ public void testGenericRequestParameters() throws Exception {

@Test
public void testJSONPathGetZeroMatchingVariables() throws Exception {
String resourceName = "gital-mergerequest-comment.json";
String resourceName = "gitlab-mergerequest-comment.json";
String postContent = getContent(resourceName);

String regexpFilter = "";
Expand All @@ -188,7 +188,7 @@ public void testJSONPathGetZeroMatchingVariables() throws Exception {

@Test
public void testJSONPathGetOneVariable() throws Exception {
String resourceName = "gital-mergerequest-comment.json";
String resourceName = "gitlab-mergerequest-comment.json";
String postContent = getContent(resourceName);

String regexpFilter = "";
Expand All @@ -213,7 +213,7 @@ public void testJSONPathGetOneVariable() throws Exception {

@Test
public void testJSONPathGetTwoVariables() throws Exception {
String resourceName = "gital-mergerequest-comment.json";
String resourceName = "gitlab-mergerequest-comment.json";
String postContent = getContent(resourceName);

String regexpFilter = "";
Expand All @@ -240,7 +240,7 @@ public void testJSONPathGetTwoVariables() throws Exception {

@Test
public void testJSONPathGetNodeVariable() throws Exception {
String resourceName = "gital-mergerequest-comment.json";
String resourceName = "gitlab-mergerequest-comment.json";
Map<String, String> variables = getJsonPathVariables(resourceName, "$.user");

assertThat(variables) //
Expand All @@ -249,7 +249,7 @@ public void testJSONPathGetNodeVariable() throws Exception {

@Test
public void testJSONPathGetPayloadVariable() throws Exception {
String resourceName = "gital-mergerequest-comment.json";
String resourceName = "gitlab-mergerequest-comment.json";
String postContent = getContent(resourceName);

String regexpFilter = "";
Expand Down
113 changes: 113 additions & 0 deletions src/test/resources/gitlab-mergerequest-push.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"object_kind":"merge_request",
"user":{
"name":"Administrator",
"username":"root",
"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon"
},
"project":{
"name":"violations-test",
"description":"",
"web_url":"http://846c453ea620/root/violations-test",
"avatar_url":null,
"git_ssh_url":"git@846c453ea620:root/violations-test.git",
"git_http_url":"http://846c453ea620/root/violations-test.git",
"namespace":"root",
"visibility_level":20,
"path_with_namespace":"root/violations-test",
"default_branch":"master",
"homepage":"http://846c453ea620/root/violations-test",
"url":"git@846c453ea620:root/violations-test.git",
"ssh_url":"git@846c453ea620:root/violations-test.git",
"http_url":"http://846c453ea620/root/violations-test.git"
},
"object_attributes":{
"id":1,
"target_branch":"master",
"source_branch":"feature/addingcrap",
"source_project_id":1,
"author_id":1,
"assignee_id":null,
"title":"some crap 2",
"created_at":"2017-07-15 07:31:01 UTC",
"updated_at":"2017-07-20 18:49:48 UTC",
"milestone_id":null,
"state":"opened",
"merge_status":"unchecked",
"target_project_id":1,
"iid":1,
"description":"",
"position":0,
"locked_at":null,
"updated_by_id":1,
"merge_error":null,
"merge_params":{
"force_remove_source_branch":"0"
},
"merge_when_pipeline_succeeds":false,
"merge_user_id":null,
"merge_commit_sha":null,
"deleted_at":null,
"in_progress_merge_commit_sha":null,
"lock_version":1,
"time_estimate":0,
"source":{
"name":"violations-test",
"description":"",
"web_url":"http://846c453ea620/root/violations-test",
"avatar_url":null,
"git_ssh_url":"git@846c453ea620:root/violations-test.git",
"git_http_url":"http://846c453ea620/root/violations-test.git",
"namespace":"root",
"visibility_level":20,
"path_with_namespace":"root/violations-test",
"default_branch":"master",
"homepage":"http://846c453ea620/root/violations-test",
"url":"git@846c453ea620:root/violations-test.git",
"ssh_url":"git@846c453ea620:root/violations-test.git",
"http_url":"http://846c453ea620/root/violations-test.git"
},
"target":{
"name":"violations-test",
"description":"",
"web_url":"http://846c453ea620/root/violations-test",
"avatar_url":null,
"git_ssh_url":"git@846c453ea620:root/violations-test.git",
"git_http_url":"http://846c453ea620/root/violations-test.git",
"namespace":"root",
"visibility_level":20,
"path_with_namespace":"root/violations-test",
"default_branch":"master",
"homepage":"http://846c453ea620/root/violations-test",
"url":"git@846c453ea620:root/violations-test.git",
"ssh_url":"git@846c453ea620:root/violations-test.git",
"http_url":"http://846c453ea620/root/violations-test.git"
},
"last_commit":{
"id":"29c79ef42415790839584003088fa9f6032af0d4",
"message":"some crap\n",
"timestamp":"2017-07-20T20:49:38+02:00",
"url":"http://846c453ea620/root/violations-test/commit/29c79ef42415790839584003088fa9f6032af0d4",
"author":{
"name":"Tomas Bjerre",
"email":"tomas.bjerre85@gmail.com"
}
},
"work_in_progress":false,
"total_time_spent":0,
"human_total_time_spent":null,
"human_time_estimate":null,
"url":"http://846c453ea620/root/violations-test/merge_requests/1",
"action":"update",
"oldrev":"7e23c9a980197fe49fae67fb23687c857ff42f86"
},
"labels":[

],
"repository":{
"name":"violations-test",
"url":"git@846c453ea620:root/violations-test.git",
"description":"",
"homepage":"http://846c453ea620/root/violations-test"
}
}

0 comments on commit 40eb716

Please sign in to comment.