diff --git a/commit-message-validator.js b/commit-message-validator.js index 9cff4ee..1f2e331 100644 --- a/commit-message-validator.js +++ b/commit-message-validator.js @@ -2,7 +2,7 @@ const core = require('@actions/core'); const github = require('@actions/github'); function buildDefaultPattern() { - const mergeBranchPattern = 'Merge branch [\'"][^\'"]+[\'"](?: of [^\\s]+)? into [^\\s]+'; + const mergeBranchPattern = 'Merge branch [\'"][^\'"]+[\'"](?: of [^\\s]+)?(?: into [^\\s]+)?'; // git omits " into " when merging into the default branch const remoteTrackingPattern = 'Merge remote-tracking branch [\'"][^\'"]+[\'"](?: into [^\\s]+)?'; const mergePullRequestPattern = 'Merge pull request #\\d+ from [^\\s]+';