docs: บันทึกกับดัก repo ใหม่ที่ CI ไม่ยอมรัน + CLAUDE.md ของ repo นี้ - #3
Merged
Conversation
…epo นี้ ตอนตั้ง CI ให้ repo นี้เจอเองว่า repo ที่ยังไม่เคยมี workflow บน default branch จะไม่รัน CI ให้ ถึงไฟล์จะอยู่บน branch ของ PR แล้วก็ตาม ไม่มี check ขึ้นเลย และ actions/workflows คืน 0 ทั้งที่ Actions เปิดอยู่ ทีมจะเจอทุกครั้งที่ตั้ง repo ใหม่ จึงเขียนวิธีวินิจฉัยและลำดับที่ถูกไว้ เพิ่ม CLAUDE.md ให้ repo ตัวเอง — เน้นข้อห้ามที่เฉพาะกับ repo นี้จริง ๆ คือห้ามทำให้ gate job ชื่อ 'ci' ในไฟล์ template หายไป และห้ามมีข้อมูล จริงหลุดเพราะ repo เป็น public ยังไม่เพิ่ม CODEOWNERS เพราะ repo มีคนเดียว ใส่ไปก็ไม่มีผลจริง เหตุผลบันทึกไว้ใน CLAUDE.md แล้ว Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dru5ECsrJrqhTfUhUvDsqw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ทำไมต้องเปลี่ยน
ตอนตั้ง CI ให้ repo นี้เจอกับดักจริงที่ไม่ได้อยู่ในเอกสาร: repo ที่ยังไม่เคยมี workflow บน default branch จะไม่รัน CI ให้ ถึงไฟล์จะอยู่บน branch ของ PR แล้วก็ตาม — ไม่มี check ขึ้นเลย และ
actions/workflowsคืน 0 ทั้งที่actions/permissionsบอกว่าenabled: trueทีมจะเจอทุกครั้งที่ตั้ง repo ใหม่ และถ้าเผลอตั้ง required check ก่อน repo จะ merge อะไรไม่ได้ถาวร
เปลี่ยนอะไร
docs/04— หัวข้อใหม่ "ข้อยกเว้น: repo ที่เพิ่งสร้างใหม่" พร้อมคำสั่งวินิจฉัย 3 บรรทัด, ลำดับที่ถูก และวิธีหาชื่อ check ที่ใช้ได้จริงdocs/99— เพิ่มแถวในตารางแก้ปัญหาCLAUDE.md— ของ repo นี้เอง (57 บรรทัด) เน้นข้อห้ามที่เฉพาะกับ repo นี้: ห้ามทำให้ gate job ชื่อciในไฟล์ template หายไป และห้ามมีข้อมูลจริงหลุดเพราะเป็น public.github/PULL_REQUEST_TEMPLATE.md— ใช้ของตัวเองตามที่แจกให้ทีมที่ตั้งใจไม่ทำ
ไม่เพิ่ม
CODEOWNERS— repo มีคนเดียว ใส่@monthop-gmailเป็นเจ้าของทุกไฟล์แล้ว GitHub จะข้ามให้อัตโนมัติเพราะ approve PR ตัวเองไม่ได้ ได้ไฟล์ที่ดูเหมือนมีมาตรฐานแต่ไม่ทำอะไรเลย ซึ่งแย่กว่าไม่มี เหตุผลและเงื่อนไขที่จะเพิ่มบันทึกไว้ในCLAUDE.mdแล้วทดสอบยังไง
ผ่านทั้งหมด — รันด้วย shellcheck 0.11.0 และ pyyaml เหมือนที่ CI ใช้ (ไม่ใช่รันแบบข้าม shellcheck)
ผลกระทบ
เป็นเอกสารและ config ของ repo ตัวเอง ไม่แตะ template ที่ทีมใช้อยู่