Skip to content

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

Open
rickvdl wants to merge 2 commits intomainfrom
rickvdl/skip-rerun-when-workflow-missing
Open

Skip rerun-danger when target workflow doesn't exist yet#8
rickvdl wants to merge 2 commits intomainfrom
rickvdl/skip-rerun-when-workflow-missing

Conversation

@rickvdl
Copy link
Copy Markdown
Member

@rickvdl rickvdl commented Apr 29, 2026

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
Copy link
Copy Markdown
Member

@ajpallares ajpallares left a comment

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