How to do code review for google cloud git repo
Asked Answered
M

3

41

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?

Maxim answered 13/5, 2016 at 3:14 Comment(0)
D
10

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.

Dynamometer answered 6/11, 2017 at 4:50 Comment(2)
It is a reliable option if you are allowed to host the source code outside But what if you couldn't?Willowwillowy
@Willowwillowy The question is centered on code being hosted in google cloud, which already means outside (unless you're with Google). If you drop that it's a different question: you'd be looking for an on-premise code review solution. This might help: softwarerecs.stackexchange.com/a/20409/13888Dynamometer
U
6

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

Some open source options including one mentioned in a comment:

A commercial option that goes way beyond just code review, is JetBrains Space, but this may require that they host your repository as well. They previously had a dedicated code review app (Upsource), but it was retired in favor of Space.

Unbelievable answered 9/7, 2019 at 19:28 Comment(3)
JetBrains_Upsource doesn't support Google Cloud repositories at the moment youtrack.jetbrains.com/issue/UP-10376Kiley
@Kiley that is incorrect. That issue is a duplicate of youtrack.jetbrains.com/issue/UP-9164 , And there, JetBrains does state that it is possible.Kristof
Note that as of 01/2023, JetBrains Upsource is no longer available, requiring a switch to their Space product, which replaces Cloud Source Repositories too. See blog.jetbrains.com/upsource/2022/01/31/… for details.Photomural
N
0

One possible solution is vanilla git branches and commits.

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.
  • 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 instead work with internal project management tools which have access to the commits to reference them and have a conversation. There are other tools that work off of local copies, provide a GUI, which are covered in other answers to this question.

Nineteen answered 28/7, 2018 at 14:32 Comment(2)
This suggestion is more of a workaround (making the change available for others to check out and view), but the original question is asking for official tooling around this area.Precursor
I agree, but this isn't an open source, extendable programmatic interface that people can work to solve arbitrary problems with (unlike most programming languages, git, physical world, etc). If GCP doesn't give us something, it's going to be obvious (from documentation) and there's pretty much no "answer" to the question. Unless you call a feature request somewhere an "answer". Because it isn't FOSS, someone who wants X feature badly enough to spend resources on, isn't getting X either. Though GCP is better on OSS in general. Thanks for the reasoning for why this is a bad answer.Nineteen

© 2022 - 2024 — McMap. All rights reserved.