@misterhuydo/sentinel 1.4.84 → 1.4.86
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/.cairn/.hint-lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-27T05:10:33.256Z
|
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-
|
|
3
|
-
"checkpoint_at": "2026-03-
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-27T05:09:05.068Z",
|
|
3
|
+
"checkpoint_at": "2026-03-27T05:09:05.069Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -158,7 +158,13 @@ def _run_tests(repo: RepoConfig, local_path: str) -> bool:
|
|
|
158
158
|
except FileNotFoundError:
|
|
159
159
|
raise MissingToolError(cmd[0])
|
|
160
160
|
if r.returncode != 0:
|
|
161
|
-
|
|
161
|
+
output = r.stdout[-3000:] + r.stderr[-1000:]
|
|
162
|
+
logger.error("Tests failed:\n%s", output)
|
|
163
|
+
# Detect missing sub-tool invoked by the build (e.g. yarn called from Maven exec plugin)
|
|
164
|
+
import re as _re
|
|
165
|
+
m = _re.search(r'Cannot run program "([^"]+)"', output)
|
|
166
|
+
if m:
|
|
167
|
+
raise MissingToolError(m.group(1))
|
|
162
168
|
return False
|
|
163
169
|
logger.info("Tests passed")
|
|
164
170
|
return True
|
|
@@ -127,13 +127,20 @@ def scan_issues(project_dir: Path) -> list[IssueEvent]:
|
|
|
127
127
|
body_start = 0
|
|
128
128
|
|
|
129
129
|
# Parse metadata headers in any order (TARGET_REPO, SUBMITTED_BY, SUBMITTED_AT, etc.)
|
|
130
|
+
import re as _re
|
|
130
131
|
_META = ("TARGET_REPO:", "SUBMITTED_BY:", "SUBMITTED_AT:", "SUPPORT_URL:")
|
|
132
|
+
submitter_user_id = ""
|
|
131
133
|
for i, line in enumerate(lines):
|
|
132
134
|
stripped = line.strip()
|
|
133
135
|
upper = stripped.upper()
|
|
134
136
|
if upper.startswith(_TARGET_REPO_PREFIX):
|
|
135
137
|
target_repo = stripped[len(_TARGET_REPO_PREFIX):].strip()
|
|
136
138
|
body_start = i + 1
|
|
139
|
+
elif upper.startswith("SUBMITTED_BY:"):
|
|
140
|
+
m = _re.search(r'\(([UW][A-Z0-9]+)\)', stripped)
|
|
141
|
+
if m:
|
|
142
|
+
submitter_user_id = m.group(1)
|
|
143
|
+
body_start = i + 1
|
|
137
144
|
elif any(upper.startswith(p) for p in _META) or not stripped:
|
|
138
145
|
body_start = i + 1
|
|
139
146
|
else:
|
|
@@ -148,6 +155,7 @@ def scan_issues(project_dir: Path) -> list[IssueEvent]:
|
|
|
148
155
|
message=message,
|
|
149
156
|
body=body,
|
|
150
157
|
target_repo=target_repo,
|
|
158
|
+
submitter_user_id=submitter_user_id,
|
|
151
159
|
))
|
|
152
160
|
logger.info("Found issue: %s (target_repo=%r)", f.name, target_repo or "auto")
|
|
153
161
|
|
|
@@ -1768,15 +1768,17 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
1768
1768
|
try:
|
|
1769
1769
|
content = f.read_text(encoding="utf-8", errors="replace")
|
|
1770
1770
|
content_lower = content.lower()
|
|
1771
|
-
# Check if TARGET_REPO
|
|
1771
|
+
# Check if TARGET_REPO header matches — files use "TARGET_REPO: value" (colon)
|
|
1772
|
+
# but also support "TARGET_REPO=value" (equals) for compatibility
|
|
1772
1773
|
for line in content.splitlines():
|
|
1773
|
-
if line.strip().upper().startswith("TARGET_REPO
|
|
1774
|
-
|
|
1775
|
-
|
|
1774
|
+
if line.strip().upper().startswith("TARGET_REPO"):
|
|
1775
|
+
# split on first : or = to get the value
|
|
1776
|
+
repo_val = line.split(":", 1)[-1].split("=", 1)[-1].strip().lower()
|
|
1777
|
+
if keyword.lower() in repo_val:
|
|
1776
1778
|
repo_matched.append(f)
|
|
1777
1779
|
break
|
|
1778
1780
|
else:
|
|
1779
|
-
if keyword in content_lower:
|
|
1781
|
+
if keyword.lower() in content_lower:
|
|
1780
1782
|
content_matched.append(f)
|
|
1781
1783
|
except OSError:
|
|
1782
1784
|
pass
|