-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: update merge script to update on github #15917
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15917 +/- ##
==========================================
+ Coverage 90.96% 90.99% +0.03%
==========================================
Files 145 145
Lines 49534 49521 -13
==========================================
+ Hits 45057 45062 +5
+ Misses 4477 4459 -18
Continue to review full report at Codecov.
|
Just to make sure, the goal of this is to allow you to push your local changes back up to the PR branch, correct? And then use the green "Squash and merge" from there? IIUC the new options are
Maybe the logic should be flipped on the if / else you added, to be more consistent with how it was ( |
Need to remember to update https://github.com/pandas-dev/pandas/wiki/Merging-Commits Also should have have a section there on commit message format (which I messed up with b070d51). Can link to http://pandas.pydata.org/pandas-docs/stable/contributing.html#committing-your-code |
Yes, indeed, that's what I have used it for. I would prefer if we use the github green button more (but we can talk about in the meeting) For that reason I put the update as 'yes' :), but can also switch or make it a different command ('update-pr.py') |
What is wrong with it? |
Forgot the |
scripts/merge-pr.py
Outdated
|
||
merged_refs = [target_ref] | ||
|
||
merge_hash = merge_pr(pr_num, target_ref) | ||
update = continue_maybe2("Update PR and push to github (y) or merge locally (n)?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this explicity, maybe r
(remote) or l
(local) or q/n
to do nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any thoughts on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's good, will upate
@jreback What you mentioned on the hangout about the commit message: as far as I can see, you can edit both commit title and longer commit message. What else do you want to edit? |
if update == 'r': | ||
merge_hash = update_pr(pr_num, user_login, base_ref) | ||
elif update == 'l': | ||
merge_hash = merge_pr(pr_num, target_ref) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing an else
block? or an elif update == 'n'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nevermind, that's do nothing :)
I just did a test, and it seems like you can edit both the title and the
squashed commit message when using the squash and merge button.
…On Fri, Apr 7, 2017 at 11:38 AM, Joris Van den Bossche < ***@***.***> wrote:
@jreback <https://github.com/jreback> What you mentioned on the hangout
about the commit message: as far as I can see, you can edit both commit
title and longer commit message. What else do you want to edit?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15917 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIisNM3wLJXuiOog0nMzFmTTCQPlvks5rtmaLgaJpZM4M1SBd>
.
|
so the script captures the top-of-the PR, which I usually want some of it because its a nice sentence or 2 on what is going on this PR. The button only includes the title. BUT since we have https://github.com/pandas-dev/pandas/blob/master/.github/PULL_REQUEST_TEMPLATE.md, I have to edit this out most of the time (so maybe we should just remove this entirely). |
here's what you get if you don't explicity edit things with the scripts. Not picking on you @TomAugspurger I accidently do this too :>
|
I understand that copying from the first post into the commit message box is some extra work, but if you typically still need to edit the generated commit message by the script, it does not seem more work? |
what are you suggesting? I think editing the commit messages if using the script is fine. just noting it. I use the script because I often need to edit very minor things (like the formatting or something) in the whatsnew. Its just easier to do this right before merge. |
What I said on the meeting: using the merge button. You can still use the script to do minor things (that's the reason I the update part), but instead of merging locally and pushing, pushing to github and directly merging there (which means editing the commit message on github instead of locally the generated one -> and that is what I meant with not much difference in work as both typically needs editing) |
@jorisvandenbossche ahh yes I see what you mean now. ok, then I agree the default should actually be to push back to the user PR with any changes. (default is to do nothing I think). |
thanks @jorisvandenbossche let me give this a try! |
@jreback @TomAugspurger This adds the ability to checkout a PR, do a small fixup or rebase, and push changes to github.
I now added it as an additional question whether to update or merge, but can also make to separate scripts of it for convenience.