@oss-autopilot/core 0.44.18 → 0.46.0
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/cli-registry.js +78 -0
- package/dist/cli.bundle.cjs +58 -1396
- package/dist/cli.bundle.cjs.map +4 -4
- package/dist/commands/dashboard-lifecycle.js +1 -1
- package/dist/commands/dashboard-process.d.ts +19 -0
- package/dist/commands/dashboard-process.js +93 -0
- package/dist/commands/dashboard-server.d.ts +1 -15
- package/dist/commands/dashboard-server.js +27 -84
- package/dist/commands/dashboard.d.ts +0 -10
- package/dist/commands/dashboard.js +1 -27
- package/dist/commands/index.d.ts +52 -8
- package/dist/commands/index.js +57 -9
- package/dist/commands/pr-template.d.ts +9 -0
- package/dist/commands/pr-template.js +14 -0
- package/dist/commands/rate-limiter.d.ts +31 -0
- package/dist/commands/rate-limiter.js +36 -0
- package/dist/commands/startup.d.ts +1 -1
- package/dist/commands/startup.js +21 -22
- package/dist/commands/stats.d.ts +15 -0
- package/dist/commands/stats.js +57 -0
- package/dist/core/github-stats.d.ts +0 -4
- package/dist/core/github-stats.js +1 -9
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.js +3 -1
- package/dist/core/pr-monitor.js +3 -13
- package/dist/core/pr-template.d.ts +27 -0
- package/dist/core/pr-template.js +65 -0
- package/dist/core/state.d.ts +20 -17
- package/dist/core/state.js +29 -30
- package/dist/core/stats.d.ts +25 -0
- package/dist/core/stats.js +33 -0
- package/dist/core/types.d.ts +2 -2
- package/dist/core/utils.d.ts +16 -9
- package/dist/core/utils.js +45 -11
- package/dist/formatters/json.d.ts +8 -2
- package/package.json +1 -1
- package/dist/commands/dashboard-components.d.ts +0 -33
- package/dist/commands/dashboard-components.js +0 -57
- package/dist/commands/dashboard-formatters.d.ts +0 -12
- package/dist/commands/dashboard-formatters.js +0 -19
- package/dist/commands/dashboard-scripts.d.ts +0 -7
- package/dist/commands/dashboard-scripts.js +0 -281
- package/dist/commands/dashboard-styles.d.ts +0 -5
- package/dist/commands/dashboard-styles.js +0 -765
- package/dist/commands/dashboard-templates.d.ts +0 -12
- package/dist/commands/dashboard-templates.js +0 -470
package/dist/cli-registry.js
CHANGED
|
@@ -993,4 +993,82 @@ export const commands = [
|
|
|
993
993
|
});
|
|
994
994
|
},
|
|
995
995
|
},
|
|
996
|
+
// ── PR Template ──────────────────────────────────────────────────────
|
|
997
|
+
{
|
|
998
|
+
name: 'pr-template',
|
|
999
|
+
register(program) {
|
|
1000
|
+
program
|
|
1001
|
+
.command('pr-template <repo>')
|
|
1002
|
+
.description("Fetch a repository's PR description template")
|
|
1003
|
+
.option('--json', 'Output as JSON')
|
|
1004
|
+
.action(async (repo, options) => {
|
|
1005
|
+
try {
|
|
1006
|
+
const { runPRTemplate } = await import('./commands/pr-template.js');
|
|
1007
|
+
const data = await runPRTemplate({ repo });
|
|
1008
|
+
if (options.json) {
|
|
1009
|
+
outputJson(data);
|
|
1010
|
+
}
|
|
1011
|
+
else if (data.template) {
|
|
1012
|
+
console.log(`\nPR template found at: ${data.source}\n`);
|
|
1013
|
+
console.log(data.template);
|
|
1014
|
+
}
|
|
1015
|
+
else if (data.error) {
|
|
1016
|
+
console.error(`\nWarning: Could not check for PR template: ${data.error}`);
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
console.log('\nNo PR template found for this repository.');
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
catch (err) {
|
|
1023
|
+
handleCommandError(err, options.json);
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
},
|
|
1027
|
+
},
|
|
1028
|
+
// ── Stats ─────────────────────────────────────────────────────────────
|
|
1029
|
+
{
|
|
1030
|
+
name: 'stats',
|
|
1031
|
+
localOnly: true,
|
|
1032
|
+
register(program) {
|
|
1033
|
+
program
|
|
1034
|
+
.command('stats')
|
|
1035
|
+
.description('Show contribution statistics')
|
|
1036
|
+
.option('--json', 'Output as JSON')
|
|
1037
|
+
.option('--markdown', 'Output as shareable markdown report')
|
|
1038
|
+
.option('--badge', 'Output as shields.io endpoint JSON')
|
|
1039
|
+
.action(async (options) => {
|
|
1040
|
+
try {
|
|
1041
|
+
const { runStats, formatStatsMarkdown, formatStatsBadge } = await import('./commands/stats.js');
|
|
1042
|
+
const data = await runStats();
|
|
1043
|
+
if (options.badge) {
|
|
1044
|
+
console.log(JSON.stringify(formatStatsBadge(data), null, 2));
|
|
1045
|
+
}
|
|
1046
|
+
else if (options.markdown) {
|
|
1047
|
+
console.log(formatStatsMarkdown(data));
|
|
1048
|
+
}
|
|
1049
|
+
else if (options.json) {
|
|
1050
|
+
outputJson(data);
|
|
1051
|
+
}
|
|
1052
|
+
else {
|
|
1053
|
+
console.log(`\nOSS Contribution Stats (@${data.username})\n`);
|
|
1054
|
+
console.log(` Merged PRs: ${data.totalMerged}`);
|
|
1055
|
+
console.log(` Closed PRs: ${data.totalClosed}`);
|
|
1056
|
+
console.log(` Merge Rate: ${data.mergeRateFormatted}`);
|
|
1057
|
+
console.log(` Active PRs: ${data.activePRs}`);
|
|
1058
|
+
console.log(` Repos Contributed: ${data.reposContributed}`);
|
|
1059
|
+
if (data.topRepos.length > 0) {
|
|
1060
|
+
console.log('\n Top Repos:');
|
|
1061
|
+
for (const repo of data.topRepos.slice(0, 5)) {
|
|
1062
|
+
console.log(` ${repo.repo}: ${repo.mergedCount} merged`);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
console.log('\n Use --markdown for a shareable report or --badge for shields.io');
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
catch (err) {
|
|
1069
|
+
handleCommandError(err, options.json);
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
996
1074
|
];
|