2018-11-25 18:44:07 +01:00
|
|
|
const github = function (body) {
|
2018-11-27 16:35:55 +01:00
|
|
|
|
|
|
|
if (body.commits && body.ref.match("^/refs/heads/")) return "commit";
|
|
|
|
if (body.commits && body.ref.match("^/refs/tags/")) return "tag";
|
|
|
|
if (body.issue) return "issue";
|
|
|
|
|
2018-11-25 18:44:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = {github};
|