diff --git a/src/main/java/org/kohsuke/github/GHCodeScanningAlert.java b/src/main/java/org/kohsuke/github/GHCodeScanningAlert.java
index 3918d49429..dfe39739bc 100644
--- a/src/main/java/org/kohsuke/github/GHCodeScanningAlert.java
+++ b/src/main/java/org/kohsuke/github/GHCodeScanningAlert.java
@@ -7,6 +7,9 @@
import java.net.URL;
import java.util.Date;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
/**
* Code scanning alert for a repository
*
@@ -142,74 +145,106 @@ public URL getHtmlUrl() throws IOException {
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD" }, justification = "JSON API")
static class Rule {
private String id;
- private String severity;
- private String description;
private String name;
- private String full_description;
+ private String description;
+ private String severity;
+ private String security_severity_level;
private String[] tags;
+ private String full_description;
private String help;
+ private String help_uri;
+
/**
- * Id of rule
+ * A unique identifier for the rule used to detect the alert.
*
* @return the id
*/
+ @Nullable
public String getId() {
return id;
}
/**
- * Severity of rule
+ * The name of the rule used to detect the alert.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * The severity of the alert.
*
* @return the severity
*/
+ @Nullable
public String getSeverity() {
return severity;
}
/**
- * Description of rule
+ * The security severity of the alert.
+ *
+ * @return the security severity
+ */
+ @Nullable
+ public String getSecuritySeverityLevel() {
+ return security_severity_level;
+ }
+
+ /**
+ * A short description of the rule used to detect the alert.
*
* @return the description
*/
+ @Nonnull
public String getDescription() {
return description;
}
/**
- * Name of rule
+ * A set of tags applicable for the rule.
*
- * @return the name
+ * @return the tags
*/
- public String getName() {
- return name;
+ @Nullable
+ public String[] getTags() {
+ return tags;
}
+ // The following fields only appear on some endpoints.
+ // These might be empty on endpoints like listSecurityAlerts
+
/**
* Full description of rule
*
* @return the full description
*/
+ @Nonnull
public String getFullDescription() {
return full_description;
}
/**
- * Tags associated with the rule
+ * Help text for the rule
*
- * @return the tags
+ * @return the help text
*/
- public String[] getTags() {
- return tags;
+ @Nullable
+ public String getHelp() {
+ return help;
}
/**
- * Help text for the rule
+ * A link to documentation for the rule used to detect the alert. Can be null.
*
- * @return the help text
+ * @return alert documentation url
*/
- public String getHelp() {
- return help;
+ @Nullable
+ public String getHelpUri() {
+ return help_uri;
}
}
diff --git a/src/main/java/org/kohsuke/github/GHCodeScanningAlertInstance.java b/src/main/java/org/kohsuke/github/GHCodeScanningAlertInstance.java
index fa0c8aeb81..0991051ea3 100644
--- a/src/main/java/org/kohsuke/github/GHCodeScanningAlertInstance.java
+++ b/src/main/java/org/kohsuke/github/GHCodeScanningAlertInstance.java
@@ -5,6 +5,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Objects;
/**
* Code scanning alert instance for a repository
@@ -93,41 +94,129 @@ public Location getLocation() {
return location;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ GHCodeScanningAlertInstance that = (GHCodeScanningAlertInstance) o;
+ return Objects.equals(ref, that.ref) && Objects.equals(analysis_key, that.analysis_key)
+ && Objects.equals(environment, that.environment) && state == that.state
+ && Objects.equals(commit_sha, that.commit_sha) && Arrays.equals(classifications, that.classifications)
+ && Objects.equals(message, that.message) && Objects.equals(location, that.location);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = Objects.hash(ref, analysis_key, environment, state, commit_sha, message, location);
+ result = 31 * result + Arrays.hashCode(classifications);
+ return result;
+ }
+
+ /**
+ * Alert message
+ */
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD" }, justification = "JSON API")
- static class Message {
+ public static class Message {
private String text;
+ /**
+ * Alert message
+ *
+ * @return contents of the message
+ */
public String getText() {
return text;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ Message message = (Message) o;
+ return Objects.equals(text, message.text);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(text);
+ }
}
+ /**
+ * Describe a region within a file for an alert.
+ */
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD" }, justification = "JSON API")
- static class Location {
+ public static class Location {
private String path;
private long start_line;
private long end_line;
private long start_column;
private long end_column;
+ /**
+ * Path to the file containing the described code region
+ *
+ * @return path
+ */
public String getPath() {
return path;
}
+ /**
+ * Line number at the start of the code region.
+ *
+ * @return line number at the start of the code region
+ */
public long getStartLine() {
return start_line;
}
+ /**
+ * Line number at the end of the code region.
+ *
+ * @return line number at the end of the code region
+ */
public long getEndLine() {
return end_line;
}
+ /**
+ * Column number at the start of the code region.
+ *
+ * @return column number at the start of the code region
+ */
public long getStartColumn() {
return start_column;
}
+ /**
+ * Column number at the end of the code region.
+ *
+ * @return column number at the end of the code region
+ */
public long getEndColumn() {
return end_column;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ Location location = (Location) o;
+ return start_line == location.start_line && end_line == location.end_line
+ && start_column == location.start_column && end_column == location.end_column
+ && path.equals(location.path);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(path, start_line, end_line, start_column, end_column);
+ }
}
}
diff --git a/src/test/java/org/kohsuke/github/BridgeMethodTest.java b/src/test/java/org/kohsuke/github/BridgeMethodTest.java
index eb9138eda4..5a69cdc38e 100644
--- a/src/test/java/org/kohsuke/github/BridgeMethodTest.java
+++ b/src/test/java/org/kohsuke/github/BridgeMethodTest.java
@@ -13,7 +13,7 @@
import javax.annotation.Nonnull;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.containsInAnyOrder;
// TODO: Auto-generated Javadoc
/**
diff --git a/src/test/java/org/kohsuke/github/GHCodeScanningAlertInstanceTest.java b/src/test/java/org/kohsuke/github/GHCodeScanningAlertInstanceTest.java
index c80953eb01..b469142a4a 100644
--- a/src/test/java/org/kohsuke/github/GHCodeScanningAlertInstanceTest.java
+++ b/src/test/java/org/kohsuke/github/GHCodeScanningAlertInstanceTest.java
@@ -7,8 +7,7 @@
import java.io.IOException;
import java.util.List;
-import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.*;
/**
*
@@ -21,6 +20,11 @@ public class GHCodeScanningAlertInstanceTest extends AbstractGitHubWireMockTest
private static final String REPO_NAME = "Pixi";
private GHCodeScanningAlert alert;
+ /**
+ * Load a dismissed alert from the code scanning api web response
+ *
+ * @throws Exception the exception
+ */
@Before
public void setUp() throws Exception {
GHRepository repo = gitHub.getRepository(GITHUB_API_TEST_ORG + "/" + REPO_NAME);
@@ -35,6 +39,10 @@ private GHCodeScanningAlert getAlertFromRepo(GHRepository repo) {
return dismissedAlerts.get(0);
}
+ /**
+ * Test that an alert returns a list of its own instances
+ * @throws IOException could not get a compatible response
+ */
@Test
public void testListAlertInstances() throws IOException {
// Arrange
@@ -53,6 +61,12 @@ public void testListAlertInstances() throws IOException {
assertThat(instance.getMessage(), not((Object) null));
assertThat(instance.getLocation(), not((Object) null));
+ assertThat(instance.getMessage().getText(), not(emptyOrNullString()));
+
+ assertThat(instance.getAnalysisKey(), not((Object) null));
+ assertThat(instance.getClassifications(), not((Object) null));
+ assertThat(instance.getEnvironment(), notNullValue());
+
GHCodeScanningAlertInstance.Location location = instance.getLocation();
// Can't assert on exact values with having to hardcode values from
// json file, hence making the assertions generics
@@ -60,6 +74,6 @@ public void testListAlertInstances() throws IOException {
assertThat(location.getStartLine(), greaterThanOrEqualTo(0L));
assertThat(location.getEndLine(), greaterThanOrEqualTo(0L));
assertThat(location.getStartColumn(), greaterThanOrEqualTo(0L));
- assertThat(location.getStartColumn(), greaterThanOrEqualTo(0L));
+ assertThat(location.getEndColumn(), greaterThanOrEqualTo(0L));
}
}
diff --git a/src/test/java/org/kohsuke/github/GHCodeScanningAlertTest.java b/src/test/java/org/kohsuke/github/GHCodeScanningAlertTest.java
index 709d546876..8bd65c2b9e 100644
--- a/src/test/java/org/kohsuke/github/GHCodeScanningAlertTest.java
+++ b/src/test/java/org/kohsuke/github/GHCodeScanningAlertTest.java
@@ -5,12 +5,13 @@
import org.junit.Test;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.util.List;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.not;
+import javax.annotation.Nonnull;
+
+import static org.hamcrest.Matchers.*;
/**
*
@@ -23,11 +24,20 @@ public class GHCodeScanningAlertTest extends AbstractGitHubWireMockTest {
private static final String REPO_NAME = "Pixi";
private GHRepository repo;
+ /**
+ * Set up the test with alerts from a purpose-made repo
+ *
+ * @throws Exception trouble
+ */
@Before
public void setUp() throws Exception {
repo = gitHub.getRepository(GITHUB_API_TEST_ORG + "/" + REPO_NAME);
}
+ /**
+ * Check that we can get a list of alerts for a repo and that the response contains
+ * values in its required fields.
+ */
@Test
public void testListCodeScanningAlerts() {
// Arrange
@@ -45,7 +55,8 @@ public void testListCodeScanningAlerts() {
assertThat(alert.getTool(), not((Object) null));
GHCodeScanningAlert.Tool tool = alert.getTool();
assertThat(tool.getName(), is("CodeQL"));
- assertThat(tool.getVersion(), not((Object) null));
+ assertThat(tool.getVersion(), isA(String.class));
+ assertThat(tool.getGuid(), anyOf(nullValue(), isA(String.class)));
// Verify that fields of the code scanning rule are non-null
assertThat(alert.getRule(), not((Object) null));
@@ -53,6 +64,8 @@ public void testListCodeScanningAlerts() {
assertThat(rule.getId(), not((Object) null));
assertThat(rule.getName(), not((Object) null));
assertThat(rule.getSeverity(), not((Object) null));
+ assertThat(rule.getDescription(), not((Object) null));
+ assertThat(rule.getSecuritySeverityLevel(), anyOf(nullValue(), instanceOf(String.class)));
// Act - Search by filtering on alert status
List openAlerts = repo.listCodeScanningAlerts(GHCodeScanningAlertState.OPEN)
@@ -66,8 +79,15 @@ public void testListCodeScanningAlerts() {
assertThat(openAlert.getState(), is(GHCodeScanningAlertState.OPEN));
}
+ /**
+ * Get the data for a single alert and verify that the additional details are filled in.
+ *
+ * @throws IOException encountered an error while retrieving a response
+ * @throws InvocationTargetException tried to reflectively invoke a method incorrectly
+ * @throws IllegalAccessException tried to reflectively invoke a method that didn't want to be called
+ */
@Test
- public void testGetCodeScanningAlert() throws IOException {
+ public void testGetCodeScanningAlert() throws IOException, InvocationTargetException, IllegalAccessException {
// Arrange
List dismissedAlerts = repo.listCodeScanningAlerts(GHCodeScanningAlertState.DISMISSED)
._iterator(1)
@@ -85,6 +105,27 @@ public void testGetCodeScanningAlert() throws IOException {
assertThat(result.getDismissedReason(), equalTo(dismissedAlert.getDismissedReason()));
assertThat(result.getDismissedAt(), equalTo(dismissedAlert.getDismissedAt()));
assertThat(result.getDismissedBy().login, equalTo(dismissedAlert.getDismissedBy().login));
+ assertThat(result.getHtmlUrl(), equalTo(dismissedAlert.getHtmlUrl()));
+ assertThat(result.getMostRecentInstance(), equalToObject(dismissedAlert.getMostRecentInstance()));
+
+ GHCodeScanningAlert.Rule rule = result.getRule();
+ assertThat(rule.getId(), not((Object) null));
+ assertThat(rule.getSeverity(), not((Object) null));
+ assertThat(rule.getDescription(), not((Object) null));
+ assertThat(rule.getName(), not((Object) null));
+
+ // The following fields are exclusive to getCodeScanningAlert's response
+ assertThat(rule.getFullDescription(), not((Object) null));
+ assertThat(rule.getTags(), arrayWithSize(greaterThan(0)));
+ assertThat(rule.getHelp(), not((Object) null));
+ assertThat(rule.getHelpUri(), anyOf(nullValue(), isA(String.class)));
+
+ // A little redundant, but we should enforce that Nonnull getters return a value
+ for (Method m : GHCodeScanningAlert.Rule.class.getDeclaredMethods()) {
+ if (m.isAnnotationPresent(Nonnull.class)) {
+ assertThat(m.invoke(rule), notNullValue());
+ }
+ }
}
}
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi-2.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi-2.json
index 2767224e1f..a70ce2b8af 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi-2.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi-2.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
index 23306dde16..6cd5c0379c 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1_instances-4.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1_instances-4.json
index 43f9c37ddc..d6935cbd0c 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1_instances-4.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1_instances-4.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/user-1.json
index 23870c743a..d14f54e6df 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/user-1.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertInstanceTest/wiremock/testListAlertInstances/mappings/user-1.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi-2.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi-2.json
index 55ff3cc82e..33c387a845 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi-2.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi-2.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
index 5b8fed5a77..c9f93daef8 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1-4.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1-4.json
index 1bf9bdf4a3..bb4b4af04d 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1-4.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts_1-4.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/user-1.json
index 3227dd2fc9..cc93722811 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/user-1.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testGetCodeScanningAlert/mappings/user-1.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi-2.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi-2.json
index 3d6ed9491a..7838acf249 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi-2.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi-2.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
index d7a775c4c9..2462962c3a 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-3.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-4.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-4.json
index fd76711943..886c3b2b10 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-4.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/repos_hub4j-test-org_pixi_code-scanning_alerts-4.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},
diff --git a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/user-1.json
index 052e6c4692..db891874df 100644
--- a/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/user-1.json
+++ b/src/test/resources/org/kohsuke/github/GHCodeScanningAlertTest/wiremock/testListCodeScanningAlerts/mappings/user-1.json
@@ -6,7 +6,7 @@
"method": "GET",
"headers": {
"Accept": {
- "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ "equalTo": "application/vnd.github.v3+json"
}
}
},