@happyvertical/github-actions 0.74.8
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/AGENT.md +33 -0
- package/LICENSE +7 -0
- package/README.md +147 -0
- package/dist/cli/claude-context.d.ts +3 -0
- package/dist/cli/claude-context.d.ts.map +1 -0
- package/dist/cli/claude-context.js +21 -0
- package/dist/cli/claude-context.js.map +1 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +325 -0
- package/dist/cli.js.map +1 -0
- package/dist/index-v2-CqFKwTm8.js +687 -0
- package/dist/index-v2-CqFKwTm8.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +637 -0
- package/dist/index.js.map +1 -0
- package/dist/labels-cli.d.ts +20 -0
- package/dist/labels-cli.d.ts.map +1 -0
- package/dist/planning/analyze.d.ts +13 -0
- package/dist/planning/analyze.d.ts.map +1 -0
- package/dist/planning/comment.d.ts +15 -0
- package/dist/planning/comment.d.ts.map +1 -0
- package/dist/planning/definition-of-ready.d.ts +15 -0
- package/dist/planning/definition-of-ready.d.ts.map +1 -0
- package/dist/planning/index.d.ts +14 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/types.d.ts +71 -0
- package/dist/planning/types.d.ts.map +1 -0
- package/dist/shared/adapters.d.ts +11 -0
- package/dist/shared/adapters.d.ts.map +1 -0
- package/dist/shared/ai.d.ts +43 -0
- package/dist/shared/ai.d.ts.map +1 -0
- package/dist/shared/github.d.ts +52 -0
- package/dist/shared/github.d.ts.map +1 -0
- package/dist/shared/index.d.ts +9 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/labels.d.ts +35 -0
- package/dist/shared/labels.d.ts.map +1 -0
- package/dist/shared/projects.d.ts +34 -0
- package/dist/shared/projects.d.ts.map +1 -0
- package/dist/triage/analyze.d.ts +12 -0
- package/dist/triage/analyze.d.ts.map +1 -0
- package/dist/triage/comment.d.ts +17 -0
- package/dist/triage/comment.d.ts.map +1 -0
- package/dist/triage/duplicates.d.ts +12 -0
- package/dist/triage/duplicates.d.ts.map +1 -0
- package/dist/triage/github.d.ts +5 -0
- package/dist/triage/github.d.ts.map +1 -0
- package/dist/triage/index-v2.d.ts +19 -0
- package/dist/triage/index-v2.d.ts.map +1 -0
- package/dist/triage/index.d.ts +13 -0
- package/dist/triage/index.d.ts.map +1 -0
- package/dist/triage/label-v2.d.ts +20 -0
- package/dist/triage/label-v2.d.ts.map +1 -0
- package/dist/triage/label.d.ts +16 -0
- package/dist/triage/label.d.ts.map +1 -0
- package/dist/triage/project-v2.d.ts +12 -0
- package/dist/triage/project-v2.d.ts.map +1 -0
- package/dist/triage/project.d.ts +7 -0
- package/dist/triage/project.d.ts.map +1 -0
- package/dist/triage/types.d.ts +64 -0
- package/dist/triage/types.d.ts.map +1 -0
- package/metadata.json +30 -0
- package/package.json +58 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TriageContext } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Apply labels to an issue using `@happyvertical/repos`.
|
|
4
|
+
*
|
|
5
|
+
* @param context - Triage context with token and repo info
|
|
6
|
+
* @param labels - Label names to apply
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyLabels(context: TriageContext, labels: string[]): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Remove an `agent: <type>` label from an issue. Silently ignores 404 errors.
|
|
11
|
+
*
|
|
12
|
+
* @param context - Triage context with token and repo info
|
|
13
|
+
* @param agentType - Agent type suffix (e.g., "triage", "planning")
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeAgentLabel(context: TriageContext, agentType: string): Promise<void>;
|
|
16
|
+
export declare function getTypeLabel(type: string): string;
|
|
17
|
+
export declare function getPriorityLabel(priority: string): string;
|
|
18
|
+
export declare function getSizeLabel(size: string): string;
|
|
19
|
+
export declare function getAgentLabel(agentType: string): string;
|
|
20
|
+
//# sourceMappingURL=label-v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-v2.d.ts","sourceRoot":"","sources":["../../src/triage/label-v2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TriageContext } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Apply labels to an issue using the raw GitHub API.
|
|
4
|
+
* @deprecated Use the v2 export which uses `@happyvertical/repos`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function applyLabels(context: TriageContext, labels: string[]): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Remove an `agent: <type>` label from an issue. Silently ignores 404 errors.
|
|
9
|
+
* @deprecated Use the v2 export which uses `@happyvertical/repos`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function removeAgentLabel(context: TriageContext, agentType: string): Promise<void>;
|
|
12
|
+
export declare function getTypeLabel(type: string): string;
|
|
13
|
+
export declare function getPriorityLabel(priority: string): string;
|
|
14
|
+
export declare function getSizeLabel(size: string): string;
|
|
15
|
+
export declare function getAgentLabel(agentType: string): string;
|
|
16
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/triage/label.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TriageContext } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Update an issue's status on the GitHub Projects V2 board using `@happyvertical/projects`.
|
|
4
|
+
*
|
|
5
|
+
* Adds the issue to the project if not already present, then sets the status field.
|
|
6
|
+
* No-ops if project integration is disabled or the status name is not configured.
|
|
7
|
+
*
|
|
8
|
+
* @param context - Triage context with project config
|
|
9
|
+
* @param statusName - Target status name (must exist in `config.statusOptions`)
|
|
10
|
+
*/
|
|
11
|
+
export declare function updateProjectStatus(context: TriageContext, statusName: string): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=project-v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-v2.d.ts","sourceRoot":"","sources":["../../src/triage/project-v2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAwDf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TriageContext } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Update an issue's status on the GitHub Projects V2 board via raw GraphQL.
|
|
4
|
+
* @deprecated Use the v2 export which uses `@happyvertical/projects`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function updateProjectStatus(context: TriageContext, statusName: string): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/triage/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAiGf"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Actions Issue Triage Types
|
|
3
|
+
*/
|
|
4
|
+
export interface TriageConfig {
|
|
5
|
+
/** Repository description for AI analysis */
|
|
6
|
+
repoDescription: string;
|
|
7
|
+
/** Package pattern (e.g., "@happyvertical/*", "@smrt/*") */
|
|
8
|
+
packagePattern?: string;
|
|
9
|
+
/** Example package names for AI context */
|
|
10
|
+
packageExamples?: string[];
|
|
11
|
+
/** Whether to update project board */
|
|
12
|
+
projectEnabled?: boolean;
|
|
13
|
+
/** GitHub Project V2 ID */
|
|
14
|
+
projectId?: string;
|
|
15
|
+
/** Status field ID */
|
|
16
|
+
statusFieldId?: string;
|
|
17
|
+
/** Status option IDs */
|
|
18
|
+
statusOptions?: {
|
|
19
|
+
[statusName: string]: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface AIAnalysis {
|
|
23
|
+
/** Issue type: bug, feature, docs, maintenance, research, question */
|
|
24
|
+
type: string;
|
|
25
|
+
/** Priority: critical, high, medium, low, icebox */
|
|
26
|
+
priority: string;
|
|
27
|
+
/** Size/effort estimate: xs, s, m, l, xl */
|
|
28
|
+
size: string;
|
|
29
|
+
/** Affected packages */
|
|
30
|
+
affected_packages?: string[];
|
|
31
|
+
/** Analysis reasoning */
|
|
32
|
+
reasoning: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DuplicateIssue {
|
|
35
|
+
number: number;
|
|
36
|
+
title: string;
|
|
37
|
+
state: string;
|
|
38
|
+
html_url: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TriageContext {
|
|
41
|
+
/** GitHub token */
|
|
42
|
+
token: string;
|
|
43
|
+
/** Repository owner */
|
|
44
|
+
owner: string;
|
|
45
|
+
/** Repository name */
|
|
46
|
+
repo: string;
|
|
47
|
+
/** Issue number */
|
|
48
|
+
issueNumber: number;
|
|
49
|
+
/** Issue title */
|
|
50
|
+
issueTitle: string;
|
|
51
|
+
/** Issue body */
|
|
52
|
+
issueBody?: string;
|
|
53
|
+
/** Issue author */
|
|
54
|
+
issueAuthor: string;
|
|
55
|
+
/** Configuration */
|
|
56
|
+
config: TriageConfig;
|
|
57
|
+
}
|
|
58
|
+
export interface TriageResult {
|
|
59
|
+
success: boolean;
|
|
60
|
+
analysis?: AIAnalysis;
|
|
61
|
+
duplicates?: DuplicateIssue[];
|
|
62
|
+
error?: string;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/triage/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WA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MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/metadata.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@happyvertical/github-actions",
|
|
3
|
+
"path": "packages/github-actions",
|
|
4
|
+
"position": {
|
|
5
|
+
"index": 13,
|
|
6
|
+
"count": 30
|
|
7
|
+
},
|
|
8
|
+
"description": "Reusable GitHub Actions utilities for issue triage, PR validation, and workflow automation",
|
|
9
|
+
"provides": [
|
|
10
|
+
"Reusable GitHub Actions utilities for issue triage, PR validation, and workflow automation"
|
|
11
|
+
],
|
|
12
|
+
"implements": [],
|
|
13
|
+
"requires": {
|
|
14
|
+
"workspace": [
|
|
15
|
+
"@happyvertical/projects",
|
|
16
|
+
"@happyvertical/repos"
|
|
17
|
+
],
|
|
18
|
+
"externalHappyVertical": [],
|
|
19
|
+
"external": []
|
|
20
|
+
},
|
|
21
|
+
"dependents": [],
|
|
22
|
+
"stability": {
|
|
23
|
+
"level": "stable",
|
|
24
|
+
"reason": "Primary package surface is described as implemented and production-oriented."
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"github",
|
|
28
|
+
"actions"
|
|
29
|
+
]
|
|
30
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@happyvertical/github-actions",
|
|
3
|
+
"version": "0.74.8",
|
|
4
|
+
"description": "Reusable GitHub Actions utilities for issue triage, PR validation, and workflow automation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"github-actions": "./dist/cli.js",
|
|
10
|
+
"have-github-actions-context": "./dist/cli/claude-context.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@happyvertical/projects": "0.74.8",
|
|
20
|
+
"@happyvertical/repos": "0.74.8"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "25.0.10",
|
|
24
|
+
"typescript": "^5.9.3",
|
|
25
|
+
"vite": "7.3.2",
|
|
26
|
+
"vite-plugin-dts": "4.5.4",
|
|
27
|
+
"vitest": "4.1.5"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"AGENT.md",
|
|
34
|
+
"metadata.json"
|
|
35
|
+
],
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"registry": "https://registry.npmjs.org",
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/happyvertical/sdk.git",
|
|
43
|
+
"directory": "packages/github-actions"
|
|
44
|
+
},
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/happyvertical/sdk/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/happyvertical/sdk/tree/main/packages/github-actions#readme",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"scripts": {
|
|
51
|
+
"test": "npx vitest run",
|
|
52
|
+
"test:watch": "npx vitest",
|
|
53
|
+
"build": "vite build",
|
|
54
|
+
"build:watch": "vite build --watch",
|
|
55
|
+
"clean": "rm -rf dist",
|
|
56
|
+
"dev": "npm run build:watch & npm run test:watch"
|
|
57
|
+
}
|
|
58
|
+
}
|