diff --git a/tools/gh-monitor/com.hans.gh-monitor.plist b/tools/gh-monitor/com.hans.gh-monitor.plist index 8b8f071..d1a4621 100644 --- a/tools/gh-monitor/com.hans.gh-monitor.plist +++ b/tools/gh-monitor/com.hans.gh-monitor.plist @@ -16,6 +16,13 @@ /Users/hansheinemann/Projects/hans-tools/tools/gh-monitor/state/stdout.log StandardErrorPath /Users/hansheinemann/Projects/hans-tools/tools/gh-monitor/state/stderr.log + EnvironmentVariables + + PATH + /usr/local/bin:/usr/bin:/bin:/Users/hansheinemann/.nvm/versions/node/v22.22.1/bin + HOME + /Users/hansheinemann + RunAtLoad diff --git a/tools/gh-monitor/poll.py b/tools/gh-monitor/poll.py index 8d7637b..9edb715 100644 --- a/tools/gh-monitor/poll.py +++ b/tools/gh-monitor/poll.py @@ -62,7 +62,7 @@ def save_state(state: dict, path: Path) -> None: def gh_api(endpoint: str) -> list | dict: result = subprocess.run( - ["/usr/local/bin/gh", "api", "--paginate", endpoint], + ["gh", "api", "--paginate", endpoint], capture_output=True, text=True, ) @@ -135,7 +135,7 @@ def new_events_since(events: list[dict], cursor_ts: str, seen_ids: set) -> list[ def notify(text: str) -> None: result = subprocess.run( - ["/Users/hansheinemann/.nvm/versions/node/v22.22.1/bin/openclaw", "system", "event", "--text", text, "--mode", "now"], + ["openclaw", "system", "event", "--text", text, "--mode", "now"], capture_output=True, text=True, ) @@ -190,7 +190,7 @@ def dispatch_agent(repo_slug: str, pr: dict, event: dict) -> None: try: result = subprocess.run( [ - "/Users/hansheinemann/.nvm/versions/node/v22.22.1/bin/openclaw", "cron", "add", + "openclaw", "cron", "add", "--name", job_name, "--at", "1m", "--session", "isolated",