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

Fix GitHub PR comment with failing lint #714

Closed
ewels opened this issue Jul 30, 2020 · 4 comments
Closed

Fix GitHub PR comment with failing lint #714

ewels opened this issue Jul 30, 2020 · 4 comments
Assignees
Milestone

Comments

@ewels
Copy link
Member

ewels commented Jul 30, 2020

This PR should have a comment about failing tests: https://github.com/nf-core/chipseq/pull/177/checks?check_run_id=929475596

Figure out why that didn't happen..

@ewels ewels added this to the 1.10.2 patch milestone Jul 30, 2020
@ewels ewels self-assigned this Jul 30, 2020
@ewels ewels mentioned this issue Jul 30, 2020
6 tasks
@ewels
Copy link
Member Author

ewels commented Jul 30, 2020

Maybe everything is fine..? nf-core/gwas#3 (comment)

@ewels
Copy link
Member Author

ewels commented Jul 31, 2020

Ok, so I finally tracked this down after a lot of debugging. There is no problem with the code, it's a limitation of GitHub actions.

When a pull-request is created, the actor is the user / repo that the PR is coming from. That's who is running the action. If the PR comes from within the nf-core organisation (eg. from the TEMPLATE branch as in the gwas PR above) then everything works as expected. However, if the PR comes from a fork that is outside the nf-core organisation then the secret is not available and the comment cannot be posted.

We could fix this by asking everyone with a fork to make an auth token and set it as a secret on their forked repo, but that's never going to happen. Some people make a dedicated GitHub app which people can register with, but that's way too much work. So for now I think we leave it as it is - comments will appear on branch PRs but not fork PRs.

We are not the only people to be affected by this - there are a lot of threads about it on the GitHub community forum. There are some fairly extreme workarounds that some people have made. Hopefully this will be addressed in a nicer way in the future.

@ewels
Copy link
Member Author

ewels commented Jul 31, 2020

Here's the workaround that someone made that I referenced: https://stackoverflow.com/a/61450807/713980

Repo: https://github.com/nyurik/auto_pr_comments_from_forks

@ewels
Copy link
Member Author

ewels commented Jul 31, 2020

NB: If that repo does get rewritten as a stable GitHub action then we could save the markdown to a file (we already have support for this) and then use the action to post it. That would be fairly trivial... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant