Skip to content

Commit

Permalink
Skip commit message check for backports (#1697)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjulian committed Jul 3, 2020
1 parent 9a98d6b commit ea2b0ee
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit ea2b0ee

Please sign in to comment.