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

Talk Python's Mastodon Michael Kennedy's Mastodon