diff --git a/conventional_commits/.gitlab-ci.yml b/conventional_commits/.gitlab-ci.yml index 8c4c10c..59157d2 100644 --- a/conventional_commits/.gitlab-ci.yml +++ b/conventional_commits/.gitlab-ci.yml @@ -22,6 +22,7 @@ - pip install -r $ROOT_DIR/conventional_commits/requirements.txt - echo "[DEBUG] CI_PROJECT_ID[$CI_PROJECT_ID]" - echo "[DEBUG] CI_COMMIT_BRANCH[$CI_COMMIT_BRANCH]" + - git fetch --all - git checkout --track origin/$CI_COMMIT_BRANCH - git show-branch -a - target_branch=$(git show-branch -a | awk 'BEGIN { FS="\n\s+*" } { print $1 }' | awk '{print $2}' | grep '\[' | sed 's/.*\[origin\/\(.*\)\].*/\1/' | grep -v '\[' | grep -v $(git rev-parse --abbrev-ref HEAD) | grep -vi 'HEAD' | awk 'BEGIN{ RS = "" ; FS = "\n" }{print $1}')