Skip to content

Do not restart workflows for closed PR's and merge group - #68

Merged
AndWeHaveAPlan merged 5 commits into
mainfrom
restarter-skip-merged-pr
Jul 28, 2026
Merged

Do not restart workflows for closed PR's and merge group#68
AndWeHaveAPlan merged 5 commits into
mainfrom
restarter-skip-merged-pr

Conversation

@AndWeHaveAPlan

Copy link
Copy Markdown
Collaborator
  • merge_group: never restart — a failed queue run already evicted the PR,
    and a re-run cannot re-enqueue it.
  • pull_request/pull_request_target: skip if a PR for the head branch was
    merged or closed after the run was created; an open PR (e.g. reopened)
    always keeps restarts working.
  • everything else (push, schedule, dispatch): restart as before.

Notes:

  • PR detection by head branch, not SHA (squash/rebase merges hide the head SHA).
  • Requires new App permission: Pull requests (read). Fails without it, warns and restarts as before

@AndWeHaveAPlan
AndWeHaveAPlan merged commit f039edc into main Jul 28, 2026
11 checks passed
@AndWeHaveAPlan
AndWeHaveAPlan deleted the restarter-skip-merged-pr branch July 28, 2026 14:09
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.

2 participants