Skip to content

Commit d89c5c5

Browse files
committed
update github and reviewers schema sections
1 parent 4fb09dd commit d89c5c5

File tree

1 file changed

+37
-20
lines changed

1 file changed

+37
-20
lines changed

fern/products/sdks/reference/generators-yml-reference.mdx

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -674,28 +674,48 @@ groups:
674674

675675
### GitHub Configuration
676676

677-
<ParamField path="groups.{groupName}.generators[].github.repository" type="string" required={true} toc={true}>
678-
</ParamField>
677+
There are three ways (`mode`) to deploy your SDK code to GitHub:
678+
* **Commit and release** (recommended) - Fern generates your code, commits it to main, and tags a new release.
679+
* **Pull request** - Fern generates your code, commits to a new branch, and opens a PR for review. To publish, you must merge the PR and tag a GitHub release.
680+
* **Push** - Fern generates your code and pushes it to the branch you specify.
679681

680-
<ParamField path="groups.{groupName}.generators[].github.mode" type="'commit' | 'release' | 'pull-request' | 'push'" required={false} toc={true}>
681-
</ParamField>
682+
For all of these modes, you must specify the GitHub repository in which you want to store your SDK code. You can optionally
683+
specify a branch name, license, and reviewers.
682684

683-
<ParamField path="groups.{groupName}.generators[].github.branch" type="string" required={false} toc={true}>
684-
</ParamField>
685+
```yml {6-17}
686+
groups:
687+
ts-sdk:
688+
generators:
689+
- name: fernapi/fern-typescript-sdk
690+
...
691+
github:
692+
repository: "your-org/your-repo-name"
693+
mode: "commit"
694+
branch: "your-branch-name"
695+
license: "MIT"
696+
reviewers:
697+
teams:
698+
- name: "sdk-team"
699+
- name: "api-team"
700+
users:
701+
- name: "john-doe"
702+
- name: "jane-smith"
703+
```
685704

686-
<ParamField path="groups.{groupName}.generators[].github.license" type="GithubLicenseSchema" required={false} toc={true}>
705+
<ParamField path="repository" type="string" required={true} toc={true}>
687706
</ParamField>
688707

689-
<ParamField path="groups.{groupName}.generators[].github.license.MIT" type="'MIT'" required={false} toc={true}>
708+
<ParamField path="mode" type="'commit' | 'release' | 'pull-request' | 'push'" required={false} toc={true}>
690709
</ParamField>
691710

692-
<ParamField path="groups.{groupName}.generators[].github.license.Apache" type="'Apache-2.0'" required={false} toc={true}>
711+
<ParamField path="branch" type="string" required={false} toc={true}>
693712
</ParamField>
694713

695-
<ParamField path="groups.{groupName}.generators[].github.license.custom" type="string" required={false} toc={true}>
714+
<ParamField path="license" type="'MIT' | 'Apache-2.0' | { custom: 'Custom License Name' }" required={false} toc={true}>
696715
</ParamField>
697716

698-
<ParamField path="groups.{groupName}.generators[].github.reviewers" type="ReviewersSchema" required={false} toc={true}>
717+
<ParamField path="reviewers" type="{ teams: list<string>, users: list<string> }" required={false} toc={true}>
718+
Specify which teams and users should review generated code. See [reviewers configuration](#reviewers-1).
699719
</ParamField>
700720

701721
### Generator Metadata
@@ -741,17 +761,14 @@ reviewers:
741761
- name: "jane-smith"
742762
```
743763

744-
<ParamField path="reviewers" type="ReviewersSchema" required={false} toc={true}>
745-
</ParamField>
746-
747-
<ParamField path="reviewers.teams" type="list<ReviewerSchema>" required={false} toc={true}>
748-
</ParamField>
749-
750-
<ParamField path="reviewers.teams[].name" type="string" required={true} toc={true}>
764+
<ParamField path="teams" type="list<string>" required={false} toc={true}>
765+
GitHub team names that should review generated code.
751766
</ParamField>
752767

753-
<ParamField path="reviewers.users" type="list<ReviewerSchema>" required={false} toc={true}>
768+
<ParamField path="users" type="list<string>" required={false} toc={true}>
769+
GitHub users that should review generated code.
754770
</ParamField>
755771

756-
<ParamField path="reviewers.users[].name" type="string" required={true} toc={true}>
772+
<ParamField path="name" type="string" required={true} toc={true}>
773+
Name of a GitHub team or a user.
757774
</ParamField>

0 commit comments

Comments
 (0)