Sitelet https://github.com/canonical/vanilla-framework/pull/5812
Skip to content

chore: skip Percy on Blocked PRs even with the Percy label - #5812

Merged
Onibenjo merged 1 commit into
mainfrom
WD-37050/skip-percy-on-blocked-prs
Jun 15, 2026
Merged

Onibenjo merged 1 commit into
mainfrom
WD-37050/skip-percy-on-blocked-prs

Conversation

@Onibenjo

@Onibenjo Onibenjo commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Done

  • Guard the Percy (labeled) workflow so it never runs when a PR carries the Blocked ⛔ label, even if Review: Percy needed is present.
  • Matches Blocked as a substring (robust to the emoji/trailing space; no other label contains it).
  • Applies to both trigger branches (labeled and synchronize), so neither adding the Percy label nor pushing/rebasing a blocked PR will start a build.

Why: a Renovate PR was labelled Review: Percy needed, then hit a problem and was marked Blocked ⛔ and abandoned. Renovate kept rebasing it ~2–4×/week, and each synchronize faithfully ran a full ~700-screenshot Percy build for months. The label was doing its job; it just outlived its purpose on a PR that could never merge.

Effect: healthy labelled PRs (including legitimate Renovate version-bump visual checks) are unaffected and still re-check on each rebase. Blocked ⛔ now acts as a pause/resume switch.

CI-only change — no SCSS/macro changes, so no version bump or release-notes entry needed.

Fixes — ticket WD-37050
https://warthogs.atlassian.net/browse/WD-37066

QA

  • On a PR with Review: Percy needed and Blocked ⛔: push a commit → confirm the Percy (labeled) workflow does not trigger.
  • On a PR with only Review: Percy needed (no Blocked ⛔): push a commit → confirm Percy still runs as before.
  • Remove Blocked ⛔, push again → Percy resumes.

Check if PR is ready for release

N/A — no Vanilla SCSS or macro code changes (CI workflow only).

Screenshots

N/A

@webteam-app

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the “Percy (labeled)” GitHub Actions workflow so it will not run for pull requests that have a Blocked ⛔ label present, even if Review: Percy needed is applied. This prevents repeated Percy runs on abandoned/blocked PRs (notably Renovate PRs that continue to rebase and retrigger synchronize events).

Changes:

  • Add a job-level guard to skip the workflow whenever any PR label contains the substring Blocked.
  • Apply the guard consistently for both workflow trigger paths (labeled and synchronize) so neither labeling nor new commits will start Percy while blocked.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@immortalcodes immortalcodes 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.

LGTM! Thanks, this will be helpful.

@Onibenjo
Onibenjo force-pushed the WD-37050/skip-percy-on-blocked-prs branch from b777dcb to 3577120 Compare June 15, 2026 11:01
@Onibenjo Onibenjo added the Review: Percy needed This PR needs a review of Percy for visual regressions label Jun 15, 2026
@Onibenjo
Onibenjo merged commit a7c1a43 into main Jun 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintenance 🔨 Review: Code +1 Review: Percy needed This PR needs a review of Percy for visual regressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants