> ## Documentation Index
> Fetch the complete documentation index at: https://styleguide-nextjs.2smooth.io/llms.txt
> Use this file to discover all available pages before exploring further.

# การทำ Pull Request

export const CLASSIFICATION_TERMS = {
  positive: {
    must: '+MUST',
    should: '+SHOULD',
    optional: '+OPTIONAL'
  },
  negative: {
    must: '-MUST',
    should: '-SHOULD',
    optional: '-OPTIONAL'
  }
};

export const TextHighlight = ({text = '', positive = false, negative = false}) => {
  let textColor = undefined;
  let bgColor = undefined;
  if (positive) {
    textColor = 'black';
    bgColor = 'oklch(72.77% 0.1798 128.27)';
  }
  if (negative) {
    textColor = 'black';
    bgColor = 'oklch(51.73% 0.2119 28.74)';
  }
  return <div style={{
    display: 'inline-block',
    fontWeight: 'bold',
    paddingLeft: '4px',
    paddingRight: '4px',
    border: '1px solid',
    borderRadius: '8px',
    color: textColor,
    backgroundColor: bgColor
  }}>
      {text}
    </div>;
};

## ขั้นตอนที่ 1

<img src="https://mintcdn.com/2smooth/3Cd1Op2cOOoe_EES/assets/images/git-pr-1.png?fit=max&auto=format&n=3Cd1Op2cOOoe_EES&q=85&s=d029e078d5b352e20c0be252d33fb670" alt="create-pull-request" width="1881" height="613" data-path="assets/images/git-pr-1.png" />

1. ไปที่ tab `Pull Request`
2. กดปุ่ม `New Pull Request` เพื่อสร้าง

## ขั้นตอนที่ 2

<img src="https://mintcdn.com/2smooth/3Cd1Op2cOOoe_EES/assets/images/git-pr-2.png?fit=max&auto=format&n=3Cd1Op2cOOoe_EES&q=85&s=790dcdca058ac8921ac817b4c6d4c255" alt="define-pull-request" width="1242" height="694" data-path="assets/images/git-pr-2.png" />

1. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> เลือก branch ที่จะทำการ Pull Request
   * ตรวจสอบสัญลักษณ์ทางขวา ถ้าเป็นเครื่องหมาย กากบาท อาจมีปัญหาได้ ลองพูดคุยภายในทีม<br />
     และ/หรือ ให้ติดต่อ ผู้รับผิดชอบ/ผู้บริหาร
   * `compare` คือต้นทางที่ขอให้มีการ Pull
   * `base` คือ ปลายทางของการ Pull Request
2. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> ทำการใส่หัวข้อของการ Pull Request โดยสรุปใจความ
3. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> อธิบายรายละเอียดโดยสรุปของ Pull Request นี้ ว่ามีการเปลี่ยนแปลงอะไรไปบ้าง
4. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> เลือก ผู้รับผิดชอบ/ผู้บริหาร ในการมา อนุมัติ Pull Request
5. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.optional } /> เลือก ผู้เปิด Pull Request

## ขั้นตอนที่ 3

<img src="https://mintcdn.com/2smooth/3Cd1Op2cOOoe_EES/assets/images/git-pr-3.png?fit=max&auto=format&n=3Cd1Op2cOOoe_EES&q=85&s=64b4f459784d9473a8e30cb1e5d3dd13" alt="result-pull-request" width="1256" height="703" data-path="assets/images/git-pr-3.png" />

1. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> ตรวจสอบชื่อของ Pull Request
2. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> ตรวจสอบข้อมูลโดยสรุปของ Pull Request
3. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.optional } /> ตรวจสอบรายการ commits ที่มีใน Pull Request นี้
4. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.should } /> ตรวจสอบสถานะของ Pull Request
5. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.should } /> หากข้อ 1 หรือ 2 ไม่ถูกต้อง ควรแก้ไขให้เรียบร้อย
6. <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> copy link เพื่อทำการสื่อสารกับคนในทีม และ<br />ผู้รับผิดชอบ/ผู้บริหาร ว่ามีการเปิด Pull Request
