Skip to content

Commit d804582

Browse files
authored
Merge branch 'main' into add_gitcommit_class
2 parents 8d06a5d + 0e41ccb commit d804582

3 files changed

Lines changed: 23 additions & 15 deletions

File tree

pom.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333

3434
<properties>
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
<spotbugs-maven-plugin.version>4.5.0.0</spotbugs-maven-plugin.version>
37-
<spotbugs.version>4.5.0</spotbugs.version>
36+
<spotbugs-maven-plugin.version>4.5.3.0</spotbugs-maven-plugin.version>
37+
<spotbugs.version>4.5.3</spotbugs.version>
3838
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
3939
<hamcrest.version>2.2</hamcrest.version>
4040
<okhttp3.version>4.9.2</okhttp3.version>
@@ -55,12 +55,12 @@
5555
<extension>
5656
<groupId>org.apache.maven.scm</groupId>
5757
<artifactId>maven-scm-provider-gitexe</artifactId>
58-
<version>1.12.0</version>
58+
<version>1.12.2</version>
5959
</extension>
6060
<extension>
6161
<groupId>org.apache.maven.scm</groupId>
6262
<artifactId>maven-scm-manager-plexus</artifactId>
63-
<version>1.12.0</version>
63+
<version>1.12.2</version>
6464
</extension>
6565
<!-- Doing site publishing manually for now -->
6666
<!--
@@ -258,7 +258,7 @@
258258
<plugin>
259259
<groupId>org.apache.maven.plugins</groupId>
260260
<artifactId>maven-site-plugin</artifactId>
261-
<version>3.9.1</version>
261+
<version>3.10.0</version>
262262
</plugin>
263263
<plugin>
264264
<groupId>org.apache.maven.plugins</groupId>
@@ -289,7 +289,7 @@
289289
</plugin>
290290
<plugin>
291291
<artifactId>maven-compiler-plugin</artifactId>
292-
<version>3.8.1</version>
292+
<version>3.9.0</version>
293293
<configuration>
294294
<source>1.8</source>
295295
<target>1.8</target>
@@ -321,7 +321,7 @@
321321
<plugin>
322322
<groupId>com.infradna.tool</groupId>
323323
<artifactId>bridge-method-injector</artifactId>
324-
<version>1.22</version>
324+
<version>1.23</version>
325325
<executions>
326326
<execution>
327327
<goals>
@@ -333,7 +333,7 @@
333333
<plugin>
334334
<groupId>com.diffplug.spotless</groupId>
335335
<artifactId>spotless-maven-plugin</artifactId>
336-
<version>2.17.6</version>
336+
<version>2.20.0</version>
337337
<executions>
338338
<execution>
339339
<id>spotless-check</id>
@@ -442,7 +442,7 @@
442442
<dependency>
443443
<groupId>com.fasterxml.jackson.core</groupId>
444444
<artifactId>jackson-databind</artifactId>
445-
<version>2.13.0</version>
445+
<version>2.13.1</version>
446446
</dependency>
447447
<dependency>
448448
<groupId>commons-io</groupId>
@@ -452,7 +452,7 @@
452452
<dependency>
453453
<groupId>com.infradna.tool</groupId>
454454
<artifactId>bridge-method-annotation</artifactId>
455-
<version>1.22</version>
455+
<version>1.23</version>
456456
<optional>true</optional>
457457
</dependency>
458458
<!-- for stapler-jetty -->
@@ -541,7 +541,7 @@
541541
<dependency>
542542
<groupId>org.mockito</groupId>
543543
<artifactId>mockito-core</artifactId>
544-
<version>4.1.0</version>
544+
<version>4.3.1</version>
545545
<scope>test</scope>
546546
</dependency>
547547
<dependency>
@@ -565,7 +565,7 @@
565565
<dependency>
566566
<groupId>org.slf4j</groupId>
567567
<artifactId>slf4j-simple</artifactId>
568-
<version>1.7.32</version>
568+
<version>1.7.35</version>
569569
<scope>test</scope>
570570
</dependency>
571571
</dependencies>
@@ -768,7 +768,7 @@
768768
</plugin>
769769
<plugin>
770770
<artifactId>maven-compiler-plugin</artifactId>
771-
<version>3.8.1</version>
771+
<version>3.9.0</version>
772772
<executions>
773773
<execution>
774774
<id>compile-java-11</id>
@@ -791,7 +791,7 @@
791791
<plugin>
792792
<groupId>org.apache.maven.plugins</groupId>
793793
<artifactId>maven-jar-plugin</artifactId>
794-
<version>3.2.0</version>
794+
<version>3.2.2</version>
795795
<configuration>
796796
<archive>
797797
<manifestEntries>

src/main/java/org/kohsuke/github/GitHub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ public PagedIterable<GHOrganization> listOrganizations(final String since) {
667667
*/
668668
public GHRepository getRepository(String name) throws IOException {
669669
String[] tokens = name.split("/");
670-
if (tokens.length < 2) {
670+
if (tokens.length != 2) {
671671
throw new IllegalArgumentException("Repository name must be in format owner/repo");
672672
}
673673
return GHRepository.read(this, tokens[0], tokens[1]);

src/test/java/org/kohsuke/github/GitHubTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ public void getRepository() throws IOException {
3535

3636
try {
3737
gitHub.getRepository("hub4j_github-api");
38+
fail();
39+
} catch (IllegalArgumentException e) {
40+
assertThat(e.getMessage(), equalTo("Repository name must be in format owner/repo"));
41+
}
42+
43+
try {
44+
gitHub.getRepository("hub4j/github/api");
45+
fail();
3846
} catch (IllegalArgumentException e) {
3947
assertThat(e.getMessage(), equalTo("Repository name must be in format owner/repo"));
4048
}

0 commit comments

Comments
 (0)