summaryrefslogtreecommitdiff
path: root/evergreen/commit_message_validate.sh
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /evergreen/commit_message_validate.sh
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'evergreen/commit_message_validate.sh')
-rw-r--r--evergreen/commit_message_validate.sh23
1 files changed, 6 insertions, 17 deletions
diff --git a/evergreen/commit_message_validate.sh b/evergreen/commit_message_validate.sh
index 6a66a2113cc..45602695a95 100644
--- a/evergreen/commit_message_validate.sh
+++ b/evergreen/commit_message_validate.sh
@@ -1,25 +1,14 @@
-# Note: This script is called "commit_message_validate", but it does not actually
-# evaluate the commit message. Rather, it leverages the fact that a GitHub merge queue
-# triggered branch will have a single commit message that is the name of the PR.
-# This script ensures the PR name matches a well-known regex (see below for details).
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
+
cd src
+
set -o verbose
set -o errexit
if [ "${is_commit_queue}" = "true" ]; then
- # Fetch the gitlog from the last merge commit to HEAD, which is guaranteed
- # to be the commit message of the PR.
- gitlog=$(git log --pretty=format:'%s' ${branch_name}...HEAD 2>&1)
- # In case there are any special characters that could cause issues (like "). To
- # do this, we will write it out to a file, then read that file into a variable.
- cat > commit_message.txt << END_OF_COMMIT_MSG
-${gitlog}
-END_OF_COMMIT_MSG
- commit_message_content=$(cat commit_message.txt)
activate_venv
- $python buildscripts/validate_commit_message.py "$commit_message_content"
-else
- echo "Not a commit queue PR, skipping commit message validation"
- exit 0
+ $python -m pip --disable-pip-version-check install --upgrade cryptography==36.0.2 || exit 1
+ $python buildscripts/validate_commit_message.py \
+ --evg-config-file ./.evergreen.yml \
+ ${version_id}
fi