Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/check_api_change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

set -euo pipefail

UPSTREAM_BRANCH="${GITHUB_BASE_REF:-master}"
UPSTREAM_BRANCH="${GITHUB_BASE_REF:-main}"
echo "Checking for incompatible API changes relative to ${UPSTREAM_BRANCH}..."

MASTER_CLONE_DIR="$(mktemp -d)"
Expand Down Expand Up @@ -58,7 +58,7 @@ for pkg in $PKGS; do
continue;
fi

# Compute export data for master@HEAD.
# Compute export data for main@HEAD.
(cd "$MASTER_CLONE_DIR"; apidiff -w "$PKGINFO_MASTER" "$pkg")

# Print all changes for posterity.
Expand All @@ -79,7 +79,7 @@ fi
echo "Found breaking API change(s) in: ${incompatible_change_pkgs[*]}."

# Found incompatible changes; see if they were declared as OK via a commit.
if git cherry -v master | grep -q "BREAKING_CHANGE_OK"; then
if git cherry -v main | grep -q "BREAKING_CHANGE_OK"; then
echo "Allowing them due to a commit message with BREAKING_CHANGE_OK.";
exit 0;
fi
Expand Down
9 changes: 4 additions & 5 deletions internal/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ echo "Ensuring that there are no dependencies not listed in ./internal/alldeps..

# For pull requests, check if there are undeclared incompatible API changes.
# Skip this if we're already going to fail since it is expensive.
# CURRENTLY BROKEN
# if [[ ${result} -eq 0 ]] && [[ ! -z "${GITHUB_HEAD_REF:-x}" ]]; then
# echo
# ./internal/check_api_change.sh || result=1;
# fi
if [[ ${result} -eq 0 ]] && [[ ! -z "${GITHUB_HEAD_REF:-x}" ]]; then
echo
./internal/check_api_change.sh || result=1;
fi

exit $result