Delete comments in a Workitem Azure devops - azure-devops

I have a bulk of workitem in azuredevops project. I want do delete the comments inside all of them, even the comments raised by others. Is there a way to do it? I tried with delete comments api and it gives me an error: VS403664: Unable to update the comment xxx, you must be a creator of the comment to update it

I was also facing the same issue.
Delete comment feature is now no longer supported in azure devops because in recent time azure devops architecture has been changed due to that it is not providing
comment id to each and every comment hence it's not possible to distinguished each and every comment and because of this issue deleting comment is not supported by azure devops.
unfortunately in the azure devops docs it's not updated yet.
I hope this will be helpful.

Related

Renaming Azure Devops Build and Release pipeline through REST API

trying to rename the pipelines build and release through REST API, I have gone through the official Microsoft documentation but didn't find any API's for this task. Did i miss any or we have such API's where by using build id/build name we can rename the pipeline
have you tried to make the change in the azure release page and look at the request that is being sent in the dev tools network tab? A couple of months ago I was able to learn how to retrieve some information that I was looking for by doing that.
Best regards.
You could use Definitions-Get API to retrieve the requested body by pipeline definition ID.
Copy the response as body and use Definitions-Update to rename the pipeline. Update the pipeline name of this revision.
Check the DevOps UI output.
The above workflow also applies to release pipeline, your need to change the REST API.
Using Releases-Get release to get the latest revision and using Releases - Update Release to rename it

Triggering Azure Pipelines Build Deletion

I am tasked to verify why expired builds are not deleted in my company's locally hosted Azure DevOps server.
When querying the SQL Database I find that there are very few deleted builds and most of those were manually triggered.
Most of the builds aren't actively retained.
I found this question which asks pretty much the same question I am asking but does not seem to have an answer. To me it looks like there is an infrequently found bug for cases like this, which has not yet been diagnosed. My question is: is there a way, for instance via REST API to trigger the deletion of Builds as defined via the DevOps Admin interface?
On further review, I discovered that what actually seems to be happening is that DevOps, though updated to the latest release, seems to be applying per-Pipeline rules. One of the pipelines has this custom rule: and I have evidence that tells me that the builds are being deleted as per that rule.
I found the answer in the Developer Community at Visual Studio. Seems to have been a problem that was fixed in their 2020.0.1 Patch 2 Release. I should note, however, that even though the issue is officially closed, there have been a couple of dissenting votes as of this date.

Passing Azure Release Info to Jira Issue

I have recently migrated the work items to Jira Cloud. I am using Azure Devops for my releases.
I want to use Jira API to update the issue once the release is completed. My issues contains a release info field which I want to update with my Release number in Azure DevOps
I read Jira API documentation from - https://docs.atlassian.com/jira-software/REST/7.3.1/
but couldn't get a clue updating an issue field.
Also tried to understand https://developer.atlassian.com/server/jira/platform/updating-an-issue-via-the-jira-rest-apis-6848604/ still couldn't get what I am looking for.
Is there any other option/ API which I am missing. Any help on this is appreciated.
This blog: Azure Pipelines integration with Jira Software, mentions that you can install Azure Pipelines integration with Jira and connect Azure DevOps organizations with your Jira Software instance. So you can follow this tutorial: Integrate with Jira Issue tracking to report deployment status to Jira issues.

Azure DevOps link work items to commit message as mandatory

Is there a way to create a rule in Azure DevOps which enforces linking work items to azure repo commit as mandatory?
You cannot enforce linking work items for individual commits. However, you can require that work items be linked as part of your Pull Request Policy.
Here's Microsoft's documentation on how to set it up:
https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops#check-for-linked-work-items

Custom GitHub PR comment triggers for Azure Pipelines

Is it possible to trigger somehow Azure Pipelines with custom GitHub Pull Request comments (besides the standard ones)?
We’ve found the following documentation suggesting to use webhook triggers but as far as I understand this feature isn’t yet implemented in Azure Pipelines, is it?
Custom GitHub PR comment triggers for Azure Pipelines
Yes, you are right. The feature Incoming Webhook should not yet implemented in Azure Pipelines at this time.
Now, Azure pipeline trigger only support the "standard" GitHub Pull Request comments, like /AzurePipelines runor /AzurePipelines run <pipeline-name>. So we could not use the custom GitHub PR comment trigger the Azure pipeline currently.
The workaround as Levi Lu answered in that post, but the limitation is that the pipeline still needs to be executed for each PR.
If above workaround not help you, 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.