repobee / repobee-sanitizer

A plugin for sanitizing master repositories before distribution to students
MIT License
2 stars 3 forks source link

Add `sanitize-repo` command #14

Closed slarse closed 4 years ago

slarse commented 4 years ago

A command to automatically sanitize all files in a repo.

Possibly in two different modes: discover or dictate.

Discover mode:

# scan through all files to find sanitize marks, sanitize any file with a sanitize mark
$ repobee sanitize-repo --discover-files
Sanitized src/Main.java
Sanitized README.md
Sanitized docs/README.md

Dictate mode, with a files.txt that only specifies src/Main.java

# sanitize only the files specified in files.txt
$ repobee sanitize-repo --files-list files.txt
Sanitized src/Main.java

If in addition you specify --target-branch, the sanitized worktree of the repo is copied to the target branch and a commit is made.