This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
pushee/reviews.py

29 lines
497 B
Python

#!/usr/bin/env python3
import sys
from commands import MergeRequests, UpdateAssignees, Comments, Merge, Test
from constants import SUBMISSIONS
COMMANDS = {
"mrs": MergeRequests,
"update-assignees": UpdateAssignees,
"comments": Comments,
"merge": Merge,
"test": Test,
}
def main():
if len(sys.argv) < 2 or sys.argv[1] not in COMMANDS:
print("Invalid command")
exit(2)
COMMANDS[sys.argv[1]](SUBMISSIONS)()
if __name__ == "__main__":
main()