From d2db9408a7deea63827fc4edaa880155923e7686 Mon Sep 17 00:00:00 2001 From: deckrider Date: Tue, 7 May 2019 04:08:20 -0600 Subject: [PATCH] Don't trigger job without changes to branch (#102) Set the SCMSource Id with the GitLabProject pathWithNamespsce so that the job won't keep building when there are no changes on the branch (for example on periodic organization folder scan). See also: #45, #101 --- .../jenkins/plugins/gitlab_branch_source/GitLabSCMSource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/GitLabSCMSource.java b/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/GitLabSCMSource.java index b107c45..d92838f 100644 --- a/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/GitLabSCMSource.java +++ b/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/GitLabSCMSource.java @@ -68,7 +68,7 @@ public GitLabSCMSource(@Nonnull String projectPath, @Nonnull GitLabSCMSourceSett } GitLabSCMSource(GitLabProject project, GitLabSCMSourceSettings sourceSettings) { - super(null); + setId(project.getPathWithNamespace()); this.project = project; this.sourceSettings = sourceSettings; this.hookListener = GitLabSCMWebHook.createListener(this);