Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Enable auto-merge for Fern Scribe PRs

Summary

Modified the Fern Scribe workflow to automatically enable auto-merge and approve PRs it creates, matching the behavior of the update-versions.yml workflow. This addresses the request from the Slack thread to set up automation for Fern Scribe PRs.

Changes:

  • Updated fern-scribe.js to output the PR number via GITHUB_OUTPUT when a PR is successfully created
  • Added two new workflow steps:
    1. Enable Pull Request Automerge: Uses peter-evans/enable-pull-request-automerge@v3 with squash merge method
    2. Approving PR: Uses gh pr review --approve with the PR_BOT_GH_PAT secret

The implementation follows the same pattern as the existing update-versions.yml workflow.

Review & Testing Checklist for Human

  • Verify PR_BOT_GH_PAT secret exists - The workflow requires this secret for PR approval. Check that it's configured in repository secrets and has the necessary permissions
  • Test with draft PRs - Fern Scribe creates draft PRs by default (line 1647 in fern-scribe.js). Verify that auto-merge can be enabled on draft PRs, or if they need to be marked "ready for review" first
  • End-to-end test - Create a test issue with the fern-scribe label and verify:
    • PR is created successfully
    • PR number is captured correctly
    • Auto-merge is enabled
    • PR is approved
    • PR auto-merges when CI passes (if not a draft)

Notes

  • The workflow only runs when issues are labeled with fern-scribe
  • Both new steps have conditional checks: success() && steps.fern-scribe.outputs.pr-number to only run when a PR was actually created
  • If the draft PR issue blocks auto-merge, you may need to either:
    • Remove the draft: true flag from the PR creation in fern-scribe.js, OR
    • Add a step to mark the PR as ready before enabling auto-merge

Link to Devin run: https://app.devin.ai/sessions/1fc14f49872d4da09a4ab7654f81c68e
Requested by: [email protected] (@jon-fern)

@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

@jon-fern jon-fern closed this Oct 18, 2025
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