Bot "github-actions" not allowed to comment locked PR #25230
-
I experienced following behaviour and didn’t know where I should open an issue. I’m using an action that runs Technical users are configured and maintained by contributors so I understand them as “deputies” and think they should have contributor rights (at least for commenting). What do you think? If you agree: where should I file an issue? Example: between locking and unlocking PR in the image below I did same action and expected a comment just like the other ones (source). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Sorry for the delay response. When you use GITHUB_TOKEN , all of the interactions with the repository are on behalf of the Github-actions bot. Github-actions bot doesn’t have enough permission to create comments in locked pull request. According to the message : You and other members of teams with write access to this repository can still leave comments that others can see. As a work around, I would suggest you to use your own PAT in the action for adding comment to Pull request. You can store your PAT in secrets and use ${{ secrets.name }} in action. For Creating and using encrypted secrets, please refer to this document: In pull request page , you will see that it is you add a comment. |
Beta Was this translation helpful? Give feedback.
-
While the bot doesn’t have permission to create a comment in a locked issue, it does have permission to unlock an issue, create a comment, and relock the issue:
Handle locked PRs
|
Beta Was this translation helpful? Give feedback.
Sorry for the delay response. When you use GITHUB_TOKEN , all of the interactions with the repository are on behalf of the Github-actions bot.
Github-actions bot doesn’t have enough permission to create comments in locked pull request.
According to the message : You and other members of teams with write access to this repository can still leave comments that others can see.
As a work around, I would suggest you to use your own PAT in the action for adding comment to Pull request. You can store your PAT in secrets and use ${{ secrets.name }} in action.
For Creating and using encrypted secrets, please refer to this document:
https://help.github.com/en/actions/automating-your-workflow-wit…