claude-teammate 0.1.151 → 0.1.153
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/package.json +1 -1
- package/src/commands/worker.js +16 -16
- package/src/forge/github.js +27 -1
- package/src/forge/gitlab.js +27 -1
package/package.json
CHANGED
package/src/commands/worker.js
CHANGED
|
@@ -170,28 +170,28 @@ export async function runWorkerCommand({ projectRoot }) {
|
|
|
170
170
|
...previousState,
|
|
171
171
|
projectRoot,
|
|
172
172
|
startedAt: new Date().toISOString(),
|
|
173
|
-
lastPollAt: null,
|
|
174
|
-
lastSuccessAt: null,
|
|
173
|
+
lastPollAt: previousState.lastPollAt ?? null,
|
|
174
|
+
lastSuccessAt: previousState.lastSuccessAt ?? null,
|
|
175
175
|
lastError: null,
|
|
176
|
-
issueCount: 0,
|
|
177
|
-
issues: [],
|
|
178
|
-
lastGitHubPollAt: null,
|
|
179
|
-
lastGitHubSuccessAt: null,
|
|
176
|
+
issueCount: previousState.issueCount ?? 0,
|
|
177
|
+
issues: Array.isArray(previousState.issues) ? previousState.issues : [],
|
|
178
|
+
lastGitHubPollAt: previousState.lastGitHubPollAt ?? null,
|
|
179
|
+
lastGitHubSuccessAt: previousState.lastGitHubSuccessAt ?? null,
|
|
180
180
|
lastGitHubError: null,
|
|
181
|
-
githubIssueCount: 0,
|
|
182
|
-
githubIssues: [],
|
|
183
|
-
lastPrPollAt: null,
|
|
184
|
-
lastPrSuccessAt: null,
|
|
181
|
+
githubIssueCount: previousState.githubIssueCount ?? 0,
|
|
182
|
+
githubIssues: Array.isArray(previousState.githubIssues) ? previousState.githubIssues : [],
|
|
183
|
+
lastPrPollAt: previousState.lastPrPollAt ?? null,
|
|
184
|
+
lastPrSuccessAt: previousState.lastPrSuccessAt ?? null,
|
|
185
185
|
lastPrError: null,
|
|
186
|
-
draftPrCount: 0,
|
|
187
|
-
draftPrs: [],
|
|
186
|
+
draftPrCount: previousState.draftPrCount ?? 0,
|
|
187
|
+
draftPrs: Array.isArray(previousState.draftPrs) ? previousState.draftPrs : [],
|
|
188
188
|
prCommentReview: buildPrSubtaskState(previousState.prCommentReview),
|
|
189
189
|
prImplementation: buildPrSubtaskState(previousState.prImplementation),
|
|
190
|
-
lastReviewPollAt: null,
|
|
191
|
-
lastReviewSuccessAt: null,
|
|
190
|
+
lastReviewPollAt: previousState.lastReviewPollAt ?? null,
|
|
191
|
+
lastReviewSuccessAt: previousState.lastReviewSuccessAt ?? null,
|
|
192
192
|
lastReviewError: null,
|
|
193
|
-
reviewPrCount: 0,
|
|
194
|
-
reviewPrs: [],
|
|
193
|
+
reviewPrCount: previousState.reviewPrCount ?? 0,
|
|
194
|
+
reviewPrs: Array.isArray(previousState.reviewPrs) ? previousState.reviewPrs : [],
|
|
195
195
|
pollerBusy: { jira: false, github: false, draftPr: false, reviewPr: false }
|
|
196
196
|
};
|
|
197
197
|
|
package/src/forge/github.js
CHANGED
|
@@ -659,7 +659,7 @@ function filterGitHubSummaries(items, options = {}) {
|
|
|
659
659
|
|
|
660
660
|
return items
|
|
661
661
|
.filter((item) => {
|
|
662
|
-
if (labels.size > 0 && !item.labels.some((label) => labels.has(label))) {
|
|
662
|
+
if (labels.size > 0 && !item.labels.some((label) => labels.has(label)) && !matchesGitHubBodyStatusFallback(item, labels)) {
|
|
663
663
|
return false;
|
|
664
664
|
}
|
|
665
665
|
if (authorLogin && String(item.author?.login || "").trim().toLowerCase() !== authorLogin) {
|
|
@@ -670,6 +670,32 @@ function filterGitHubSummaries(items, options = {}) {
|
|
|
670
670
|
.sort(compareSummariesByCreatedAsc);
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
+
function matchesGitHubBodyStatusFallback(item, labels) {
|
|
674
|
+
if (!item || typeof item.body !== "string") {
|
|
675
|
+
return false;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const status = getEmbeddedPullRequestStatus(item.body);
|
|
679
|
+
if (!status) {
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
if ((status === "INITIALIZING" || status === "IMPLEMENTING") && labels.has("tm8:implementing")) {
|
|
684
|
+
return true;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
if (status === "IMPLEMENTED" && labels.has("tm8:implemented")) {
|
|
688
|
+
return true;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
return false;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
function getEmbeddedPullRequestStatus(body) {
|
|
695
|
+
const match = /(^|\n)\s*STATUS:\s*([A-Z_]+)\b/u.exec(String(body || ""));
|
|
696
|
+
return match ? String(match[2] || "").trim().toUpperCase() : "";
|
|
697
|
+
}
|
|
698
|
+
|
|
673
699
|
function compareSummariesByCreatedAsc(left, right) {
|
|
674
700
|
const leftCreated = left.createdAt ? Date.parse(left.createdAt) : 0;
|
|
675
701
|
const rightCreated = right.createdAt ? Date.parse(right.createdAt) : 0;
|
package/src/forge/gitlab.js
CHANGED
|
@@ -772,7 +772,7 @@ function filterGitLabSummaries(items, options = {}) {
|
|
|
772
772
|
|
|
773
773
|
return items
|
|
774
774
|
.filter((item) => {
|
|
775
|
-
if (labels.size > 0 && !item.labels.some((label) => labels.has(label))) {
|
|
775
|
+
if (labels.size > 0 && !item.labels.some((label) => labels.has(label)) && !matchesGitLabBodyStatusFallback(item, labels)) {
|
|
776
776
|
return false;
|
|
777
777
|
}
|
|
778
778
|
if (authorLogin && String(item.author?.login || "").trim().toLowerCase() !== authorLogin) {
|
|
@@ -783,6 +783,32 @@ function filterGitLabSummaries(items, options = {}) {
|
|
|
783
783
|
.sort(compareSummariesByCreatedAsc);
|
|
784
784
|
}
|
|
785
785
|
|
|
786
|
+
function matchesGitLabBodyStatusFallback(item, labels) {
|
|
787
|
+
if (!item || typeof item.body !== "string") {
|
|
788
|
+
return false;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
const status = getEmbeddedPullRequestStatus(item.body);
|
|
792
|
+
if (!status) {
|
|
793
|
+
return false;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
if ((status === "INITIALIZING" || status === "IMPLEMENTING") && labels.has("tm8:implementing")) {
|
|
797
|
+
return true;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
if (status === "IMPLEMENTED" && labels.has("tm8:implemented")) {
|
|
801
|
+
return true;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
function getEmbeddedPullRequestStatus(body) {
|
|
808
|
+
const match = /(^|\n)\s*STATUS:\s*([A-Z_]+)\b/u.exec(String(body || ""));
|
|
809
|
+
return match ? String(match[2] || "").trim().toUpperCase() : "";
|
|
810
|
+
}
|
|
811
|
+
|
|
786
812
|
async function listGitLabTrackedItems({ config, repoUrls = [], type, authorLogin }) {
|
|
787
813
|
const baseUrls = resolveTrackedGitLabBaseUrls(config, repoUrls);
|
|
788
814
|
const results = [];
|