smith: answer @smith in any repo (smith-dispatch.yml) #10

Merged
noe.trevino merged 2 commits from smith-everywhere into main 2026-10-13 18:19:10 -05:00
Owner

@smith in any repo, with no caller file in the repo. The smith-hook service (noe.trevino/forgejo PR, same name) starts smith-dispatch.yml here for each mention by a user with write access.

Changes

  • smith-dispatch.yml (new): a workflow_dispatch with the inputs repo, number, comment-id, review, actor. It calls smith.yml with mention: true, persona: agent-smith, and addressee: Mr. Trevino for you.
  • smith.yml: new target-* inputs. When target-repo is set, the mention jobs act on that repo. forge gets the repo from FORGE_REPO. The gate reads the title, the text, the comment, and the default branch through the API. Checkout uses repository: target-repo. The scripts come from the ref of the run.
  • forge: issue view --field, comment-view ID, repo --field default-branch|url.
  • Callers that already exist work the same as before. Without target-repo, every expression falls back to the old event value.

Found while testing (Forgejo 15)

  • In the with: block of a called workflow, github.* is empty. inputs.* works.

Tests

  • python3 -m unittest discover -s smith: 13 tests pass.
  • Test server: a webhook and the hook started the dispatch. The gate (with access check, 👀 reaction, and review thread) and the failure comment all acted on the other repo.
  • Live: a dispatch on this branch for ai-job-search PR #2 (run 36). smith reacted and answered your comment. It made no file changes.

Before merge

Merge this PR before the hook goes live. The hook dispatches smith-dispatch.yml on main.

`@smith` in any repo, with no caller file in the repo. The `smith-hook` service (noe.trevino/forgejo PR, same name) starts `smith-dispatch.yml` here for each mention by a user with write access. ## Changes - `smith-dispatch.yml` (new): a `workflow_dispatch` with the inputs `repo`, `number`, `comment-id`, `review`, `actor`. It calls `smith.yml` with `mention: true`, `persona: agent-smith`, and `addressee: Mr. Trevino` for you. - `smith.yml`: new `target-*` inputs. When `target-repo` is set, the mention jobs act on that repo. `forge` gets the repo from `FORGE_REPO`. The gate reads the title, the text, the comment, and the default branch through the API. Checkout uses `repository: target-repo`. The scripts come from the ref of the run. - `forge`: `issue view --field`, `comment-view ID`, `repo --field default-branch|url`. - Callers that already exist work the same as before. Without `target-repo`, every expression falls back to the old event value. ## Found while testing (Forgejo 15) - In the `with:` block of a called workflow, `github.*` is empty. `inputs.*` works. ## Tests - `python3 -m unittest discover -s smith`: 13 tests pass. - Test server: a webhook and the hook started the dispatch. The gate (with access check, 👀 reaction, and review thread) and the failure comment all acted on the other repo. - Live: a dispatch on this branch for ai-job-search PR #2 (run 36). smith reacted and answered your comment. It made no file changes. ## Before merge Merge this PR **before** the hook goes live. The hook dispatches `smith-dispatch.yml` on `main`.
smith: answer @smith in any repo through smith-dispatch.yml
All checks were successful
Smith tests / unit (push) Successful in 3s
12ee137a6f
smith: take the scripts from the run ref for a dispatched mention
All checks were successful
Smith tests / unit (push) Successful in 3s
Smith tests / unit (pull_request) Successful in 3s
b982b30444
Sign in to join this conversation.
No description provided.