bowtie-co/node-houndstooth-sdk

View on GitHub
src/models/GitHub.js

Summary

Maintainability
C
1 day
Test Coverage
D
63%

Function _loadPath has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _loadPath (options = {}) {
    return new Promise(
      (resolve, reject) => {
        const content = {}

Severity: Major
Found in src/models/GitHub.js - About 2 hrs to fix

    File GitHub.js has 266 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const async = require('async')
    const parse = require('parse-link-header')
    const Octokit = require('@octokit/rest')
    const { verifyRequired } = require('@bowtie/utils')
    
    
    Severity: Minor
    Found in src/models/GitHub.js - About 2 hrs to fix

      Function upsertFiles has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        upsertFiles (params = {}) {
          verifyRequired(params, [ 'owner', 'repo', 'files', 'message' ])
      
          return new Promise(
            (resolve, reject) => {
      Severity: Major
      Found in src/models/GitHub.js - About 2 hrs to fix

        Function _exec has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          _exec (key, action, params = {}) {
            return new Promise(
              (resolve, reject) => {
                this.logger.info(`Exec github for key: ${key}`)
        
        
        Severity: Major
        Found in src/models/GitHub.js - About 2 hrs to fix

          There are no issues that match your filters.

          Category
          Status