tusharzalte / tusharesume

Apache License 2.0
35 stars 76 forks source link

Readme edit #185

Closed ZapeeoSheikh closed 1 year ago

ZapeeoSheikh commented 1 year ago

name: Pull Request Template

on: pull_request: types:

jobs: pr-template: runs-on: ubuntu-latest

steps:
  - name: Check PR title
    run: |
      title=$(git log --pretty=format:%s origin/main..HEAD)
      if [[ $title != *"JIRA-"* ]]; then
        echo "Error: PR title must include a JIRA ticket number"
        exit 1
      fi

  - name: Check PR description
    run: |
      description=$(git log --pretty=format:%b origin/main..HEAD)
      if [[ $description != *"JIRA-"* ]]; then
        echo "Error: PR description must include a JIRA ticket number"
        exit 1
      fi

  - name: Request more information
    run: |
      echo "👋 Thank you for your contribution! To help the reviewer understand your changes better, please provide the following information:"

      echo ""
      echo "## Description"
      echo ""
      echo "<!-- Please provide a brief summary of your changes. -->"
      echo ""

      echo "## Why This PR ?"
      echo ""
      echo "<!-- Why is this change necessary? What problem does it solve? -->"
      echo ""

      echo "## How Has This Been Tested?"
      echo ""
      echo "<!-- Please describe the tests that you ran to verify your changes. -->"
      echo ""

      echo "## Screenshots (if applicable)"
      echo ""
      echo "<!-- If applicable, add screenshots to help explain your changes. -->"
      echo ""

      echo "## Related Issues"
      echo ""
      echo "<!-- If this PR is related to any issues, please mention them using the GitHub issue linking syntax (e.g., 'Fixes #123', 'Closes #456'). -->"
      echo ""

      echo "## Types of Changes"
      echo ""
      echo "<!-- What types of changes does your code introduce? Put an `x` in the boxes that apply. -->"
      echo "- [ ] Bug fix (non-breaking change which fixes an issue)"
      echo "- [ ] New feature (non-breaking change which adds functionality)"
      echo "- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)"
      echo "- [ ] Documentation update"
      echo ""

      echo "## Checklist"
      echo ""
      echo "<!-- Put an `x` in the boxes that apply. -->"
      echo "- [ ] My code adheres to the established style guidelines of this project"
      echo "- [ ] I have conducted a self-review of my code"
      echo "- [ ] I have commented my code, particularly in hard-to-understand areas"
      echo "- [ ] I have made corresponding changes to the documentation"
      echo "- [ ] My changes generate no new warnings"
      echo ""