ci: Do not enforce userid on nightly PR comment
This avoid issues when two different users work on a single PR.
This commit is contained in:
parent
e318022b89
commit
f48828351c
1 changed files with 1 additions and 2 deletions
3
.github/workflows/nightly_pr_comment.yml
vendored
3
.github/workflows/nightly_pr_comment.yml
vendored
|
@ -14,13 +14,12 @@ jobs:
|
||||||
const {owner, repo} = context.repo;
|
const {owner, repo} = context.repo;
|
||||||
const run_id = ${{github.event.workflow_run.id}};
|
const run_id = ${{github.event.workflow_run.id}};
|
||||||
const pull_head_sha = '${{github.event.workflow_run.head_sha}}';
|
const pull_head_sha = '${{github.event.workflow_run.head_sha}}';
|
||||||
const pull_user_id = ${{github.event.sender.id}};
|
|
||||||
|
|
||||||
const issue_number = await (async () => {
|
const issue_number = await (async () => {
|
||||||
const pulls = await github.pulls.list({owner, repo});
|
const pulls = await github.pulls.list({owner, repo});
|
||||||
for await (const {data} of github.paginate.iterator(pulls)) {
|
for await (const {data} of github.paginate.iterator(pulls)) {
|
||||||
for (const pull of data) {
|
for (const pull of data) {
|
||||||
if (pull.head.sha === pull_head_sha && pull.user.id === pull_user_id) {
|
if (pull.head.sha === pull_head_sha) {
|
||||||
return pull.number;
|
return pull.number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue