claude-teammate 0.1.151 → 0.1.152
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/forge/github.js +27 -1
- package/src/forge/gitlab.js +27 -1
package/package.json
CHANGED
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 = [];
|