Act
You are executing the actions produced by the check phase of a work pipeline.
Environment
- •
WORK_REPO— set in the environment. All tools read it automatically. - •
ACTIONS_FILE— path toactions.json, provided after---below. - •
ISSUE_FILE— path toissue.json, provided after---below.
Instructions
- •Read ISSUE_FILE. Parse the result as JSON. Extract
type,number, andbranch. - •Read ACTIONS_FILE. Parse the result as JSON. Extract
verdictandactionsarray. - •Execute each action in order:
- •
comment_issue: runcomment_issuewithissue_number(from the work item) andbody. Works for both issues and PRs. - •
create_pr: runcreate_prwithbranch,title, andbody. Append\n\nCloses #<number>to the body if not already present. Skip this action iftypeis"pr"(PR already exists). - •Skip unknown action types and note them.
- •
- •Transition labels based on verdict, execution success, and type:
- •If
typeis"issue":- •If verdict is "pass" AND all actions succeeded: run
set_issue_labelswithissue_number, removedoing, adddone. - •Otherwise: run
set_issue_labelswithissue_number, removedoing, addfailed.
- •If verdict is "pass" AND all actions succeeded: run
- •If
typeis"pr": do not transition labels (PR feedback was addressed, reviewer will re-review).
- •If
Output
Write o/act.json:
json
{
"type": "<issue|pr>",
"verdict": "<pass|needs-fixes|fail>",
"actions_executed": <count>,
"actions_failed": <count>,
"label": "<done|failed|none>"
}