最佳答案
它是什么
来自 Bitbucket support 4 天前:
This message is in honor of the pride celebrations here in San Francisco. From time to time we add images to the push process and/or UI to recognize holidays and current events. It is simply a nod to the great diversity of our customers, employees, and integrators.
如何禁用
You can turn off the terminal message by going to Bitbucket settings, and unchecking Console messages under Profile. The UI logo will be restored back to our normal Bitbucket logo next week.
远程服务如何打印自定义消息
真的,这一切都归结为 git
和您可以用来响应传入请求以更改存储库的 3 个 Hook :
预接收
- 每次有人使用
git push
将提交推送到存储库时执行。在更新任何内容之前调用。
- 每次有人使用
更新
- 在
pre-receive
之后调用,其工作方式大致相同。它仍然在任何实际更新之前被调用,但它会为每个被推送的引用单独调用。
- 在
接收后
- 在成功的
推送
操作后调用,使其成为执行通知的好地方。
- 在成功的
所以从手头的话题来看,我可以肯定地说 bitbucket
可能使用了他们平台中内置的 post-receive
Hook 服务来发送 ASCII原帖中的艺术。还值得一提的是,他们最近添加了一些其他消息,最值得注意的是,一条消息提供了为您刚刚推送到的分支创建 pull 请求的直接链接(只要它不是主分支)。
此类技术的其他更值得注意的用途
- CI services
- Deployment tools (因为自动化很酷)
- Slack Github notifications
- (可能值得一提的是,Github 已经构建了一个完整的 API 供第 3 方开发人员访问,但尽管如此,它使用的是相同的服务)
希望对您有所帮助!
关于Git remote 推送后打印一条彩色消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51006115/