如何使用 GitHub 操作/工作流程获得拉取请求的批准者?

问题描述 投票:0回答:1

在 GitHub 操作中。 来自拉取请求的所有审阅者 批准上述拉取请求的人 我想知道他们的用户名。

我希望有一个值可以传递给工作流程中的“步骤”。就像有什么

${{ github.event.pull_request.body }}

我想要获得像这样的值:

APPROVERS: ${{ github.event.pull_request.reviewers }}
,这样我就可以将其解析为自定义脚本。

github-actions pull-request github-codereviews
1个回答
0
投票

看起来审稿人应该可以在

  • github.event.pull_request.pull_request.requested_reviewers
  • github.event.pull_request.pull_request.requested_teams

您可以使用 GitHub CLI 查询审核请求:

gh pr view https://github.com/Azure/azure-cli-extensions/pull/6793 --json "reviewRequests,reviews"
© www.soinside.com 2019 - 2024. All rights reserved.