diff --git a/bin/comment_with_dependency_diff b/bin/comment_with_dependency_diff index 5f1be45..56ebf30 100755 --- a/bin/comment_with_dependency_diff +++ b/bin/comment_with_dependency_diff @@ -4,14 +4,15 @@ set -euo pipefail MODULE="${1:-}" CONFIGURATION="${2:-}" -OWNER="${3:-}" -REPO="${4:-}" -if [ -z "$MODULE" ] || [ -z "$CONFIGURATION" ] || [ -z "$OWNER" ] || [ -z "$REPO" ]; then - echo "Not enough arguments provided. Usage: ./comment_with_dependency_diff " +if [ -z "$MODULE" ] || [ -z "$CONFIGURATION" ]; then + echo "Not enough arguments provided. Usage: ./comment_with_dependency_diff " exit 1 fi +OWNER=$(basename "$(dirname "${BUILDKITE_PULL_REQUEST_REPO}")") +REPO=$(basename "${BUILDKITE_PULL_REQUEST_REPO%.git}") + DIFF_DEPENDENCIES_FOLDER="./build/reports/diff" BASE_BRANCH_DEPENDENCIES_FILE="$DIFF_DEPENDENCIES_FOLDER/base_branch_dependencies.txt" HEAD_BRANCH_DEPENDENCIES_FILE="$DIFF_DEPENDENCIES_FOLDER/head_branch_dependencies.txt"