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:
@@ -1,3 +1,3 @@
|
||||
module.exports = sequelize => ({
|
||||
integrations: require("./integrations")(sequelize),
|
||||
integrations: require("./integrations")(sequelize),
|
||||
});
|
||||
|
||||
@@ -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},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user