orf/cargo-bloat-action

Permission problem posting comments

alerque opened this issue · 6 comments

I've setup by workflow pretty much as a copy/paste of the example repo. Everything looks good up until the moment it tries to post a comment:

image

(CI run log)

Is there some undocumented step I'm missing to set this up to reply to PR requests?

This happened to me as well, my config used to work and suddenly I got the same error.

In that case I'm guessing something in Github's permissions model changed and the setup process needs an extra step to get it authorized!

orf commented

It might be the Draft MR status @alerque - have you tried removing that?

@orf Unfortunately it doesn't seem to be that. I removed the status and did some more pushes. I read the links you sent and it seems pretty clear that this is caused by the PR being opened by me from my fork. Even though I own the upstream project I was working in a fork instead of a branch.

I agree the situation kind of sucks. I would propose mitigating it by not failing if the issue is not being able to post comments, but instead send well formatted output to the terminal which can be reviewed in the CI logs for those that care, and pass on a success code so people don't think they are setup wrong. Meanwhile in-repo PRs will still get PR comments.

Yes, this is indeed a serious issue.

An alternative, is to use same approach which clippy actions does (https://github.com/actions-rs/clippy-check#limitations) it prints out the summary and fail if there are any errors.