配置 GitHub Token,输出检测结果
()
| 120 | |
| 121 | |
| 122 | def configure_token() -> None: |
| 123 | """配置 GitHub Token,输出检测结果""" |
| 124 | token = os.environ.get("GITHUB_TOKEN") or os.environ.get("GH_TOKEN") |
| 125 | if token: |
| 126 | print(Console.ok(t("inf_github_token_configured"))) |
| 127 | else: |
| 128 | print(Console.warn(t("wrn_github_token_not_configured"))) |
| 129 | print(Console.info(t("inf_github_token_hint"))) |
| 130 | print("-" * 40) |
| 131 | |
| 132 | |
| 133 | def run_command( |