Effective PyCharm Transcripts
Chapter: Source control
Lecture: Pull requests in PyCharm

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So we have our PR open on GitHub and we want to push those changes
0:04 back into the working branch. Now of course I could do this in the browser and
0:11 Git hub but it turns out recent versions of PyCharm have really cool support for
0:15 this. One of the challenges of working with pull requests directly in GIT hub or
0:20 directly in git is you have these potential changes which could be merged in and you
0:25 would very likely want to say,
0:27 well let me do that merge,
0:29 have a look and explore the code and then decide do I actually want to accept
0:34 the poor request or not? So if you go over here notice we have this
0:38 poor request tab and we open it up,
0:41 Check it out right there, fixes.
0:42 48 ads version to the title and we double click that or hit that little
0:47 arrow. It shows us all sorts of details about it.
0:50 Here's the main comment. If there was a conversation which we didn't have,
0:54 you would see that here. But these are the things like when I did that
0:58 check in and tagged 48, it told me what's happening is the shaw of the
1:03 check in would have the reviewer and the labels and so on and I could just
1:07 flat reject this by closing the poor request or I could say merge.
1:11 It were ready to accept it.
1:13 One of the things I want to jump back real quick is I actually closed this
1:16 uh close this issue. I'm gonna go thinking oh it should have closed it when
1:20 we did that check in. It didn't do it because it wasn't going to the
1:23 main branch. But here with this PR we might get it to be able to
1:26 close. It's also not the default branch,
1:28 I'm not 100% sure it'll close it,
1:29 but let's let's see what happens when we do.
1:32 So I'm going to say this looks good.
1:33 Let's merge it. You put our comment here,
1:36 I'm happy to just let that happen.
1:38 Look at that, it's done.
1:39 If we go back to the list,
1:42 we hit refresh, it comes up and says it's out of date.
1:44 We hit refresh and then it says there's none open,
1:46 but we can go to closed and here's that one we just did with a whole
1:51 bunch of others from various reasons throughout the life of this project.
1:54 So very, very cool. Now,
1:56 the real test is what happened over on GIT hub.
1:59 You refresh it here, check it out right there is our merge change and again
2:07 because this is not the default branch,
2:09 I guess it didn't close it.
2:10 I'll just close it again. There we go.
2:12 We have our emerged pr and the final thing to realize is when we did that
2:16 that pushed the important change of adding the version title to the title back into
2:21 our code. So let's go to our project.
2:23 Close this thing up. So if we try to update the project,
2:26 I'll say no, no, it's already up to date when we merged it in
2:28 PyCharm. It actually got us the new version into our ref branch.
2:33 So it basically pulled this change down right there.
2:36 That was part of the pull request.
2:37 So it saves us a step of updating it to make sure our working branch.
2:40 Is it consistent with the PR that we just added?
2:43 Super cool. I don't think you notice the reason that I can see my details
2:48 about these projects potentially if they're private and so on is if I go over here
2:53 and I look for GIT hub under version control,
2:58 you can see I've registered my github account Michael
3:01 C Kennedy inside a PyCharm.
3:04 So PyCharm has access to my private Git hub repos, my issues.
3:09 It can make changes on my behalf.
3:11 For example approving emerging a pull request on this repository.
3:15 This is a public repository. You can read it but not everyone can merge pull
3:19 requests. They can only view them or comment on them.
3:22 Right? So you want to make sure that you go here and you add your
3:25 account so log in to github with whatever.
3:29 Right, We don't need that right now.
3:30 But it will open up in the browser,
3:31 you log in there. Tell it okay
3:33 And then it'll pop back over here and you have access to your github private repos,
36:03 you have access to making changes like approving requests like what we diid