@gaud_erp/paperclip-github-manager 0.3.0

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 ADDED
@@ -0,0 +1,69 @@
1
+ # @gaud_erp/paperclip-github-manager
2
+
3
+ Paperclip connector plugin for GitHub — repository listing, PR/issue sync, and webhook registration.
4
+
5
+ ## Features
6
+
7
+ - List repositories for the authenticated user
8
+ - Sync open pull requests and issues (manual actions + scheduled job)
9
+ - Register GitHub webhooks pointing at the Paperclip host inbound URL
10
+ - Dashboard health widget and full **GitHub** page in the host UI
11
+
12
+ ## Requirements
13
+
14
+ - Paperclip instance with plugin runtime
15
+ - GitHub PAT saved in **GitHub → Configurações** (or company secret UUID when secret refs are re-enabled)
16
+ - For webhook registration: token scope `admin:repo_hook` on target repos
17
+
18
+ ## Repository
19
+
20
+ Source: [gauderp/paperclip-github-manager](https://github.com/gauderp/paperclip-github-manager)
21
+
22
+ ## Local development
23
+
24
+ ```bash
25
+ npm install
26
+ npm run dev
27
+ paperclipai plugin install /absolute/path/to/plugins/github-manager
28
+ ```
29
+
30
+ ## Releases e npmjs
31
+
32
+ Cada **release no GitHub** (tag `v*`, ex. `v0.3.0`) dispara o workflow [publish-npm.yml](.github/workflows/publish-npm.yml) e publica `@gaud_erp/paperclip-github-manager` no [npmjs](https://www.npmjs.com/package/@gaud_erp/paperclip-github-manager).
33
+
34
+ ### Primeira vez / credencial
35
+
36
+ 1. No repo **gauderp/paperclip-github-manager** → Settings → Secrets → Actions: `NPM_TOKEN` (publish no escopo `@gaud_erp`).
37
+ 2. Criar release no GitHub: tag `v0.3.0` apontando para `main`.
38
+ 3. Confirmar: `npm view @gaud_erp/paperclip-github-manager version`
39
+
40
+ ### Próximas versões
41
+
42
+ 1. Bump `version` em `package.json` + `src/manifest.ts`
43
+ 2. Commit, push `main`
44
+ 3. GitHub → **Create release** com tag `vX.Y.Z`
45
+
46
+ ## Production install (npm)
47
+
48
+ ```bash
49
+ paperclipai plugin install @gaud_erp/paperclip-github-manager@0.3.0 --api-base http://127.0.0.1:3100
50
+ paperclipai plugin inspect cus.github-manager --api-base http://127.0.0.1:3100
51
+ ```
52
+
53
+ Configure o PAT em **GitHub → Configurações** na sidebar do Paperclip.
54
+
55
+ ## Build
56
+
57
+ ```bash
58
+ npm run typecheck
59
+ npm test
60
+ npm run build
61
+ ```
62
+
63
+ `prepublishOnly` runs build automatically before `npm publish`.
64
+
65
+ ## Manifest
66
+
67
+ - Plugin id: `cus.github-manager`
68
+ - Webhook endpoint: `github-events`
69
+ - Scheduled job: `sync-github` (every 6 hours)
@@ -0,0 +1,118 @@
1
+ // src/constants.ts
2
+ var ROUTES = {
3
+ repos: "github",
4
+ settings: "github-settings",
5
+ pullRequests: "github-pull-requests"
6
+ };
7
+
8
+ // src/manifest.ts
9
+ var manifest = {
10
+ id: "cus.github-manager",
11
+ apiVersion: 1,
12
+ version: "0.3.0",
13
+ displayName: "GitHub Manager",
14
+ description: "Plugin Paperclip para gerenciar repositorios, PRs, issues e webhooks GitHub",
15
+ author: "CUS",
16
+ categories: ["connector"],
17
+ capabilities: [
18
+ "events.subscribe",
19
+ "http.outbound",
20
+ "secrets.read-ref",
21
+ "plugin.state.read",
22
+ "plugin.state.write",
23
+ "jobs.schedule",
24
+ "webhooks.receive",
25
+ "ui.sidebar.register",
26
+ "ui.dashboardWidget.register",
27
+ "ui.page.register"
28
+ ],
29
+ jobs: [
30
+ {
31
+ jobKey: "sync-github",
32
+ displayName: "Sync GitHub PRs and issues",
33
+ description: "Pulls open PRs and issues for tracked repositories",
34
+ schedule: "0 */6 * * *"
35
+ }
36
+ ],
37
+ webhooks: [
38
+ {
39
+ endpointKey: "github-events",
40
+ displayName: "GitHub repository events",
41
+ description: "Receives pull_request and issues events from configured repositories"
42
+ }
43
+ ],
44
+ entrypoints: {
45
+ worker: "./dist/worker.js",
46
+ ui: "./dist/ui"
47
+ },
48
+ ui: {
49
+ slots: [
50
+ {
51
+ type: "sidebarPanel",
52
+ id: "github-module",
53
+ displayName: "GitHub",
54
+ exportName: "GitHubSidebarModule",
55
+ order: 45
56
+ },
57
+ {
58
+ type: "routeSidebar",
59
+ id: "github-route-nav",
60
+ displayName: "GitHub",
61
+ routePath: ROUTES.repos,
62
+ exportName: "GitHubRouteSidebar",
63
+ order: 45
64
+ },
65
+ {
66
+ type: "routeSidebar",
67
+ id: "github-settings-route-nav",
68
+ displayName: "GitHub",
69
+ routePath: ROUTES.settings,
70
+ exportName: "GitHubRouteSidebar",
71
+ order: 45
72
+ },
73
+ {
74
+ type: "routeSidebar",
75
+ id: "github-prs-route-nav",
76
+ displayName: "GitHub",
77
+ routePath: ROUTES.pullRequests,
78
+ exportName: "GitHubRouteSidebar",
79
+ order: 45
80
+ },
81
+ {
82
+ type: "dashboardWidget",
83
+ id: "github-health",
84
+ displayName: "GitHub Manager Health",
85
+ exportName: "DashboardWidget"
86
+ },
87
+ {
88
+ type: "page",
89
+ id: "github-settings-page",
90
+ displayName: "GitHub \u2014 Configura\xE7\xF5es",
91
+ routePath: ROUTES.settings,
92
+ exportName: "GitHubSettingsPage",
93
+ order: 45
94
+ },
95
+ {
96
+ type: "page",
97
+ id: "github-repos-page",
98
+ displayName: "GitHub \u2014 Reposit\xF3rios",
99
+ routePath: ROUTES.repos,
100
+ exportName: "GitHubReposPage",
101
+ order: 45
102
+ },
103
+ {
104
+ type: "page",
105
+ id: "github-prs-page",
106
+ displayName: "GitHub \u2014 Pull requests",
107
+ routePath: ROUTES.pullRequests,
108
+ exportName: "GitHubPullRequestsPage",
109
+ order: 45
110
+ }
111
+ ]
112
+ }
113
+ };
114
+ var manifest_default = manifest;
115
+ export {
116
+ manifest_default as default
117
+ };
118
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/constants.ts", "../src/manifest.ts"],
4
+ "sourcesContent": ["/** Plugin page route segments (manifest `routePath` \u2014 single slug, no slashes). */\nexport const ROUTES = {\n repos: \"github\",\n settings: \"github-settings\",\n pullRequests: \"github-pull-requests\"\n} as const;\n\n/** Host navigation paths (use with `linkProps`). */\nexport const PATHS = {\n repos: \"/github\",\n settings: \"/github-settings\",\n pullRequests: \"/github-pull-requests\",\n companySecrets: \"/company/settings\"\n} as const;\n\nexport const GITHUB_TOKEN_SECRET_KEY = \"github_token\";\n", "import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\nimport { ROUTES } from \"./constants.js\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: \"cus.github-manager\",\n apiVersion: 1,\n version: \"0.3.0\",\n displayName: \"GitHub Manager\",\n description: \"Plugin Paperclip para gerenciar repositorios, PRs, issues e webhooks GitHub\",\n author: \"CUS\",\n categories: [\"connector\"],\n capabilities: [\n \"events.subscribe\",\n \"http.outbound\",\n \"secrets.read-ref\",\n \"plugin.state.read\",\n \"plugin.state.write\",\n \"jobs.schedule\",\n \"webhooks.receive\",\n \"ui.sidebar.register\",\n \"ui.dashboardWidget.register\",\n \"ui.page.register\"\n ],\n jobs: [\n {\n jobKey: \"sync-github\",\n displayName: \"Sync GitHub PRs and issues\",\n description: \"Pulls open PRs and issues for tracked repositories\",\n schedule: \"0 */6 * * *\"\n }\n ],\n webhooks: [\n {\n endpointKey: \"github-events\",\n displayName: \"GitHub repository events\",\n description: \"Receives pull_request and issues events from configured repositories\"\n }\n ],\n entrypoints: {\n worker: \"./dist/worker.js\",\n ui: \"./dist/ui\"\n },\n ui: {\n slots: [\n {\n type: \"sidebarPanel\",\n id: \"github-module\",\n displayName: \"GitHub\",\n exportName: \"GitHubSidebarModule\",\n order: 45\n },\n {\n type: \"routeSidebar\",\n id: \"github-route-nav\",\n displayName: \"GitHub\",\n routePath: ROUTES.repos,\n exportName: \"GitHubRouteSidebar\",\n order: 45\n },\n {\n type: \"routeSidebar\",\n id: \"github-settings-route-nav\",\n displayName: \"GitHub\",\n routePath: ROUTES.settings,\n exportName: \"GitHubRouteSidebar\",\n order: 45\n },\n {\n type: \"routeSidebar\",\n id: \"github-prs-route-nav\",\n displayName: \"GitHub\",\n routePath: ROUTES.pullRequests,\n exportName: \"GitHubRouteSidebar\",\n order: 45\n },\n {\n type: \"dashboardWidget\",\n id: \"github-health\",\n displayName: \"GitHub Manager Health\",\n exportName: \"DashboardWidget\"\n },\n {\n type: \"page\",\n id: \"github-settings-page\",\n displayName: \"GitHub \u2014 Configura\u00E7\u00F5es\",\n routePath: ROUTES.settings,\n exportName: \"GitHubSettingsPage\",\n order: 45\n },\n {\n type: \"page\",\n id: \"github-repos-page\",\n displayName: \"GitHub \u2014 Reposit\u00F3rios\",\n routePath: ROUTES.repos,\n exportName: \"GitHubReposPage\",\n order: 45\n },\n {\n type: \"page\",\n id: \"github-prs-page\",\n displayName: \"GitHub \u2014 Pull requests\",\n routePath: ROUTES.pullRequests,\n exportName: \"GitHubPullRequestsPage\",\n order: 45\n }\n ]\n }\n};\n\nexport default manifest;\n"],
5
+ "mappings": ";AACO,IAAM,SAAS;AAAA,EACpB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,cAAc;AAChB;;;ACFA,IAAM,WAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,aAAa;AAAA,EACb,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,YAAY,CAAC,WAAW;AAAA,EACxB,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ;AAAA,MACE,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,aAAa;AAAA,MACb,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR;AAAA,MACE,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,aAAa;AAAA,IACX,Q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