در حال بارگذاری ...

Creating the Pull Request0:00

The time has come to create the pull request. If you go to the package on GitHub, either the master or your fork, you should see a little notification saying that you recently pushed to a branch, and from there you can directly create a pull request. So let's hit this big green button, compare and pull request. Different repositories have different rules on how to format the title, but prompts has nothing specific, so we'll just add a nice descriptive title. Adds reversible steps to prompts. I've already created a PR description, I'm not going to make you sit here and watch me write it out line by line, but I would like to go through it, because crafting a good PR description is one of the best ways to ensure that what you're doing is clear and

Writing a Strong PR Description0:46

write it out line by line, but I would like to go through it, because crafting a good PR description is one of the best ways to ensure that what you're doing is clear and make it more likely that your code is merged. Right off the bat I'm going to provide a very basic overview of what this PR does, so that they know immediately what they're looking at. You might even want to go ahead and create a simple quick screen recording so that you can demonstrate what it actually does without them ever having to clone your branch. The next thing I do is explain the purpose of this PR. Why am I creating it? Yeah, it might be a great idea, but is there a real use case? In the case of steps, I basically tell them that I'm terrible at typing, I make typos, I make mistakes, and at the moment

might be a great idea, but is there a real use case? In the case of steps, I basically tell them that I'm terrible at typing, I make typos, I make mistakes, and at the moment the only way to fix it is to cancel and start again. So I'm giving them my use case from personal experience. It's not something I've invented or created out of thin air, it's real, it's visceral, and that already gives them motive to at least look at the PR. In the next paragraph I explain what I've done to rectify the problem, and I give them clear instructions on how to actually use this PR. Then we go into even more detail in the usage section, starting with a very basic usage of what it looks like to create steps. You know how this looks now, but remember, this

Providing Usage Examples2:05

Then we go into even more detail in the usage section, starting with a very basic usage of what it looks like to create steps. You know how this looks now, but remember, this is the first time they see the code. So make sure it explains itself well, is clear, and you don't add too much extra code and extra detail that isn't important for the message you're trying to get across. Then you can go into some more interesting examples. For example, how do we prevent reverting? Here's a little code snippet to show you. What if you want custom revert logic? Here's a little code to show you. What about if you want to utilise previous responses? Again, descriptions followed by a real code example. And you can pull these code examples from the tests that you created, which you'll notice is what I've done here.

Summarizing and Thanking2:44

descriptions followed by a real code example. And you can pull these code examples from the tests that you created, which you'll notice is what I've done here. Finally, you're going to wrap up. You're going to once again summarise why you think this is a positive pull request, why you think it's worth them merging your code in. And I always like to finish with a thank you, because they put so much hard work, whether or not they're being paid. So much hard work into keeping the code clean, maintaining it, updating it. I just want to say thank you for all the work they are doing in taking the time to look at my code. So if you're happy, you can choose between drafting the pull request, which basically won't inform them that it exists. It will just put it there ready for you to play around.

Draft vs Submit PR3:22

So if you're happy, you can choose between drafting the pull request, which basically won't inform them that it exists. It will just put it there ready for you to play around with, perhaps get some initial feedback. Or in our case, I'm going to go straight ahead and hit create pull request.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟