Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPubMed Central: add checkbox support #1926
Conversation
This comment has been minimized.
This comment has been minimized.
This does not sort the checkboxes in the order they're found in the search. This can be added, but I figured I'd make the minimal changes to address the issue. |
dstillman
reviewed
Apr 7, 2019
@@ -20,6 +44,8 @@ function detectWeb(doc, url) { | |||
if (getSearchResults(doc, true)) { | |||
return "multiple"; | |||
} | |||
|
|||
return undefined; |
This comment has been minimized.
This comment has been minimized.
dstillman
Apr 7, 2019
Member
If we're going to keep this rule, we should just return false
for these.
This comment has been minimized.
This comment has been minimized.
retorquere
Apr 7, 2019
•
Author
Contributor
I'm fine with that, I just tried to fix the issue without introducing unnecessary semantic differences. Since undefined
is returned implicitly, I figured making it explicit stayed closest to the original intent as expressed in the code.
This comment has been minimized.
This comment has been minimized.
retorquere
Apr 7, 2019
Author
Contributor
Can I change this particular commit without introducing a 3rd commit?
This comment has been minimized.
This comment has been minimized.
dstillman
Apr 7, 2019
Member
Yes. Make the change, git add
it, and then use git commit --fixup [hash-of-commit-you're-updating]
. Then before merging, you or whoever merges this can use git rebase
to squash the commit automatically (with either rebase.autosquash
set to true globally, which I would recommend, or --autosquash
).
(In this case you can just do the above and then force-push, since this is a small PR and easy to review.)
This comment has been minimized.
This comment has been minimized.
retorquere
Apr 7, 2019
Author
Contributor
Done the fixup and the force-push, but that still gave me a 3rd commit.
I'm not going to complain if someone else can do the rebase. rebase still terrifies me.
This comment has been minimized.
This comment has been minimized.
dstillman
Apr 7, 2019
Member
Sorry, "the above" included the rebase. It'll be OK!
First, make sure this setting is on:
git config --global rebase.autosquash true
Then run git rebase -i 6005fa6^
. That's the first commit in this PR plus ^ (which means the commit before that one).
You should see in your editor that the commits have been reordered, with the fixup commit automatically moved to after the first one. Save and close and it should be automatically merged. (Fixup means that the commit message is automatically discarded.) Then you can force push.
Technically you don't need to use -i
in this case since there's nothing else to be done, but I always use it, since it's nice to see what's happening.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The last test does not pass BTW, but it doesn't pass on the current |
retorquere
added some commits
Apr 7, 2019
retorquere
force-pushed the
retorquere:PubMed_Central
branch
from
96f0220
to
9d5feb1
Apr 7, 2019
This comment has been minimized.
This comment has been minimized.
@dstillman could you clarify what you preference on merging multi-commit PRs is? Github does have, of course, the option to just squash on merge via GUI. Should I generally do this, or is the preferences to have the submitter squash into sensible commits (e.g. one for the code fix, one for the linting-related fixes), or something else? |
This comment has been minimized.
This comment has been minimized.
Yes, I think all tests on PDF pages currently fail. Not sure if that's fixable in the test-suite? Import into Zotero works fine. |
This comment has been minimized.
This comment has been minimized.
@dstillman previously explicitly requested the lint-fix commit and the functionality commit be kept separate when submitting a PR. |
This comment has been minimized.
This comment has been minimized.
Absolutely, I want them separate for review, too. But it makes things easier to squash everything into one commit from the online GUI when merging. |
This comment has been minimized.
This comment has been minimized.
Yes, I do think it's a good idea to keep lint commits separate post-merge — that way if we have to review the commit history later we can focus on what actually changed. For most multi-commit PRs, squashing is fine, since there's no need to keep a permanent history of every tweak that was made in response to feedback while the PR was under review. But for things that will have meaning later, I think it's worth asking the submitter to rebase at the end into logical commits. (And as shown above, |
retorquere commentedApr 7, 2019
Fixes #1925