Default reviewers in TFS - tfs

Our company is using Team Foundation Server 2015. Is it possible to add one or several persons automatically as reviewers to every pull request? As required default reviewers?

Yes, you can add default reviewers to pull requests quite easily.
If you configure your branch policy you can have different reviewers occur for different code paths. If you want to add default reviewers to all pull requests for that code path you can specify "/*" in the path box. They will then be added to every pull request.

Related

In AzureDevOps Server (on prem) how do I get the timestamp when I last looked at a Pull Request?

I'm using the Microsoft.VisualStudio.Services.Client library (added via NuGet) to connect to my on-prem Azure Dev Ops server and query various bits of information regarding pull requests. I'd like to make a little notification application that can alert me if someone has replied to a comment I made on a pull request. The trick is that I only want to see the notification if I haven't already looked at it.
I know that the system knows when I last looked at the pull request because it decorates pull requests with new content (comments, new code, etc.) with a little dot and when I open a pull request, it tells me that there are new comments since I visited last and tells me how long ago I looked at it.
How do I get access to the date that I opened the pull request in the web via the client libraries or REST? In other words, how would my app know that I have or haven't looked at new comments via the web page?
I did not find such an api that can retrieve the timestamp the last time you looked at the PR.
There is lastUpdatedDate you can use to track the comments that were checked. So as a workaround you can save the lastUpdatedDate to a file in your code, and compare this value everytime when you call api. Then you will get the latest updated comments.
However, PR comments notification can also be configured from azure devops. You can go to your user profile on the top right corner and select notifications to enable the notification for A comment is left on a pull request.
For more information about Azure devops notification, you can check this document.

Pull Request Permission

I have question on ADS GIT Pull request permissions Is there any way to prevent others from being able to change the status your pull request? like being able to publish your draft request, setting the complete status, abandoning etc?
Is there any way to prevent others from being able to change the status your pull request?
Sorry for any inconvenience.
Now, Azure devops service/server doesn't provide a feature to meet this requirement.
To protect the Pull Request, you could add reviewers for the target branch to prevent set the complete status directly.
On the other hand, we could set creator's target branch or repo contribute permission to Deny, you need to add specific user to target Branch security page. This not applied to all the creators all the PRs. Just a specific PR and specific user:
But none of these settings apply to abandon. For this option, you could add your request for this feature on our UserVoice site (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ), which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps.
Hope this helps.

Getting change id's of depending changes from gerrit rest or ssh api?

Gerrit allows associated external changes into a single change request via "Depends-On" on the commit message. However, by the looks of it, rest api does not expose these dependencies.
I can ofcourse get the commit message and then parse it, and then get change request for this external change.
Anyone know if there would be a bit more streamlined option to archive the same ?
You can get the related changes using REST API:
'GET /changes/{change-id}/revisions/{revision-id}/related'
Retrieves related changes of a revision. Related changes are changes
that either depend on, or are dependencies of the revision.
Request GET
/changes/gerrit~master~I5e4fc08ce34d33c090c9e0bf320de1b17309f774/revisions/b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe/related
HTTP/1.0
See more info in the Gerrit documentation here

What is the intended pull request rejection workflow in TFS/Team Services?

my team and I are using Team Services with Visual Studio 2015. I understand the concept of a pull request, but the rejection and correction process is very blur.
MSDN falls short of covering this part on the main page regarding the topic: https://msdn.microsoft.com/en-us/library/vs/alm/code/git/pull-requests
Basically, when you reject a pull request, what's expected of the person that created it? Should he modify his branch and issue a new different request? or bring changes to his branch in a way that will make it appear under the current request? In the latter case, how?
Thanks
More detailed description is placed here: Conduct a Git pull request on Visual Studio Online
Make changes on the source branch
To act on the feedback, the requestor revises the code on their dev
machine and pushes the changes so that reviewers can see them.
So the requestor need to update his code and push the changes into source branch. The code in the pull request will be updated automatically after new change is pushed.

Is there an API to access the Import/Copy Components log files in D2L?

Using the (g)ui in desire2learn, if you have sufficient permissions you can look at the history of import/copy requests for a target org unit. Is there a programmatic way to access that history?
We copy lots of items using Valence and the only indications we get are if the job itself failed. Often a job will succeed, yet some part of the copy failed and we want know that.
A new experimental API route to retrieve the logs for an import job will be released on v10.4.10 of Brightspace in continuous release. The docs for it will be coming very soon, but the route won't be available to clients on platforms older than v10.4.10.

Resources