我正在尝试origin从 GitHub 操作推送到远程。我的行动逻辑是:
pull_request_review事件并按评论消息过滤originThe script is:
if [[ "${GITHUB_EVENT_NAME}" != "pull_request_review" ]]; then
echo "unsupported event: ${GITHUB_EVENT_NAME}"
exit 1
fi
user=$(jq -r .review.user.login ${GITHUB_EVENT_PATH})
cmd=$(jq -r .review.body ${GITHUB_EVENT_PATH})
echo "reviewer is ${user}, command is ${cmd}"
if [[ "${cmd}" == "merge" ]]; then
head=$(jq -r .pull_request.head.ref ${GITHUB_EVENT_PATH})
git config user.email test@test.com
git config user.name test
git checkout -B _tmp origin/${head}
git checkout …Run Code Online (Sandbox Code Playgroud) 在我的一个存储库(存储库 A)中,有一个脚本可以获取另一个存储库(存储库 B,不是我的存储库)上的文件内容。因此,我想在每次推送存储库 B 时触发存储库 A 上的 GitHub 操作。我在 GitHub 操作触发文档 上没有看到这种情况,这可能吗?