Repository: avelino/awesome-go (language: go)

Issue:
First comment action is not working
### Search first

- [X] I searched and no similar issues were found

### What Happened?

I opened a PR and the first comment action failed. See https://github.com/avelino/awesome-go/actions/runs/5617543194.

Seems like a regression of https://github.com/avelino/awesome-go/issues/4868.
First comment action is not working
### Search first

- [X] I searched and no similar issues were found

### What Happened?

I opened a PR and the first comment action failed. See https://github.com/avelino/awesome-go/actions/runs/5617543194.

Seems like a regression of https://github.com/avelino/awesome-go/issues/4868.


Discussion / hints:
@carlmjohnson Can you send a corrected contribution?
You mean open a new PR?
Failed again: https://github.com/avelino/awesome-go/actions/runs/5617685809/job/15222150529?pr=4940
The error looks like it is a problem with the permission, got the same error all the time

> RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/peter-evans/create-or-update-comment/v3/dist/index.js:4694:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  status: 403,

Maybe it is caused by the GITHUB_TOKEN does not have enough permission to perform its action, could you recheck?
https://github.com/avelino/awesome-go/blob/main/.github/workflows/pull-request-first-comment.yaml#L14

ref: https://github.com/peter-evans/create-or-update-comment#action-inputs
This problem has been around for several months now, despite this issue only being posted recently. Is anyone actually looking into it?
I added a possible fix to https://github.com/avelino/awesome-go/pull/4961, not sure how to test it without creating a new dummy PR, and I don't want to spam the repo.
> I added a possible fix to #4961, not sure how to test it without creating a new dummy PR, and I don't want to spam the repo.

Since the issue appears to be fixed, I've removed the fix from #4961.
I don't see a way to get the PR to re-run the action that was failing due to an expired token. Does this mean we need to kill our PRs and re-submit them?
@carlmjohnson Can you send a corrected contribution?
You mean open a new PR?
Failed again: https://github.com/avelino/awesome-go/actions/runs/5617685809/job/15222150529?pr=4940
The error looks like it is a problem with the permission, got the same error all the time

> RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/peter-evans/create-or-update-comment/v3/dist/index.js:4694:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  status: 403,

Maybe it is caused by the GITHUB_TOKEN does not have enough permission to perform its action, could you recheck?
https://github.com/avelino/awesome-go/blob/main/.github/workflows/pull-request-first-comment.yaml#L14

ref: https://github.com/peter-evans/create-or-update-comment#action-inputs
This problem has been around for several months now, despite this issue only being posted recently. Is anyone actually looking into it?
I added a possible fix to https://github.com/avelino/awesome-go/pull/4961, not sure how to test it without creating a new dummy PR, and I don't want to spam the repo.
> I added a possible fix to #4961, not sure how to test it without creating a new dummy PR, and I don't want to spam the repo.

Since the issue appears to be fixed, I've removed the fix from #4961.
I don't see a way to get the PR to re-run the action that was failing due to an expired token. Does this mean we need to kill our PRs and re-submit them?

Fix patch:
diff --git a/.github/workflows/pull-request-first-comment.yaml b/.github/workflows/pull-request-first-comment.yaml
index ffdd9f3e325..ca216b706ad 100644
--- a/.github/workflows/pull-request-first-comment.yaml
+++ b/.github/workflows/pull-request-first-comment.yaml
@@ -1,7 +1,7 @@
 name: First comment in new pull request
 
 on:
-  pull_request:
+  pull_request_target:
     types: [opened]
 
 jobs:


Test patch: