-
Notifications
You must be signed in to change notification settings - Fork 488
Link to source is invalid when using ssh remote [email protected]:owner/name.git #1295
Copy link
Copy link
Closed
Description
- 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 [email protected]test.js
const GitUrlParse = require("git-url-parse");
console.log(GitUrlParse("[email protected]: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://[email protected]/: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 [email protected]{ protocols: [],
protocol: 'ssh',
port: null,
resource: 'github.com',
user: 'git',
pathname: '/asciidoctor/asciidoctor.js.git',
hash: '',
search: '',
href: '[email protected]: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.
Metadata
Metadata
Assignees
Labels
No labels