-
Notifications
You must be signed in to change notification settings - Fork 136
Support PRs from fork #12
Comments
Unfortunately, |
I was able to solve a similar issue (pushing on protected branches) in a different action. Instead of using The same thing should work for PRs from forks, assuming that the Allow edit from maintainers option is checked. I hope this helps... |
@drdanz seems your workaround will work for the action then! You can create env:
GITHUB_TOKEN: ${{ secrets.GITHUB_OAUTH_TOKEN }} Then action will act on your user's behalf 🤔 |
What are the risks of including a personal token in a Github Action? |
Secrets are not exposed to PRs from forks, so this is not a viable workaround. |
Background: https://issues.apache.org/jira/browse/FINERACT-829 Is there really no way around this? I've reached out to ask GitHub Support for any advice, let's see. https://github.com/tibdex/autosquash seems another action that is vaguely similar to this one (only in the sense that it also does stuff to commits on PRs) - does anyone understand how that gets around this problem? @tibdex do you want to chime in here? |
@vorburger #17 addresses this issue. |
I've been using a fork of this: https://github.com/ljharb/rebase which works, but the automatic rebase + force push doesn't work on fork PRs (the majority) because github actions' user doesn't have the same permissions as collaborators. I don't think there's a workaround yet short of running your own server. |
Apologies for commenting on an older issue, but I was hoping to follow up with @drdanz regarding this comment:
You seem to be using a rebase action from your own fork, and your entrypoint.sh seems to be a bit different to the entrypoint.sh contained within this repo. Can you perhaps help me understand what is different on your fork? I would really like a reliable way to rebase PR's from forks, but this action doesn't quite do what I was hoping, and I was wondering what your fork of it might do. Thanks |
FYI it now works great for us on https://github.com/apache/fineract/
|
@vorburger do you also rebase PR's from forks into the repository? That is where I was still seeing issues. If so, what happens if someone who doesn't have contributor rights to the organisation uses the `/rebase' command? |
And by PR's I mean PR's from other forks other than your own. Thanks for getting back to me about this, I appreciate it! |
In our project (Apache Fineract), the person typing /rebase is typically a
maintainer (committer). It definitely works even for forks for us, between
commiters, but also if the PR is from a contributor (who doesn't have push
permission). -- I think they need to have that flag about "let others
update this PR" thing, which seems to be on, by default.
What I'm not sure if it works is for a contributor to use /rebase. I'd
imagine for their own PR it should - why wouldn't it? Try... But it may not
for others' - but perhaps you'd consider that "a feature, not a big"(tm)...
;-)
… |
I want to know this too. |
When trying to rebase a PR from a fork repository, the action fails with this message:
It would be very useful if this was supported.
From the git point of view it shouldn't be very difficult to do, something like this should do the trick (untested, but should work):
My only issue is that I don't know if the
GITHUB_TOKEN
works also on fork repositoriesThe text was updated successfully, but these errors were encountered: