Open brando90 opened 7 years ago
note git also tracks via git username too.
is there a way to enforce this?
See #39
@hairuoguo but @qianli wants there to be an actual typed string per question python file (beyond git keeping track). For example when u download the code or not using git one doesn't know the authorship.
It looks like this is possible using git pre-commit hooks: https://stackoverflow.com/questions/7291186/git-warn-before-committing-if-string-appears-in-source-or-diff
So it looks like it won't be possible to set up a client-set hook that rejects invalid commits using Github (it is only possible if we set up a remote master on our own server that lets us run our own checks on pushes). I'm writing a hook that will run client-side (to fail commits if the authorship information is not there) and which we can install via an install.sh file, but ultimately there is no way to prevent people from removing that hook and committing their code anyway. Maybe we can have this first as a temporary fix (when only MIT students are involved with question creation), and then set up a server-side hook once this project involves public submissions?
I don't know what a good solution would be. I didn't even consider rejecting commits. I thought we could just do pull requests and have it humans check it or something. Maybe we can think about this after the more important/main features of the framework are up.
maybe format is a comment with full name and email.