SERVER-92729 Ignore whitespace for commit message validation comparisons (#25191)

GitOrigin-RevId: 4b0e45da036e265971b82500736cdb0db4d8234a
This commit is contained in:
Steve McClure
2024-07-23 12:35:07 -04:00
committed by MongoDB Bot
parent aa11c7f714
commit bfa96e8503
2 changed files with 10 additions and 2 deletions

View File

@@ -59,6 +59,11 @@ class ValidateCommitMessageTest(unittest.TestCase):
binsha=b"deadbeefdeadbeefdead",
message="SERVER-123 asdf\nAnything in this description will be included in the commit message. Replace or delete this text before merging. Add links to testing in the comments of the PR.",
), # Contains some banned strings
Commit(
repo=fake_repo,
binsha=b"deadbeefdeadbeefdead",
message="SERVER-123 asdf\nAnything\n\n in this description will be included in the commit message.\nReplace or delete this text before merging. Add links to testing in the\ncomments of the PR.",
), # Contains some banned strings with extra newlines
]
self.assertTrue(all(is_valid_commit(message) == False for message in messages))