Feature branch name pattern now allows for upper-case

Closes #3
dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 10 years ago
parent 069d6b47aa
commit 47c08812ba
  1. 4
      BuildServer/lib/commenter.js

@ -4,7 +4,7 @@ var fs = require('fs'),
builder = require('../lib/builder'), builder = require('../lib/builder'),
settings = require('../settings'); settings = require('../settings');
var featureNamePattern = /^feature-(\d+)(?:-[a-z0-9]+)+$/; var featureNamePattern = /^feature-(\d+)(?:-[a-zA-Z0-9]+)+$/;
var versionNamePattern = /^v\d+(\.\d+)*$/; var versionNamePattern = /^v\d+(\.\d+)*$/;
var masterNamePattern = /^master$/; var masterNamePattern = /^master$/;
@ -99,7 +99,7 @@ var checkPullRequest = function (options, callback) {
} }
if (!featureNamePattern.test(head.branchname)) { if (!featureNamePattern.test(head.branchname)) {
return closePullRequest(options, "Only merging from feature branch is allowed", callback); return closePullRequest(options, "Only merging from feature branch is allowed (pattern: `" + featureNamePattern.toString() + "`)", callback);
} }
if (!versionNamePattern.test(base.branchname) && !masterNamePattern.test(base.branchname)) { if (!versionNamePattern.test(base.branchname) && !masterNamePattern.test(base.branchname)) {

Loading…
Cancel
Save