Skip to content

Commit

Permalink
fix: handle when remote is ssh (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Mar 12, 2024
1 parent da8727a commit ee681c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/prepare_security.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ class PrepareSecurityRelease {
checkRemote(cli) {
const remote = runSync('git', ['ls-remote', '--get-url', 'origin']).trim();
const { owner, repo } = this.repository;
const securityReleaseOrigin = `https://github.com/${owner}/${repo}.git`;
const securityReleaseOrigin = [
`https://github.com/${owner}/${repo}.git`,
`git@github.com:${owner}/${repo}.git`
];

if (remote !== securityReleaseOrigin) {
if (!securityReleaseOrigin.includes(remote)) {
cli.error(`Wrong repository! It should be ${securityReleaseOrigin}`);
process.exit(1);
}
Expand Down

0 comments on commit ee681c6

Please sign in to comment.