Hi Infracost team, I added the integration into GH...
# general
s
Hi Infracost team, I added the integration into GH actions and set the
pull-requests: write
permission in the workflow, still getting
Copy code
Error: The pull request comment was generated successfully but could not be posted:
ST <https://api.github.com/repos/><org>/<repo>/commits/<commit-id>/comments: 403 Resource not accessible by integration []
Could you please support here?
b
Hello! Please use #help next time to ask for help. We're trying to keep #general to public announcements 🙂 For the issue, I noticed that the API request is for a commit comment, not a PR comment, so
pull-requests: write
probably doesn't help. May I ask you if it was your intent to post comments on specific commits? The
infracost comment
command accepts either
--pull-request
for PR comments or
--commit
for commit comments
For the commit comments, could you please try setting the permission
contents: write
and re-run the workflow?
w
@square-fall-35970 I’m curious why you want to post comments on commits? Most of the users I talk to post comments on PRs as that’s where engs discuss/review the code