Skip to content

Instantly share code, notes, and snippets.

@joshcooper
Created February 18, 2016 22:28
Show Gist options
  • Save joshcooper/2b3b5a20f4237467267c to your computer and use it in GitHub Desktop.
Save joshcooper/2b3b5a20f4237467267c to your computer and use it in GitHub Desktop.
#!/bin/bash
echo -n "Enter merge commit: "
read merge_sha
echo -n "Enter last known passing commit: "
read ci_sha
git merge-base --is-ancestor $merge_sha $ci_sha
if [ $? -eq 0 ]; then
echo "Commit $merge_sha passed CI in $ci_sha"
else
echo "Commit $merge_sha has not passed CI yet"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment