1
0
mirror of https://gitlab.com/ceda_ei/git-alerts-bot synced 2025-11-04 06:10:07 +01:00

Create base structure

This commit is contained in:
2018-11-25 23:14:07 +05:30
parent 8d97415c4e
commit bd0a88c7dc
6 changed files with 27 additions and 0 deletions

6
util/convert/commit.js Normal file
View File

@@ -0,0 +1,6 @@
const github = function (body) {
};
const gitlab = github;
module.exports = { github, gitlab };

6
util/convert/event.js Normal file
View File

@@ -0,0 +1,6 @@
const github = function (body) {
if (body.commits && body.ref.match("^/refs/heads/") return "commit";
if (body.commits && body.ref.match("^/refs/tags/") return "tag";
};
module.exports = {github};

4
util/convert/index.js Normal file
View File

@@ -0,0 +1,4 @@
module.exports = {
getEvent: require('./event'),
commit: require('./commit'),
};