-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comment pull-request with Build Scan links in Publish action #4
Conversation
5203859
to
3699e84
Compare
9741932
to
ffe1f1a
Compare
5f8d425
to
cb12371
Compare
ffe1f1a
to
ff543ce
Compare
78f4889
to
4b288d4
Compare
4b288d4
to
90c17d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should simply render the build scan URL directly, rather than obfuscating it with "Link N". Otherwise, LGTM.
maven/build-scan/publish/action.yml
Outdated
scanLink=$(grep -A1 "Publishing build scan..." build.out | tail -n 1 | sed 's/\[INFO\] //') | ||
if [[ ! -z "$scanLink" ]] | ||
then | ||
scanLinks="${scanLinks},[Link $((publishedScans++))]($scanLink)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these links would be more useful if they were raw so the user could see the URL. If we have a nice human-readable text for the build then that would be good, but the "Link 1" text just obfuscates things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right 👍
5649d11
to
599b9f2
Compare
ce120a8
to
ba6bf14
Compare
- One single job to publish Build Scans - Replace approve with accept
ba6bf14
to
f352754
Compare
Description
This PR adds published Build Scan links as comments to the pull-request. This is required as there is no easy way to correlate the Workflow execution (not using a
pull_request
trigger) with the original pull request.This happens by modifying the publish composite action.
Testing
Same as for the publish action, no testing is provided
Implementation Details
The
github-token
is added as action inputs to allow commenting the pull-request.Preview
Shortcomings
The Build Scan link is retrieved by grepping the Maven console output which is not elegant.
This could be revisited once the Maven init action will be alive.
Comment
This PR has the
jprinet/add-publish-maven-build-scan-action
as base for clarity