From 1f40ef80092f0a5821984d61b910d0fee90386e0 Mon Sep 17 00:00:00 2001 From: Gitlab-CI Date: Wed, 5 Dec 2018 12:33:56 +0700 Subject: [PATCH] fix(ribbon): fix ribbon getting wrong url --- src/cli/cmds/ribbon.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cli/cmds/ribbon.js b/src/cli/cmds/ribbon.js index 3b7ea35..cf1579c 100644 --- a/src/cli/cmds/ribbon.js +++ b/src/cli/cmds/ribbon.js @@ -1,5 +1,4 @@ /* eslint-disable no-undef, no-param-reassign, global-require, no-unused-vars, no-console, no-underscore-dangle, prefer-destructuring */ -const execa = require('execa'); const path = require('path'); const fs = require('fs'); @@ -25,10 +24,8 @@ exports.handler = async (argv) => { const repoName = url.indexOf('github.com') !== -1 ? 'GitHub' : 'GitLab'; - const { stdout: repoUrl } = await execa.shell(`node ${argv.$0} meta http-url -p ${argv.path}`); - const ribbon = { - url: repoUrl, + url: url.replace(/\.git$/, ''), text: `Fork us on ${repoName}`, };