Fix ABAP Doc Casing Check permissions for fork PRs#768
Merged
albertmink merged 2 commits intomainfrom Apr 20, 2026
Merged
Conversation
Change from pull_request to pull_request_target to allow the workflow to post comments on PRs from forks. With pull_request, the GITHUB_TOKEN has read-only permissions when triggered from a fork, causing the "Resource not accessible by integration" error. Using pull_request_target runs the workflow in the context of the base repository with write permissions, allowing it to post the checklist comment. Also updated event.pull_request.number to event.number as the PR number is at the top level for pull_request_target events. Fixes the failure in PR #737 where the checklist posting was blocked.
Control PanelHi, I'm an AI-powered Review Bot that helps you with summarizing and reviewing pull requests.
💌 Have ideas or want to contribute? Create an issue and share your thoughts with us! Made with ❤️ by Hyperspace. |
albertmink
approved these changes
Apr 20, 2026
Contributor
albertmink
left a comment
There was a problem hiding this comment.
LGTM. Maybe this Action is getting replace with the Hyperspace bot 🤖
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.
Problem
The ABAP Doc Casing Check workflow fails on PRs from forks with the error:
This is visible in PR #737 where the "Post casing checklist on PR" job fails.
Root Cause
When using
pull_requesttrigger, workflows from fork PRs run with read-onlyGITHUB_TOKENpermissions as a security measure. Even though we declarepull-requests: writein permissions, GitHub restricts this for fork PRs.Solution
Changed from
pull_requesttopull_request_target:pull_request_targetruns in the context of the base repository (not the fork)Also updated event references from
github.event.pull_request.numbertogithub.event.numberas the PR number is at the top level forpull_request_targetevents.Testing
This fix will allow the workflow to successfully post checklist comments on fork PRs like #737.