How to do code review for google cloud git repo

拟墨画扇 提交于 2020-05-25 09:45:19

问题


We are hosting git repo on the google cloud platform. I know for github.com, we can use pull requests for code reviews, but google cloud does not seem to provide that.

How do I perform code review for repos on google cloud platform?


回答1:


One possibility (not ideal, I know, but still something) would be to have your cloud repo connected to a GitHub or BitBucket repo which you could use for code reviews instead. From Connecting a Hosted Repository:

You can connect a Cloud Source Repository to a Git repository hosted on GitHub or Bitbucket. When you push changes to the hosted repository, the changes are automatically synchronized with the Cloud Source Repository.




回答2:


You can use a separate code review app that integrates with Git.

One example of this is JetBrains Upsource, which supports adding a generic Git repository. It's free for a few users, but paid after that. If you're already using a JetBrains IDE in general or due to using a GCP plugin, it also has some integrations with their IDE products.

Also see open source options including one mentioned in a comment:

  • Review Board
  • Gerrit



回答3:


Branches.

A code review ability is the ability to view commits and code (and perhaps facilitate discussion) before they're mainlined.

  • Ask your contributors of code to push to review-featureName branches.
  • The reviewers review the branch for quality, and if accepted, they merge it in.
  • If not, they add in commits which explain why it failed review.
  • The contributor reviews these, replies to TODOs/resolves them. And then, depending on conventions, could squash everything together, push to a new review branch, etc.

And the process repeats. You don't have a web interface, but you could easily work with internal project management tools which have access to the commits to reference them and have a conversation.



来源:https://stackoverflow.com/questions/37200647/how-to-do-code-review-for-google-cloud-git-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!