From 92f81f629dc06112185b5999265d01fc90a20a54 Mon Sep 17 00:00:00 2001
From: Zachariah Dzielinski <dzielinski_zachariah@bah.com>
Date: Tue, 19 Jan 2021 11:34:00 -0700
Subject: [PATCH] ci: added linting for changelog and version

---
 scripts/lint_changelog.sh | 2 +-
 scripts/lint_version.sh   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lint_changelog.sh b/scripts/lint_changelog.sh
index 62df767edb..cd52786548 100755
--- a/scripts/lint_changelog.sh
+++ b/scripts/lint_changelog.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # diff the file silently, while still printing errors
-git diff --exit-code ${CI_DEFAULT_BRANCH}:${CHANGELOG_FILE} ${CHANGELOG_FILE} >/dev/null
+git diff --exit-code origin/${CI_DEFAULT_BRANCH}:${CHANGELOG_FILE} ${CHANGELOG_FILE} >/dev/null
 
 # exit code of 0 indicates non changed file
 if [ $? -eq 0 ]; then
diff --git a/scripts/lint_version.sh b/scripts/lint_version.sh
index 5a76fd21c7..d4300ab6e5 100755
--- a/scripts/lint_version.sh
+++ b/scripts/lint_version.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # obtain the default version
-default_version=$(git show ${CI_DEFAULT_BRANCH}:${CHART_FILE} | grep -oP 'version: \K(.*)')
+default_version=$(git show origin/${CI_DEFAULT_BRANCH}:${CHART_FILE} | grep -oP 'version: \K(.*)')
 
 # check for command error
 if [ $? -ne 0 ]; then
-- 
GitLab