Skip to content

Automate screenshot previews for article PRs - #662

Draft
mateu wants to merge 1 commit into
perladvent:mainfrom
mateu:koan/auto-screenshot-article-prs
Draft

mateu wants to merge 1 commit into
perladvent:mainfrom
mateu:koan/auto-screenshot-article-prs

Conversation

@mateu

@mateu mateu commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

What

Automatically run article screenshot previews for PRs and fix workflow conditions that prevented comments/skips from behaving correctly.

Why

Issue #408 asks for screenshots on new article pull requests, but the current workflow needs a manual label, fails when no article files are changed, and never posts comments due to an event-condition mismatch.

How

  • Trigger screenshot workflow on PR lifecycle events for */incoming/*.pod and */articles/*.pod changes.
  • Remove label-gated execution and run for non-draft PRs automatically.
  • Treat "no changed articles" as a clean skip instead of a failure.
  • Gate expensive screenshot/build steps on detected article changes.
  • Fix PR comment step condition to run in pull_request_target events.

Testing

  • perl -MYAML::XS=LoadFile -e 'LoadFile(".github/workflows/screenshot.yml")'
  • prove -lr t

Quality Report

Changes: 1 file changed, 14 insertions(+), 13 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: 1 issue(s)

  • Branch is not pushed to remote

Generated by Kōan post-mission quality pipeline

@oalders

oalders commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

I think the really tricky part here is actually getting the screenshots into the PR comments. We'd need some kind of an article to accompany the PR so that we can test the workflow.

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