Skip to content

Skip rerun-danger when target workflow doesn't exist yet#8

Merged
rickvdl merged 2 commits into
mainfrom
rickvdl/skip-rerun-when-workflow-missing
Apr 30, 2026
Merged

Skip rerun-danger when target workflow doesn't exist yet#8
rickvdl merged 2 commits into
mainfrom
rickvdl/skip-rerun-when-workflow-missing

Conversation

@rickvdl

@rickvdl rickvdl commented Apr 29, 2026

Copy link
Copy Markdown
Member

If a label is added quickly after creating a PR, the rerun-danger action can fire before CircleCI has created the pipeline run, and the action fails because the target workflow doesn't exist yet. In that case there's nothing to rerun anyway — the workflow still has to run for the first time. Skip with exit 0 instead of failing.

This is especially likely when an AI agent uses the gh CLI to create a PR and add a label back-to-back.

@rickvdl rickvdl added the pr:fix A bug fix label Apr 29, 2026
@rickvdl rickvdl marked this pull request as ready for review April 29, 2026 12:40
@rickvdl rickvdl requested review from ajpallares and tonidero April 29, 2026 12:41
@rickvdl rickvdl changed the title Skip rerun-danger when target workflow not yet expanded Skip rerun-danger when target workflow doesn't exist yet Apr 29, 2026

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice improvement!

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

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants