0

我在 github 工作流上从 C# bot 触发 repository_dispatch 事件。如何提取使用 octokit.net 触发运行的用户和事件类型(在我的情况下为“run_ba”,我需要运行示例图片中“通过存储库调度 6 天前触发”标签下的信息)?

运行示例

我尝试在https://api.github.com/repos/{repoOwner}/{repoName}/actions/runs上使用 GET ,但没有找到我想要的东西。

4

1 回答 1

0

I am posting my solution here, maybe it will help someone or someone will provide a better way to do this.

-Create another job in the workflow that creates annotations for the info that I need (check_run_id …)

e.g. echo “::notice title=RunId::${{ github.run_id }}”</p>

-Using octokit to filter workflow runs based on status -Using octokit retrieve the list of annotations based on the check_run_id from the list of workflow runs and the checksuite that is attached to annotations job.

于 2022-02-07T14:26:07.213 回答