Skip to content

ADR-234: Add auto-update hook#34

Merged
jodavis merged 2 commits into
feature/ADR-269-agent-orchestrationfrom
dev/claude/ADR-234-update-hook
Jun 12, 2026
Merged

ADR-234: Add auto-update hook#34
jodavis merged 2 commits into
feature/ADR-269-agent-orchestrationfrom
dev/claude/ADR-234-update-hook

Conversation

@jodavis

@jodavis jodavis commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Create a hook that will make it easier to update plugins as development continues

@jodavis jodavis requested a review from Copilot June 12, 2026 16:12
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

build-and-test: Python test results

Status: ✅ Passed

Test log

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a SessionStart hook and companion script to automatically fast-forward update the dev-team plugin repo on a configurable cadence, using a persisted timestamp in the plugin data directory.

Changes:

  • Added scripts/dev_team_update.py to check a last_update timestamp and run git pull --ff-only --quiet when stale.
  • Added hooks/hooks.json to invoke the update script on SessionStart.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scripts/dev_team_update.py Implements the timestamp-based auto-update behavior and stderr-only logging for failures.
hooks/hooks.json Registers the SessionStart hook to run the updater with plugin root/data substitutions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/dev_team_update.py Outdated
Comment thread scripts/dev_team_update.py
Comment thread hooks/hooks.json Outdated
@jodavis jodavis changed the title ADR-234: uncommitted changes at validation ADR-234: Add auto-update hook Jun 12, 2026
… quoted paths

- Wrap parse_args() in try/except SystemExit so --help and argument
  errors exit 0 instead of propagating and blocking SessionStart.
- Check git status --porcelain before pulling; skip and log to stderr
  when the working tree has local changes.
- Run both git invocations with GIT_TERMINAL_PROMPT=0 and timeout=30
  to prevent interactive credential prompts from hanging the hook.
- Quote \${CLAUDE_PLUGIN_ROOT} and \${CLAUDE_PLUGIN_DATA} in hooks.json
  so paths containing spaces are passed as single arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jodavis jodavis merged commit 70bccc7 into feature/ADR-269-agent-orchestration Jun 12, 2026
1 check passed
@jodavis jodavis deleted the dev/claude/ADR-234-update-hook branch June 12, 2026 17:41
jodavis added a commit that referenced this pull request Jun 19, 2026
* ADR-234: uncommitted changes at validation

* ADR-234: Address review comments — exit-0 guarantee, dirty-tree skip, quoted paths

- Wrap parse_args() in try/except SystemExit so --help and argument
  errors exit 0 instead of propagating and blocking SessionStart.
- Check git status --porcelain before pulling; skip and log to stderr
  when the working tree has local changes.
- Run both git invocations with GIT_TERMINAL_PROMPT=0 and timeout=30
  to prevent interactive credential prompts from hanging the hook.
- Quote \${CLAUDE_PLUGIN_ROOT} and \${CLAUDE_PLUGIN_DATA} in hooks.json
  so paths containing spaces are passed as single arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Joe Davis <ElwoodMoves@hotmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants