Skip to content

Commit b0893c0

Browse files
[mlir-tensorrt] NFC: remove commit message checker in GitHub CI pipeline
1 parent f968d8e commit b0893c0

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

.github/workflows/mlir-tensorrt-ci.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -44,41 +44,6 @@ jobs:
4444
with:
4545
fetch-depth: 5
4646

47-
- name: Validate commit message
48-
if: ${{ github.event_name == 'pull_request' }}
49-
env:
50-
PR_HEAD_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
51-
run: |
52-
cat > commit_message_checker.py <<EOF
53-
#!/usr/bin/python3
54-
import re
55-
import sys
56-
import subprocess
57-
58-
git_cmd = f"git show -s --format=%B {sys.argv[1]}"
59-
try:
60-
commit_message_cmd = subprocess.run(git_cmd.split(' '), capture_output=True, text=True, check=True)
61-
commit_message = commit_message_cmd.stdout.strip()
62-
except subprocess.CalledProcessError as e:
63-
print(f"Failed to get PR HEAD commit message with error: {e.stderr.strip()}")
64-
65-
match = re.search(r"^(\[bot\].+|NFC: .+|(.+\n\n+.+\n+.+))$", commit_message, re.DOTALL)
66-
if match:
67-
print("Commit message is in canonical form :)")
68-
sys.exit(0)
69-
print("Commit message is not in the canonical form!")
70-
print(commit_message)
71-
print("")
72-
print("Expected format is, ")
73-
print("<title>")
74-
print("<body>")
75-
print("NOTE: Body should start on new line. '2 spaces + enter' for new line!")
76-
print("NOTE: Body should be at least two lines.")
77-
sys.exit(1)
78-
EOF
79-
80-
python3 commit_message_checker.py ${PR_HEAD_COMMIT_SHA}
81-
8247
# Run initial format check
8348
- name: Run python format and clang check
8449
uses: addnab/docker-run-action@v3

0 commit comments

Comments
 (0)