fork+pull request 这种基础操作就不用提了吧。
节操
但一般大型项目都会引入一个节操的机制,就Kubernetes类项目来说,在遵守代码提交规范的基础上,需要先同意CLA之后,pr才有被合并的机会。
如果贸贸然直接pr,就会被k8s-ci-robot这个机器人账户直接打上cncf-cla: no.
那么要怎么同意CLA呢?
注册
根据这个指示,按个人或者组织申请账户,关联起来就行。我当时直接选择用GitHub账户关联 Linux 基金会。
https://github.com/kubernetes/community/blob/master/CLA.md#the-contributor-license-agreement
- 验证邮箱(该邮箱要跟GitHub账户邮箱一致)
- 重设密码
- 电子签署SLA文件
修正提交信息
之前用电脑提交代码的时候,都是不填email的,结果导致提交上去的个人信息是一个空的头像,于是我只得设置一下email,跟GitHub账户保持一致。
1
2
3
git config --global user.email "[email protected]"
git commit --amend --reset-author
git push --force
这通操作之后,提交信息跟 GitHub/Linux 基金会注册信息保持一致啦。但是cncf-cla: no这个标签还在。
于是我向天空大喊一声“I signed it”
k8s-ci-robot出来给我重新验证了cla,并打上cncf-cla: yes标签,合并的流程进入到review阶段
友好交流(撕逼)
https://github.com/kubernetes-sigs/kustomize/pull/1204
Basic operations like fork+pull request don’t need to be mentioned.
Integrity
But generally large projects will introduce an integrity mechanism. For Kubernetes-like projects, on the basis of following code submission standards, you need to agree to the CLA first before the PR has a chance to be merged.
If you directly submit a PR without doing this, the k8s-ci-robot bot account will directly tag it with cncf-cla: no.
So how do you agree to the CLA?
Registration
According to these instructions, apply for an account as an individual or organization and link it. I directly chose to link my GitHub account with the Linux Foundation.
https://github.com/kubernetes/community/blob/master/CLA.md#the-contributor-license-agreement
- Verify email (this email must match the GitHub account email)
- Reset password
- Electronically sign the SLA document
Fix Commit Information
When I submitted code on the computer before, I didn’t fill in the email, which resulted in the submitted personal information being an empty avatar. So I had to set the email to match the GitHub account.
1
2
3
git config --global user.email "[email protected]"
git commit --amend --reset-author
git push --force
After these operations, the commit information matches the GitHub/Linux Foundation registration information. But the cncf-cla: no tag is still there.
So I shouted to the sky “I signed it”
k8s-ci-robot came out to re-verify my CLA and tagged it with cncf-cla: yes, and the merge process entered the review stage.
Friendly Communication (Debate)
https://github.com/kubernetes-sigs/kustomize/pull/1204
fork+pull requestのような基本的な操作は言うまでもありません。
節操
しかし、一般的に大型プロジェクトは節操のメカニズムを導入します。Kubernetesのようなプロジェクトの場合、コード提出規約を遵守することを基礎として、CLAに同意した後、PRがマージされる機会があります。
これをせずに直接PRを提出すると、k8s-ci-robotというボットアカウントが直接cncf-cla: noのタグを付けます。
では、CLAに同意するにはどうすればよいでしょうか?
登録
この指示に従って、個人または組織としてアカウントを申請し、リンクします。私は直接GitHubアカウントをLinux Foundationとリンクすることを選択しました。
https://github.com/kubernetes/community/blob/master/CLA.md#the-contributor-license-agreement
- メールを確認(このメールはGitHubアカウントのメールと一致する必要があります)
- パスワードをリセット
- SLA文書に電子署名
コミット情報の修正
以前コンピューターでコードを提出したとき、メールを入力しなかったため、提出された個人情報が空のアバターになりました。そのため、GitHubアカウントと一致するようにメールを設定する必要がありました。
1
2
3
git config --global user.email "[email protected]"
git commit --amend --reset-author
git push --force
これらの操作の後、コミット情報はGitHub/Linux Foundationの登録情報と一致します。しかし、cncf-cla: noタグはまだ残っています。
そこで、空に向かって「I signed it」と叫びました。
k8s-ci-robotがCLAを再確認し、cncf-cla: yesタグを付け、マージプロセスがレビューステージに入りました。
友好的な交流(議論)
https://github.com/kubernetes-sigs/kustomize/pull/1204
Базовые операции, такие как fork+pull request, не нужно упоминать.
Честность
Но обычно крупные проекты вводят механизм честности. Для проектов типа Kubernetes, на основе соблюдения стандартов отправки кода, вам нужно сначала согласиться с CLA, прежде чем PR получит шанс быть объединенным.
Если вы напрямую отправите PR без этого, бот-аккаунт k8s-ci-robot напрямую пометит его как cncf-cla: no.
Итак, как согласиться с CLA?
Регистрация
Согласно этим инструкциям, подайте заявку на учетную запись как физическое лицо или организация и свяжите ее. Я напрямую выбрал связать свой аккаунт GitHub с Linux Foundation.
https://github.com/kubernetes/community/blob/master/CLA.md#the-contributor-license-agreement
- Подтвердить email (этот email должен совпадать с email аккаунта GitHub)
- Сбросить пароль
- Электронно подписать документ SLA
Исправить информацию о коммите
Когда я отправлял код на компьютере раньше, я не заполнял email, что привело к тому, что отправленная личная информация была пустым аватаром. Поэтому мне пришлось установить email, чтобы соответствовать аккаунту GitHub.
1
2
3
git config --global user.email "[email protected]"
git commit --amend --reset-author
git push --force
После этих операций информация о коммите соответствует регистрационной информации GitHub/Linux Foundation. Но тег cncf-cla: no все еще там.
Поэтому я крикнул в небо “I signed it”
k8s-ci-robot вышел, чтобы повторно проверить мой CLA и пометил его как cncf-cla: yes, и процесс объединения вошел в стадию обзора.
Дружеское общение (Дебаты)
https://github.com/kubernetes-sigs/kustomize/pull/1204
💬 讨论 / Discussion
对这篇文章有想法?欢迎在 GitHub 上发起讨论。
Have thoughts on this post? Start a discussion on GitHub.