Skip to content

Pull Request (PR) Guidelines – Sentinel Repository

Kumar, Manish edited this page Aug 13, 2025 · 1 revision

Pull Request Creation Guide

This document provides a step-by-step guide for creating a Pull Request (PR) in the Sentinel repository, following the workflow and conventions defined in the .github workflows.


1. Create a New Branch

  • Ensure you are on the latest main branch:
    git checkout main
    git pull origin main
  • Create a new branch from main with a meaningful name:
    git checkout -b feature/short-description
    Examples:
    • feature/add-user-authentication
    • bugfix/fix-login-redirect

2. Make Your Changes

  • Implement your changes in the codebase.
  • Follow coding standards and style guidelines.

3. Run Tests Locally

  • Before committing, run tests locally to ensure nothing is broken.
    mvn clean install

4. Commit Your Changes

  • Stage and commit changes with a clear message:
    git add .
    git commit -m "feat: add user authentication flow"
    Use Conventional Commits for commit messages:
    • feat: for new features
    • fix: for bug fixes
    • docs: for documentation updates
    • refactor: for code refactoring
    • test: for adding/modifying tests

5. Push to Remote

git push origin feature/short-description

6. Create a Pull Request (PR)

  • Go to the Sentinel GitHub repository.
  • You will see a "Compare & pull request" button — click it.
  • Fill in the PR template:
    • Title: Short and descriptive.
    • Description: Explain the changes, include screenshots/logs if applicable.
    • Related Issue: Mention the issue number (e.g., Closes #42).
    • Checklist: Ensure all required checkboxes in the PR template are ticked.

7. Link to Jira Ticket

  • If applicable, link the PR to a Jira ticket using the ticket ID in the PR description.

8. PR Review Process

  • Assign reviewers from the team.
  • Wait for feedback and make necessary changes:
    git add .
    git commit -m "fix: address review comments"
    git push origin feature/short-description

9. Workflow Automation

  • The .github workflows will automatically run:
    • Build & Test checks.
    • Linting.
    • Security Scans.
  • Ensure all checks pass before requesting a merge.

10. Merge the PR

  • Once approved and all checks pass, merge the PR:
    • Choose Squash and merge for clean history.
    • Delete the feature branch after merging.

Following this process ensures that the CI/CD pipelines defined in .github/workflows run smoothly, and that your contribution is reviewed and merged efficiently.