Fix non-zero exit on error and debounce transient mergeable=false #2
Reference in New Issue
Block a user
Delete Branch "benvin/followup-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up bug fixes for a v0.1.1 patch. agentpr/watchpr already exited non-zero on command errors but had no regression coverage and the root command was not constructible outside main(); watchpr also fired a spurious "lost mergeability (conflict)" alert because Gitea computes mergeability asynchronously and can briefly report mergeable=false right after a push; and the docs printed the AppRole role_id literal UUID.
newRootCmd()incmd/agentprandcmd/watchprsomain()only runsExecute()and exits non-zero on any command error (bad ref, Vault/Gitea failure); add tests assertingExecute()returns an error for a bad PR ref, malformed--repo, and no args.MeaningfulChange: alert only whenmergeable=falsepersists across two consecutive polls (both prev and cur false, still open); a single false poll is benign. Update the table test to cover one-poll-false (benign), false-persisting (alert), and recovered false->true (benign). Other alert conditions (merge/close, non-agent comment, CI failure) are unchanged.AGENT_APPROLE_ROLE_IDby env var in README.md/AGENTS.md without printing the literal role_id; keep the code default and env override.