@misterhuydo/sentinel 1.4.73 → 1.4.75
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/lib/generate.js +1 -1
- package/package.json +1 -1
- package/python/sentinel/main.py +4 -3
package/lib/generate.js
CHANGED
package/package.json
CHANGED
package/python/sentinel/main.py
CHANGED
|
@@ -632,13 +632,14 @@ async def _send_startup_email_delayed(cfg, results: dict, delay: int = 300):
|
|
|
632
632
|
|
|
633
633
|
# ── Config repo polling ──────────────────────────────────────────────────────────────────────────
|
|
634
634
|
|
|
635
|
-
def _config_repo_git_env() -> dict:
|
|
635
|
+
def _config_repo_git_env(project_dir: Path | None = None) -> dict:
|
|
636
636
|
"""Return env with GIT_SSH_COMMAND pointing to ~/.ssh/<slug>.key if it exists."""
|
|
637
637
|
env = os.environ.copy()
|
|
638
638
|
try:
|
|
639
|
+
cwd = str((project_dir or Path(".")).resolve())
|
|
639
640
|
r = subprocess.run(
|
|
640
641
|
["git", "remote", "get-url", "origin"],
|
|
641
|
-
capture_output=True, text=True, timeout=5,
|
|
642
|
+
cwd=cwd, capture_output=True, text=True, timeout=5,
|
|
642
643
|
)
|
|
643
644
|
remote = r.stdout.strip()
|
|
644
645
|
# Extract slug: git@github.com:org/repo.git or https://github.com/org/repo.git
|
|
@@ -662,7 +663,7 @@ def _poll_config_repo(cfg_loader: ConfigLoader) -> bool:
|
|
|
662
663
|
["git", "pull", "--rebase", "--autostash"],
|
|
663
664
|
cwd=str(project_dir),
|
|
664
665
|
capture_output=True, text=True, timeout=30,
|
|
665
|
-
env=_config_repo_git_env(),
|
|
666
|
+
env=_config_repo_git_env(project_dir),
|
|
666
667
|
)
|
|
667
668
|
if result.returncode != 0:
|
|
668
669
|
logger.warning("Config repo git pull failed: %s", result.stderr.strip())
|