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

Link to source is invalid when using ssh remote git@github.com:owner/name.git #1295

Closed
ggrossetie opened this issue Nov 4, 2019 · 0 comments · Fixed by #1296
Closed

Link to source is invalid when using ssh remote git@github.com:owner/name.git #1295

ggrossetie opened this issue Nov 4, 2019 · 0 comments · Fixed by #1296

Comments

@ggrossetie
Copy link
Contributor

  • What version of documentation.js are you using? latest (12.1.2)
  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): CLI

Please note that this bug is fixed in git-url-parse 11.1.2.

Reproduction case

$ npm init -y
$ npm i --save git-url-parse@10.1.0

test.js

const GitUrlParse = require("git-url-parse");
console.log(GitUrlParse("git@github.com:asciidoctor/asciidoctor.js.git"));
$ node test.js
{ protocols: [ 'http' ],
  protocol: 'ssh',
  port: null,
  resource: 'github.com',
  user: 'git',
  pathname: '/:asciidoctor/asciidoctor.js.git',
  hash: '',
  search: '',
  href: 'http://git@github.com/:asciidoctor/asciidoctor.js.git',
  query: [Object: null prototype] {},
  token: '',
  toString: [Function],
  source: 'github.com',
  git_suffix: true,
  name: 'asciidoctor.js',
  owner: ':asciidoctor',
  commit: undefined,
  ref: '',
  filepathtype: '',
  filepath: '',
  organization: ':asciidoctor',
  full_name: ':asciidoctor/asciidoctor.js' }

Notice that the organization and the owner is :asciidoctor (prefixed by :).

$ npm i --save git-url-parse@11.1.2
{ protocols: [],
  protocol: 'ssh',
  port: null,
  resource: 'github.com',
  user: 'git',
  pathname: '/asciidoctor/asciidoctor.js.git',
  hash: '',
  search: '',
  href: 'git@github.com:asciidoctor/asciidoctor.js.git',
  query: [Object: null prototype] {},
  token: '',
  toString: [Function],
  source: 'github.com',
  git_suffix: true,
  name: 'asciidoctor.js',
  owner: 'asciidoctor',
  commit: undefined,
  ref: '',
  filepathtype: '',
  filepath: '',
  organization: 'asciidoctor',
  full_name: 'asciidoctor/asciidoctor.js' }

Now the organization and the owner is valid.

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

Successfully merging a pull request may close this issue.

1 participant