paperclip-github-plugin 0.9.11 → 0.9.12
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 +1 -1
- package/dist/manifest.js +1 -1
- package/dist/worker.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -186,7 +186,7 @@ Additional behavior:
|
|
|
186
186
|
- Sync-driven handoffs to agent assignees best-effort enqueue an explicit wakeup so the next reviewer, approver, or executor can pick the issue up even when their agent is not running heartbeats.
|
|
187
187
|
- Open imported issues that are already in `backlog` stay in `backlog` until someone changes them in Paperclip.
|
|
188
188
|
- 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.
|
|
189
|
-
- When an issue has
|
|
189
|
+
- When an issue has a scheduled Paperclip issue monitor, GitHub Sync lets that monitor own the wait. It still refreshes GitHub metadata, but it does not change the issue's Paperclip status, assignee, execution state, transition comments, or wakeups until the monitor fires or is cleared.
|
|
190
190
|
- Trusted new GitHub comments from the original issue author or a verified maintainer/admin can move an open imported issue back into active work, whether the new comment lands on the source issue, in a linked pull request's top-level comment stream, or in a linked pull request review thread; GitHub Sync uses `in_progress` when it can route the issue to an executor and otherwise `todo`.
|
|
191
191
|
- When the sync changes a Paperclip issue status, it adds a Paperclip comment explaining what changed and why.
|
|
192
192
|
|
package/dist/manifest.js
CHANGED
|
@@ -642,7 +642,7 @@ var PULL_REQUEST_ASSET_API_ROUTE_URL_PATH = `/api/plugins/${GITHUB_SYNC_PLUGIN_I
|
|
|
642
642
|
var require2 = createRequire(import.meta.url);
|
|
643
643
|
var packageJson = require2("../package.json");
|
|
644
644
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
645
|
-
var MANIFEST_VERSION = "0.9.
|
|
645
|
+
var MANIFEST_VERSION = "0.9.12"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
646
646
|
var manifest = {
|
|
647
647
|
id: GITHUB_SYNC_PLUGIN_ID,
|
|
648
648
|
apiVersion: 1,
|
package/dist/worker.js
CHANGED
|
@@ -5478,7 +5478,7 @@ function getPaperclipIssueSyncContext(issue) {
|
|
|
5478
5478
|
executionState: normalizePaperclipIssueExecutionState(record.executionState)
|
|
5479
5479
|
};
|
|
5480
5480
|
}
|
|
5481
|
-
function
|
|
5481
|
+
function hasScheduledPaperclipIssueMonitor(syncContext) {
|
|
5482
5482
|
const monitor = syncContext.executionState?.monitor;
|
|
5483
5483
|
if (!monitor) {
|
|
5484
5484
|
return false;
|
|
@@ -5487,7 +5487,7 @@ function hasActivePaperclipIssueMonitor(syncContext) {
|
|
|
5487
5487
|
return false;
|
|
5488
5488
|
}
|
|
5489
5489
|
const normalizedStatus = monitor.status?.trim().toLowerCase();
|
|
5490
|
-
return normalizedStatus
|
|
5490
|
+
return normalizedStatus === "scheduled";
|
|
5491
5491
|
}
|
|
5492
5492
|
function hasUnresolvedPaperclipIssueBlockerSummary(blockers) {
|
|
5493
5493
|
if (!Array.isArray(blockers)) {
|
|
@@ -5708,7 +5708,7 @@ function isClearableMaintainerWaitExecutionState(executionState) {
|
|
|
5708
5708
|
if (executionState === null) {
|
|
5709
5709
|
return true;
|
|
5710
5710
|
}
|
|
5711
|
-
if (
|
|
5711
|
+
if (hasScheduledPaperclipIssueMonitor({
|
|
5712
5712
|
assignee: null,
|
|
5713
5713
|
executionPolicy: null,
|
|
5714
5714
|
executionState
|
|
@@ -9559,8 +9559,8 @@ async function cancelUnmappedTransferredGitHubIssue(ctx, params) {
|
|
|
9559
9559
|
};
|
|
9560
9560
|
}
|
|
9561
9561
|
const paperclipIssueSyncContext = getPaperclipIssueSyncContext(paperclipIssue);
|
|
9562
|
-
if (
|
|
9563
|
-
ctx.logger.info("GitHub sync skipped transferred issue cancellation because an issue monitor is
|
|
9562
|
+
if (hasScheduledPaperclipIssueMonitor(paperclipIssueSyncContext)) {
|
|
9563
|
+
ctx.logger.info("GitHub sync skipped transferred issue cancellation because an issue monitor is scheduled.", {
|
|
9564
9564
|
companyId,
|
|
9565
9565
|
issueId: params.importedIssue.paperclipIssueId,
|
|
9566
9566
|
transferredRepositoryUrl: params.transferredRepository.url,
|
|
@@ -9899,8 +9899,8 @@ async function synchronizePaperclipIssueStatuses(ctx, octokit, repository, mappi
|
|
|
9899
9899
|
importedIssue.lastSeenCommentCount = snapshot.commentCount;
|
|
9900
9900
|
importedIssue.lastSeenGitHubState = snapshot.state;
|
|
9901
9901
|
importedIssue.linkedPullRequestCommentCounts = currentLinkedPullRequestCommentCounts;
|
|
9902
|
-
if (
|
|
9903
|
-
ctx.logger.info("GitHub sync skipped Paperclip issue state changes because an issue monitor is
|
|
9902
|
+
if (hasScheduledPaperclipIssueMonitor(paperclipIssueSyncContext)) {
|
|
9903
|
+
ctx.logger.info("GitHub sync skipped Paperclip issue state changes because an issue monitor is scheduled.", {
|
|
9904
9904
|
companyId: mapping.companyId,
|
|
9905
9905
|
issueId: importedIssue.paperclipIssueId,
|
|
9906
9906
|
repositoryUrl: repository.url,
|
|
@@ -10166,8 +10166,8 @@ async function synchronizePaperclipPullRequestIssueStatuses(ctx, octokit, mappin
|
|
|
10166
10166
|
const shouldClearTransitionAssignee = nextStatus === "in_review" && (nextTransitionAssignee === null || shouldPreserveMaintainerWaitRouting) && paperclipIssueSyncContext.assignee !== null;
|
|
10167
10167
|
const nextAssigneeChanged = nextTransitionAssignee ? !doesPaperclipIssueAssigneeMatch(paperclipIssueSyncContext.assignee, nextTransitionAssignee.principal) : false;
|
|
10168
10168
|
const shouldWakeTransitionAssignee = paperclipIssue.status !== nextStatus && nextTransitionAssignee?.principal.kind === "agent" && isActionablePaperclipIssueStatus(nextStatus) && (nextAssigneeChanged || paperclipIssue.status !== nextStatus);
|
|
10169
|
-
if (
|
|
10170
|
-
ctx.logger.info("GitHub sync skipped Paperclip pull request issue state changes because an issue monitor is
|
|
10169
|
+
if (hasScheduledPaperclipIssueMonitor(paperclipIssueSyncContext)) {
|
|
10170
|
+
ctx.logger.info("GitHub sync skipped Paperclip pull request issue state changes because an issue monitor is scheduled.", {
|
|
10171
10171
|
companyId: mapping.companyId,
|
|
10172
10172
|
issueId: paperclipIssueId,
|
|
10173
10173
|
repositoryUrl: primaryRepository?.url,
|