Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

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

Summary

Replaces the thollander/actions-comment-pull-request@v2.4.3 third-party action with GitHub's official actions/github-script@v7 for posting and updating PR comments in the preview-docs workflow.

The new implementation:

  • Uses a hidden HTML marker (<!-- preview-docs-comment -->) to identify the preview comment
  • Uses the Octokit API via github.rest.issues.listComments to find existing comments
  • Updates the existing comment if found, otherwise creates a new one

Review & Testing Checklist for Human

  • Test the workflow end-to-end: Create a test PR, push a commit, verify comment is created. Push another commit, verify the same comment is updated (not a new one created)
  • Verify comment body handling: Test with MDX files that produce special characters or complex markdown in the diff output to ensure the comment body is properly handled
  • Check for pagination edge case: If a PR has 100+ comments, listComments may not return all comments by default (though this is unlikely in practice)

Notes

Requested by: kenny

Link to Devin run: https://app.devin.ai/sessions/721831cc9aad445b8db89c07b4ff7bad

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
@devin-ai-integration devin-ai-integration bot changed the title Replace third-party comment action with native gh CLI Replace third-party comment action with actions/github-script Feb 2, 2026
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