DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Clark Ngo
Clark Ngo

Posted on

Simple and Better Pull Requests

Follow Me, Shout Out, or Give Thanks!

Please πŸ’– this article. a small thing to keep me motivated =)
Twitter: @djjasonclark
Linkedin: in/clarkngo
Note: if there are technical jargons here, that is by design (its a way for me to impart my experience as software engineer). I'd like readers to expand their tech jargon dictionary. you can google or leave a comment. 😊

Are you guilty of naming your commits and PRs (pull requests) such as add button, fix bug on form, etc.?

Are you having a hard time linking this to a user story/task/ticket?

Say no more.

Why do we need this? πŸ€”

Well... gives us more info. new code changes can lead to... breaking the application (hoping its not a production pool and serving lots of traffic) 😬

With PR integration to a project management tool, It adds visibility to managers. They don't need to always look at your code repository (like GitHub) to know the status of a feature request or bug fix.

Linking your ticket and PRs - that lazy manual way

If you have a ticket with title: app-1234 enhance-response-performance, then before you push your code base, then use this as commit message:

git commit -m 'app-1234 enhance-response-performance'
Enter fullscreen mode Exit fullscreen mode

In this way if something breaks, then when you do RCA (root cause analysis) it easier to track down, and get more information, instead of just the owner. Then we can do the necessary fix. Maybe rollback the latest manifest deployed, or do a roll forward fix instead.

Bonus tip:
don't know who wrote that code line?

git blame Filename.java
Enter fullscreen mode Exit fullscreen mode

want more visualization in git (helpful for very active code bases with lots of contributors and branches)? Download SmartGit.

Automate that manual process

Enter webhooks (do something when event happens)

  • when you create a new PR with the same jira title (well just appname-1234 without the extra text might work already), then it will update your JIRA ticket with the status of that PR.

How to automate

Bonus

Jira
what is Jira? It is a popular project management tool. How popular? Jira market share is 44.11% with more than 72391 companies using this software. Data from Datanyze

A tool where most developers dread. Story points? estimate? can I just work?

What creating button takes 5 days when hooking up and reading/writing to a database took 1 day? πŸ€ͺ

JIRA

Top comments (0)

Head to your account's Settings to...

🌚 Enable dark mode
πŸ”  Change your default font
πŸ“š Adjust your experience level to see more relevant content