Executor
Translates DecisionMessage actions into GitHub API calls.
The harness executes all GitHub API calls — agents only produce action lists. Credentials never enter agent containers.
| CLASS | DESCRIPTION |
|---|---|
GitHubExecutor |
Translates a :class: |
UnknownActionError |
Raised when a DecisionMessage contains an unrecognized action type. |
Classes¶
GitHubExecutor
¶
GitHubExecutor(token: str, memory: MemoryStore)
Translates a :class:~foreman.protocol.DecisionMessage into GitHub API calls.
Logs the decision to the memory store before executing any GitHub API call, so the record exists even if a downstream call fails.
| PARAMETER | DESCRIPTION |
|---|---|
token
|
GitHub Personal Access Token for the bot account.
TYPE:
|
memory
|
:class:
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
execute |
Execute all actions in decision, logging the decision first. |
Functions¶
execute
¶
execute(decision: DecisionMessage, repo: str, issue_number: int, task_type: str = 'issue.triage', allow_close: bool = False) -> None
Execute all actions in decision, logging the decision first.
Writes the decision record to action_log before any GitHub API
call is attempted. Actions are executed in the order they appear in
:attr:~foreman.protocol.DecisionMessage.actions.
| PARAMETER | DESCRIPTION |
|---|---|
decision
|
The agent's decision message containing actions to run.
TYPE:
|
repo
|
Repository in
TYPE:
|
issue_number
|
GitHub issue number targeted by this decision.
TYPE:
|
task_type
|
Task type string stored in
TYPE:
|
allow_close
|
Whether
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
UnknownActionError
|
If any action has an unrecognized |