@xcelera/cli 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action.js +8 -4
- package/dist/action.js.map +1 -1
- package/dist/cli.js +10 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/action.js
CHANGED
|
@@ -36530,8 +36530,8 @@ async function getRemoteUrl() {
|
|
|
36530
36530
|
}
|
|
36531
36531
|
return remoteUrl;
|
|
36532
36532
|
}
|
|
36533
|
-
catch {
|
|
36534
|
-
throw new Error('Could not determine git remote URL. Please ensure you have an origin remote configured.');
|
|
36533
|
+
catch (error) {
|
|
36534
|
+
throw new Error('Could not determine git remote URL. Please ensure you have an origin remote configured.', { cause: error });
|
|
36535
36535
|
}
|
|
36536
36536
|
}
|
|
36537
36537
|
async function isGitRepository() {
|
|
@@ -36539,7 +36539,11 @@ async function isGitRepository() {
|
|
|
36539
36539
|
}
|
|
36540
36540
|
async function getCommit(hash = 'HEAD') {
|
|
36541
36541
|
// format: %H: commit hash, %s: subject, %an: author name, %ae: author email, %ai: author date
|
|
36542
|
-
const commit = await simpleGit().show([
|
|
36542
|
+
const commit = await simpleGit().show([
|
|
36543
|
+
hash,
|
|
36544
|
+
'--no-patch',
|
|
36545
|
+
'--format=%H|%s|%an|%ae|%ai'
|
|
36546
|
+
]);
|
|
36543
36547
|
const [resolvedHash, message, author_name, author_email, date] = commit
|
|
36544
36548
|
.trim()
|
|
36545
36549
|
.split('|');
|
|
@@ -36551,7 +36555,7 @@ async function getCommit(hash = 'HEAD') {
|
|
|
36551
36555
|
message: message,
|
|
36552
36556
|
author: author_name || 'Unknown',
|
|
36553
36557
|
email: author_email || '',
|
|
36554
|
-
date: date
|
|
36558
|
+
date: date ? new Date(date).toISOString() : new Date().toISOString()
|
|
36555
36559
|
};
|
|
36556
36560
|
}
|
|
36557
36561
|
|