From 68ee66c38c24b84c4665d046045337cf2a841fff Mon Sep 17 00:00:00 2001 From: AugistineCreates Date: Sat, 27 Jun 2026 19:01:17 +0100 Subject: [PATCH] Enhancement: Add PR template with security and performance checklists and CONTRIBUTING.md --- .github/pull_request_template.md | 31 +++++++++++++++++++++++++++++++ CONTRIBUTING.md | 16 ++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 CONTRIBUTING.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..34d6707f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,31 @@ +## Summary + + +## Type of Change +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Chore / Refactor (no functional changes) + +## Testing Done +- [ ] Unit Tests +- [ ] Integration Tests +- [ ] Manual Verification (e.g., iOS/Android UI checks) + +## Security Considerations +- [ ] Does this store user data securely (e.g., avoiding plain AsyncStorage for sensitive data)? +- [ ] Is token handling secure (no token exposure in logs or UI)? +- [ ] Are all user inputs validated? +- [ ] Is deep link handling safe from malicious payloads? + +## Performance Considerations +- [ ] Are React hooks (`useCallback`, `useMemo`) used appropriately to prevent unnecessary renders? +- [ ] Is `FlatList` optimized (e.g., using `getItemLayout`, `keyExtractor`)? +- [ ] Are asynchronous patterns handled correctly (e.g., `useEffect` cleanup to avoid memory leaks)? +- [ ] Have bundle size impacts been considered? + +## Checklist +- [ ] I have read the [CONTRIBUTING](CONTRIBUTING.md) guide. +- [ ] My code follows the style guidelines of this project. +- [ ] I have updated the documentation accordingly. +- [ ] Are there architectural changes? If so, is there an Architectural Decision Record (ADR)? diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..183fac71 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,16 @@ +# Contributing Guidelines + +Thank you for your interest in contributing to teachLink_mobile! + +## Pull Request Process +When submitting a Pull Request, you must fill out the provided PR template. The template ensures that all necessary considerations are accounted for before merge. + +Please review the `.github/pull_request_template.md` which includes: +- **Summary & Type of Change**: Describe what the PR does. +- **Testing Done**: List the tests performed. +- **Security Considerations**: Address concerns like secure data storage, token handling, input validation, and deep link handling. +- **Performance Considerations**: Address concerns like hook optimization (`useCallback`, `useMemo`), `FlatList` optimization, and asynchronous patterns. +- **Checklist**: General checks, including checking whether an Architectural Decision Record (ADR) is needed. + +## Architectural Changes +If your PR introduces a significant architectural change, please ensure an Architectural Decision Record (ADR) has been discussed or created and that it is checked off in the PR template.