Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip commit message check for backports #1697

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/check_commit_message
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
"""Checks that a commit message conforms the the style guide."""
import sys

# Get the commit message location
Expand All @@ -10,6 +11,10 @@ lines = list((line.rstrip() for line in open(commit_msg_filepath, 'r')))
# Remove all commented lines
lines = [line for line in lines if len(line) == 0 or line[0] != '#']

# Skip if this is an automated backport
if len(lines) >= 2 and 'cherry picked from commit' in lines[-2]:
sys.exit(0)

exit_code = 0

# Error: no commit message
Expand Down