Merge branch 'master' into dependabot/maven/com.fasterxml.jackson.core-jackson-databind-2.12.1

This commit is contained in:
Liam Newman
2021-02-25 02:04:36 -08:00
committed by GitHub
11 changed files with 27 additions and 23 deletions

View File

@@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs-maven-plugin.version>4.1.4</spotbugs-maven-plugin.version>
<spotbugs-maven-plugin.version>4.2.0</spotbugs-maven-plugin.version>
<spotbugs.version>4.1.3</spotbugs.version>
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
<hamcrest.version>2.2</hamcrest.version>
@@ -325,7 +325,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.6.1</version>
<version>2.7.0</version>
<executions>
<execution>
<id>spotless-check</id>
@@ -390,7 +390,7 @@
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>0.15.0</version>
<version>0.16.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -520,7 +520,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.6.28</version>
<version>3.7.7</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@@ -152,7 +152,7 @@ public final class GHCheckRunBuilder {
}
GHCheckRun run = requester.with("output", output).with("actions", actions).fetch(GHCheckRun.class).wrap(repo);
while (!extraAnnotations.isEmpty()) {
Output output2 = new Output(output.title, output.summary);
Output output2 = new Output(output.title, output.summary).withText(output.text);
int i = Math.min(extraAnnotations.size(), MAX_ANNOTATIONS);
output2.annotations = extraAnnotations.subList(0, i);
extraAnnotations = extraAnnotations.subList(i, extraAnnotations.size());

View File

@@ -49,7 +49,7 @@ public class GHCheckRunBuilderTest extends AbstractGHAppInstallationTest {
.withExternalID("whatever")
.withStartedAt(new Date(999_999_000))
.withCompletedAt(new Date(999_999_999))
.add(new GHCheckRunBuilder.Output("Some Title", "what happened…")
.add(new GHCheckRunBuilder.Output("Some Title", "what happened…").withText("Hello Text!")
.add(new GHCheckRunBuilder.Annotation("stuff.txt",
1,
GHCheckRun.AnnotationLevel.NOTICE,
@@ -62,11 +62,14 @@ public class GHCheckRunBuilderTest extends AbstractGHAppInstallationTest {
assertEquals("completed", checkRun.getStatus());
assertEquals(1, checkRun.getOutput().getAnnotationsCount());
assertEquals(1424883286, checkRun.getId());
assertEquals("Hello Text!", checkRun.getOutput().getText());
}
@Test
public void createCheckRunManyAnnotations() throws Exception {
GHCheckRunBuilder.Output output = new GHCheckRunBuilder.Output("Big Run", "Lots of stuff here »");
GHCheckRunBuilder.Output output = new GHCheckRunBuilder.Output("Big Run", "Lots of stuff here »")
.withText("Hello Text!");
for (int i = 0; i < 101; i++) {
output.add(
new GHCheckRunBuilder.Annotation("stuff.txt", 1, GHCheckRun.AnnotationLevel.NOTICE, "hello #" + i));
@@ -80,6 +83,7 @@ public class GHCheckRunBuilderTest extends AbstractGHAppInstallationTest {
assertEquals("Big Run", checkRun.getOutput().getTitle());
assertEquals("Lots of stuff here »", checkRun.getOutput().getSummary());
assertEquals(101, checkRun.getOutput().getAnnotationsCount());
assertEquals("Hello Text!", checkRun.getOutput().getText());
assertEquals(1424883599, checkRun.getId());
}

View File

@@ -13,7 +13,7 @@
"output": {
"title": "Some Title",
"summary": "what happened…",
"text": null,
"text": "Hello Text!",
"annotations_count": 1,
"annotations_url": "https://api.github.com/repos/hub4j-test-org/test-checks/check-runs/1424883286/annotations"
},
@@ -58,4 +58,4 @@
"events": []
},
"pull_requests": []
}
}

View File

@@ -11,7 +11,7 @@
},
"bodyPatterns": [
{
"equalToJson": "{\"conclusion\":\"success\",\"output\":{\"title\":\"Some Title\",\"summary\":\"what happened…\",\"annotations\":[{\"path\":\"stuff.txt\",\"start_line\":1,\"end_line\":1,\"annotation_level\":\"notice\",\"message\":\"hello to you too\",\"title\":\"Look here\"}],\"images\":[{\"alt\":\"Unikitty\",\"image_url\":\"https://i.pinimg.com/474x/9e/65/c0/9e65c0972294f1e10f648c9780a79fab.jpg\",\"caption\":\"Princess Unikitty\"}]},\"completed_at\":\"1970-01-12T13:46:39Z\",\"name\":\"foo\",\"started_at\":\"1970-01-12T13:46:39Z\",\"external_id\":\"whatever\",\"details_url\":\"http://nowhere.net/stuff\",\"actions\":[{\"label\":\"Help\",\"description\":\"what I need help with\",\"identifier\":\"doit\"}],\"head_sha\":\"89a9ae301e35e667756034fdc933b1fc94f63fc1\",\"status\":\"completed\"}",
"equalToJson": "{\"conclusion\":\"success\",\"output\":{\"title\":\"Some Title\",\"summary\":\"what happened…\",\"text\":\"Hello Text!\",\"annotations\":[{\"path\":\"stuff.txt\",\"start_line\":1,\"end_line\":1,\"annotation_level\":\"notice\",\"message\":\"hello to you too\",\"title\":\"Look here\"}],\"images\":[{\"alt\":\"Unikitty\",\"image_url\":\"https://i.pinimg.com/474x/9e/65/c0/9e65c0972294f1e10f648c9780a79fab.jpg\",\"caption\":\"Princess Unikitty\"}]},\"completed_at\":\"1970-01-12T13:46:39Z\",\"name\":\"foo\",\"started_at\":\"1970-01-12T13:46:39Z\",\"external_id\":\"whatever\",\"details_url\":\"http://nowhere.net/stuff\",\"actions\":[{\"label\":\"Help\",\"description\":\"what I need help with\",\"identifier\":\"doit\"}],\"head_sha\":\"89a9ae301e35e667756034fdc933b1fc94f63fc1\",\"status\":\"completed\"}",
"ignoreArrayOrder": true,
"ignoreExtraElements": false
}
@@ -50,4 +50,4 @@
"uuid": "b1eec35d-bc33-49b6-a44b-4dcf13cc0f1b",
"persistent": true,
"insertionIndex": 5
}
}

View File

@@ -13,7 +13,7 @@
"output": {
"title": "Big Run",
"summary": "Lots of stuff here »",
"text": null,
"text": "Hello Text!",
"annotations_count": 50,
"annotations_url": "https://api.github.com/repos/hub4j-test-org/test-checks/check-runs/1424883599/annotations"
},
@@ -58,4 +58,4 @@
"events": []
},
"pull_requests": []
}
}

View File

@@ -13,7 +13,7 @@
"output": {
"title": "Big Run",
"summary": "Lots of stuff here »",
"text": null,
"text": "Hello Text!",
"annotations_count": 101,
"annotations_url": "https://api.github.com/repos/hub4j-test-org/test-checks/check-runs/1424883599/annotations"
},
@@ -58,4 +58,4 @@
"events": []
},
"pull_requests": []
}
}

View File

@@ -13,7 +13,7 @@
"output": {
"title": "Big Run",
"summary": "Lots of stuff here »",
"text": null,
"text": "Hello Text!",
"annotations_count": 100,
"annotations_url": "https://api.github.com/repos/hub4j-test-org/test-checks/check-runs/1424883599/annotations"
},
@@ -58,4 +58,4 @@
"events": []
},
"pull_requests": []
}
}

View File

@@ -11,7 +11,7 @@
},
"bodyPatterns": [
{
"equalToJson": "{\"output\":{\"title\":\"Big Run\",\"summary\":\"Lots of stuff here »\",\"annotations\":[{\"path\":\"stuff.txt\",\"start_line\":1,\"end_line\":1,\"annotation_level\":\"notice\",\"message\":\"hello #100\"}]}}",
"equalToJson": "{\"output\":{\"title\":\"Big Run\",\"summary\":\"Lots of stuff here »\",\"text\":\"Hello Text!\",\"annotations\":[{\"path\":\"stuff.txt\",\"start_line\":1,\"end_line\":1,\"annotation_level\":\"notice\",\"message\":\"hello #100\"}]}}",
"ignoreArrayOrder": true,
"ignoreExtraElements": false
}
@@ -49,4 +49,4 @@
"uuid": "b00d927c-1c6c-4f49-b568-68327ef7d436",
"persistent": true,
"insertionIndex": 7
}
}