Skip to content

Commit

Permalink
Work when remote URL doesn't have .git suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
greglockwood committed Jan 18, 2021
1 parent fd941be commit 0f03fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async function ensurePrsExist({
process.exit(0);
}

const nickAndRepo = remoteUrl.match(/github\.com[/:](.*)\.git/)[1];
const nickAndRepo = remoteUrl.match(/github\.com[/:](.*)/)[1].replace(/\.git$/, '');
if (!nickAndRepo) {
console.log(`I could not parse your remote ${remote} repo URL`.red);
process.exit(4);
Expand Down

0 comments on commit 0f03fb9

Please sign in to comment.