Skip to main content

My Github Pull Request Template for React Native Projects

Β· 4 min read
Erik

I really like using pull requests templates in Github. They're not only useful to collect vital information about a pull request, but also can serve as a checklist reminder for the contributor.

As you can see in the template, I love clean code so it serves to remind team members to use ESLint and Prettier, though recently I have started using lint-stagedand husky to handle that during a pre-commit hook.

I also think that pull request templates don't have to be boring. They should be fun! That's why I like to sprinkle mine with emojis. πŸ’ͺπŸ˜ƒ

Here's a template I use for my React Native projects. You can use it as a starter template and tweak it for any of your projects as needed!

.github/PULL_REQUEST_TEMPLATE.md
# ✍️ Description (Why)

_Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change._

## 🎯 Changes Outline (What)

1.
1.

## πŸ”¬ Type of Change

Choose all that apply:

- [ ] N/A
- [ ] πŸš€ New feature (non-breaking change which adds functionality)
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ] 🧹 Refactor (doesn't add or remove features)
- [ ] ⚑️ Performance
- [ ] 🧺 Chore (dependencies, tooling, etc)
- [ ] πŸ““ Documentation Update
- [ ] πŸ§ͺ Tests

### Extras

Optional:

- [ ] πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
- **Describe**:
- [ ] 🚨 Security (concerns security)
- [ ] β€οΈβ€πŸ©Ή Hot fix (in between release emergency patch)

## πŸ“Ή Screenshots / Video

_None_

## πŸ’ͺ Contributors Testing Instructions

_How should **other contributors** manually test this Pull Request?_

- [ ] N/A

### 🎭 Personas

- while **unauthenticated**
- [ ] as Guest
- while **authenticated**
- [ ] as **Seller**
- [ ] as **Customer**

### πŸ—ΊοΈ Steps

1.
1.

## ✨ Self Test Checklist

### ✊ I manually tested on

- [ ] iOS [specify version here]
- [ ] iPhone 14 (**Required**)
- [ ] iPhone SE (**Required if visual change**)
- [ ] Android [specify version here]
- [ ] Android Phone [specify model here] (**Required**)
- [ ] PWA Mobile Safari on iPhone
- [ ] PWA Mobile Chrome on Android
- [ ] PWA Desktop Firefox
- [ ] PWA Desktop Chrome

_List any other relevant versions i.e. iOS version, Android version_

### 🎩 Persona Manual Tests

- while **unauthenticated**
- [ ] as Guest
- while **authenticated**
- [ ] as **Seller**
- [ ] as **Customer**

### ♻️ Automated Testing

Included automated tests

- [ ] unit tests (if applicable)
- [ ] functional tests (if applicable)
- [ ] component tests (if applicable)
- [ ] integration tests (if applicable)
- [ ] end to end tests (if applicable)

## 🧼 Best Practices Checklist

### 🫑 Code Quality: Readability and Maintainability

- [ ] My code follows the [style guidelines](https://example.com/link-to-your-best-practices) of this project
- [ ] I have linted my changes with ESLint (if applicable)
- [ ] I have formatted my code using Prettier (if applicable)
- [ ] My changes generate no new warnings (if applicable)

### 🀝 Code Review Facilitation

- [ ] I have performed a self-review of my own code
- [ ] I have included all files and commits necessary
- [ ] I have annotated my PR code, particularly in hard-to-understand areas to clarify certain changes (if applicable)
- [ ] I have made corresponding changes to the documentation (if applicable)

## Closes #issue_number, Closes external_issue_link, Closes (add orphan-pr label if no associate issue)
info

- [ ] in Github will output an HTML checkbox

info

For my order lists I like to use just 1.'s instead of 1., 2., 3., etc. By using 1.'s markdown will automatically do the incrementing for us.

1.
1.
1.