@misterhuydo/sentinel 1.4.84 → 1.4.85

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.4.84",
3
+ "version": "1.4.85",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -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
- logger.error("Tests failed:\n%s", r.stdout[-2000:] + r.stderr[-1000:])
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