-
Notifications
You must be signed in to change notification settings - Fork 0
/
weekly-release.py
35 lines (26 loc) · 1.12 KB
/
weekly-release.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from datetime import date
from utils import get_week, get_quarter, get_year
from trello_manager import TrelloManager
from google_sheet_manager import GoogleSheetManager
def main():
tm = TrelloManager()
sm = GoogleSheetManager()
rm = ReleaseManager(trello_manager=tm, sheet_manager=sm)
today = date.today()
rm.release(week=get_week(today),
quarter=get_quarter(today),
year=get_year(today),
dry_run=False,
)
class ReleaseManager:
def __init__(self, trello_manager=None, sheet_manager=None):
self.trello_manager = trello_manager
self.sheet_manager = sheet_manager
def release(self, week=None, quarter=None, year=None, dry_run=False):
print("=== Starting Release ({}Q{} W{}) ===".format(year, quarter, week))
print("=== Release Trello ===")
self.trello_manager.release(week=week, quarter=quarter, year=year, dry_run=dry_run)
print("=== Release Weekly Planner ===")
self.sheet_manager.release(week=week, quarter=quarter, year=year, dry_run=dry_run)
print("=== Release Complete ===")
main()