简体   繁体   English

如何对谷歌云 git repo 进行代码审查

[英]How to do code review for google cloud git repo

We are hosting git repo on the google cloud platform.我们在谷歌云平台上托管 git repo。 I know for github.com, we can use pull requests for code reviews, but google cloud does not seem to provide that.我知道对于 github.com,我们可以使用拉取请求进行代码审查,但谷歌云似乎没有提供。

How do I perform code review for repos on google cloud platform?如何在谷歌云平台上对 repos 进行代码审查?

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.一种可能性(不理想,我知道,但仍然存在)是将您的云存储库连接到 GitHub 或 BitBucket 存储库,您可以将其用于代码审查。 From Connecting a Hosted Repository :连接托管存储库

You can connect a Cloud Source Repository to a Git repository hosted on GitHub or Bitbucket .您可以将Cloud Source Repository连接到托管在GitHubBitbucket上的 Git 存储库。 When you push changes to the hosted repository, the changes are automatically synchronized with the Cloud Source Repository.当您将更改推送到托管存储库时,更改会自动与 Cloud Source Repository 同步。

You can use a separate code review app that integrates with Git.您可以使用与 Git 集成的单独代码审查应用程序。

One example of this is JetBrains Upsource , which supports adding a generic Git repository .其中一个例子是JetBrains Upsource ,它支持添加通用 Git 存储库 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.如果您已经在一般情况下使用 JetBrains IDE 或由于使用 GCP 插件,它还与他们的 IDE 产品进行了一些集成。

Also see open source options including one mentioned in a comment:另请参阅开源选项,包括评论中提到的选项:

One possible solution is vanilla git branches and commits.一种可能的解决方案是 vanilla git 分支和提交。

I define code review ability as 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.请您的代码贡献者推送到review-featureName分支。
  • 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.贡献者审查这些,回复 TODO/解决它们。 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 instead work with internal project management tools which have access to the commits to reference them and have a conversation.您没有 Web 界面,但您可以使用内部项目管理工具,这些工具可以访问提交以引用它们并进行对话。 There are other tools that work off of local copies, provide a GUI, which are covered in other answers to this question.还有其他工具可以使用本地副本,提供 GUI,该问题的其他答案中涵盖了这些工具。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 mono-repo 与 Google Cloud Functions 结合使用 - Use of mono-repo with Google Cloud Functions 如何删除 Google Cloud Firestore 中项目的所有 collections? - How do I delete ALL collections for a project in Google Cloud Firestore? 如果 repo 是最新的,git 推送返回不同的状态码 - git push to return different staus code if repo is upto date Google Cloud Build git 对 Cloud Source Repositories 的身份验证 - Google Cloud Build git authentication to Cloud Source Repositories 如何使用 IAM 用户对 Google Cloud Storage Bucket 进行日志记录和监控 - how to do Logging & Monitoring on Google Cloud Storage Buckets with IAM user 我们如何查看由 Google Cloud BigQuery 执行的查询计划? - How do we see a query plan executed by Google Cloud BigQuery? 在本地使用 Intellij Cloud Code Cloud Run 时如何指定 GOOGLE_APPLICATION 凭据? - How to specify GOOGLE_APPLICATION credentials when using Intellij Cloud Code Cloud Run locally? 如何在 Cloud Run for Anthos on Google Cloud 集群上启用 HTTPS? - How do I enable HTTPS on a Cloud Run for Anthos on Google Cloud cluster? 如何保护用作 Diaglogflow / Google Action 主机的 Google 云 function - How do I secure a Google cloud function being used as the host for a Diaglogflow / Google Action 如何让我的 Google-service.json 在 Google Cloud Plataform 中与 Firestore 一起使用? - How do I get my Google-service.json working with Firestore inside Google Cloud Plataform?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM