Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 43 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.11</version>
<version>2.33</version>
</parent>

<artifactId>gogs-branch-source</artifactId>
<version>0.1-SNAPSHOT</version>
<version>0.3-SNAPSHOT</version>
<packaging>hpi</packaging>

<name>Gogs Branch Source Plugin</name>
Expand All @@ -45,7 +45,7 @@
</licenses>

<properties>
<jenkins.version>1.642.1</jenkins.version>
<jenkins.version>2.46.2</jenkins.version>
</properties>

<scm>
Expand All @@ -59,12 +59,12 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>5.17</version>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>branch-api</artifactId>
<version>2.0.2</version>
<version>2.0.11</version>
<exclusions>
<!-- This plugin will choose scm-api version -->
<exclusion>
Expand All @@ -76,19 +76,24 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scm-api</artifactId>
<version>2.0.2</version>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git</artifactId>
<version>3.0.4</version>
<version>3.5.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
Expand All @@ -97,23 +102,43 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-multibranch</artifactId>
<version>2.12</version>
<version>2.16</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>2.14</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-scm-step</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.3</version>
</dependency>
</dependencies>

<repositories>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
Expand All @@ -126,4 +151,4 @@
</pluginRepository>
</pluginRepositories>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void visitSources(SCMSourceObserver observer) throws IOException, Interru
}
}

private void add(TaskListener listener, SCMSourceObserver observer, GogsRepository repo) throws InterruptedException {
private void add(TaskListener listener, SCMSourceObserver observer, GogsRepository repo) throws InterruptedException, IOException {
String name = repo.getRepositoryName();
if (!Pattern.compile(pattern).matcher(name).matches()) {
listener.getLogger().format("Ignoring %s%n", name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ public GogsApi buildGogsClient() {
}

@Override
protected void retrieve(SCMHeadObserver observer, final TaskListener listener) throws IOException,
InterruptedException {

protected void retrieve(SCMSourceCriteria criteria, @NonNull SCMHeadObserver observer, SCMHeadEvent<?> event, @NonNull TaskListener listener) throws IOException, InterruptedException {
StandardUsernamePasswordCredentials scanCredentials = getScanCredentials();
if (scanCredentials == null) {
listener.getLogger().format("Connecting to %s with no credentials, anonymous access%n", gogsServerUrl == null ? "https://gogs.org" : gogsServerUrl);
Expand Down