Commenting on PRs


#1

The “issues: write” permission seems to allow commenting on issues, but not on pull requests. This is unusual, since generally pull requests are treated as a special case of issues.

However, even after enabling the pull requests read/write permission, the create a comment endpoint appears not to work – I get a 403 error. Is there another endpoint for creating issue comments (not comments on a diff) for PRs?


#2

Hi @djmitche :wave:

The “issues: write” permission seems to allow commenting on issues, but not on pull requests. This is unusual, since generally pull requests are treated as a special case of issues.

That’s expected since issues and pull requests have separate permissions in GitHub Apps. GitHub Apss have more granular permissions than the scope-based permissions that were available before. See

https://developer.github.com/v3/apps/permissions/#permission-on-issues

and

https://developer.github.com/v3/apps/permissions/#permission-on-pull-requests

and the notes at the end of the page.

However, even after enabling the pull requests read/write permission, the create a comment1 endpoint appears not to work – I get a 403 error. Is there another endpoint for creating issue comments (not comments on a diff) for PRs?

Can you share the full output of a curl -v request which clearly demonstrates this behavior? Just mask the token you used for the request in the output of curl -v. That output should help us investigate and offer advice.


#3

I think I mixed something up - perhaps accidentally trying to comment in a repo for which I hadn’t clicked “accept” after modifying the permissions. As of today, commenting on PRs via the issues endpoint works fine. So, nothing to see here. Sorry!


#4