Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ Useful flags:
- `--once` run one polling cycle and exit
- `--retry-failed` retry failed PRs without waiting for a new head SHA

Note: the monitor dispatches Codex through explicit `--task/--agent/--base` flags for compatibility with both older and newer `scripts/codex-agent.sh` argument parsing.

## Important behavior defaults

- No command defaults to `gx status`.
Expand Down
6 changes: 5 additions & 1 deletion scripts/review-bot-watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ process_one_pr() {

echo "[review-bot-watch] Dispatching Codex agent for PR #${pr} (${head_branch})"
set +e
bash "$repo_root/scripts/codex-agent.sh" "$task_name" "$AGENT_NAME" "$BASE_BRANCH" -- exec "$prompt"
bash "$repo_root/scripts/codex-agent.sh" \
--task "$task_name" \
--agent "$AGENT_NAME" \
--base "$BASE_BRANCH" \
-- exec "$prompt"
local exit_code="$?"
set -e

Expand Down
6 changes: 5 additions & 1 deletion templates/scripts/review-bot-watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ process_one_pr() {

echo "[review-bot-watch] Dispatching Codex agent for PR #${pr} (${head_branch})"
set +e
bash "$repo_root/scripts/codex-agent.sh" "$task_name" "$AGENT_NAME" "$BASE_BRANCH" -- exec "$prompt"
bash "$repo_root/scripts/codex-agent.sh" \
--task "$task_name" \
--agent "$AGENT_NAME" \
--base "$BASE_BRANCH" \
-- exec "$prompt"
local exit_code="$?"
set -e

Expand Down
8 changes: 8 additions & 0 deletions test/install.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,14 @@ test('review-bot-watch script prints help after setup', () => {
assert.match(helpResult.stdout, /Continuously monitor GitHub pull requests targeting a base branch/);
});

test('review-bot-watch uses explicit codex-agent flags for argument parsing compatibility', () => {
const script = fs.readFileSync(path.resolve(__dirname, '..', 'scripts', 'review-bot-watch.sh'), 'utf8');
assert.match(script, /--task \"\$task_name\"/);
assert.match(script, /--agent \"\$AGENT_NAME\"/);
assert.match(script, /--base \"\$BASE_BRANCH\"/);
assert.match(script, /-- exec \"\$prompt\"/);
});

test('setup blocks in-place maintenance writes on protected main after initialization', () => {
const repoDir = initRepoOnBranch('main');

Expand Down
Loading