1
0
mirror of https://gitlab.com/ceda_ei/git-alerts-bot synced 2025-12-23 22:30:05 +01:00

[refactor] Add eslint and do dependency injection

This commit is contained in:
Muthu Kumar
2018-11-27 21:05:55 +05:30
parent dce4394ff6
commit 968f1a8e1e
14 changed files with 2157 additions and 2110 deletions

View File

@@ -1,3 +1,3 @@
module.exports = sequelize => ({
integrations: require("./integrations")(sequelize),
integrations: require("./integrations")(sequelize),
});

View File

@@ -1,12 +1,10 @@
const Sequelize = require("sequelize");
module.exports = sequelize => {
const integrations = sequelize.define("integrations", {
chatID: { type: Sequelize.INTEGER, allowNull: false, unique: "com"},
repoURL: {type: Sequelize.STRING, allowNull: false, unique: "com"},
chatType: {type: Sequelize.STRING},
issues: {type: Sequelize.BOOLEAN, defaultValue: false},
pullRequests: {type: Sequelize.BOOLEAN, defaultValue: false},
commits: {type: Sequelize.BOOLEAN, defaultValue: true},
});
integrations.sync().then(return integration);
};
module.exports = sequelize =>
sequelize.define("integrations", {
chatID: { type: Sequelize.INTEGER, allowNull: false, unique: "com"},
repoURL: {type: Sequelize.STRING, allowNull: false, unique: "com"},
chatType: {type: Sequelize.STRING},
issues: {type: Sequelize.BOOLEAN, defaultValue: false},
pullRequests: {type: Sequelize.BOOLEAN, defaultValue: false},
commits: {type: Sequelize.BOOLEAN, defaultValue: true},
});