Skip to content

Commit 3676d29

Browse files
authored
Update leaderboard scoring (#74)
1 parent 04c5fc7 commit 3676d29

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def post_leaderboard():
144144
+ get_completed_issues(5, "New Feature", 7)
145145
+ get_completed_issues(5, "Technical Change", 7)
146146
)
147-
priority_to_score = {1: 4, 2: 4, 3: 2, 4: 1, 5: 1}
147+
priority_to_score = {1: 10, 2: 10, 3: 5, 4: 1, 5: 1}
148148
leaderboard = {}
149149
for item in items:
150150
assignee = item["assignee"]
@@ -164,7 +164,7 @@ def post_leaderboard():
164164
slack_markdown = get_slack_markdown_by_linear_username(assignee)
165165
markdown += f"{medals[i]} {slack_markdown}: {score}\n"
166166
markdown += "\n\n"
167-
markdown += "_scores - 4pts for high, 2pts for medium, 1pt for low_\n\n"
167+
markdown += "_scores - 10pts for high, 5pts for medium, 1pt for low_\n\n"
168168
markdown += f"<{os.getenv('APP_URL')}?days=7|View Bug Board>"
169169
url = os.getenv("SLACK_WEBHOOK_URL")
170170
requests.post(url, json={"text": markdown})

linear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ def by_assignee(issues):
279279
if assignee not in assignee_issues:
280280
assignee_issues[assignee] = {"score": 0, "issues": []}
281281
assignee_issues[assignee]["issues"].append(issue)
282-
# high - 4, medium - 2, everything else - 1
283-
priority_to_score = {1: 4, 2: 4, 3: 2, 4: 1, 5: 1}
282+
# high - 10, medium - 5, everything else - 1
283+
priority_to_score = {1: 10, 2: 10, 3: 5, 4: 1, 5: 1}
284284
score = priority_to_score.get(issue["priority"], 1)
285285
assignee_issues[assignee]["score"] += score
286286
# sort by the score

templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ <h4>
106106
Scores
107107
<small
108108
id="score-tooltip"
109-
data-tooltip="4pts for high, 2pts for medium, 1pt for low"
109+
data-tooltip="10pts for high, 5pts for medium, 1pt for low"
110110
style="font-size: 0.8em; opacity: 0.6;"
111111
></small>
112112
</h4>

0 commit comments

Comments
 (0)