paperclip-github-plugin 0.3.3 → 0.3.5
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 +9 -3
- package/dist/manifest.js +69 -1
- package/dist/ui/index.js +6 -2
- package/dist/ui/index.js.map +2 -2
- package/dist/worker.js +648 -35
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ With this plugin, you can:
|
|
|
21
21
|
- configure mappings and import defaults per Paperclip company
|
|
22
22
|
- run sync manually or on a schedule
|
|
23
23
|
- triage open pull requests from mapped Paperclip projects in a hosted queue
|
|
24
|
-
- give Paperclip agents native GitHub tools for issues, pull requests, CI, and
|
|
24
|
+
- give Paperclip agents native GitHub tools for issues, pull requests, CI, review threads, and org-level projects
|
|
25
25
|
|
|
26
26
|
## What you get in Paperclip
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ GitHub tokens and sync cadence are shared at the plugin instance level, while re
|
|
|
53
53
|
|
|
54
54
|
### Project binding that respects existing work
|
|
55
55
|
|
|
56
|
-
If a company already has a Paperclip project bound to a GitHub repository workspace, the settings UI can reuse that project instead of creating a duplicate. New mappings can also create and bind a Paperclip project automatically.
|
|
56
|
+
If a company already has a Paperclip project bound to a GitHub repository workspace, the settings UI can reuse that project instead of creating a duplicate. New mappings can also create and bind a Paperclip project automatically, and those newly created projects opt into isolated issue checkouts.
|
|
57
57
|
|
|
58
58
|
### Status sync with delivery context
|
|
59
59
|
|
|
@@ -67,7 +67,7 @@ Paperclip issue linkage on the queue prefers the GitHub issue that the pull requ
|
|
|
67
67
|
|
|
68
68
|
### Agent workflows built in
|
|
69
69
|
|
|
70
|
-
Paperclip agents can search GitHub for duplicates, read and update issues, post comments, create pull requests, inspect changed files and CI, reply to review threads, resolve or unresolve threads,
|
|
70
|
+
Paperclip agents can search GitHub for duplicates, read and update issues, post comments, create pull requests, inspect changed files and CI, reply to review threads, resolve or unresolve threads, request reviewers, list org-level GitHub Projects, and associate pull requests with those projects without leaving the Paperclip plugin surface.
|
|
71
71
|
|
|
72
72
|
## Requirements
|
|
73
73
|
|
|
@@ -118,6 +118,8 @@ When a token is saved, the settings page audits the mapped repositories for the
|
|
|
118
118
|
|
|
119
119
|
Imported issues keep the original GitHub title and use the normalized GitHub body as the Paperclip description. The worker also normalizes GitHub HTML that Paperclip descriptions do not render cleanly, including elements such as `<br>`, `<hr>`, `<details>`, `<summary>`, and inline images.
|
|
120
120
|
|
|
121
|
+
To keep imported issues recognizable without cluttering the visible description, the plugin appends a hidden HTML comment footer with the source GitHub issue URL. Agents and repair flows use that marker when the plugin-owned link entity or import registry is missing.
|
|
122
|
+
|
|
121
123
|
Repeated syncs keep existing imports current instead of creating duplicates again. If the plugin's import registry is stale, the worker can repair deduplication by reusing existing Paperclip issues when durable GitHub link metadata is already present.
|
|
122
124
|
|
|
123
125
|
When the local Paperclip API is available, the plugin also syncs labels by name, prefers exact color matches when multiple Paperclip labels share the same name, and creates missing Paperclip labels when needed.
|
|
@@ -126,6 +128,7 @@ When the local Paperclip API is available, the plugin also syncs labels by name,
|
|
|
126
128
|
|
|
127
129
|
| GitHub condition | Paperclip status |
|
|
128
130
|
| --- | --- |
|
|
131
|
+
| Open issue with no linked pull request, created by a repository maintainer | `todo` on first import |
|
|
129
132
|
| Open issue with no linked pull request | Configured default status, which defaults to `backlog` |
|
|
130
133
|
| Open issue with a linked pull request and unfinished CI | `in_progress` |
|
|
131
134
|
| Open issue with failing CI or unresolved review threads | `todo` |
|
|
@@ -135,7 +138,9 @@ When the local Paperclip API is available, the plugin also syncs labels by name,
|
|
|
135
138
|
|
|
136
139
|
Additional behavior:
|
|
137
140
|
|
|
141
|
+
- Open issues with no linked pull request that are created by a verified repository maintainer/admin bypass the default imported status and start in `todo`.
|
|
138
142
|
- Open imported issues that are already in `backlog` stay in `backlog` until someone changes them in Paperclip.
|
|
143
|
+
- If an imported issue is `done` or `cancelled` and GitHub shows it open again with no linked pull request, sync moves it to `todo` so agents can pick it up again.
|
|
139
144
|
- Trusted new GitHub comments from the original issue author or a verified maintainer/admin can move an open imported issue back to `todo`.
|
|
140
145
|
- When the sync changes a Paperclip issue status, it adds a Paperclip comment explaining what changed and why.
|
|
141
146
|
|
|
@@ -172,6 +177,7 @@ The plugin exposes GitHub workflow tools to Paperclip agents, including:
|
|
|
172
177
|
- issue reads, comment reads, comment writes, and metadata updates
|
|
173
178
|
- pull request creation, reads, updates, changed-file inspection, and CI-check inspection
|
|
174
179
|
- review-thread reads, replies, resolve and unresolve actions, and reviewer requests
|
|
180
|
+
- organization-level GitHub Project listing and pull-request-to-project association
|
|
175
181
|
|
|
176
182
|
When an agent posts a GitHub comment or review-thread reply through the plugin, the message includes a footer disclosing that it was created by a Paperclip AI agent and which model was used.
|
|
177
183
|
|
package/dist/manifest.js
CHANGED
|
@@ -6,6 +6,10 @@ var repositoryProperty = {
|
|
|
6
6
|
type: "string",
|
|
7
7
|
description: "GitHub repository as owner/repo or https://github.com/owner/repo. Omit when the current Paperclip project has exactly one mapped repository."
|
|
8
8
|
};
|
|
9
|
+
var organizationProperty = {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "GitHub organization login that owns the Projects."
|
|
12
|
+
};
|
|
9
13
|
var paperclipIssueIdProperty = {
|
|
10
14
|
type: "string",
|
|
11
15
|
description: "Paperclip issue id used to infer the linked GitHub issue and repository when available."
|
|
@@ -20,6 +24,15 @@ var pullRequestNumberProperty = {
|
|
|
20
24
|
minimum: 1,
|
|
21
25
|
description: "GitHub pull request number."
|
|
22
26
|
};
|
|
27
|
+
var projectIdProperty = {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "GitHub ProjectV2 node id. You can use the id returned by list_organization_projects."
|
|
30
|
+
};
|
|
31
|
+
var projectNumberProperty = {
|
|
32
|
+
type: "integer",
|
|
33
|
+
minimum: 1,
|
|
34
|
+
description: "GitHub organization project number. Requires organization when projectId is not provided."
|
|
35
|
+
};
|
|
23
36
|
var llmModelProperty = {
|
|
24
37
|
type: "string",
|
|
25
38
|
description: "Exact LLM name used to draft the comment. Required so the plugin can append the mandatory AI-authorship footer."
|
|
@@ -44,6 +57,16 @@ var pullRequestTargetSchema = {
|
|
|
44
57
|
}
|
|
45
58
|
]
|
|
46
59
|
};
|
|
60
|
+
var organizationProjectTargetSchema = {
|
|
61
|
+
anyOf: [
|
|
62
|
+
{
|
|
63
|
+
required: ["projectId"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
required: ["organization", "projectNumber"]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
};
|
|
47
70
|
var GITHUB_AGENT_TOOLS = [
|
|
48
71
|
{
|
|
49
72
|
name: "search_repository_items",
|
|
@@ -427,6 +450,51 @@ var GITHUB_AGENT_TOOLS = [
|
|
|
427
450
|
}
|
|
428
451
|
]
|
|
429
452
|
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: "list_organization_projects",
|
|
456
|
+
displayName: "List Organization Projects",
|
|
457
|
+
description: "List GitHub organization-level Projects so an agent can choose where to associate pull requests.",
|
|
458
|
+
parametersSchema: {
|
|
459
|
+
type: "object",
|
|
460
|
+
additionalProperties: false,
|
|
461
|
+
required: ["organization"],
|
|
462
|
+
properties: {
|
|
463
|
+
organization: organizationProperty,
|
|
464
|
+
includeClosed: {
|
|
465
|
+
type: "boolean",
|
|
466
|
+
description: "Include closed Projects in the results. Defaults to false."
|
|
467
|
+
},
|
|
468
|
+
query: {
|
|
469
|
+
type: "string",
|
|
470
|
+
description: "Optional free-text filter matched against project titles and descriptions after loading the organization projects."
|
|
471
|
+
},
|
|
472
|
+
limit: {
|
|
473
|
+
type: "integer",
|
|
474
|
+
minimum: 1,
|
|
475
|
+
maximum: 100,
|
|
476
|
+
description: "Maximum number of projects to return."
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
name: "add_pull_request_to_project",
|
|
483
|
+
displayName: "Add Pull Request To Project",
|
|
484
|
+
description: "Associate a GitHub pull request with an organization-level GitHub Project.",
|
|
485
|
+
parametersSchema: {
|
|
486
|
+
type: "object",
|
|
487
|
+
additionalProperties: false,
|
|
488
|
+
allOf: [pullRequestTargetSchema, organizationProjectTargetSchema],
|
|
489
|
+
properties: {
|
|
490
|
+
repository: repositoryProperty,
|
|
491
|
+
pullRequestNumber: pullRequestNumberProperty,
|
|
492
|
+
paperclipIssueId: paperclipIssueIdProperty,
|
|
493
|
+
projectId: projectIdProperty,
|
|
494
|
+
organization: organizationProperty,
|
|
495
|
+
projectNumber: projectNumberProperty
|
|
496
|
+
}
|
|
497
|
+
}
|
|
430
498
|
}
|
|
431
499
|
];
|
|
432
500
|
|
|
@@ -435,7 +503,7 @@ var require2 = createRequire(import.meta.url);
|
|
|
435
503
|
var packageJson = require2("../package.json");
|
|
436
504
|
var DASHBOARD_WIDGET_CAPABILITY = "ui.dashboardWidget.register";
|
|
437
505
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
438
|
-
var MANIFEST_VERSION = "0.3.
|
|
506
|
+
var MANIFEST_VERSION = "0.3.5"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
439
507
|
var manifest = {
|
|
440
508
|
id: "paperclip-github-plugin",
|
|
441
509
|
apiVersion: 1,
|
package/dist/ui/index.js
CHANGED
|
@@ -27558,7 +27558,10 @@ async function resolveOrCreateProject(companyId, projectName) {
|
|
|
27558
27558
|
method: "POST",
|
|
27559
27559
|
body: JSON.stringify({
|
|
27560
27560
|
name: projectName.trim(),
|
|
27561
|
-
status: "planned"
|
|
27561
|
+
status: "planned",
|
|
27562
|
+
executionWorkspacePolicy: {
|
|
27563
|
+
enabled: true
|
|
27564
|
+
}
|
|
27562
27565
|
})
|
|
27563
27566
|
});
|
|
27564
27567
|
}
|
|
@@ -33119,6 +33122,7 @@ export {
|
|
|
33119
33122
|
GitHubSyncProjectPullRequestsPage,
|
|
33120
33123
|
GitHubSyncProjectPullRequestsSidebarItem,
|
|
33121
33124
|
GitHubSyncSettingsPage,
|
|
33122
|
-
index_default as default
|
|
33125
|
+
index_default as default,
|
|
33126
|
+
resolveOrCreateProject
|
|
33123
33127
|
};
|
|
33124
33128
|
//# sourceMappingURL=index.js.map
|