-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconstants.py
82 lines (70 loc) · 1.98 KB
/
constants.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
"""Constants"""
import os
FINISH_RELEASE_ID = "finish_release"
NEW_RELEASE_ID = "new_release"
# project types
WEB_APPLICATION_TYPE = "web_application"
LIBRARY_TYPE = "library"
VALID_PROJECT_TYPES = [WEB_APPLICATION_TYPE, LIBRARY_TYPE]
# web application types
DJANGO = "django"
HUGO = "hugo"
VALID_WEB_APPLICATION_TYPES = [DJANGO, HUGO]
# packaging tool types
NONE = "none"
NPM = "npm"
SETUPTOOLS = "setuptools"
GO = "go"
VALID_PACKAGING_TOOL_TYPES = [NONE, NPM, SETUPTOOLS, GO]
# versioning strategies
FILE_VERSION = "file"
NPM_VERSION = "npm"
PYTHON_VERSION = "python"
VALID_VERSIONING_STRATEGIES = [FILE_VERSION, NPM_VERSION, PYTHON_VERSION]
# deployment server types
RC = "rc"
CI = "ci"
PROD = "prod"
VALID_DEPLOYMENT_SERVER_TYPES = [CI, RC, PROD]
MINOR = "minor"
PATCH = "patch"
VALID_RELEASE_ALL_TYPES = [MINOR, PATCH]
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
GIT_RELEASE_NOTES_PATH = os.path.join(
SCRIPT_DIR, "./node_modules/.bin/git-release-notes"
)
YARN_PATH = os.path.join(SCRIPT_DIR, "./node_modules/.bin/yarn")
# github labels
ALL_CHECKBOXES_CHECKED = "all checkboxes checked"
DEPLOYING_TO_RC = "deploying to rc"
WAITING_FOR_CHECKBOXES = "waiting for checkboxes"
DEPLOYING_TO_PROD = "deploying to prod"
DEPLOYED_TO_PROD = "deployed to prod"
RELEASE_LABELS = [
ALL_CHECKBOXES_CHECKED,
DEPLOYING_TO_RC,
WAITING_FOR_CHECKBOXES,
DEPLOYING_TO_PROD,
DEPLOYED_TO_PROD,
]
FREEZE_RELEASE = "freeze release"
BLOCKER = "blocker"
BLOCKED = "blocked"
RELEASE_BLOCKER = "release blocker"
BLOCKER_LABELS = [
FREEZE_RELEASE,
BLOCKED,
BLOCKER,
RELEASE_BLOCKER,
]
# not github labels but used internally when calculating release statuses
LIBRARY_PR_WAITING_FOR_MERGE = "library PR waiting for merge"
STATUS_EMOJIS = {
WAITING_FOR_CHECKBOXES: "🕰️",
DEPLOYING_TO_PROD: "🕰️",
DEPLOYING_TO_RC: "🕰️",
ALL_CHECKBOXES_CHECKED: "🔔",
LIBRARY_PR_WAITING_FOR_MERGE: "🔔",
}
for label in BLOCKER_LABELS:
STATUS_EMOJIS[label] = "❌"