Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 10, 2025

Description

Refs: User request from Niels Swimberghe (@Swimburger)

Adds support for specifying whether generated pull requests should be created as draft or ready for review when using --mode pull-request.

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

Changes Made

  • Add --pr-state CLI option with choices draft or ready for fern generate command
  • Add GithubPullRequestState enum type to Fern definition (group.yml)
  • Add pr-state field to GithubSelfhostedSchema and GithubPullRequestSchema in generators.yml configuration
  • Pass prState through the generation flow to PR creation logic
  • CLI --pr-state takes precedence over generators.yml pr-state config, which defaults to ready
  • Add changelog entry for v3.6.0

Usage:

fern generate --group ts-sdk --mode pull-request --pr-state draft

Or in generators.yml:

groups:
  ts-sdk:
    generators:
      - name: fernapi/fern-typescript-sdk
        github:
          uri: org/repo
          token: ${{ GITHUB_TOKEN }}
          mode: pull-request
          pr-state: draft

Human Review Checklist

  • The prState parameter is passed to remote generation but not fully utilized there (Fiddle service would need updates) - confirm this partial implementation is acceptable
  • PullRequestState type is defined in 3 separate files (generateAPIWorkspaces.ts, runLocalGenerationForWorkspace.ts, runRemoteGenerationForAPIWorkspace.ts) rather than a single source - consider if consolidation is needed
  • Verify the auto-generated schema files in packages/cli/configuration/src/generators-yml/schemas/ are correct

Testing

  • Unit tests added/updated
  • Lint checks pass
  • CI checks pass
  • Manual testing completed (not performed - would require actual GitHub PR creation)

Add support for specifying whether generated pull requests should be
created as draft or ready for review when using --mode pull-request.

- Add --pr-state CLI option with choices 'draft' or 'ready'
- Add pr-state field to GithubSelfhostedSchema and GithubPullRequestSchema
- Pass prState through generation flow to PR creation logic
- CLI --pr-state takes precedence over generators.yml pr-state config
- Update CLI versions.yml with new feature entry (v3.6.0)

Co-Authored-By: Niels Swimberghe <[email protected]>
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant