@theholocron/holocron-plugin-github 3.0.1 → 3.0.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/index.d.mts +74 -74
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -7,69 +7,20 @@ declare const resolveSyncToken: (input?: ResolveTokenInput) => string;
|
|
|
7
7
|
declare const resolveReleaseToken: (input?: ResolveTokenInput) => string;
|
|
8
8
|
declare const resolveAdminToken: (input?: ResolveTokenInput) => string;
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region src/
|
|
11
|
-
|
|
12
|
-
* Encrypt `value` for the given GitHub-provided base64 public key.
|
|
13
|
-
* Returns the base64 ciphertext to send as `encrypted_value`.
|
|
14
|
-
*/
|
|
15
|
-
declare function encryptSecret(publicKeyBase64: string, value: string): Promise<string>;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/capabilities/source.d.ts
|
|
18
|
-
interface SourceOptions {
|
|
19
|
-
repo: string;
|
|
20
|
-
repoRoot: string;
|
|
21
|
-
}
|
|
22
|
-
declare class GitHubSource implements Source {
|
|
23
|
-
private readonly client;
|
|
24
|
-
readonly key: "source";
|
|
25
|
-
readonly providerName = "github";
|
|
26
|
-
private readonly owner;
|
|
27
|
-
private readonly name;
|
|
28
|
-
private readonly repo;
|
|
29
|
-
private readonly repoRoot;
|
|
30
|
-
private readonly workflowDir;
|
|
31
|
-
constructor(client: GitHubClient, opts: SourceOptions);
|
|
32
|
-
whoami(): Promise<{
|
|
33
|
-
login: string;
|
|
34
|
-
}>;
|
|
35
|
-
getRepo(): Promise<RepoRef>;
|
|
36
|
-
listRulesets(): Promise<Ruleset[]>;
|
|
37
|
-
createRuleset(payload: Record<string, unknown>): Promise<Ruleset>;
|
|
38
|
-
updateRuleset(id: number, payload: Record<string, unknown>): Promise<Ruleset>;
|
|
39
|
-
updateRepoSettings(settings: RepoSettings): Promise<void>;
|
|
40
|
-
protectBranch(branch: string, payload: Record<string, unknown>): Promise<void>;
|
|
41
|
-
enableVulnerabilityAlerts(): Promise<void>;
|
|
42
|
-
enableAutomatedSecurityFixes(): Promise<void>;
|
|
43
|
-
enableSecretScanning(): Promise<void>;
|
|
44
|
-
enableCodeScanning(): Promise<string>;
|
|
45
|
-
disableDefaultCodeScanning(): Promise<void>;
|
|
46
|
-
enableDependencyGraph(): Promise<void>;
|
|
47
|
-
enablePrivateVulnerabilityReporting(): Promise<void>;
|
|
48
|
-
listWorkflowFiles(): Promise<string[]>;
|
|
49
|
-
readWorkflowFile(name: string): Promise<string | null>;
|
|
50
|
-
writeWorkflowFile(name: string, contents: string): Promise<void>;
|
|
51
|
-
removeWorkflowFile(name: string): Promise<void>;
|
|
52
|
-
writeRepoFile(path: string, contents: string): Promise<void>;
|
|
53
|
-
syncLabels(canonical: ReadonlyArray<LabelDef>, stale: ReadonlyArray<string>): Promise<string>;
|
|
54
|
-
syncProperties(values: Record<string, string>): Promise<string>;
|
|
55
|
-
syncTeams(teams: TeamEntry$1[]): Promise<string>;
|
|
56
|
-
syncTopics(topics: string[]): Promise<string>;
|
|
57
|
-
syncDescription(description: string): Promise<string>;
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/capabilities/secrets.d.ts
|
|
61
|
-
interface SecretsOptions {
|
|
10
|
+
//#region src/capabilities/ci.d.ts
|
|
11
|
+
interface CiOptions {
|
|
62
12
|
repo: string;
|
|
63
13
|
}
|
|
64
|
-
declare class
|
|
14
|
+
declare class GitHubCi implements Ci {
|
|
65
15
|
private readonly client;
|
|
66
16
|
private readonly opts;
|
|
67
|
-
readonly key: "
|
|
17
|
+
readonly key: "ci";
|
|
68
18
|
readonly providerName = "github";
|
|
69
|
-
constructor(client: GitHubClient, opts:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
19
|
+
constructor(client: GitHubClient, opts: CiOptions);
|
|
20
|
+
listRuns(filter?: CiRunFilter): Promise<CiRun[]>;
|
|
21
|
+
getRun(id: string | number): Promise<CiRun>;
|
|
22
|
+
private mapRun;
|
|
23
|
+
private mapConclusion;
|
|
73
24
|
}
|
|
74
25
|
//#endregion
|
|
75
26
|
//#region src/capabilities/environments.d.ts
|
|
@@ -88,22 +39,6 @@ declare class GitHubEnvironments implements Environments {
|
|
|
88
39
|
private flattenReviewers;
|
|
89
40
|
}
|
|
90
41
|
//#endregion
|
|
91
|
-
//#region src/capabilities/ci.d.ts
|
|
92
|
-
interface CiOptions {
|
|
93
|
-
repo: string;
|
|
94
|
-
}
|
|
95
|
-
declare class GitHubCi implements Ci {
|
|
96
|
-
private readonly client;
|
|
97
|
-
private readonly opts;
|
|
98
|
-
readonly key: "ci";
|
|
99
|
-
readonly providerName = "github";
|
|
100
|
-
constructor(client: GitHubClient, opts: CiOptions);
|
|
101
|
-
listRuns(filter?: CiRunFilter): Promise<CiRun[]>;
|
|
102
|
-
getRun(id: string | number): Promise<CiRun>;
|
|
103
|
-
private mapRun;
|
|
104
|
-
private mapConclusion;
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
42
|
//#region src/capabilities/issues.d.ts
|
|
108
43
|
interface IssuesOptions {
|
|
109
44
|
repo: string;
|
|
@@ -162,6 +97,64 @@ interface CanonicalLabel {
|
|
|
162
97
|
*/
|
|
163
98
|
declare function syncLabels(client: GitHubClient, repo: string, canonical: ReadonlyArray<CanonicalLabel>, stale: ReadonlyArray<string>): Promise<string>;
|
|
164
99
|
//#endregion
|
|
100
|
+
//#region src/capabilities/secrets.d.ts
|
|
101
|
+
interface SecretsOptions {
|
|
102
|
+
repo: string;
|
|
103
|
+
}
|
|
104
|
+
declare class GitHubSecrets implements Secrets {
|
|
105
|
+
private readonly client;
|
|
106
|
+
private readonly opts;
|
|
107
|
+
readonly key: "secrets";
|
|
108
|
+
readonly providerName = "github";
|
|
109
|
+
constructor(client: GitHubClient, opts: SecretsOptions);
|
|
110
|
+
listSecrets(scope: SecretScope): Promise<string[]>;
|
|
111
|
+
setSecret(scope: SecretScope, name: string, value: string): Promise<void>;
|
|
112
|
+
deleteSecret(scope: SecretScope, name: string): Promise<void>;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/capabilities/source.d.ts
|
|
116
|
+
interface SourceOptions {
|
|
117
|
+
repo: string;
|
|
118
|
+
repoRoot: string;
|
|
119
|
+
}
|
|
120
|
+
declare class GitHubSource implements Source {
|
|
121
|
+
private readonly client;
|
|
122
|
+
readonly key: "source";
|
|
123
|
+
readonly providerName = "github";
|
|
124
|
+
private readonly owner;
|
|
125
|
+
private readonly name;
|
|
126
|
+
private readonly repo;
|
|
127
|
+
private readonly repoRoot;
|
|
128
|
+
private readonly workflowDir;
|
|
129
|
+
constructor(client: GitHubClient, opts: SourceOptions);
|
|
130
|
+
whoami(): Promise<{
|
|
131
|
+
login: string;
|
|
132
|
+
}>;
|
|
133
|
+
getRepo(): Promise<RepoRef>;
|
|
134
|
+
listRulesets(): Promise<Ruleset[]>;
|
|
135
|
+
createRuleset(payload: Record<string, unknown>): Promise<Ruleset>;
|
|
136
|
+
updateRuleset(id: number, payload: Record<string, unknown>): Promise<Ruleset>;
|
|
137
|
+
updateRepoSettings(settings: RepoSettings): Promise<void>;
|
|
138
|
+
protectBranch(branch: string, payload: Record<string, unknown>): Promise<void>;
|
|
139
|
+
enableVulnerabilityAlerts(): Promise<void>;
|
|
140
|
+
enableAutomatedSecurityFixes(): Promise<void>;
|
|
141
|
+
enableSecretScanning(): Promise<void>;
|
|
142
|
+
enableCodeScanning(): Promise<string>;
|
|
143
|
+
disableDefaultCodeScanning(): Promise<void>;
|
|
144
|
+
enableDependencyGraph(): Promise<void>;
|
|
145
|
+
enablePrivateVulnerabilityReporting(): Promise<void>;
|
|
146
|
+
listWorkflowFiles(): Promise<string[]>;
|
|
147
|
+
readWorkflowFile(name: string): Promise<string | null>;
|
|
148
|
+
writeWorkflowFile(name: string, contents: string): Promise<void>;
|
|
149
|
+
removeWorkflowFile(name: string): Promise<void>;
|
|
150
|
+
writeRepoFile(path: string, contents: string): Promise<void>;
|
|
151
|
+
syncLabels(canonical: ReadonlyArray<LabelDef>, stale: ReadonlyArray<string>): Promise<string>;
|
|
152
|
+
syncProperties(values: Record<string, string>): Promise<string>;
|
|
153
|
+
syncTeams(teams: TeamEntry$1[]): Promise<string>;
|
|
154
|
+
syncTopics(topics: string[]): Promise<string>;
|
|
155
|
+
syncDescription(description: string): Promise<string>;
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
165
158
|
//#region src/capabilities/teams.d.ts
|
|
166
159
|
interface NormalizedTeamEntry {
|
|
167
160
|
slug: string;
|
|
@@ -170,6 +163,13 @@ interface NormalizedTeamEntry {
|
|
|
170
163
|
declare function normalizeTeamEntry(entry: TeamEntry): NormalizedTeamEntry;
|
|
171
164
|
declare function syncTeams(client: GitHubClient, repo: string, teams: TeamEntry[]): Promise<string>;
|
|
172
165
|
//#endregion
|
|
166
|
+
//#region src/sodium.d.ts
|
|
167
|
+
/**
|
|
168
|
+
* Encrypt `value` for the given GitHub-provided base64 public key.
|
|
169
|
+
* Returns the base64 ciphertext to send as `encrypted_value`.
|
|
170
|
+
*/
|
|
171
|
+
declare function encryptSecret(publicKeyBase64: string, value: string): Promise<string>;
|
|
172
|
+
//#endregion
|
|
173
173
|
//#region src/verify-token.d.ts
|
|
174
174
|
/**
|
|
175
175
|
* `verifyToken` — plugin-level export used by `holocron auth set` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-github",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Holocron plugin for GitHub. Implements source, ci, secrets, environments, and issues capabilities against the GitHub REST API.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/holocron/tree/main/packages/holocron-plugin-github#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/holocron/issues",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@theholocron/github-client": "^1.3.3",
|
|
26
|
-
"@theholocron/cli": "3.0.
|
|
26
|
+
"@theholocron/cli": "3.0.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"libsodium-wrappers": "^0.8.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@theholocron/eslint-config": "^7.
|
|
32
|
+
"@theholocron/eslint-config": "^7.6.0",
|
|
33
33
|
"@theholocron/github-client": "^1.3.3",
|
|
34
34
|
"@theholocron/tsconfig": "^7.5.0",
|
|
35
35
|
"@theholocron/tsdown-config": "^7.5.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"tsx": "4.23.1",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"vitest": "^4.1.10",
|
|
47
|
-
"@theholocron/cli": "3.0.
|
|
47
|
+
"@theholocron/cli": "3.0.2"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|