Mar*_*n13 3 git bash github-cli
我正在尝试使用GitHub CLI自动化GitHub的拉取请求创建过程的拉取请求创建过程。
\n我目前正在使用以下脚本,它的作用就像一个魅力:
\n(\n # Parentheses are used here to avoid the exposure of temporal variables to the outer scope.\n # Tested on macOS bash only.\n \n cd ~/Projects/pet_projects/basic_temperature\n \n # Pushes the release branch to the remote repository.\n git push origin release_nemo\n\n # Logs in to GitHub CLI using pre-generated access token.\n # https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token\n gh auth login --with-token < ~/Projects/pet_projects/.github_cli_access_token\n \n# Sets HEREDOC to PR_TITLE variable.\n# Indentation is avoided here intentionally.\n# https://stackoverflow.com/a/1655389/12201472\nread -r -d \'\' PR_TITLE <<-\'TEXT\'\nThis is a Placeholder PR to check whether all specs are green [Current Release][Nemo]\nTEXT\n \n# Sets HEREDOC to PR_BODY variable.\n# Indentation is avoided here intentionally.\n# https://stackoverflow.com/a/1655389/12201472\nread -r -d \'\' PR_BODY <<-\'MARKDOWN\'\n[RELEASE CARD TODO]() (**\xe2\x9d\x97This PR is NOT completed yet!\xe2\x9d\x97**)\n \n### Already included cards:\n- None.\n \n### Cards to be included:\n- None.\n \n### Previous Release TODO\nMARKDOWN\n \n gh pr create \\\n --title "${PR_TITLE}" \\\n --body "${PR_BODY}" \\\n --base master \\\n --head release_nemo \\\n --assignee @me \\\n --label Release \\\n --web\n)\nRun Code Online (Sandbox Code Playgroud)\n我现在遇到的唯一问题是,我不清楚如何更新此命令
\ngh pr create \\\n --title "${PR_TITLE}" \\\n --body "${PR_BODY}" \\\n --base master \\\n --head release_nemo \\\n --assignee @me \\\n --label Release \\\n --web\nRun Code Online (Sandbox Code Playgroud)\n为新创建的 PR 分配多个受让人?
\n我已仔细阅读gh pr create文档,但尚未找到实现它的方法。
\n预先感谢您的任何帮助。
\ngh 命令用于github.com/spf13/cobra命令行标志解析,该Assignees字段是StringSlice. 根据cobra 文档,您可以多次提供该标志或用逗号分隔多个值。
所以你可以做--assignee @me --assignee @you或--assignee @me,@you。
| 归档时间: |
|
| 查看次数: |
1578 次 |
| 最近记录: |