Loading ci/check-signed-off-by.sh +11 −17 Changes for ci/check-signed-off-by.sh: 11 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -15,19 +15,19 @@ DEPENDABOT_COMMITER='GitHub <noreply@github.com>' DEPENDABOT_AUTHOR='dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>' # this retrieves the merge commit created by GH if [[ -n "$1" ]]; then commits=$(git show -s --format=%h ${1}~..HEAD) else parents=(`git log -n 1 --format=%p HEAD`) if [[ "${#parents[@]}" -ne 2 ]]; then echo "HEAD is not a merge commit, please supply the oldest SHA" exit 1 fi commits=$(git show -s --format=%h ${parents[0]}..${parents[1]}) fi if [[ "${#parents[@]}" -eq 1 ]]; then # CI doesn't use a merge commit commits=$(git show -s --format=%h ${parents}) elif [[ "${#parents[@]}" -eq 2 ]]; then # CI uses a merge commit, eg GH / Travis from="${parents[0]}" into="${parents[1]}" commits=$(git show -s --format=%h ${from}..${into}) else echo "Unexpected behavior, cannot verify more than 2 parent commits!" if [[ -z "${commits}" ]]; then echo "No commits found in this PR!" exit 1 fi Loading Loading @@ -78,10 +78,4 @@ for sha in $commits; do if [[ ${found_author} == false || ${found_committer} == false ]]; then exit 1 fi done if [[ -z "${commits}" ]]; then echo "No commits found in this PR!" exit 1 fi Loading
ci/check-signed-off-by.sh +11 −17 Changes for ci/check-signed-off-by.sh: 11 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -15,19 +15,19 @@ DEPENDABOT_COMMITER='GitHub <noreply@github.com>' DEPENDABOT_AUTHOR='dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>' # this retrieves the merge commit created by GH if [[ -n "$1" ]]; then commits=$(git show -s --format=%h ${1}~..HEAD) else parents=(`git log -n 1 --format=%p HEAD`) if [[ "${#parents[@]}" -ne 2 ]]; then echo "HEAD is not a merge commit, please supply the oldest SHA" exit 1 fi commits=$(git show -s --format=%h ${parents[0]}..${parents[1]}) fi if [[ "${#parents[@]}" -eq 1 ]]; then # CI doesn't use a merge commit commits=$(git show -s --format=%h ${parents}) elif [[ "${#parents[@]}" -eq 2 ]]; then # CI uses a merge commit, eg GH / Travis from="${parents[0]}" into="${parents[1]}" commits=$(git show -s --format=%h ${from}..${into}) else echo "Unexpected behavior, cannot verify more than 2 parent commits!" if [[ -z "${commits}" ]]; then echo "No commits found in this PR!" exit 1 fi Loading Loading @@ -78,10 +78,4 @@ for sha in $commits; do if [[ ${found_author} == false || ${found_committer} == false ]]; then exit 1 fi done if [[ -z "${commits}" ]]; then echo "No commits found in this PR!" exit 1 fi