GitHub pull requests

Talk about anything
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

GitHub pull requests

06 Sep 2018, 04:59

Hello. Say someone submitted a GitHub pull request to you, and you liked it, apart from one typo in a comment. Is it easy to correct that typo and accept the pull request, or does it become an entirely new pull request, or does it become a two-part pull request, or what. Thanks.

Links:
[AHK v1.1/v2.0 pull requests]
Pull Requests · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/pulls
[AHK v1.1 commits]
Commits · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/commits/master
[AHK v2.0 commits]
Commits · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/commits/alpha
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Guest

Re: GitHub pull requests

06 Sep 2018, 06:48

You can ask if they would like to correct it, pull requests can be edited, so no need to create a new one.

Or if you don't mind doing it yourself, pull it locally first, edit it, merge it and push it back to GitHub (your edit will be visible in the commit history of course)
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GitHub pull requests

06 Sep 2018, 07:45

Thanks a lot for your answer. A lot of the best posts come from Guests.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: GitHub pull requests

06 Sep 2018, 09:13

jeeswg wrote:Hello. Say someone submitted a GitHub pull request to you, and you liked it, apart from one typo in a comment. Is it easy to correct that typo and accept the pull request, or does it become an entirely new pull request, or does it become a two-part pull request, or what. Thanks.
pull requests initiate from a branch from one repository, and request to be merged into a branch of another repository

typically the workflow is like this:

1. the main repo exists in Lexikos/AHK_L in its MASTER branch
2. you fork (copy) the repo into your own account at jeeswg/AHK_L
3. you create a new branch in your own repo with some changes you want to make, say a bugfix in branch BUGFIX1
4. you add some changes in your BUGFIX1 branch so you don't affect your main branch
5. you then create a pull request to merge your changes from the BUGFIX1 branch in your repo into the MASTER branch in the main repo

now, these web based git services such as github or gitlab will track your branch in their web UI, so it will update the PR automatically whenever you add new commits to your BUGFIX1 branch. so yes, you can just edit your typo without needing to create a whole new PR

example:

https://github.com/Lexikos/AutoHotkey_L/pull/27

1. at the top of that link, you can see fincs has created a new branch named "v2-onexit-onclipboardchange" and he wanted to merge it into the "alpha" branch in Lexikos repo (Lexikos uses the "alpha" name to represent the v2 branch)
2. fincs writes a post with a description of his proposed changes
3. underneath that, you can see github tracks 3 commits that fincs had added to his onexit branch. these were his changes and updates
4. Lexikos and joedf comment on the proposed request. Lexikos prefers a certain code style for the {braces} and asks that it be changed
5. github tracks 2 more commits that fincs makes to his "v2-onexit-onclipboardchange" branch
- the first commit, fincs merges the upstream 'alpha' branch back into his onexit feature branch. this is because he originally created the PR in april. Lexikos didn't comment until June, and presumably the v2 alpha branch had added more updates since then, so fincs wanted to clean up his PR so that his branch would match the latest stable copy of Lexikos' repo
- the second commit, fincs makes the code formatting change as Lexikos previously requested
6. a few more comments, then Lexikos is finally happy and merges

you may also want to read up on the philosophy behind this version control systems like git, and start playing around locally. but i didn't fully start grasping it until i actually started using it

OffTopic:
theres no problem with you not understanding this and trying to learn. that's good. but, in the other thread, you were all critical of github and pullrequests and how all the development and discussion was taking place "behind your back" so to speak. the point i'm trying to make is, when you don't even understand something, you are not in the place to be making claims or demands about when and where discussion should be taking place. you should be coming from an open mindset of "hey i notice some development is going on over at github, what is all that about?" (like the mindset you've taken with this thread), rather than the mindset of "i dont like this so it shouldn't be done this way"

User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GitHub pull requests

09 Sep 2018, 22:34

- Thanks for the info.
- Great link re. source code style, thanks.
offtopic
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: GitHub pull requests

09 Sep 2018, 22:51

After a feature has been added in code its extremely unlikely to ever get removed. Regardless of whether it was added by an accepted pull request or made by lexikos. No amount of discussion on this forums are likely to change that.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GitHub pull requests

09 Sep 2018, 22:55

- Thank you nnnik, interesting point. Although in the AHK v2 alpha stage, there have been some things that have gone back and forth like: more use of %% to dereference, then less, making commands have a return parameter, then not, and, LoopXXX as well as Loop XXX, then not. At least those three things that I can think of.
- If 'things once changed remain fixed' is a truism, more reason to have all the big discussions early and in one place.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: GitHub pull requests

10 Sep 2018, 00:33

Those were not things added in Pull Requests or? And if we should have a discussion in the right place it would be github the home of the AutoHotkey source.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GitHub pull requests

10 Sep 2018, 00:57

Those were not things added in Pull Requests or?
- Here's a GitHub pull request being retrospectively discussed on the AHK forums.
<> no longer acceptable as a comparison operator - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=55460
- Am I surprised? No.
- If certain pull requests would have significant ramifications, it would be wise to introduce those ideas at the AHK forums first.
And if we should have a discussion in the right place it would be github the home of the AutoHotkey source.
- Is GitHub the right place though?
- The AutoHotkey forums are better for feature and source code discussions, they are the right place. E.g. you can only discuss *one* pull request per GitHub pull request thread, you can't consider the larger picture.
- It all gets discussed here eventually anyway, just that now we have important points scattered in more places.
- I see GitHub as useful for tracking source code changes, that's it. There can still be more minor pull request discussions there for convenience.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 35 guests