Your team requires commit messages shaped like type: subject where:
typeis one of:feat,fix,docs,chore- a colon and a single space follow the type
- the subject is non-empty and the TOTAL length is ≤ 50 characters
Read one commit message from stdin. Print OK if it passes, otherwise REJECTED.
Examples:
fix: raise db timeout to 5s → OK
update stuff → REJECTED (no valid type)
feat:no space → REJECTED (missing space)
Hint: msg.split(": ", 1) and check the parts.