ansible-freshen: fail on uncommitted/stash/unmerged + blocked pulls; report repos needing push #252

Closed
opened 2026-06-06 23:07:45 +00:00 by coilysiren · 0 comments
Owner

The coily ansible-freshen git sweep (git role + ansible/library/repo_status.py) reported repos needing attention but never failed the run, and stashes / unmerged local branches were flagged but excluded from action_required. There was also no dedicated surface for "this repo just needs a push."

Make the freshness command:

  1. Surface and fail on uncommitted changes (including stashed work and work parked on unmerged local branches) and on pulls that can't happen automatically (non-ff / rebase-conflict, reported BLOCKED), alongside the existing in-progress-op / detached-HEAD / mirror-drift signals.
  2. Add informational output for repos that need to be pushed (local commits on the default branch not yet on origin), which must never fail the run.

Implementation:

  • repo_status.py: fold stashes + stale (unmerged branches) into _is_action_required; add _push_pending + a needs_push output list.
  • git role: report needs_push informationally; surface action_required.
  • freshen.yml: a post_tasks freshness gate (ansible.builtin.fail) fails the whole run on action_required, deferred so every role converges and all reports print first.
The `coily ansible-freshen` git sweep (git role + `ansible/library/repo_status.py`) reported repos needing attention but never **failed** the run, and stashes / unmerged local branches were flagged but excluded from `action_required`. There was also no dedicated surface for "this repo just needs a push." Make the freshness command: 1. **Surface and fail** on uncommitted changes (including stashed work and work parked on unmerged local branches) and on pulls that can't happen automatically (non-ff / rebase-conflict, reported `BLOCKED`), alongside the existing in-progress-op / detached-HEAD / mirror-drift signals. 2. Add **informational** output for repos that need to be pushed (local commits on the default branch not yet on `origin`), which must never fail the run. Implementation: - `repo_status.py`: fold `stashes` + `stale` (unmerged branches) into `_is_action_required`; add `_push_pending` + a `needs_push` output list. - git role: report `needs_push` informationally; surface `action_required`. - `freshen.yml`: a `post_tasks` freshness gate (`ansible.builtin.fail`) fails the whole run on `action_required`, deferred so every role converges and all reports print first.
Sign in to join this conversation.
No description provided.