Is it possible to have access to the main branch in the Vercel - Ignored Build Step? I have a repo where I need to compare changes with the main branch, but it is not accessible.
My script looks like this
#!/bin/bash
# add an origin for the git repository
git remote add origin git@github.com:sztadii/monorepo.git
git fetch origin main
# get the project_root path from arguments
project_root=$1
package_name=$2
changes=$(npx yarn-changed-workspaces@2.0.11 --projectRoot "$project_root" --branch origin/main)
if [[ "$changes" == *"$package_name"* ]] ; then
echo "✅ - Build can proceed"
exit 1;
else
echo " - Build canceled"
exit 0;
fi
We are running the yarn-changed-workspaces package to see if the workspace has any new changes ( or their latest deps have any changes ), but for that, I need a second branch to compare. Any ideas on how to do this?