Require templated header / footer on matching files
Description
Method to allow easy insertion of header/footer text in files with names matching defined patterns and to check for and enforce its existence.
This will allow customers to easily handle a variety of situations that require specific information to appear at the top and/or bottom of certain types of files. These situations include (but are not limited to) the the following:
- Security classification
- Copyright information
- License information
These settings should be configurable overall for the server, for individual groups, or for individual projects.
Proposal
Web GUI:
- Drop-down links for header/footer templates (similar to .gitignore, etc.)
- Administrative configuration of the following on a per server / group / project basis:
- Templates for headers/footers
- Templates for matching file selection
- Rejection message
- Commit pass/fail REGEXP
Commit / push hook:
Implement a hook that fires on admin-selected files and that uses a REGEXP to check for required text at the top/bottom of each matching file at commit / push time. Non-conforming commits will be rejected with an appropriate error message
Links / references
http://www.cdse.edu/documents/cdse/Marking_Classified_Information.pdf
Documentation blurb
TBD - similar to the way other templates work
/cc: @pauldalmeida @victorwu