how to use github actions to comment when the event is not 'push'?

I tried to create an action that comments on event, but I get an error saying “Resource not accessible by integration”. It works on push event though…

Is there any way to make github-actions bot comment on a PR when event is not push?

@amey-kudari ,

If posssible, can you share your repository with us, so that we can the check more detailed configurations and source code in your action to analyze the root cause?

In addition, here is a GitHub’s action first-interaction, it also can allow to set a comments added to a PR or issue. Maybe you can reference it to improve your action.