Skip to content

feat(workflow): only poll accepted issues, add ci-failed state machine#7834

Merged
BYK merged 2 commits into
mainfrom
feat/ci-poller-accepted-gate
Apr 17, 2026
Merged

feat(workflow): only poll accepted issues, add ci-failed state machine#7834
BYK merged 2 commits into
mainfrom
feat/ci-poller-accepted-gate

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 16, 2026

Summary

Two changes to eliminate wasted polling on abandoned releases:

1. Only poll issues with both ci-pending AND accepted

The poller now ignores issues that nobody has approved. Abandoned releases with ci-pending but no accepted label cost zero poller time.

2. CI failure → ci-failed label + remove accepted

When CI fails, the poller:

  • Swaps ci-pendingci-failed (red label)
  • Removes accepted so the poller stops checking this issue
  • Comments with the failed check names and a link to check runs

To retry: fix CI, then re-add the accepted label. publish.yml detects ci-failed + accepted, swaps back to ci-pending, comments, and immediately triggers the poller via workflow_dispatch (using app token).

State machine

opened → ci-pending

accepted added → poller starts checking (ci-pending + accepted)
  CI passes   → ci-ready → publish starts
  CI fails    → ci-failed, accepted removed → waiting for human

accepted re-added → ci-failed → ci-pending → poller retries

Changes

  • ci-poller.yml: Filter by --label ci-pending --label accepted. On failure: swap labels, remove accepted, comment.
  • publish.yml: waiting-for-ci job handles ci-failedci-pending swap when accepted is re-added. Triggers poller via gh workflow run with app token. Publish gate now also excludes ci-failed.

Pre-requisite (already done)

Created ci-failed label (red #D93F0B) in the repo.

Changes the poller to only check issues with BOTH ci-pending AND
accepted labels. Abandoned releases without approval cost zero.

When CI fails:
- Swaps ci-pending → ci-failed (red label)
- Removes accepted label
- Comments with failed check names and link

To retry after fixing CI, re-add the accepted label. publish.yml
detects ci-failed + accepted, swaps back to ci-pending, and
immediately triggers the poller via workflow_dispatch.

State machine:
  opened → ci-pending
  accepted added → poller starts checking
  CI passes → ci-ready → publish
  CI fails → ci-failed, accepted removed → waiting for human
  accepted re-added → ci-pending → poller retries
@BYK BYK marked this pull request as ready for review April 16, 2026 21:05
@BYK BYK requested a review from a team as a code owner April 16, 2026 21:05
Comment thread .github/workflows/ci-poller.yml
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit efb9fac. Configure here.

Comment thread .github/workflows/ci-poller.yml
…cepted

Since we now only query issues with both ci-pending and accepted
labels, has_accepted is always true. Replace the conditional with
the single "publishing is starting now" message.
Comment thread .github/workflows/ci-poller.yml
@BYK BYK merged commit 8c40d5a into main Apr 17, 2026
10 checks passed
@BYK BYK deleted the feat/ci-poller-accepted-gate branch April 17, 2026 08:29
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.

1 participant