<commit_before>const exec = require('child-process-promise').exec;

const app = require('../index');
const models = app.set('models');
const roles = require('../server/constants/roles');

var data = {};

if (process.env.NODE_ENV !== 'development') {
  return console.error('Only run reset script in development');
}

exec('make dropdb && make database')
.then((result) => {
  console.log('output', result.stdout);

  return exec('SEQUELIZE_ENV=development npm run db:migrate')
})
.then((result) => {
  console.log('output', result.stdout);

  return models.Application.create({
    api_key: '<KEY>',
    name: 'webapp',
    _access: 1
  })
  .then(() => {
    return models.User.create({
      email: '<EMAIL>',
      password: 'password'
    })
    .then((user) => data.user = user);
  })
  .then(() => {
    return models.Group.create({
      name: 'OpenCollective Demo',
      description: 'OpenCollective Demo group',
      isPublic: true,
      slug: 'opencollective'
    })
    .then((group) => group.addUserWithRole(data.user, roles.HOST))
  })
  .then(() => {
    return models.ConnectedAccount.create({
      provider: 'paypal',
      // Sandbox api keys
      clientId: '<KEY>',
      secret: '<KEY>'
    })
    .then((connectedAccount) => connectedAccount.setUser(data.user));
  })
  .then(() => {
    return models.User.create({
      email: 'stripe<EMAIL>',
      password: 'password'
    })
    .then((user) => data.user = user);
  })
  .then(() => {
    return models.Group.create({
      name: 'OpenCollective Demo with stripe',
      description: 'OpenCollective Demo group with stripe',
      isPublic: true,
      slug: 'oc-stripe'
    })<commit_msg>add mission to dummy collectives to get them to serve<commit_after>const exec = require('child-process-promise').exec;

const app = require('../index');
const models = app.set('models');
const roles = require('../server/constants/roles');

var data = {};

if (process.env.NODE_ENV !== 'development') {
  return console.error('Only run reset script in development');
}

exec('make dropdb && make database')
.then((result) => {
  console.log('output', result.stdout);

  return exec('SEQUELIZE_ENV=development npm run db:migrate')
})
.then((result) => {
  console.log('output', result.stdout);

  return models.Application.create({
    api_key: '<KEY>',
    name: 'webapp',
    _access: 1
  })
  .then(() => {
    return models.User.create({
      email: '<EMAIL>',
      password: 'password'
    })
    .then((user) => data.user = user);
  })
  .then(() => {
    return models.Group.create({
      name: 'OpenCollective Demo',
      description: 'OpenCollective Demo group',
      isPublic: true,
      slug: 'opencollective',
      mission: 'demo open collective'
    })
    .then((group) => group.addUserWithRole(data.user, roles.HOST))
  })
  .then(() => {
    return models.ConnectedAccount.create({
      provider: 'paypal',
      // Sandbox api keys
      clientId: '<KEY>',
      secret: '<KEY>'
    })
    .then((connectedAccount) => connectedAccount.setUser(data.user));
  })
  .then(() => {
    return models.User.create({
      email: '<EMAIL>',
      password: 'password'
    })
    .then((user) => data.user = user);
  })
  .then(() => {
    return models.Group.create({
      name: 'OpenCollective Demo with stripe',
      description: 'OpenCollective Demo group with stripe',
      isPublic: true,
      slug: 'oc-stripe',
      mission: 'oc with stripe'
    })
{'fraction_non_alphanumeric': 0.17711962833914052, 'fraction_numerical': 0.0005807200929152149, 'mean_word_length': 3.0625, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6912383', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1093, 'n_words': 249}