How to add a comments on a git commit with the Azure DevOps REST api

Stephane Ronse 21 Reputation points
2020-07-22T14:55:13.407+00:00

I cannot find the API to add a "global comments" on a specific Git commit using the Azure DevOps REST api.
I need this since our custom CI tool must report detailed status per commit.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,335 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,791 Reputation points
    2020-07-22T15:43:51.123+00:00

    Hi,

    Azure DevOps is currently not supported in the Q&A forums, the supported products are listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    You can ask the experts in the dedicated Azure DevOps forum over here:
    https://developercommunity.visualstudio.com/spaces/21/index.html

    (Please don't forget to accept helpful replies as answer)

    Best regards,
    Leon

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ryan Hill 28,286 Reputation points Microsoft Employee
    2020-07-24T04:34:39.33+00:00

    Hi @Stephane Ronse ,

    I took a gander at https://learn.microsoft.com/en-us/rest/api/azure/devops/git/?view=azure-devops-rest-6.0#common-tasks and I don't see any support for PUT on that resource. Therefore, I don't think you add comments. You can however get a list a commits. Perhaps you can track messages within your custom CI tool and link those messages to the necessary commit. Just a thought. There's also some sample code that can help get you started.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.