-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the GITHUB_TOKEN does not have write permission when running lint.yml
workflow
#4033
Comments
I could create a custom token although it's weird that the default one is not working. |
i see. that's indeed weird. i am also using a default token. |
I tried using a different token in ccea338. Could you check if it helped? |
@vitaut thanks. i am testing it at https://github.com/fmtlib/fmt/actions/runs/9847874756/job/27188716238?pr=4062#step:5:30 with a PR at #4062 . the error looks like
|
Thanks for testing. Here's a relevant thread that found but didn't have a chance to look in detail yet: actions/checkout#298. |
i tested the same setting in my repo. it works though. see https://github.com/tchaikov/fmt/actions/runs/9848013835/job/27189145141?pr=3#step:5:3 following https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository, the secret in question was created for the repository . and it was reported used: ![]() |
I've removed the commenting for now (42d3d70) since it doesn't seem worth spending more time on figuring out how to make it work with github's permissions but thanks anyway. |
i see. thanks for trying. |
see https://github.com/fmtlib/fmt/actions/runs/9616362150/job/26526654984
that's why it failed later
let's compare it with another run with the proper permission, see https://github.com/tchaikov/fmt/actions/runs/9339573823/job/25704121447
so the comment was posted. when the format was wrong.
because, per https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#create-an-issue-comment
so we might want to allow workflow to write to an pull request in https://github.com/fmtlib/fmt/settings/actions:
The text was updated successfully, but these errors were encountered: