argotorg / argotorg/solidity

`check_style.sh` fails to post comments in external PRs

Open
#13,616 0 comments 0 reactions 0 assignees View on GitHub
bug :bug: low effort low impact should have
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

Our `check_style.sh` script is supposed to post the errors it finds as a comment in the PR. E.g. https://github.com/ethereum/solidity/pull/10653#issuecomment-748128097. Looks like it does not work with external PRs, due to permission issues. For example in [1184923](https://app.circleci.com/pipelines/github/ethereum/solidity/26748/workflows/45c1a6ca-bb58-40fe-ad72-4cc8681d1cf3/jobs/1184923) from #13595 you can see this error:
```
posting error message to github
{
"message": "Requires authentication",
"documentation_url": "https://docs.github.com/rest/reference/issues#create-an-issue-comment"
}
ERROR: Error message does not contain file path.
```
and there's no comment in the issue.

Is there something we can do to fix it? The bug tracker is public so CI should not need any specific permissions/tokens to post a comment, even when it's someone not from the team triggering it.

Fixing this save us having to constantly point this out in external PR reviews.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting check_style.sh and the CircleCI job linked in the issue, then trace its request to GitHub's issue-comment API for external pull requests. Done means style errors are posted as comments on external PRs without the current authentication failure, while the existing file-path error behavior remains visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, shell
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.