fix: skip pr description updates for fork pull requests#4133
Merged
Conversation
astandrik
marked this pull request as ready for review
July 15, 2026 18:24
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents the “Update PR Description” job in the Quality Checks workflow from running on pull requests opened from forks, avoiding the known GITHUB_TOKEN permission limitation that causes 403 Resource not accessible by integration. It preserves existing behavior for PRs opened from branches within ydb-platform/ydb-embedded-ui.
Changes:
- Gate the
update_prjob so it only runs forpull_requestevents where the PR head repository matches the base repository (github.event.pull_request.head.repo.full_name == github.repository).
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.
Summary
Update PR Descriptionfor pull requests opened from forksydb-platform/ydb-embedded-uiRoot cause
Fork-based
pull_requestworkflows receive a read-onlyGITHUB_TOKEN, even when the job declarespull-requests: write. The description update therefore fails with403 Resource not accessible by integration, as observed in #4130.Verification
.github/workflows/quality.ymlwith Ruby/Psychmain: one commit, one file, one condition changedCI Results
Test Status:⚠️ FLAKY
📊 Full Report
😟 No changes in tests. 😕
Bundle Size: ✅
Current: 64.43 MB | Main: 64.43 MB
Diff: 0.00 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information
Greptile Summary
This PR fixes a
403 Resource not accessible by integrationerror that occurs when fork-based pull requests try to update the PR description via theupdate_prjob, which requires write access that fork workflows do not receive.github.event.pull_request.head.repo.full_name == github.repositoryto the job-levelifcondition, which is the canonical GitHub Actions pattern for skipping jobs that need write permissions on fork PRs.ydb-platform/ydb-embedded-uiis fully preserved.Confidence Score: 5/5
Safe to merge — the single-line addition correctly guards the write-permission job against fork PRs without touching any other workflow logic.
The change is one condition added to a job-level
ifexpression. The guardgithub.event.pull_request.head.repo.full_name == github.repositoryis the standard pattern used across the GitHub Actions ecosystem to distinguish same-repo branches from forks. All other jobs in the workflow are unaffected, and the PR description update continues to work normally for first-party branches.No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[pull_request event] --> B{github.event_name == 'pull_request'?} B -- No --> Z[Skip update_pr job] B -- Yes --> C{head.repo.full_name == github.repository?} C -- No\nfork PR --> D[Skip update_pr job\navoids 403 on read-only token] C -- Yes\nsame repo --> E[Run update_pr job\nwrite token available] E --> F[Update PR description]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[pull_request event] --> B{github.event_name == 'pull_request'?} B -- No --> Z[Skip update_pr job] B -- Yes --> C{head.repo.full_name == github.repository?} C -- No\nfork PR --> D[Skip update_pr job\navoids 403 on read-only token] C -- Yes\nsame repo --> E[Run update_pr job\nwrite token available] E --> F[Update PR description]Reviews (1): Last reviewed commit: "fix: skip pr description update for fork..." | Re-trigger Greptile