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
61 changes: 61 additions & 0 deletions .github/workflows/agents-pr-health.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ---------------------------------------------------------------------------
# Agents PR Health — Consumer Repo Thin Wrapper
# ---------------------------------------------------------------------------
# Periodically scans open PRs for merge conflicts and failing checks,
# then routes remediation to the coding agent that most recently worked
# on each PR.
#
# Copy this file to: .github/workflows/agents-pr-health.yml
#
# Required secrets (inherited from org / repo):
# - WORKFLOWS_APP_ID / WORKFLOWS_APP_PRIVATE_KEY (preferred)
# - ACTIONS_BOT_PAT or SERVICE_BOT_PAT (fallback)
# ---------------------------------------------------------------------------

name: Agents PR Health

on:
schedule:
# Runs every hour — actual frequency is controlled by the repo
# variable PR_HEALTH_INTERVAL_HOURS (Settings → Secrets and
# variables → Actions → Variables). The reusable workflow skips
# runs at non-aligned hours, so most hourly triggers exit in
# seconds with no API calls.
#
# 1 = every hour (active development — default)
# 4 = every 4 hours
# 6 = every 6 hours (moderate activity)
# 12 = twice daily
# 0 = disabled
- cron: '0 * * * *'
workflow_dispatch:
inputs:
dry_run:
description: 'Preview mode — scan and report without pushing or dispatching'
required: false
default: false
type: boolean
max_prs:
description: 'Maximum PRs to process'
required: false
default: 10
type: number

permissions:
contents: write
pull-requests: write
actions: write

concurrency:
group: pr-health-${{ github.repository }}
cancel-in-progress: true

jobs:
health:
uses: stranske/Workflows/.github/workflows/reusable-agents-pr-health.yml@main
with:
dry_run: ${{ inputs.dry_run || false }}
max_prs: ${{ inputs.max_prs || 10 }}
cron_interval_hours: ${{ vars.PR_HEALTH_INTERVAL_HOURS || 1 }}
is_scheduled_trigger: ${{ github.event_name == 'schedule' }}
secrets: inherit
Loading
Loading