从文件配置您的 GitHub 仓库,无需在 UI 中点击。
项目描述
关于
从文件配置您的 GitHub 仓库,无需在 UI 中点击。
安装
github-file 已在 PyPI 上,所以您只需
$ pip install github-file
用法
首先,您需要通过环境提供您的 GitHub 凭据。由于 github-file 使用 python-dotenv,您可以通过创建包含以下内容的 .env 文件来实现这一点
GITHUB_USER=your_username
GITHUB_PASS=your_password
接下来,您需要创建一个有效的 Githubfile。以下是一个示例
[core]
owner = jacquerie
repo = github-file
description = Configure your GitHub repository from a file,
without having to click around in the UI.
topics = github, configuration, file
[features]
has_issues = true
has_projects = false
has_wiki = false
[merges]
allow_squash_merge = false
allow_merge_commit = false
allow_rebase_merge = true
这些选项的含义已在 GitHub API 文档 中解释,尽管目前并非所有选项都受到支持(特别是您目前无法存档仓库或配置默认分支。)
最后,运行
$ github-file update -f Githubfile
将更新您的 GitHub 仓库配置,使其与文件中描述的内容相匹配。请注意,如果您没有提供文件名,它将默认在 .github/Githubfile 中查找。
许可证
MIT
项目详情
关闭
github-file-0.5.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 22dcb17c4c9a76c6b781e9ee92029bdc4a79368e1c1ff252a80aedb85a03346d |
|
MD5 | 652b96bf04eb027d0577ecaa88e5c250 |
|
BLAKE2b-256 | cc487b7614d57275083ec9f4a1e3a8288d6f72fbbb3b42ff477698a65d4dbe5d |