mirror of
https://gitlab.com/ceda_ei/git-alerts-bot
synced 2025-12-23 22:30:05 +01:00
Create base structure
This commit is contained in:
6
util/convert/commit.js
Normal file
6
util/convert/commit.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const github = function (body) {
|
||||
};
|
||||
|
||||
const gitlab = github;
|
||||
|
||||
module.exports = { github, gitlab };
|
||||
6
util/convert/event.js
Normal file
6
util/convert/event.js
Normal 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
4
util/convert/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
getEvent: require('./event'),
|
||||
commit: require('./commit'),
|
||||
};
|
||||
Reference in New Issue
Block a user