Skip to content

Prevent PR-close workflows from ending in action_required when intentionally inapplicable - #47973

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/workflow-health-label-closed-prs
Closed

Prevent PR-close workflows from ending in action_required when intentionally inapplicable#47973
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/workflow-health-label-closed-prs

Conversation

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Two PR-close workflows were frequently ending with action_required on the same day due to event filters eliminating all runnable work. This change ensures each workflow has an explicit non-error path for ineligible PR-close events.

  • Root-cause containment: no-job runs on filtered PR-close events

    • Label Closed PRs could skip its only job when the PR was merged or on copilot/* branches, leaving the run without executable work.
    • PR Description Updater used a top-level workflow if gate that could similarly short-circuit all jobs.
  • Workflow hardening: guaranteed executable path

    • Added skip-non-target-prs job to label-closed-prs.yml for merged/Copilot-branch closures so the workflow resolves cleanly instead of surfacing action_required.
    • Removed the top-level if gate from pr-description-caveman.md and moved eligibility checks into prompt logic, where ineligible events call noop and exit intentionally.
  • Generated workflow alignment

    • Recompiled pr-description-caveman.lock.yml to reflect the markdown source updates and preserve runtime behavior.
jobs:
  skip-non-target-prs:
    if: github.event.pull_request.merged == true || startsWith(github.event.pull_request.head.ref, 'copilot/')
    steps:
      - run: echo "Skipping Label Closed PRs for merged PRs and Copilot branches."

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix workflow health alert for closed PRs and description updater Prevent PR-close workflows from ending in action_required when intentionally inapplicable Jul 25, 2026
Copilot AI requested a review from pelikhan July 25, 2026 11:01
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[workflow-health] Label Closed PRs + PR Description Updater — persistent action_required (Jul 25)

2 participants