ci: Fix automodel and submodule check comments from a fork#1028
Merged
terrykong merged 1 commit intoNVIDIA-NeMo:mainfrom Sep 17, 2025
Merged
ci: Fix automodel and submodule check comments from a fork#1028terrykong merged 1 commit intoNVIDIA-NeMo:mainfrom
terrykong merged 1 commit intoNVIDIA-NeMo:mainfrom
Conversation
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
4 tasks
Collaborator
|
@ko3n1g to review |
terrykong
approved these changes
Sep 16, 2025
PrinsYin
pushed a commit
to PrinsYin/RL
that referenced
this pull request
Nov 30, 2025
…Mo#1028) Signed-off-by: Charlie Truong <chtruong@nvidia.com>
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.
What does this PR do ?
Fix automodel and submodule check comments from a fork
When a PR is made from a fork, the PR comment job does not have the right permissions to write to the PR due to security reasons. We can enable this by separating the PR comment steps to separate jobs that run on the
pull_request_targetevent. When a job runs in the context of that event (as opposed to the typicalpull_requestevent), it runs from the perspective off the base branch and has the permissions to write to the PR such as adding a comment.https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target
Because of the increased privilege that the fork PR would have, it is not recommended to check out and do anything with the code from the PR itself. So, we only do the commenting with the
pull_request_targetevent. To clarify:pull_requestthe automodel and submodule checks happen as usual and write their comments to a Github artifactpull_request_targetthe corresponding jobs poll for the artifacts to exist. If the artifacts do not exist, then nothing fails. If they do exist within a given number of tries, then it will comment on the PR.Here's an example of this working:
chtruong814#3
Those comments are from a PR I made from my personal Github username to a fork of RL.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information