Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when repository is not hosted on github #2

Open
SupernaviX opened this issue Mar 1, 2018 · 2 comments
Open

TypeError when repository is not hosted on github #2

SupernaviX opened this issue Mar 1, 2018 · 2 comments

Comments

@SupernaviX
Copy link

Hi,

I seem to be getting a TypeError trying to generate docs for something without a repository url.

Unhandled rejection TypeError: Cannot read property 'isDirty' of undefined
    at DocBuilder.getSource (/Users/gelliss/stash/miniapp-version-resolver/node_modules/docts/dist/DocBuilder.js:52:30)
    at DocBuilder.formatPos (/Users/gelliss/stash/miniapp-version-resolver/node_modules/docts/dist/DocBuilder.js:76:22)
    at DocBuilder.printTitle (/Users/gelliss/stash/miniapp-version-resolver/node_modules/docts/dist/DocBuilder.js:93:22)
    at DocBuilder.printClass (/Users/gelliss/stash/miniapp-version-resolver/node_modules/docts/dist/DocBuilder.js:164:18)
    at /Users/gelliss/stash/miniapp-version-resolver/node_modules/docts/dist/DocBuilder.js:201:64
    at tryCatcher (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/map.js:61:38)
    at MappingPromiseArray.PromiseArray._iterate (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/promise_array.js:114:31)
    at MappingPromiseArray.init (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/promise_array.js:78:10)
    at MappingPromiseArray._asyncInit (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/map.js:30:10)
    at Async._drainQueue (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/async.js:138:12)
    at Async._drainQueues (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/gelliss/stash/miniapp-version-resolver/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

Taking a quick peek at the code, it looks like there's a regex explicitly checking for a repository.url that points to github. The project I'm trying to use this on is in an internal bitbucket instance, it would be helpful if docts either supported arbitrary repo urls or made the url optional.

@jjrv
Copy link
Member

jjrv commented Mar 2, 2018

Can you post here your repo URL and some link to the code, with a range of lines highlighted (if BitBucket supports that)? I'll make it work without the URL, but it could also support adding readme links to code hosted on BitBucket.

@SupernaviX
Copy link
Author

The repo is private so I can't show the contents, but if all you're interested in is the URL structure than no problem.

Clone url:
http://stash.es.ad.adp.com/scm/mea/miniapp-version-resolver.git
Link to a particular file, at a specific commit ("master" also works) with lines 4-8 highlighted:
http://stash.es.ad.adp.com/projects/mea/repos/miniapp-version-resolver/browse/lib/errors/errors.ts?at=9fd84bd824c54946f453c9dd67c1d5f127c10a80#4-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants