Skip to content

Commit 3595060

Browse files
committed
chore: Cleanup
1 parent 9143b2b commit 3595060

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

dist/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,18 +364,15 @@ try {
364364
console.log("Adding private key(s) to agent");
365365
child_process.execFileSync(sshAddCmd, [privateKey]);
366366

367-
console.log("Key(s) added:");
368-
367+
console.log("Key added:");
369368
child_process.execFileSync(sshAddCmd, ['-l'], { stdio: 'inherit' });
370-
371369
console.log('Configuring deployment key(s)');
372-
373370
child_process.execFileSync(sshAddCmd, ['-L']).toString().trim().split(/\r?\n/).forEach(function(key) {
374371
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
375372

376373
if (!parts) {
377374
if (logPublicKey) {
378-
console.log(`Comment for (public) key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
375+
console.log(`Comment for (public) key does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
379376
}
380377
return;
381378
}
@@ -395,7 +392,6 @@ try {
395392
+ ` IdentitiesOnly yes\n`;
396393

397394
fs.appendFileSync(`${homeSsh}/config`, sshConfig);
398-
399395
console.log(`Added deploy-key mapping: Use identity '${homeSsh}/key-${sha256}' for GitHub repository ${ownerAndRepo}`);
400396
});
401397

index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@ try {
4444
console.log("Adding private key(s) to agent");
4545
child_process.execFileSync(sshAddCmd, [privateKey]);
4646

47-
console.log("Key(s) added:");
48-
47+
console.log("Key added:");
4948
child_process.execFileSync(sshAddCmd, ['-l'], { stdio: 'inherit' });
50-
5149
console.log('Configuring deployment key(s)');
52-
5350
child_process.execFileSync(sshAddCmd, ['-L']).toString().trim().split(/\r?\n/).forEach(function(key) {
5451
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
5552

5653
if (!parts) {
5754
if (logPublicKey) {
58-
console.log(`Comment for (public) key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
55+
console.log(`Comment for (public) key does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
5956
}
6057
return;
6158
}
@@ -75,7 +72,6 @@ try {
7572
+ ` IdentitiesOnly yes\n`;
7673

7774
fs.appendFileSync(`${homeSsh}/config`, sshConfig);
78-
7975
console.log(`Added deploy-key mapping: Use identity '${homeSsh}/key-${sha256}' for GitHub repository ${ownerAndRepo}`);
8076
});
8177

0 commit comments

Comments
 (0)