push: filter on branch name;
This commit is contained in:
parent
8efdd4544a
commit
daeb29868a
@ -10,6 +10,8 @@ module.exports = {
|
|||||||
|
|
||||||
projectUrl: "https://framagit.org/bnjbvr/kresus/",
|
projectUrl: "https://framagit.org/bnjbvr/kresus/",
|
||||||
|
|
||||||
|
branches: ['master'],
|
||||||
|
|
||||||
// IRC nick/names for the bot
|
// IRC nick/names for the bot
|
||||||
nick: 'gitlab-bot',
|
nick: 'gitlab-bot',
|
||||||
userName: 'gitlab-bot',
|
userName: 'gitlab-bot',
|
||||||
|
9
index.js
9
index.js
@ -79,6 +79,15 @@ var handlers = {
|
|||||||
var numCommits = body.total_commits_count;
|
var numCommits = body.total_commits_count;
|
||||||
|
|
||||||
var branchName = body.ref.replace('refs/heads/', '');
|
var branchName = body.ref.replace('refs/heads/', '');
|
||||||
|
var found = false;
|
||||||
|
for (var i = 0; i < config.branches.length; i++) {
|
||||||
|
if (branchName === config.branches[i]) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
|
return;
|
||||||
|
|
||||||
var msg = null;
|
var msg = null;
|
||||||
if (!numCommits) {
|
if (!numCommits) {
|
||||||
|
Loading…
Reference in New Issue
Block a user