Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 2, 2026

Summary

Simplifies the preview-docs GitHub workflow by:

  • Replacing thollander/actions-comment-pull-request@v2.4.3 with actions/github-script@v7 for posting PR comments
  • Removing visual image diffing (CML, Puppeteer, Chrome, fern docs diff, artifact uploads)
  • Using the existing /api/fern-docs/get-slug-for-file API endpoint to resolve MDX file paths to slugs
  • Now just logs changed MDX slugs with direct links to the preview URL

The PR comment will show the preview URL and a list of changed pages with clickable links to each changed MDX file's preview.

Review & Testing Checklist for Human

  • API endpoint availability: Verify the /api/fern-docs/get-slug-for-file endpoint is available on preview URLs and returns the expected format ({ mappings: [{ file, slug }] })
  • Test on a real PR: Create a test PR with MDX changes to verify the workflow runs successfully and the comment format looks correct
  • Bot comment detection: Confirm the logic to find/update existing comments works (looks for user.type === 'Bot' and the :herb: marker)

Recommended test plan: Open a test PR that modifies an MDX file, let the workflow run, and verify:

  1. The preview URL is generated correctly
  2. The changed pages list shows the correct file paths and slugs
  3. The links to individual pages work
  4. On subsequent pushes, the comment is updated (not duplicated)

Notes

  • Visual diffing was removed as it's not ready yet per user request
  • The workflow is significantly simpler now (122 lines vs 151 lines)
  • Uses the same API endpoint that was used in the pre-visual-diffing version of this workflow

Requested by: kenny@buildwithfern.com
Link to Devin run: https://app.devin.ai/sessions/a22b7becfc7449e2aa54fb71f928535b

…l diffing

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
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.

0 participants