scrutinizer-ci / scrutinizer

Legacy repository - archives past feature requests/bug reports
https://scrutinizer-ci.com/docs
140 stars 35 forks source link

Create pull requests from an automatic fork #122

Open hkdobrev opened 10 years ago

hkdobrev commented 10 years ago

When creating a pull request for a autofix patch, Scrutinizer shows this message:

For the pull request a new branch will be created on the source repository below. You can automatically delete this branch after merging through GitHub's UI.

Scrutinizer will also add the user "scrutinizer-auto-fixer" as a collaborator to the repositories to be able to push to the patch branch and create the pull request.

Is it possible to create a fork of open-source repos and create the pull request without access and adding a contributor to the original repo?

One good example of that is Bitdeli. To activate Bitdeli for your account, you should add a badge to your readme file. It offers you to create a pull request. It does not require API access at all, because anyone could submit a pull request to an open-source repo.

schmittjoh commented 10 years ago

Access is only added for the repository which submits the pull requests (i.e. your fork) not for the target project (where you send the pull request).

This is what you suggest, no?

hkdobrev commented 10 years ago

I've probably misunderstood it.

Here is my case and what I thought would happen:

What I want Scrutinizer to for me is:

hkdobrev commented 10 years ago

@schmittjoh I guess you think I have added a fork repo to Scrutinizer, which is not the case.

schmittjoh commented 10 years ago

I see. This is the set-up that we had for quite some time, but it has some drawbacks:

Maybe there were other problems, which I do not remember now. Is there a problem with adding the collaborator to your fork (it's only added to your fork, not the target repository)?

hkdobrev commented 10 years ago

Is there a problem with adding the collaborator to your fork (it's only added to your fork, not the target repository)?

Again, I don't have a fork at all.

You cannot edit or delete the pull request branch

That is correct (you can exclude some of patches through the Scrutinizer CI website), but you cannot do this for other pull requests from other people as well. You could edit the merge commit you create when you merge the PR.

We cannot fork two repositories with the same name (or we immediately need to delete the fork)

Bitdeli and others does exactly that. AFAIK GitHub keeps the pull request in a hidden branch in the target repo (pull/number). So even if the fork is deleted the commits and the PR are not lost.

Supporting private repositories will be tricky

I guess you could use the current behavior and a collaborator to the private repo.

hkdobrev commented 10 years ago

I've updated the title from "Create pull requests from a fork" to "Create pull requests from an automatic fork". I guess this better reflects what I mean.

stof commented 10 years ago

Supporting private repositories will be tricky

AFAIK, private repos can be forked exactly the same way that public ones, assuming that you have read access to the private repo (which is the case already to be able to run builds)

schmittjoh commented 10 years ago

I'm not sure what we would achieve doing it this way.

It would not change the amount of permissions that we would have to request for your GitHub account and given that we do not commit any code to your branches regardless of which way it is done. What are the benefits of this?

jeremykenedy commented 6 years ago

Same error here: error

hkdobrev commented 6 years ago

You cannot edit or delete the pull request branch

This is no longer the case. New pull requests have the checkbox allowing maintainers to the PR head branch by default.

schmittjoh commented 6 years ago

I'm not sure what the original goal/problem was, but the current set-up works quite well for many people (we have sent thousands of pull-requests or more).

Do we still need this change?

jeremykenedy commented 6 years ago

Oddy, a little while later I tried it and it went through just fine. Thanks for the followup. I appreciate your time and product! Thank you!