Post the pull request report as a comment on it (#307) - #326
Merged
Conversation
adrpo
force-pushed
the
comment-on-the-pull-request
branch
from
August 24, 2026 16:15
ab5e2a2 to
c5be334
Compare
The summary a run writes beside its report is meant to be commented on the pull request, and --comment does that: it looks for the comment an earlier run of the same pull request left, recognises it by a marker, and replaces it rather than adding to a pile. It posts as whoever the token belongs to, GITHUB_TOKEN or GH_TOKEN in the environment or the account gh is logged in as, which is how it can be run by hand. In Jenkins it is the pull_request_comment parameter, taking the token from a github-token credential. The credential is bound where it is used rather than for the stage, so a job that does not ask for a comment runs whether one is configured or not; without a token the report is written and published as before and the summary says where it is. --- Generated by Claude Code.
adrpo
force-pushed
the
comment-on-the-pull-request
branch
from
August 24, 2026 16:34
c5be334 to
667addb
Compare
adrpo
enabled auto-merge (squash)
August 24, 2026 16:43
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.
Follows #324, which landed the pull request testing of #307 with the summary only
written to a file and printed in the build log. This posts it.
Rebased on #327, so that one merges first; the commit to review here is the
second one.
--commentposts the summary on pull request
<N>, and replaces the comment an earlierrun of the same pull request left rather than adding to a pile - it recognises
its own by a marker in the body:
<!-- openmodelica-library-testing: pull request report -->It posts as whoever the token belongs to:
GITHUB_TOKENorGH_TOKENin theenvironment, or, failing those, the account
ghislogged in as, which is what makes it usable by hand.
In Jenkins
The
pull_request_commentparameter, taking the token from agithub-tokencredential. The credential is bound where it is used rather than for the stage,
so a job that does not ask for a comment runs whether one is configured or not.
Without a token nothing changes: the report is written and published as before,
the summary is in the build log, and the run says where the file is. With a token
that is refused, the run fails after the report has been written, so the mistake
is visible and a rerun - seconds, it retests nothing - publishes and comments.
Tested
Against a throwaway pull request in a fork,
adrpo/OpenModelicaLibraryTesting#1:
ghis logged in asGenerated by Claude Code.