runline 0.7.5 → 0.7.6
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.
|
@@ -473,6 +473,103 @@ export default function github(rl) {
|
|
|
473
473
|
},
|
|
474
474
|
});
|
|
475
475
|
// ── Repository ──────────────────────────────────────
|
|
476
|
+
rl.registerAction("commit.list", {
|
|
477
|
+
description: "List repository commits, including latest commits on a branch or path",
|
|
478
|
+
inputSchema: {
|
|
479
|
+
owner: {
|
|
480
|
+
type: "string",
|
|
481
|
+
required: true,
|
|
482
|
+
description: "Repository owner",
|
|
483
|
+
},
|
|
484
|
+
repo: { type: "string", required: true, description: "Repository name" },
|
|
485
|
+
sha: {
|
|
486
|
+
type: "string",
|
|
487
|
+
required: false,
|
|
488
|
+
description: "SHA or branch to start listing commits from",
|
|
489
|
+
},
|
|
490
|
+
path: {
|
|
491
|
+
type: "string",
|
|
492
|
+
required: false,
|
|
493
|
+
description: "Only commits containing this file path",
|
|
494
|
+
},
|
|
495
|
+
author: {
|
|
496
|
+
type: "string",
|
|
497
|
+
required: false,
|
|
498
|
+
description: "GitHub username or email address",
|
|
499
|
+
},
|
|
500
|
+
since: {
|
|
501
|
+
type: "string",
|
|
502
|
+
required: false,
|
|
503
|
+
description: "Only commits after this ISO 8601 timestamp",
|
|
504
|
+
},
|
|
505
|
+
until: {
|
|
506
|
+
type: "string",
|
|
507
|
+
required: false,
|
|
508
|
+
description: "Only commits before this ISO 8601 timestamp",
|
|
509
|
+
},
|
|
510
|
+
perPage: {
|
|
511
|
+
type: "number",
|
|
512
|
+
required: false,
|
|
513
|
+
description: "Results per page (max: 100)",
|
|
514
|
+
},
|
|
515
|
+
page: { type: "number", required: false, description: "Page number" },
|
|
516
|
+
},
|
|
517
|
+
async execute(input, ctx) {
|
|
518
|
+
const { owner, repo, sha, path, author, since, until, perPage, page } = (input ?? {});
|
|
519
|
+
const qs = {};
|
|
520
|
+
if (sha)
|
|
521
|
+
qs.sha = sha;
|
|
522
|
+
if (path)
|
|
523
|
+
qs.path = path;
|
|
524
|
+
if (author)
|
|
525
|
+
qs.author = author;
|
|
526
|
+
if (since)
|
|
527
|
+
qs.since = since;
|
|
528
|
+
if (until)
|
|
529
|
+
qs.until = until;
|
|
530
|
+
if (perPage)
|
|
531
|
+
qs.per_page = perPage;
|
|
532
|
+
if (page)
|
|
533
|
+
qs.page = page;
|
|
534
|
+
return gh(ctx, "GET", `/repos/${owner}/${repo}/commits`, undefined, qs);
|
|
535
|
+
},
|
|
536
|
+
});
|
|
537
|
+
rl.registerAction("commit.get", {
|
|
538
|
+
description: "Get a repository commit by SHA, branch, or tag ref",
|
|
539
|
+
inputSchema: {
|
|
540
|
+
owner: {
|
|
541
|
+
type: "string",
|
|
542
|
+
required: true,
|
|
543
|
+
description: "Repository owner",
|
|
544
|
+
},
|
|
545
|
+
repo: { type: "string", required: true, description: "Repository name" },
|
|
546
|
+
ref: {
|
|
547
|
+
type: "string",
|
|
548
|
+
required: true,
|
|
549
|
+
description: "Commit SHA, branch name, or tag name",
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
async execute(input, ctx) {
|
|
553
|
+
const { owner, repo, ref } = input;
|
|
554
|
+
return gh(ctx, "GET", `/repos/${owner}/${repo}/commits/${encodeURIComponent(String(ref))}`);
|
|
555
|
+
},
|
|
556
|
+
});
|
|
557
|
+
rl.registerAction("branch.get", {
|
|
558
|
+
description: "Get a repository branch, including its latest commit",
|
|
559
|
+
inputSchema: {
|
|
560
|
+
owner: {
|
|
561
|
+
type: "string",
|
|
562
|
+
required: true,
|
|
563
|
+
description: "Repository owner",
|
|
564
|
+
},
|
|
565
|
+
repo: { type: "string", required: true, description: "Repository name" },
|
|
566
|
+
branch: { type: "string", required: true, description: "Branch name" },
|
|
567
|
+
},
|
|
568
|
+
async execute(input, ctx) {
|
|
569
|
+
const { owner, repo, branch } = input;
|
|
570
|
+
return gh(ctx, "GET", `/repos/${owner}/${repo}/branches/${encodeURIComponent(String(branch))}`);
|
|
571
|
+
},
|
|
572
|
+
});
|
|
476
573
|
rl.registerAction("repository.get", {
|
|
477
574
|
description: "Get repository details",
|
|
478
575
|
inputSchema: {
|