Closed frankie-mur closed 1 month ago
@frankie-mur is attempting to deploy a commit to the neosync Team on Vercel.
A member of the Team first needs to authorize it.
Hey @nickzelei, thanks! I learned alot about GH actions in the process 👍
403
it seems like you need to enable workflow write permissions in order to have it write a comment. (Thats done somewhere in project settings I assume?) (ref: https://github.com/github/codeql-action/issues/572) can also remove if the comment seems like overkill/not necessary-labeled
-unlabeled
tags in the yaml file specify, I observed the behavior working testing on my fork, let me double check on that@frankie-mur I believe you need to configure the permissions block to allow the action to comment on the PR. Can read more about it here: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs We have these configured in a few different actions in this repo, but none for commenting. Could serve as a starting point though.
The action may have just not run because you are an outside collab. I have to manually approve. That could be it...because I was thinking the same thing you specified labeled and unlabeled. It might work differently if I open a PR myself.
@frankie-mur Looks like the job runs correctly when the label is added or removed! But still receiving a 403. I left a comment with a snippet of where I believe the permissions block needs to be moved to!
@nickzelei appreciate the suggestion! I have moved the permission block over. Lets try that again 🤞
ok @frankie-mur it still didn't work. I did a little research, and it appears we have the wrong permissions.
What we actually need is issues: write
as github treats PRs as a special type of issue and the ability to comment is actually underneath the issues section instead of pull requests (so confusing!!).
I don't believe we need pull-requests: write
at all.
Anyways, maybe let's give that a go.
oh wow, that is a bit confusing. Thank you for you patience in this and also doing the (very) manual testing! 😂
All good! I'm learning something too. I'm not sure why, but it's still failing.
I wonder if it's really worth it at this point to have this. The job failing might be sufficient.
I would assume the github token doesnt need to be explicitly specified? I read a little about the github client and it says it should find it from the context.
Thats unfortunate! I have removed the add a comment job and made the job Name to be more specific
This PR adds a new Github Action, the action checks if there is atleast one PR label present, if not it makes a comment in the PR. This PR addresses issue #2294
Example:
Opening a PR without a label
Adding a label after said comment