@theholocron/holocron-plugin-github 5.0.0-alpha.264 → 5.0.0-alpha.265
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 +5 -0
- package/dist/index.mjs +16 -1
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -179,6 +179,11 @@ export declare class GitHubSource implements Source {
|
|
|
179
179
|
prune?: boolean;
|
|
180
180
|
dryRun?: boolean;
|
|
181
181
|
}): Promise<string>;
|
|
182
|
+
listVariables(): Promise<Record<string, string>>;
|
|
183
|
+
listOrgVariables(org: string): Promise<Record<string, {
|
|
184
|
+
value: string;
|
|
185
|
+
visibility: "all" | "private" | "selected";
|
|
186
|
+
}>>;
|
|
182
187
|
syncDescription(description: string): Promise<string>;
|
|
183
188
|
syncHomepage(homepage: string): Promise<string>;
|
|
184
189
|
getPullRequest(number: number, repo?: string): Promise<PullRequest>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { AuthError, ProviderApiError, connectionProbe, createFeatureResolver } from "@theholocron/cli";
|
|
2
|
+
import { AuthError, MissingTokenError, ProviderApiError, connectionProbe, createFeatureResolver } from "@theholocron/cli";
|
|
3
3
|
import { createGitHubClient, createGitHubClient as createGitHubClient$1 } from "@theholocron/github-client";
|
|
4
4
|
import { mkdir, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
@@ -842,6 +842,21 @@ var GitHubSource = class {
|
|
|
842
842
|
if (!this.orgClient) throw new Error("organization variables need the org token: set HOLOCRON_ORG_TOKEN or run `holocron auth set github.org <token>`");
|
|
843
843
|
return syncOrgVariables(this.orgClient, this.repo, org, variables, opts);
|
|
844
844
|
}
|
|
845
|
+
async listVariables() {
|
|
846
|
+
const found = await this.client.variables.listVariables(this.repo, { kind: "repo" });
|
|
847
|
+
return Object.fromEntries(found.map((v) => [v.name, v.value]));
|
|
848
|
+
}
|
|
849
|
+
async listOrgVariables(org) {
|
|
850
|
+
if (!this.orgClient) throw new MissingTokenError("organization variables need the org token: set HOLOCRON_ORG_TOKEN or run `holocron auth set github.org <token>`");
|
|
851
|
+
const found = await this.orgClient.variables.listVariables(this.repo, {
|
|
852
|
+
kind: "organization",
|
|
853
|
+
org
|
|
854
|
+
});
|
|
855
|
+
return Object.fromEntries(found.map((v) => [v.name, {
|
|
856
|
+
value: v.value,
|
|
857
|
+
visibility: v.visibility ?? "all"
|
|
858
|
+
}]));
|
|
859
|
+
}
|
|
845
860
|
async syncDescription(description) {
|
|
846
861
|
await this.client.repos.updateRepo(this.repo, { description });
|
|
847
862
|
return "description updated";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-github",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.265",
|
|
4
4
|
"description": "Holocron plugin for GitHub. Implements source, ci, secrets, environments, and issues capabilities against the GitHub REST API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
"tsx": "4.23.15",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"vitest": "^5.0.5",
|
|
47
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
48
|
-
"@theholocron/eslint-config": "^8.9.0-alpha.3",
|
|
47
|
+
"@theholocron/cli": "5.0.0-alpha.265",
|
|
49
48
|
"@theholocron/fs-utils": "^1.16.1-alpha.1",
|
|
50
49
|
"@theholocron/github-client": "^1.58.0-alpha.1",
|
|
51
50
|
"@theholocron/http-client": "^1.58.0-alpha.1",
|
|
52
|
-
"@theholocron/misc-utils": "^1.16.1-alpha.1",
|
|
53
|
-
"@theholocron/tsdown-config": "^8.9.0-alpha.3",
|
|
54
51
|
"@theholocron/tsconfig": "^8.9.0-alpha.3",
|
|
55
|
-
"@theholocron/
|
|
52
|
+
"@theholocron/misc-utils": "^1.16.1-alpha.1",
|
|
53
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.3",
|
|
54
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.3",
|
|
55
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.3"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@theholocron/fs-utils": "^1.16.0",
|
|
59
59
|
"@theholocron/github-client": "^1.51.0",
|
|
60
60
|
"@theholocron/misc-utils": "^1.16.0",
|
|
61
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
61
|
+
"@theholocron/cli": "5.0.0-alpha.265"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=22"
|