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

30 lines
497 B
Python
Raw Normal View History

2019-11-22 15:03:21 +01:00
#!/usr/bin/env python3
2019-11-22 15:03:21 +01:00
import sys
2019-11-22 20:12:37 +01:00
from commands import MergeRequests, UpdateAssignees, Comments, Merge, Test
from constants import SUBMISSIONS
2019-11-22 15:03:21 +01:00
COMMANDS = {
"mrs": MergeRequests,
"update-assignees": UpdateAssignees,
"comments": Comments,
"merge": Merge,
"test": Test,
2019-11-22 15:03:21 +01:00
}
def main():
2019-11-22 20:17:02 +01:00
if len(sys.argv) < 2 or sys.argv[1] not in COMMANDS:
2019-11-22 15:03:21 +01:00
print("Invalid command")
exit(2)
COMMANDS[sys.argv[1]](SUBMISSIONS)()
2019-11-22 15:03:21 +01:00
if __name__ == "__main__":
main()