I was trying to look for a way to query the Crucible API by a specific changeset.
After looking through the API I could not find anything similar.
https://docs.atlassian.com/fisheye-crucible/latest/wadl/crucible.html
Our dev SCM is mercurial and we are trying to find a way to enforce code reviews upon pre-push . The idea is that upon a commit a mercurial hook will auto create a review on crucible and upon pre-push it will check if a review has been completed for this changeset.
Is this possible?
May be it's possible with this REST API by make EyeQL query? You can return "reviews" from the query and to pass csid as param, see more here
Related
I have used a few code review programs. I am now using pull requests in Bitbucket. I am expecting a certain process:
Create review (ie pull request)
Comments are added by reviewers. ( am used to a graded system where someone can mark the change as a bug which needs to be fixed before being merged)
The review is sent back to the originator who fixes any problems that are marked
(!!)The originator pushes their changes to their branch and then the code review is done again by all reviewers who then approve or reject the new changes.
With all things being good, the review is approved and then merged.
What I am wondering about are steps 3 and 4. There seems no grading to the comments and there seems to be no way for the originator to see quickly the comments (in some condensed format). Also, how do new changes update a pull request? Is this just missing from the Bitbucket system or is there a way to achieve this?
"there seems to be no way for the originator to see quickly the comments (in some condensed format)". Open a pull request, and look over on the right hand side. I see 3 tabs: Details / Files / Activity. Under "Activity", I can filter to "All Comments".
"how do new changes update a pull request?" When creating a pull request, you are requesting approval from your colleagues to pull code from some source branch to some target branch. So, when the source branch is updated with changes, the pull request should automatically reflect that. In other words, you shouldn't have to take any extra action.
"There seems no grading to the comments" A reviewer can check a box that says "merge not allowed until the 'issue fixed' box is checked." The repo admin has some latitude to set how strict the PR / merge policies will be, including whether approval is needed from anyone or from specific individuals.
So I understand that once I open a pull request, I automatically get a code review for the code that's about to be merged, that's great! But is there a a way to create a Code review without creating a Pull Request? For example, let's say I am working on a feature and I would like to do a code review with peers, but I don't want to do a Pull Request as the feature is still Work In Progress.
I understand that I can use the "compare" feature in BitBucket to see the code diff, but I needed the "Codereview" kind of feature explicitly so that I can:
Share the code review link with my peers so that they can see it
They can comment and open "tasks" on the code
and all of it while not creating a Pull Request. Is that possible?
Question is already asked here.
The usual process is to start code review based on a pull-request (this is how I understand the usage in BitBucket).
It is acceptable to create the pull-request and mark it as in progress and you can always add more commits on the PR later.
This is explained in the official doc:
But, the pull request is more than just a notification—it’s a dedicated forum for discussing the proposed feature. If there are any problems with the changes, teammates can post feedback in the pull request and even tweak the feature by pushing follow-up commits. All of this activity is tracked directly inside of the pull request.
Your peers must be aware that you don't need immediate approval but just comments until you finish the feature (PR ready to be merged)
I have a gerrit - jenkins setup. Several jenkins jobs are started by a trigger based on a comment inserted to gerrit. The number of comment based triggers increases continuously. The project has a separate document with information what keyword in a comment executes what action.
It would be nice to provide a list of keywords directly in gerrit so developers do not need open documentation when searching for a specific keyword. Is there a way how to customize gerrit to show some hints when a user edits a comment?
Please follow the Checks plugin - currently is active development. It is/will be a complete redesign of how CI will do checks and how users interact with the CI checks being run. I don't think there's Jenkins integration for this already other than (custom) Groovy scripting polling the REST API at the time of writing.
The UI will allow users to trigger, re-run checks without the need for adding some magic comment! :-)
It's currently deployed on the Gerrit of Gerrit for purely optional checks:
So far (Gerrit 3.0.0) there isn't a way to do that.
I have a need to get a list of all branches with paths and IsDeleted status. I can do this with the API from a development environment, but I will be unable to use the API in the production environment. A workaround is to query the TFS database for the data I need. I found the branches table (tbl_Branches), but it doesn't have a status column. I am not sure what I need to join on to find the status.
I am looking for the status that is from the property branchObject.Properties.RootItem.IsDeleted if using the API.
Does anyone know what to look at to get the same status for the branch as what the API uses?
Thank you.
The branches are tracked as items. So you need to join "tbl_Version" to get all the versions for the branches. The entries with "DeletionID" > 0 means ther are/were deleted. However, we don't recommend to query TFS Database directly just as Daniel mentioned in the comments. You should avoid this if you have any other workaround.
Anyone knows how to search for changesets with no Associated Code Review with a TFS Query or similar? It can be also a query on TFS Data Warehouse.
When you request a code review from a changeset, it's not Bi-directional, only link one way.
This means you can't directly know if a changeset was code-reviewed or not from changeset ID. To get the association, you need to go through work item. There 's a work item called code review work item, a sample query as below, through that way you could find the code review work item for any changeset, as long as that changeset was associated with a TFS work item.
However, for your requirement, it's not able to use a work item query to do this. You may have to use TFS API to ahcieve it just as jessehouwing suggested.