@misterhuydo/sentinel 1.4.33 → 1.4.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/.cairn/.hint-lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-25T06:03:05.073Z
|
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-25T06:09:17.198Z",
|
|
3
|
+
"checkpoint_at": "2026-03-25T06:09:17.200Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
package/python/sentinel/main.py
CHANGED
|
@@ -446,6 +446,25 @@ async def _send_startup_email_delayed(cfg, results: dict, delay: int = 300):
|
|
|
446
446
|
|
|
447
447
|
# ── Config repo polling ──────────────────────────────────────────────────────────────────────────
|
|
448
448
|
|
|
449
|
+
def _config_repo_git_env() -> dict:
|
|
450
|
+
"""Return env with GIT_SSH_COMMAND pointing to ~/.ssh/<slug>.key if it exists."""
|
|
451
|
+
env = os.environ.copy()
|
|
452
|
+
try:
|
|
453
|
+
r = subprocess.run(
|
|
454
|
+
["git", "remote", "get-url", "origin"],
|
|
455
|
+
capture_output=True, text=True, timeout=5,
|
|
456
|
+
)
|
|
457
|
+
remote = r.stdout.strip()
|
|
458
|
+
# Extract slug: git@github.com:org/repo.git or https://github.com/org/repo.git
|
|
459
|
+
slug = remote.rstrip(".git").rsplit("/", 1)[-1].rsplit(":", 1)[-1].rsplit("/", 1)[-1]
|
|
460
|
+
key = Path.home() / ".ssh" / f"{slug}.key"
|
|
461
|
+
if key.exists():
|
|
462
|
+
env["GIT_SSH_COMMAND"] = f"ssh -i {key} -o StrictHostKeyChecking=no -o BatchMode=yes"
|
|
463
|
+
except Exception:
|
|
464
|
+
pass
|
|
465
|
+
return env
|
|
466
|
+
|
|
467
|
+
|
|
449
468
|
def _poll_config_repo(cfg_loader: ConfigLoader) -> bool:
|
|
450
469
|
"""git pull the project directory if it is a git repo. Returns True if changes were pulled."""
|
|
451
470
|
project_dir = Path(".")
|
|
@@ -457,6 +476,7 @@ def _poll_config_repo(cfg_loader: ConfigLoader) -> bool:
|
|
|
457
476
|
["git", "pull", "--rebase", "--autostash"],
|
|
458
477
|
cwd=str(project_dir),
|
|
459
478
|
capture_output=True, text=True, timeout=30,
|
|
479
|
+
env=_config_repo_git_env(),
|
|
460
480
|
)
|
|
461
481
|
if result.returncode != 0:
|
|
462
482
|
logger.warning("Config repo git pull failed: %s", result.stderr.strip())
|
|
@@ -1164,10 +1164,10 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
1164
1164
|
submitter_name = store.get_user_name(user_id) if user_id else ""
|
|
1165
1165
|
submitter_line = f"SUBMITTED_BY: {submitter_name} ({user_id})" if user_id else ""
|
|
1166
1166
|
lines = []
|
|
1167
|
-
if submitter_line:
|
|
1168
|
-
lines.append(submitter_line)
|
|
1169
1167
|
if target_repo:
|
|
1170
1168
|
lines.append(f"TARGET_REPO: {target_repo}")
|
|
1169
|
+
if submitter_line:
|
|
1170
|
+
lines.append(submitter_line)
|
|
1171
1171
|
if support_url:
|
|
1172
1172
|
lines.append(f"SUPPORT_URL: {support_url}")
|
|
1173
1173
|
lines.append(f"SUBMITTED_AT: {datetime.now(timezone.utc).isoformat()}")
|