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

Invalid remote origin URL in non-Github repo #62

Open
Lakitna opened this issue Jun 28, 2021 · 1 comment
Open

Invalid remote origin URL in non-Github repo #62

Lakitna opened this issue Jun 28, 2021 · 1 comment

Comments

@Lakitna
Copy link

Lakitna commented Jun 28, 2021

I was looking into using gitdown for a thing. However, I'm working with an Azure DevOps repository, which is triggering an edge case.

The thing that is tripping me up right now is the error below thrown by gitinfo. I've anonymized some values in the stack trace ;)

Error: Invalid remote origin URL ("https://{organization_name}@dev.azure.com/{organization_name}/{project_name}/_git/{repository_name}").
    at parseRemoteOriginUrl ({repo_root}\node_modules\gitinfo\dist\utils.js:74:11)
    at Object.gitinfo.getUsername ({repo_root}\node_modules\gitinfo\dist\gitinfo.js:132:44)
    at Object.gitinfo.getGithubUrl ({repo_root}\node_modules\gitinfo\dist\gitinfo.js:51:44)
    at Object.helper.compile ({repo_root}\node_modules\gitdown\dist\helpers\gitinfo.js:36:41)
    at Object.gitdown.resolveURLs ({repo_root}\node_modules\gitdown\dist\gitdown.js:111:35)
    at Object.gitdown.get ({repo_root}\node_modules\gitdown\dist\gitdown.js:54:19)
    at async Object.gitdown.writeFile ({repo_root}\node_modules\gitdown\dist\gitdown.js:66:26)

I have no interest in using this functionality and have not included any of the gitinfo things in the Markdown files. However, it still tries to gather the information with the error as a result. I have not found an option to simply disable gitinfo altogether.

I've taken a look at the source code of gitinfo (different repo, I know) and it assumes a Github repo. That makes it a very good idea to allow gitdown users to disable the gitinfo parsing imo.

@gajus
Copy link
Owner

gajus commented Jun 28, 2021

Would accept a PR that allows to disable gitinfo.

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

No branches or pull requests

2 participants