-
Notifications
You must be signed in to change notification settings - Fork 192
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
Sync: Make a branch for merging #787
Comments
Sounds like a good idea to me. |
Yes, good idea - we already use branch protection quite a bit, should be easy enough to add to https://nf-co.re/pipeline_health https://github.com/nf-core/nf-co.re/blob/master/public_html/pipeline_health.php |
I was thinking that we need to be a little more clever with how we set this up too, as building on existing open PRs might be difficult. Maybe we take this strategy?
Basically I think that we probably need a new branch for each tools release and can't just update the existing PR as we do currently. |
Release of 1.12.1 seems to confirm our suspicion that having clean So I think this paves the way for this issue 👍🏻 |
@ewels don't see it mentioned here (maybe I am blind): |
I took the liberty to give this a try at #821 I am very much a greenhorn when it comes to using the python github API :) so let me know if there is an obvious better way to do this. So I just made a draft PR to have a start at this. When testing locally it has the desired behaviour:
What bugs me right now is that it fails when the branch already exists - that's something I'll try to catch next. I removed the updating of existing PRs - in my logic that's not necessary anymore, but correct me if I'm wrong? |
Yes we can't update existing PRs if we are using new branches each time. I don't love that auto-closed PRs could have ongoing comments and work etc, but I think that it's something we have to live with. If we can make an automated comment explaining why it is closed and linking to the new PR I think it should be fine. |
ps. If the existing branch exists - maybe we should just create a new branch with a |
Okay yes that would be a solution. |
Alright, so now closed PRs get an update of title and body indicating that they have been closed because they are outdated. If a branch exists, it gets the suffix |
For the |
Solved in #821 |
As discussed on Slack after the last automated sync, some pipelines seem to have very clean PRs where others have massive ones where the sync tries to delete loads of custom files and all sorts.
Some of this is just due to larger / older pipelines with more variance from the pipeline I think. But there was suspicion on Slack that it could also be pipelines where commit history from
dev
has in the past been merged intoTEMPLATE
(x-ref nf-core/eager#615 (comment)). I guess that this is happening when people fix merge conflicts on the automated PR, which will mergedev
intoTEMPLATE
.So, idea 💡 for making merging easier for people / simpler to keep the
TEMPLATE
branch clean: How about we push the new commit toTEMPLATE
and then make a new branch fromTEMPLATE
and create the PR to dev from there? Then the merge conflicts can be resolved on github.com without changing anything inTEMPLATE
and that branch will stay super clean. This is basically what I do manually (via a fork usually) when I merge sync PRs myself.The text was updated successfully, but these errors were encountered: