cml icon indicating copy to clipboard operation
cml copied to clipboard

Support for DAGsHub | cml-send-comment

Open PuneethaPai opened this issue 3 years ago • 2 comments

We can use DAGsHub api and add support for adding comments to PR/Issues.

API Details:

  • Type: POST
  • Authentication: Password or Token based
  • URL: https://dagshub.com/api/v1/repos/{username}/{reponame}/issues/{index}/comments
  • Body:
{
    "body": "What you want to comment"
}

Example Curl Command:

curl -u "Dean" -H "Content-Type: application/json" -X POST -d '{"body":"A comment"}' https://dagshub.com/api/v1/repos/OperationSavta/SavtaDepth/issues/13/comments

@deanp70 and @guysmoilov can add more details.

PuneethaPai avatar Jun 07 '21 10:06 PuneethaPai

Nice! Please keep in mind that cml-send-comment operates on commits [1, 2] and, optionally, on the associated pull requests.

https://github.com/iterative/cml/blob/a2707c00514499b8e193986ff55db6776d71693e/src/drivers/bitbucket_cloud.js#L23-L62 https://github.com/iterative/cml/blob/a2707c00514499b8e193986ff55db6776d71693e/src/drivers/github.js#L72-L85 https://github.com/iterative/cml/blob/a2707c00514499b8e193986ff55db6776d71693e/src/drivers/gitlab.js#L73-L84

0x2b3bfa0 avatar Jun 07 '21 22:06 0x2b3bfa0

Thanks @PuneethaPai ! I think you covered everything. I didn't know that CML comments primarily on commits - DAGsHub doesn't have such an API yet, I'll update here if this changes. I'm not sure how this affects a possible integration?

guysmoilov avatar Jun 08 '21 16:06 guysmoilov

@guysmoilov Please feel free to contribute, but we don't foresee us adding this feature anytime soon, so I'm going to close this for now.

dacbd avatar Feb 17 '23 15:02 dacbd