You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2023/11/13 15:29:10 UTC

(sling-org-apache-sling-committer-cli) branch SLING-12148 updated: Fixing extra .git suffix

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch SLING-12148
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-committer-cli.git


The following commit(s) were added to refs/heads/SLING-12148 by this push:
     new 05045db  Fixing extra .git suffix
05045db is described below

commit 05045db39faacdcd0b70697b90d8ebe050a79628
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Nov 13 10:29:03 2023 -0500

    Fixing extra .git suffix
---
 src/main/java/org/apache/sling/cli/impl/ci/CIStatusValidator.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/sling/cli/impl/ci/CIStatusValidator.java b/src/main/java/org/apache/sling/cli/impl/ci/CIStatusValidator.java
index c5a0113..2afd354 100644
--- a/src/main/java/org/apache/sling/cli/impl/ci/CIStatusValidator.java
+++ b/src/main/java/org/apache/sling/cli/impl/ci/CIStatusValidator.java
@@ -120,6 +120,10 @@ public class CIStatusValidator {
                         repositoryName = repositoryName.substring(0, repositoryName.indexOf('/'));
                     }
                 }
+                // strip off the .git suffix from the repo name if it exists
+                if(repositoryName.endsWith(".git")) {
+                    repositoryName = repositoryName.substring(0, repositoryName.length() - 4);
+                }
                 log.debug("Extracted REPO: {}", repositoryName);
             }
             if (repositoryName != null && !repositoryName.isEmpty() && !tagName.isEmpty() && !tagName.equalsIgnoreCase("HEAD")) {