-
Notifications
You must be signed in to change notification settings - Fork 3
Add python-sdk generator to fern/generators.yml #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f23cc01
add python sdk generator
jsklan 345cb7f
update preview target, add fern/.preview to gitignore
jsklan 534b002
Add pydantic config
mattblank11 68d8275
Merge branch 'main' into jsklan/python-sdk
jsklan 4e7bca3
change target and add github workflow
jsklan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Release Python SDK | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "The version of the SDK that you would like to release" | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v4 | ||
|
|
||
| - name: Download Fern | ||
| run: npm install -g fern-api | ||
|
|
||
| - name: Release SDKs | ||
| env: | ||
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | ||
| FERN_PYPI_TOKEN: ${{ secrets.FERN_PYPI_TOKEN }} | ||
| run: | | ||
| fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,3 +14,6 @@ compiled/ | |
|
|
||
| # Rubymine | ||
| .idea | ||
|
|
||
| # Fern preview files | ||
| /fern/.preview | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 6 months ago
The best way to fix this issue is to introduce an explicit
permissionsblock at the root of the workflow file. This block will define minimal permissions required for the workflow to function correctly. Based on the workflow's operations, it likely only requirescontents: readpermission for accessing the repository's code. If additional permissions are required (e.g.,pull-requests: write), they can be added accordingly.To implement the fix:
permissionskey at the root level of the workflow file (beforejobs).contents: read, as this workflow primarily interacts with the repository's contents.