Closed takuya-takahash1 closed 4 months ago
GitHub REST API for removing pull request labels is same with the API for removing Issue labels.
https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28
You can use the REST API to manage labels for a repository and add or remove labels to issues and pull requests. Every pull request is an issue, but not every issue is a pull request. For this reason, "shared" actions for both features, like managing assignees, labels, and milestones, are provided within the Issues endpoints.
How is env.GH_APPS_TOKEN
set?
It seems the variable isn't set in your workflow.
And if the variable is set properly, does the access token have the permission to write pull requests?
And if I remember correctly, the permission to write issues is also required to create labels.
@suzuki-shunsuke Thank you for your reply! We have checked and the Token itself is set properly. However, we are using the Github Apps Token, and it seems that the authorization settings are missing to begin with. We are in the process of confirming this with the administrator in our organization. We will report back if there is any progress.
@takuya-takahash1 Do you have any update?
@suzuki-shunsuke Sorry for the late reply. I checked the permissions on the Github Apps Token that you are using, and the Issues permission is No Access. I changed it to read and write, made changes to the resource created by terraform, and ran checks again with Github Actions, but the same error is still occurring. Probably, it is due to the lack of authorization for Github Apps Token, which we will investigate. You may close this Issue. Thank you for your help.
Thank you for your update. I close this issue.
tfcmt version
Environment
Overview
Question.
I have tfcmt working to comment on Issues and our project fails to comment because we are not using Issues.
I would like to know how to solve this problem, because when I check the tfcmt documentation, it states that GithubActions will comment on relevant Pull-requests without any specific configuration.
Looking at the error text, I see that it tries to comment on 753 Issues and fails, but since the relevant Pull-requests are 753, it doesn't look wrong, but since the Issues are not used, the POST fails as a result.
How to reproduce
tfcmt.yaml
githubaction workflow
Debug output
Expected behaviour
tfcmt to be commented in pull-request.
Actual behaviour
Failure to allow tfcmt to comment on non-existent Issues.
Important Factoids
No response
Note
No response