REST API v3: API to add comment and label on to the pull request without having the file name #24383
-
I see APIs for adding comments and label for issues. There is an API to post comment on pull request with file name as input. I am looking for some API using which I can add label and comment on to the Pull Request just by having Pull Request number (just not specific to commit, file or line number) I would appreciate if you point out to any such APIs. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
From the documentation:
So use the standard API for creating a comment. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hi @lee-dohm I bumped into the same problem. As you said, the document you linked says: > “The Issue Comments API supports listing, viewing, editing, and creating comments on issues and pull requests.” > https://developer.github.com/v3/issues/comments/#create-a-comment But there is no description about “how to comment on pull requests”, just includes API to post a comment on issues (POST /repos/:owner/:repo/issues/:issue_number/comments). I tried following API. * * |
Beta Was this translation helpful? Give feedback.
-
Sorry I resolved. I succeeded to a regular comment on PR by: POST /repos/:owner/:repo/issues/:pull_number/comments |
Beta Was this translation helpful? Give feedback.
-
Hi @c-bata . How did you comment on the PR ? (I mean how did you authenticate yourself with the auth token). Can you paste the code block here for authentication of user with auth token… |
Beta Was this translation helpful? Give feedback.
-
I just send a http request using curl with Authorization header. |
Beta Was this translation helpful? Give feedback.
-
Can you tell how can I do it with python ? I tried many ways and searched on web but could not find any helpful reference. |
Beta Was this translation helpful? Give feedback.
-
@c-bata Can you tell how can I do it with python ? I tried many ways and searched on web but could not find any helpful reference. |
Beta Was this translation helpful? Give feedback.
-
This thread might be useful. |
Beta Was this translation helpful? Give feedback.
This thread might be useful.