Skip to content

Commit ccb441c

Browse files
authored
Merge branch 'main' into allow-docker-agent-to-request-reviews-of-its-own-p
2 parents 7fe2614 + f94d60e commit ccb441c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/review-pr.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ permissions:
100100
contents: read
101101
pull-requests: write
102102
issues: write
103-
checks: write
103+
# checks: write is intentionally omitted — callers can grant it optionally
104+
# for the "PR Review" check run on the PR. The check creation steps use
105+
# continue-on-error so the review works fine without it.
104106

105107
jobs:
106108
# ==========================================================================
@@ -231,13 +233,15 @@ jobs:
231233
repo: context.repo.repo,
232234
pull_number: prNumber
233235
});
236+
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
234237
const { data: check } = await github.rest.checks.create({
235238
owner: context.repo.owner,
236239
repo: context.repo.repo,
237240
name: 'PR Review',
238241
head_sha: pr.head.sha,
239242
status: 'in_progress',
240-
started_at: new Date().toISOString()
243+
started_at: new Date().toISOString(),
244+
details_url: runUrl
241245
});
242246
core.setOutput('check-id', check.id);
243247

.github/workflows/self-review-pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,15 @@ jobs:
138138
repo: context.repo.repo,
139139
pull_number: prNumber
140140
});
141+
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
141142
const { data: check } = await github.rest.checks.create({
142143
owner: context.repo.owner,
143144
repo: context.repo.repo,
144145
name: 'PR Review',
145146
head_sha: pr.head.sha,
146147
status: 'in_progress',
147-
started_at: new Date().toISOString()
148+
started_at: new Date().toISOString(),
149+
details_url: runUrl
148150
});
149151
core.setOutput('check-id', check.id);
150152

0 commit comments

Comments
 (0)