Skip to content

Commit 7586bae

Browse files
tidy-devCopilot
andcommitted
Initial scaffold: action.yml, TypeScript source, ncc bundle
- action.yml with inputs (base-ref, head-ref, instructions, model, pr-strategy) and outputs (release-notes, release-notes-json, skipped-prs, uncertain-entries) - src/inputs.ts: parse and validate action inputs - src/prs.ts: find PRs via merge commits or GitHub API, fetch metadata - src/prompt.ts: build Copilot CLI prompt from PR data + custom instructions - src/copilot.ts: install and invoke Copilot CLI - src/outputs.ts: parse JSON output, format markdown, set action outputs - src/index.ts: orchestration pipeline - dist/: bundled via @vercel/ncc for node20 runtime Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 parents  commit 7586bae

28 files changed

Lines changed: 39023 additions & 0 deletions

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
lib/
3+
coverage/
4+
5+
# Ignore compiled JS in src, but keep dist/
6+
src/**/*.js
7+
src/**/*.d.ts
8+
src/**/*.js.map

action.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Copilot Release Notes'
2+
description: 'AI-powered release notes generation from PRs between two refs, using GitHub Copilot CLI'
3+
author: 'GitHub'
4+
5+
branding:
6+
icon: 'file-text'
7+
color: 'blue'
8+
9+
inputs:
10+
base-ref:
11+
description: 'Tag, branch, or SHA to compare from (e.g., v3.5.6, release-3.5.6)'
12+
required: true
13+
head-ref:
14+
description: 'Tag, branch, or SHA to compare to (defaults to HEAD)'
15+
required: false
16+
default: 'HEAD'
17+
instructions:
18+
description: 'Path to a markdown file with team-specific style guide for release notes'
19+
required: false
20+
model:
21+
description: 'Model override for the Copilot CLI (e.g., gpt-4o, claude-sonnet-4)'
22+
required: false
23+
pr-strategy:
24+
description: 'How to find PRs: merge-commits (default) or github-api'
25+
required: false
26+
default: 'merge-commits'
27+
28+
outputs:
29+
release-notes:
30+
description: 'Generated release notes as formatted markdown text'
31+
release-notes-json:
32+
description: 'Structured JSON with per-entry data (tag, description, pr number, author)'
33+
skipped-prs:
34+
description: 'JSON array of PRs excluded from notes with reasons'
35+
uncertain-entries:
36+
description: 'JSON array of entries flagged for human review'
37+
38+
runs:
39+
using: 'node20'
40+
main: 'dist/index.js'

dist/copilot.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export interface CopilotResult {
2+
stdout: string;
3+
exitCode: number;
4+
}
5+
/**
6+
* Ensure the Copilot CLI is installed and available.
7+
*/
8+
export declare function ensureCopilotCLI(): Promise<string>;
9+
/**
10+
* Run the Copilot CLI with the given prompt and return the result.
11+
*/
12+
export declare function runCopilot(copilotPath: string, prompt: string, model?: string): Promise<CopilotResult>;

dist/copilot.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

dist/index.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)