Skip to content

Commit d851414

Browse files
committed
Updated with more info in PR commenter
1 parent 8d53838 commit d851414

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/PrPingReciever.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ jobs:
1111
- name: Event Information
1212
run: |
1313
echo "Event '${{ github.event.action }}' received from '${{ github.event.client_payload.repository }}'"
14-
- name: Do stuff
14+
- name: PR ID
15+
if: github.event.action == 'prupdate' && github.event.sender.login == 'JuliaControlBot'
16+
run: |
17+
echo "PR id: '${{ github.event.client_payload.pr_number }}'
18+
- name: Plots and comment
1519
env:
1620
ACCESS_TOKEN_BOT: ${{ secrets.ACCESS_TOKEN_BOT }}
1721
PR_ID: ${{ github.event.client_payload.pr_number }}
22+
RUN_ID: ${{ github.run_id }}
1823
if: github.event.action == 'prupdate' && github.event.sender.login == 'JuliaControlBot'
1924
run: |
2025
echo "Got PR Update"

utils/pr_commenter.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ function get_message(res, org, new_org, old_commit, new_branch_name)
114114

115115
str = if ndiff > 0
116116
"""This is an automated message.
117-
Plots were compared to references. $(ndiff)/$(length(res)) images have changed, see differences below:
117+
Plots were compared to references. $(ndiff)/$(length(res)) images have changed, see differences below.
118+
After pulling this PR, please update the reference images by creating a PR to ControlExamplePlots.jl [here](https://github.com/JuliaControlBot/ControlExamplePlots.jl/pull/new/($new_branch_name)).
118119
Difference | Reference Image | New Image
119120
-----------| ----------------| ---------
120121
"""*images_str
@@ -140,6 +141,7 @@ origin = "origin"
140141
org = "JuliaControl"
141142
new_org = "JuliaControlBot"
142143
ID = ENV["PR_ID"]
144+
RUN_ID = ENV["RUN_ID"]
143145

144146
try
145147
println("Running main script.")
@@ -190,7 +192,7 @@ try
190192
catch
191193
println("BUILD FAILED!")
192194

193-
message = "Something failed when generating plots. See the log at https://github.com/JuliaControl/ControlExamplePlots.jl/actions for more details."
195+
message = "Something failed when generating plots. See the log at https://github.com/JuliaControl/ControlExamplePlots.jl/runs/$(RUN_ID)?check_suite_focus=true for more details."
194196

195197
import GitHub
196198
println("running post_comment")

0 commit comments

Comments
 (0)