DEV Community

Paramanantham Harrison
Paramanantham Harrison

Posted on • Originally published at learnwithparam.com

How your pull request title serves as a documentation for your code changes

Hope you all know what a pull request is πŸ˜‰

Often PRs are not well written, and it is hard to understand what the PR is about. In this article, we will learn how to write a good pull request title and how it can serve as a documentation for your code changes.

Short but descriptive title

Always write self explanatory pull request title to make it easier for the reviewer to understand what the PR is about.

# Less Descriptive
Fixing the bug

# More Descriptive
Fixing the bug in the login page
Enter fullscreen mode Exit fullscreen mode

Include the affected areas of the code / feature

This helps reviewers quickly identify the context of the modifications,

# Ambiguous
Update styling

# Specific
Update styling for the navigation bar
Enter fullscreen mode Exit fullscreen mode

Use action verbs

This creates a sense of action and purpose, and helps reviewers quickly identify the context of the modifications.

# Vague
Refactor code

# Actionable
Refactor authentication logic for enhanced security
Enter fullscreen mode Exit fullscreen mode

I will share a separate article on how to write a good commit message, also followup on how to write good pull request description later. For now, please share your comments on twitter on what else can be done to improve the pull request title 🀞

Top comments (1)

Collapse
 
martinkr profile image
Martin Krause

Great Post