@theholocron/holocron-plugin-github 2.0.0-alpha.0 → 2.0.0-alpha.1

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/README.md CHANGED
@@ -3,13 +3,19 @@
3
3
  GitHub plugin for [Holocron](../cli). Implements five capabilities
4
4
  against the GitHub REST API:
5
5
 
6
- | Capability | What this plugin does |
7
- | -------------- | --------------------------------------------------------- |
6
+ | Capability | What this plugin does |
7
+ | -------------- | ---------------------------------------------------------------- |
8
8
  | `source` | Repos, rulesets, repo settings, security toggles, workflow files |
9
- | `ci` | Workflow run history + status |
10
- | `secrets` | GH Actions secrets (repo + environment + organization) |
11
- | `environments` | Named deployment environments (reviewers, wait timers) |
12
- | `issues` | GitHub Issues as a tracker (with lifecycle slots) |
9
+ | `ci` | Workflow run history + status |
10
+ | `secrets` | GH Actions secrets (repo + environment + organization) |
11
+ | `environments` | Named deployment environments (reviewers, wait timers) |
12
+ | `issues` | GitHub Issues as a tracker (with lifecycle slots) |
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ pnpm add -D @theholocron/holocron-plugin-github@alpha
18
+ ```
13
19
 
14
20
  ## Auth
15
21
 
@@ -30,19 +36,19 @@ toggles, etc.) — silent fallback would surface as mysterious 403s.
30
36
  ```jsonc
31
37
  // holocron.config.json
32
38
  {
33
- "providers": {
34
- "source": "github",
35
- "ci": "github",
36
- "secrets": "github",
37
- "environments": "github",
38
- "issues": ["github", { "labels": { "inProgress": "status:in-progress", "inReview": "status:in-review" } }]
39
- }
39
+ "providers": {
40
+ "source": "github",
41
+ "ci": "github",
42
+ "secrets": "github",
43
+ "environments": "github",
44
+ "issues": ["github", { "labels": { "inProgress": "status:in-progress", "inReview": "status:in-review" } }],
45
+ },
40
46
  }
41
47
  ```
42
48
 
43
49
  ## Status
44
50
 
45
- **v0.0.0 — scaffolded.** Implementations are being ported from
46
- [`rando-id/rando.id`](https://github.com/rando-id/rando.id)'s
47
- `packages/cli/src/adapters/` per the migration plan in
48
- `.notes/tech-architecture.spec.md`.
51
+ **`v2.0.0-alpha.0`**published on npm under the `alpha` dist-tag.
52
+ [Release notes](https://github.com/theholocron/holocron/releases/tag/v2.0.0-alpha.0).
53
+ All five capabilities are implemented; APIs may still shift before
54
+ stable v2.0.0.
package/dist/index.d.mts CHANGED
@@ -40,7 +40,7 @@ interface RestClientOptions {
40
40
  baseUrl?: string;
41
41
  }
42
42
  interface RequestOptions {
43
- method?: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
43
+ method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
44
44
  body?: unknown;
45
45
  /** Skip JSON parse when true (204 No Content endpoints). */
46
46
  expectNoContent?: boolean;
package/dist/index.mjs CHANGED
@@ -579,7 +579,9 @@ var GitHubRestClient = class {
579
579
  constructor(opts) {
580
580
  this.token = opts.token;
581
581
  this.fetchImpl = opts.fetch ?? globalThis.fetch;
582
- this.baseUrl = (opts.baseUrl ?? "https://api.github.com").replace(/\/+$/, "");
582
+ let url = opts.baseUrl ?? "https://api.github.com";
583
+ while (url.endsWith("/")) url = url.slice(0, -1);
584
+ this.baseUrl = url;
583
585
  }
584
586
  async request(path, opts = {}) {
585
587
  const url = `${this.baseUrl}${path}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-github",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.1",
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",
@@ -21,7 +21,7 @@
21
21
  }
22
22
  },
23
23
  "peerDependencies": {
24
- "@theholocron/cli": "2.0.0-alpha.0"
24
+ "@theholocron/cli": "2.0.0-alpha.1"
25
25
  },
26
26
  "dependencies": {
27
27
  "libsodium-wrappers": "^0.7.15"
@@ -37,7 +37,7 @@
37
37
  "typescript": "^5.9.3",
38
38
  "vitest": "^3.2.6",
39
39
  "tsdown": "^0.22.3",
40
- "@theholocron/cli": "2.0.0-alpha.0"
40
+ "@theholocron/cli": "2.0.0-alpha.1"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"