如何使用 GitHub 为 homebrew-cask 做出贡献?

How to contribute to homebrew-cask using GitHub?

下面的引文是对brew-cask的贡献说明。但是,github_user='<my-github-username>'这句话我看不懂,不知道要不要输入<>github_user是什么?

一个 GitHub 帐户有一个电子邮件地址和两个姓名。更有什者,当我输入最后一句:cask-repair --pull origin --push $github_user $outdated_cask。有 2 个错误:the requested upstream branch 'Andy1984' does not exist

Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

结果是 There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist? 我很确定我按照说明操作了。怎么了?

# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help

# fork homebrew-cask to your account - only needed once
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
hub fork

# use to update <outdated_cask>
outdated_cask='<the-cask-i-want-to-update>'
github_user='<my-github-username>'
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"

cask-repair --pull origin --push $github_user $outdated_cask

根据文档,您还可以使用脚本来推送现有 cask 的新版本。

检查:https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#updating-a-cask

# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help

# use to update <outdated_cask>
cask-repair <outdated_cask>