@misterhuydo/sentinel 1.5.34 → 1.5.35

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.5.34",
3
+ "version": "1.5.35",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -1 +1 @@
1
- __version__ = "1.5.34"
1
+ __version__ = "1.5.35"
@@ -415,17 +415,25 @@ async def _handle_issue(event: IssueEvent, cfg_loader: ConfigLoader, store: Stat
415
415
  elif len(cfg_loader.repos) == 1:
416
416
  repo = next(iter(cfg_loader.repos.values()))
417
417
  else:
418
- logger.warning(
419
- "Cannot auto-route %s -- add 'TARGET_REPO: <repo>' as first line in the file",
420
- event.source,
421
- )
422
- _route_alert(
423
- sentinel.slack_bot_token, _origin_ch,
424
- f":warning: *Issue routing failed*{' — ' + '<@' + _submitter_id + '>' if _submitter_id else ''}\n"
425
- f"Multiple repos configured — add `TARGET_REPO: <repo-name>` to the issue.\n"
426
- f"_{event.message[:120]}_",
427
- )
428
- return # Leave the file so admin can add the header
418
+ # Try to infer repo from message content (e.g. "Service: STS" in bot alerts)
419
+ from .slack_bot import _infer_target_repo
420
+ inferred = _infer_target_repo(event.body, cfg_loader.repos)
421
+ if inferred:
422
+ repo = cfg_loader.repos[inferred]
423
+ logger.info("Auto-routed %s → %s (inferred from content)", event.source, inferred)
424
+ else:
425
+ logger.warning(
426
+ "Cannot auto-route %s -- add 'TARGET_REPO: <repo>' as first line in the file",
427
+ event.source,
428
+ )
429
+ _route_alert(
430
+ sentinel.slack_bot_token, _origin_ch,
431
+ f":warning: *Issue routing failed*{' — ' + '<@' + _submitter_id + '>' if _submitter_id else ''}\n"
432
+ f"Multiple repos configured — add `TARGET_REPO: <repo-name>` to the issue.\n"
433
+ f"_{event.message[:120]}_",
434
+ )
435
+ mark_done(event.issue_file) # archive so it doesn't re-prompt every poll
436
+ return
429
437
 
430
438
  auto_commit = resolve_auto_commit(repo, sentinel)
431
439
  auto_release = resolve_auto_release(repo, sentinel)