ci: fix workflows that always fail for fork PRs#5065
Merged
jamescrosswell merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
Two CI workflows failed whenever a PR came from a fork because the pull_request trigger runs in a sandboxed context with no write access and no secrets: - Changelog Preview: switched pull_request → pull_request_target so the workflow runs in the base repo context and can post PR comments. Also tightened permissions from contents:write to contents:read since the workflow only needs to write to pull-requests. - Format Code: pull_request_target cannot push to a fork branch anyway, so the fix is fork-aware logic in the commit step. For fork PRs, formatting issues fail the check with a clear message telling the contributor which dotnet format command to run locally. Internal PR behaviour (auto-commit and push) is unchanged. Warden was also listed as failing but is already resolved — warden.yml was removed because Warden is now a globally-enabled GitHub App with its own credentials, unaffected by fork PR restrictions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5065 +/- ##
==========================================
+ Coverage 74.01% 74.13% +0.12%
==========================================
Files 499 499
Lines 18065 18066 +1
Branches 3518 3518
==========================================
+ Hits 13370 13393 +23
+ Misses 3836 3812 -24
- Partials 859 861 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jamescrosswell
added a commit
that referenced
this pull request
Mar 26, 2026
jamescrosswell
added a commit
to jamescrosswell/sentry-dotnet
that referenced
this pull request
Mar 26, 2026
jamescrosswell
added a commit
to jamescrosswell/sentry-dotnet
that referenced
this pull request
Mar 26, 2026
Flash0ver
approved these changes
Mar 30, 2026
| if [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then | ||
| if [[ $(git status) != *"nothing to commit"* ]]; then | ||
| echo "::error::Formatting issues found. Please run the following command locally and push the result:" | ||
| echo "::error:: dotnet format Sentry.slnx --no-restore --exclude ./modules ./**/*OptionsSetup.cs ./test/Sentry.Tests/AttributeReaderTests.cs" |
3 tasks
irvinesunday
added a commit
to irvinesunday/Hali
that referenced
this pull request
Apr 8, 2026
Updated [Sentry.AspNetCore](https://github.com/getsentry/sentry-dotnet) from 6.3.0 to 6.3.1. <details> <summary>Release notes</summary> _Sourced from [Sentry.AspNetCore's releases](https://github.com/getsentry/sentry-dotnet/releases)._ ## 6.3.1 ### Fixes 🐛 - fix: Workaround FileNotFoundException on Android when recovering sessions by @jamescrosswell in [#5084](getsentry/sentry-dotnet#5084) - fix: `CaptureFeedback` now supports multiple attachments correctly by @bitsandfoxes in [#5077](getsentry/sentry-dotnet#5077) ### Dependencies ⬆️ #### Deps - chore(deps): update Native SDK to v0.13.5 by @github-actions in [#5119](getsentry/sentry-dotnet#5119) - chore(deps): update CLI to v3.3.5 by @github-actions in [#5093](getsentry/sentry-dotnet#5093) - chore(deps): update Native SDK to v0.13.4 by @github-actions in [#5081](getsentry/sentry-dotnet#5081) - chore(deps): update Java SDK to v8.37.1 by @github-actions in [#5071](getsentry/sentry-dotnet#5071) - chore(deps): update CLI to v3.3.4 by @github-actions in [#5068](getsentry/sentry-dotnet#5068) - chore(deps): update Java SDK to v8.37.0 by @github-actions in [#5069](getsentry/sentry-dotnet#5069) - chore(deps): update Cocoa SDK to v9.8.0 by @github-actions in [#5044](getsentry/sentry-dotnet#5044) - chore(deps): update Java SDK to v8.36.0 by @github-actions in [#5036](getsentry/sentry-dotnet#5036) - chore(deps): update epitaph to 0.1.1 by @github-actions in [#5036](getsentry/sentry-dotnet#5036) ### Other - chore: Update validate-pr workflow by @stephanie-anderson in [#5108](getsentry/sentry-dotnet#5108) - ci: fix workflows that always fail for fork PRs by @jamescrosswell in [#5065](getsentry/sentry-dotnet#5065) Commits viewable in [compare view](getsentry/sentry-dotnet@6.3.0...6.3.1). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
This was referenced Apr 8, 2026
evgenygunko
pushed a commit
to evgenygunko/CopyWordsDA
that referenced
this pull request
Apr 9, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Sentry.Maui](https://sentry.io/) ([source](https://github.com/getsentry/sentry-dotnet)) | nuget | patch | `6.3.0` -> `6.3.1` | --- ### Release Notes <details> <summary>getsentry/sentry-dotnet (Sentry.Maui)</summary> ### [`v6.3.1`](https://github.com/getsentry/sentry-dotnet/blob/HEAD/CHANGELOG.md#631) [Compare Source](getsentry/sentry-dotnet@6.3.0...6.3.1) ##### Fixes 🐛 - fix: Workaround FileNotFoundException on Android when recovering sessions by [@​jamescrosswell](https://github.com/jamescrosswell) in [#​5084](getsentry/sentry-dotnet#5084) - fix: `CaptureFeedback` now supports multiple attachments correctly by [@​bitsandfoxes](https://github.com/bitsandfoxes) in [#​5077](getsentry/sentry-dotnet#5077) ##### Dependencies ⬆️ ##### Deps - chore(deps): update Native SDK to v0.13.5 by [@​github-actions](https://github.com/github-actions) in [#​5119](getsentry/sentry-dotnet#5119) - chore(deps): update CLI to v3.3.5 by [@​github-actions](https://github.com/github-actions) in [#​5093](getsentry/sentry-dotnet#5093) - chore(deps): update Native SDK to v0.13.4 by [@​github-actions](https://github.com/github-actions) in [#​5081](getsentry/sentry-dotnet#5081) - chore(deps): update Java SDK to v8.37.1 by [@​github-actions](https://github.com/github-actions) in [#​5071](getsentry/sentry-dotnet#5071) - chore(deps): update CLI to v3.3.4 by [@​github-actions](https://github.com/github-actions) in [#​5068](getsentry/sentry-dotnet#5068) - chore(deps): update Java SDK to v8.37.0 by [@​github-actions](https://github.com/github-actions) in [#​5069](getsentry/sentry-dotnet#5069) - chore(deps): update Cocoa SDK to v9.8.0 by [@​github-actions](https://github.com/github-actions) in [#​5044](getsentry/sentry-dotnet#5044) - chore(deps): update Java SDK to v8.36.0 by [@​github-actions](https://github.com/github-actions) in [#​5036](getsentry/sentry-dotnet#5036) - chore(deps): update epitaph to 0.1.1 by [@​github-actions](https://github.com/github-actions) in [#​5036](getsentry/sentry-dotnet#5036) ##### Other - chore: Update validate-pr workflow by [@​stephanie-anderson](https://github.com/stephanie-anderson) in [#​5108](getsentry/sentry-dotnet#5108) - ci: fix workflows that always fail for fork PRs by [@​jamescrosswell](https://github.com/jamescrosswell) in [#​5065](getsentry/sentry-dotnet#5065) </details> --- ### Configuration 📅 **Schedule**: Branch...
This was referenced Apr 10, 2026
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.

Fixes #5062:
Two CI workflows failed whenever a PR came from a fork because the pull_request trigger runs in a sandboxed context with no write access and no secrets:
Changelog Preview: switched pull_request → pull_request_target so the workflow runs in the base repo context and can post PR comments. Also tightened permissions from contents:write to contents:read since the workflow only needs to write to pull-requests.
Format Code: pull_request_target cannot push to a fork branch anyway, so the fix is fork-aware logic in the commit step. For fork PRs, formatting issues fail the check with a clear message telling the contributor which dotnet format command to run locally. Internal PR behaviour (auto-commit and push) is unchanged.
Warden was also failing but is already resolved — warden.yml was removed because Warden is now a globally-enabled GitHub App with its own credentials, unaffected by fork PR restrictions.
Testing
Tested here:
Pushed from my own private fork of the Sentry repo.