กราฟเขียว ๆ ใน Github คืออะไร? แล้วมันมากันได้อย่างไร

เคยเห็นกล่องเขียว ๆ หน้าตาแบบนี้มั้ยครับ ?

ซึ่งจะอยู่ป้ายใต้หน้าของผู้ใช้งานใน github.com ประมาณนี้

มันคือกราฟแสดงความมีส่วนร่วมในรอบ 1 ปีที่ผ่านมานับจากวันปัจจุบัน 1 กล่องสี่เหลี่ยม แทน 1 วัน สียิ่งเข้มแปลว่า วันนั้นเรามีส่วนร่วมเยอะมาก สีเทาแปลว่าไม่มีเลยในวันนั้น ส่วนจำนวนรวม ถ้าดูจากรูปด้านบนจะอยู่ทางซ้ายบนของกล่อง ในรูปตัวอย่างแสดง 2,670

ที่นี้ถ้าอยากจะล่าแต้มจะต้องทำอย่างไรบ้าง

ซึ่งกฎที่ว่านี้อ้างอิงจาก Learn how we count contributions

  • เปิด issue
  • เปิด pull-request

ซึ่งทั้งสองข้อต้องเกิดใน standalone repository ที่ไม่ใช่ fork repository

หรือเกิดจากการ commits จะต้องตรงตามเงื่อนไขดังต่อไปนี้

  1. email ที่ใช้ commit ต้องเป็น email ที่ผูกกับ account นั้น ๆ ใน github.com และผ่านการ verify email แล้ว
  2. ต้องเกิดใน standalone repository ที่ไม่ใช่ fork repository
  3. commit ต้องเกิดใน branch default ซึ่งปกติจะเป็น branch master หรือใน branch gh-pages ซึ่งเอาไว้ทำ project page เท่านั้น
  • ** ทั้งนี้ ถ้าทำใน branch อื่น ๆ แล้วถูก merge เข้า branch default จะถูกนับด้วย แต่ถ้าไม่เคยถูก merge เลยจะไม่นับ

หรือข้อใดข้อหนึ่งต่อไปนี้

  1. เป็น collaborator ใน repository ต่าง ๆ หรือ เข้าไปเป็นสมาชิกใน organization ต่างๆ
  2. ได้ทำการ fork repository
  3. เปิด issue หรือ pull-request
  4. ติดดาวให้ repository

จะเห็นว่าคะแนนการมีส่วมมาได้จากหลายทางมาก ทั้งนี้มีคน สร้างบอท หรือเขียนโปรแกรมเพื่อทำการ commit และให้ graph สีเขียวข้างบนเป็นคำพูดหรือตัวการ์ตูน สามารถดูได้จาก Google Search for Image: Github contribution

ขอ Github จงอยู่กับท่าน
สวัสดี

odds.team

Odds Team

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade