release: 4.4.0#2668
Closed
stainless-app[bot] wants to merge 778 commits intomainfrom
Closed
Conversation
Comment on lines
+10
to
+42
| runs-on: 'ubuntu-latest' | ||
| name: detect-breaking-changes | ||
| if: github.repository == 'cloudflare/cloudflare-python' | ||
| steps: | ||
| - name: Calculate fetch-depth | ||
| run: | | ||
| echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| # Ensure we can check out the pull request base in the script below. | ||
| fetch-depth: ${{ env.FETCH_DEPTH }} | ||
|
|
||
| - name: Install Rye | ||
| run: | | ||
| curl -sSf https://rye.astral.sh/get | bash | ||
| echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
| env: | ||
| RYE_VERSION: '0.44.0' | ||
| RYE_INSTALL_OPTION: '--yes' | ||
| - name: Install dependencies | ||
| run: | | ||
| rye sync --all-features | ||
| - name: Detect removed symbols | ||
| run: | | ||
| rye run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}" | ||
|
|
||
| - name: Detect breaking changes | ||
| run: | | ||
| # Try to check out previous versions of the breaking change detection script. This ensures that | ||
| # we still detect breaking changes when entire files and their tests are removed. | ||
| git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true | ||
| ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 months ago
To fix the problem, explicitly add a permissions block in the job definition (under detect_breaking_changes:). Since this job only needs to check out code and read contents of the repository, the minimal required permission is contents: read. You should add:
permissions:
contents: readas the first item under the job (above runs-on: on line 10). No changes to logic or steps are required; you are just ensuring the workflow does not request more privilege than needed. No extra libraries or imports are necessary.
Suggested changeset
1
.github/workflows/detect-breaking-changes.yml
| @@ -7,6 +7,8 @@ | ||
|
|
||
| jobs: | ||
| detect_breaking_changes: | ||
| permissions: | ||
| contents: read | ||
| runs-on: 'ubuntu-latest' | ||
| name: detect-breaking-changes | ||
| if: github.repository == 'cloudflare/cloudflare-python' |
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Automated Release PR
4.4.0 (2025-08-22)
Full Changelog: v4.3.1...v4.4.0
Features
Chores
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions