An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
Codespaces Tips: How to Create Pull Requests Without Leaving Your Code Editor
Codespaces has been a game changer for the way I work with repos on GitHub. For example, I no longer clone repositories to my local machine since there isnt a need to do so anymore with Codespaces in the browser.
Last week, while pushing code to update an internal workflow, Codespaces asked me an interesting question. Once I hit enter after my regular git push
, a notification popped up asking if I wanted to open a PR in Codespaces with GitHubs Pull Request and Issues extension.
Usually, I would completely ignore these pop up messages but I was intrigued enough to select yes and what happened next completely blew my mind - ok, ok, slight exaggeration but I was impressed!
This beautifully intuitive UI popped up on my side panel showing me my branch, the main branch that I need to merge my changes into, a title box with my commit message and a description section for my PR needs. There was even an option to create the PR as a draft, see below:
At this point, I was not only intrigued, I was also impressed! Youre telling me that I dont need to exit my code editor (codespace) to create a PR?!
I continued creating the PR by hitting Create, which triggered a pop-up asking if I wanted to publish my changes in a new upstream branch and then create the PR.
I obliged, clicked Publish Branch, and my PR was created with another pop-up asking if I wanted to periodically run git fetch.
Color me impressed by this extension. Color me impressed.
But, just in case you dont get that pop-up asking if you want to open a PR, to create a PR in Codespaces, click on the GitHub icon in the editor. This will pull up a side panel option thats like a Pull Request Dashboard. Once there, click Create Pull Request as shown below, and create your PR!
If youve used the extension before in VSCode, youd already know how to do this and it works the same in Codespaces. What I did appreciate is that this extension built into Codespaces was intelligent enough to ask me if I wanted to use it.
Im super glad I clicked yes on that pop-up notification instead of ignoring it. It just goes to show that sometimes, pop-ups can be useful.
Have you tried this extension before? Or Codespaces? Let me know your thoughts in the comments and give GitHub Pull Request and Issues extensions a try!
Happy Coding!
Original Link: https://dev.to/github/codespaces-tips-how-to-create-pull-requests-without-leaving-your-code-editor-1la8
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To