Skip to content

Commit

Permalink
Use ref instead of label when checking branches in issue-guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Jul 31, 2012
1 parent 31b30ab commit 1f70dd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .issue-guidelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ module.exports = {
'pull-requests': {

'should always be made against -wip branches': function (pull) {
assert.ok(/\-wip$/.test(pull.base.label))
assert.ok(/\-wip$/.test(pull.base.ref))
},

'should always be made from feature branches': function (pull) {
assert.ok(pull.head.label != 'master')
assert.notEqual(pull.head.ref, 'master')
},

'should always include a unit test if changing js files': function (pull) {
var hasJS = false
var hasTests = false

pull.files.forEach(function (file) {
if (/^js\/[^./]+.js/.test(file.filename)) hasJS = true
if (/^js\/[^./]+.js/.test(file.filename)) hasJS = true
if (/^js\/tests\/unit\/[^.]+.js/.test(file.filename)) hasTests = true
})

Expand Down

0 comments on commit 1f70dd7

Please sign in to comment.