Mention Claude in PRs0:09
All right, so now imagine this, let's say somebody on your team submits a PR and you're on GitHub and you are reviewing it and you think to yourself, you know what? I wish we had asked Claude to do such and such. Well now even within GitHub, you can simply mention Claude to have it do the work you need. It's actually very, very cool. Let me show you now before we can illustrate this feature. Of course, I need a PR to work with.
Create Bookmarking PR0:28
Let me show you now before we can illustrate this feature. Of course, I need a PR to work with. So why don't we quickly whip one up. I'm in the Laravel workshop project again, and we're gonna work on bookmarks. So from the terminal, I'm gonna check out a branch for this feature bookmarking, and then I'm gonna use Laravel idea to quickly whip up a Laravel model. And I'm gonna name it a little differently than I normally
to quickly whip up a Laravel model. And I'm gonna name it a little differently than I normally would, and you'll see why shortly, we'll call it post bookmark. And I'm gonna set up some relations. A bookmark belongs to a post, but it also belongs to a user. So we'll have a migration and a factory, and that should be good to go. All right, so now we have our migration, we have our model. This is good. And let's just imagine this encompasses the
All right, so now we have our migration, we have our model. This is good. And let's just imagine this encompasses the full feature, which it doesn't. Okay, from the terminal, let's add everything and we'll say implement bookmarking. All right, let's, uh, push this up to GitHub. So here's our feature, and then I have the GitHub CLI installed. So I can create a PR directly from the terminal. If you don't just Google, uh, GitHub, CLI
So I can create a PR directly from the terminal. If you don't just Google, uh, GitHub, CLI and you'll have it in 20 seconds. So I can say GitHub pr, create title, add. Once again, look marking, and the body is, this should be all you need. What a lie. All right, so we give it a run and here we go. We have our pull request. Let's have a look on GitHub. All right, here we are. And sure enough, one pull request to add bookmarking.
All right, here we are. And sure enough, one pull request to add bookmarking. And here are the changed files. Okay, so let's imagine I am the project manager or the, um, the dev team lead. And as I'm looking at this, I'm thinking, all right, this looks fine, but you know what, let's not call it post bookmark. I just wanna call it bookmark. So I could wait for the person to make this fix
Install Claude GitHub App2:16
I just wanna call it bookmark. So I could wait for the person to make this fix and that would be fine of course. But in situations like this, we can just ask Claude to do it directly from the discussion here. Here's how we can allow for that From the terminal. I'm gonna boot up Claude directly and I'm gonna run a command called install GitHub app. Alright, so let's expand this and it's gonna say, all right, are we going to install
Alright, so let's expand this and it's gonna say, all right, are we going to install for the current repository? Yes. Here we need to grant permission. If I scroll down, only the selected repository, we'll look for workshop. There it is, and we will authorize. All right, with that done, let's proceed. Now, do we want to tag Claude and also have it perform automatic code reviews?
Now, do we want to tag Claude and also have it perform automatic code reviews? For now, why don't we just have, uh, the ability to tag it. All right, let's create a token authorize. Alright, so now the next step is, uh, they have created a PR for a repository that adds the GitHub action. So we can take a look at that right now. So here it is, right here. Add cloud code, GitHub workflow. That looks good. We'll create that. We can take a look at what's going on here.
Request Rename via Claude3:25
That looks good. We'll create that. We can take a look at what's going on here. Just sets up the workflow here, don't worry about it. And now we can go ahead and merge this in. All right, and we're all set. So that should be everything we need. Let's come back to our pr and now I'm just gonna ask Claude to make the tweak for us. I will mention Claude and say change post bookmark to simply
Watch Workflow Run3:47
I will mention Claude and say change post bookmark to simply bookmark and then update related files as needed. All right, so this is pretty cool. So I'm gonna leave this comment. It will pick up on that and it will trigger a workflow. So if we come up here to actions, and here it is. So it's already running. We can see, yeah, it's literally installing claw
So it's already running. We can see, yeah, it's literally installing claw and it's going to run Claude using the prompt that we provided, uh, within that comment there. So if we give this a fast forward and switch back to the pr, if I scroll down, oh, yep, it's already done. What's cool about this is it's dynamic by the way. So you'll see the, uh, the items check as they are completed.
Review Claude Changes4:30
So you'll see the, uh, the items check as they are completed. So here's the summary. It renamed post bookmark to bookmark, and of course it updated, uh, the migrations and the factories as needed. So now let's take a look. And now we have a bookmark class and a bookmark factory. And of course the migration, uh, should create a bookmarks table. This is what we want.
should create a bookmarks table. This is what we want. And now I could go ahead and merge it in. So cool.
