Skip to content
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

Fails to report stats for PRs from a fork #2

Open
developit opened this issue Jan 24, 2020 · 5 comments
Open

Fails to report stats for PRs from a fork #2

developit opened this issue Jan 24, 2020 · 5 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@developit
Copy link
Member

developit commented Jan 24, 2020

Currently certain PR's coming from forks result in the action running in the context of the fork, which means it can't post a comment or a PR review to the PR/issue.

Possible workarounds:

  1. Report the size table back using a Status Check
    • Not sure if GitHub's UI will handle this
    • Not sure if status checks have the same permissions issue
    • Not sure if status checks for the HEAD or merge commit on a PR show on the PR itself
@developit developit added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 24, 2020
@kuldeepkeshwar
Copy link

@developit In case of forks, the passed GITHUB_TOKEN has read-only permission (due to security constraints), even if we go for status check, the token will still have read-only permission and won't be able to update upstream.

The ideal solution for such case is Github App(I was hacking around the same problem while creating Size plugin bot, my initial idea was to go for Github Action, but couldn't find any workaround )

@developit
Copy link
Member Author

Yeah, it's not great that actions have this limitation. I had actually tried doing a status check version of this and came to the same conclusion.

@ZLY201
Copy link

ZLY201 commented Oct 21, 2022

Maybe change this action to github app?

Just like coveralls/coveralls, it has a github robot named coveralls.

When you run coveralls the robot will comment in the PR.

We can even invite the robot as a outside collaborator to ensure it has the comment permission.

@kuldeepkeshwar
Copy link

@ZLY201 GitHub robot is already there size-plugin-bot

@ZLY201
Copy link

ZLY201 commented Oct 21, 2022

@ZLY201 GitHub robot is already there size-plugin-bot

Thanks! I'll try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants