heroku/heroku-pg

View on GitHub
commands/promote.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function run has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function * run (context, heroku) {
  const fetcher = require('../lib/fetcher')(heroku)
  const {app, args} = context
  const attachment = yield fetcher.attachment(app, args.database)
  let current
Severity: Major
Found in commands/promote.js - About 3 hrs to fix

    Avoid deeply nested control flow statements.
    Open

            } else if (Date.now() > endTime) {
              return cli.action.done('timeout. Check your Attach DATABASE release for failures.')
            }
    Severity: Major
    Found in commands/promote.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                if (detach && detach.status === 'succeeded') {
                  msg += 'without an attached DATABASE_URL.'
                } else {
                  msg += `with ${current.addon.name} attached as DATABASE_URL.`
                }
      Severity: Major
      Found in commands/promote.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status