Skip to content

Fix build-site-metadata handling for forked PRs#27

Open
dshevtsov wants to merge 4 commits intomainfrom
ds_fix-build-site-metadata
Open

Fix build-site-metadata handling for forked PRs#27
dshevtsov wants to merge 4 commits intomainfrom
ds_fix-build-site-metadata

Conversation

@dshevtsov
Copy link
Copy Markdown

Purpose of this pull request

This pull request updates the site metadata workflow to handle forked pull requests more safely and predictably, based on behavior reproduced in AdobeDocs/commerce-php#443 and AdobeDocs/commerce-php#444.

Summary

  • Check out the correct ref for forked PRs so metadata generation runs against the submitted changes
  • Detect whether src/pages/adp-site-metadata.json actually changed before attempting any commit or push
  • Prevent the workflow from trying to push back to forked repositories, and surface a clear error telling contributors to run npm run buildSiteMetadata locally when metadata updates are needed
  • Avoid unnecessary empty commit attempts when metadata output is unchanged

Testing

  • Verified the branch diff only changes .github/workflows/build-site-metadata.yml
  • Confirmed the workflow now gates commit/push behavior on actual metadata changes
  • Confirmed forked PRs fail with actionable guidance instead of attempting an automated push
  • Validated related workflow behavior against AdobeDocs/commerce-php#443 for forked-PR testing and AdobeDocs/commerce-php#444 for same-repo PR testing

Copy link
Copy Markdown
Contributor

@melissag-ensemble melissag-ensemble left a comment

Choose a reason for hiding this comment

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

looped in @timkim first since this overlaps with DEVSITE-2292 - waiting to hear back before reviewing: https://adobeio.slack.com/archives/C03AVNFAA8Y/p1775741260443359

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