@ihelpee/prumo-plugin-github-project 0.18.0 → 0.18.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.
Files changed (2) hide show
  1. package/README.md +70 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,3 +1,72 @@
1
1
  # @ihelpee/prumo-plugin-github-project
2
2
 
3
- Fine-grained GitHub GraphQL & REST client for project items, status, comments, and sub-issues without business domain rules.
3
+ Experimental, read-only GitHub Projects v2 and Issues client used by Prumo's pipeline plugin.
4
+ It returns GitHub data in plain typed objects and does not decide whether an issue mutation is
5
+ allowed. The pipeline owns that policy.
6
+
7
+ ## What it provides
8
+
9
+ - `GitHubProjectClient` for GraphQL requests and issue details.
10
+ - `parseIssueRef` for `owner/repo#123` references and GitHub issue URLs.
11
+ - Issue data including title, body, state, assignees, comments, sub-issues and a selected project
12
+ status.
13
+ - Optional project number filtering when an issue belongs to more than one project.
14
+
15
+ This package does not create, edit, close, assign or move issues. It has no retry or pagination
16
+ loop: the current issue-details query reads bounded pages (up to 100 comments, 50 sub-issues and
17
+ 10 project items).
18
+
19
+ ## Installation
20
+
21
+ Install it with Prumo and the pipeline plugin at matching versions:
22
+
23
+ ```bash
24
+ pnpm add @ihelpee/prumo @ihelpee/prumo-plugin-github-project @ihelpee/prumo-plugin-pipeline
25
+ ```
26
+
27
+ ## Use the client
28
+
29
+ Provide a token with access to the target issue and project. The client reads `GH_TOKEN` or
30
+ `GITHUB_TOKEN` when no token is passed explicitly.
31
+
32
+ ```ts
33
+ import {
34
+ GitHubProjectClient,
35
+ parseIssueRef,
36
+ } from '@ihelpee/prumo-plugin-github-project';
37
+
38
+ const client = new GitHubProjectClient({ token: process.env.GH_TOKEN });
39
+ const issue = await client.getIssueDetails(parseIssueRef('owner/repo#123'), 13);
40
+
41
+ console.log(issue.projectStatus, issue.assignees, issue.subIssues);
42
+ ```
43
+
44
+ The `apiUrl` option can point the client at a compatible GitHub API endpoint. Set `locale` to
45
+ `en` or `pt-BR` to localize client-generated diagnostics; English is the default.
46
+
47
+ ## Use with the pipeline plugin
48
+
49
+ Register both plugins in `prumo.config.ts`:
50
+
51
+ ```ts
52
+ import { defineConfig } from '@ihelpee/prumo';
53
+ import githubProject from '@ihelpee/prumo-plugin-github-project';
54
+ import pipeline from '@ihelpee/prumo-plugin-pipeline';
55
+
56
+ export default defineConfig({ plugins: [githubProject, pipeline] });
57
+ ```
58
+
59
+ The pipeline uses this client to read issue and project state before evaluating its own
60
+ preflight policy. See the [pipeline README](https://github.com/ihelpee/prumo/blob/main/packages/plugin-pipeline/README.md)
61
+ for its commands and configuration.
62
+
63
+ ## Errors and access
64
+
65
+ Requests fail with an explicit diagnostic when the token is missing, GitHub returns an HTTP or
66
+ GraphQL error, or the issue cannot be found. Use a token with the least privilege that can read
67
+ the repository issue and the requested project. The client does not log or persist the token.
68
+
69
+ ## Compatibility
70
+
71
+ Use the same release version as `@ihelpee/prumo` and its companion plugins. This package is
72
+ experimental; its API may change between minor releases.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ihelpee/prumo-plugin-github-project",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "type": "module",
5
5
  "description": "Thin GitHub Project v2 and Issue client: raw GraphQL queries for items, status, comments, sub-issues.",
6
6
  "author": "Alex Gotardi <alexgotardi@gmail.com> (https://github.com/alexgotardi)",
@@ -37,11 +37,11 @@
37
37
  "description": "Raw GitHub Project and Issue queries without domain business rules."
38
38
  },
39
39
  "peerDependencies": {
40
- "@ihelpee/prumo": "^0.18.0"
40
+ "@ihelpee/prumo": "^0.18.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@ihelpee/prumo": "0.18.0",
44
- "@ihelpee/prumo-plugin-typescript": "0.18.0"
43
+ "@ihelpee/prumo": "0.18.2",
44
+ "@ihelpee/prumo-plugin-typescript": "0.18.2"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "tsc -p tsconfig.json",