Skip to content

Commit 9de15f2

Browse files
committed
MOBILE-3501 gulp: Fix HEAD commit calculation
1 parent e6ac209 commit 9de15f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gulp/task-push.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,10 @@ class PushTask {
248248
if (numConsecutive > 2) {
249249
// 3 consecutive commits with different branch, probably the branch commits are over. Everything OK.
250250
return true;
251-
} else if (!wrongCommitCandidate) {
251+
252+
// Don't treat a merge pull request commit as a wrong commit between right commits.
253+
// The current push could be a quick fix after a merge.
254+
} else if (!wrongCommitCandidate && message.indexOf('Merge pull request') == -1) {
252255
wrongCommitCandidate = {
253256
message: message,
254257
issue: issue,

gulp/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
const DevConfig = require('./dev-config');
16-
const DEFAULT_ISSUE_REGEX = '(MOBILE)[-_]([0-9]+)';
16+
const DEFAULT_ISSUE_REGEX = '^(MOBILE)[-_]([0-9]+)';
1717

1818
/**
1919
* Class with some utility functions.

0 commit comments

Comments
 (0)