Skip to content

Commit fd3691f

Browse files
committed
fix double counting progress in PR comment, bump version
1 parent 899d7b2 commit fd3691f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "OK"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
edition = "2024"
55

66
[dependencies]

src/pr.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,28 @@ impl PullRequestReport {
155155

156156
let size_diff = progressions
157157
.iter()
158+
// ghetto hack to stop double counting progress
159+
.filter(|x| x.0.name != ".text")
158160
.map(|x| x.0.size_difference)
159161
.sum::<i64>();
160162
let size_direction = if size_diff >= 0 { "+" } else { "" };
161163

162164
let ok_rating = match size_diff {
165+
diff if diff >= 10_000 => {
166+
"If I could feel emotions, I would be crying tears of joy right now."
167+
}
163168
diff if diff >= 5_000 => "You are a decomp GOD, can I have your autograph?",
164169
diff if diff >= 2_000 => "Amazing contribution, you are the decomp GOAT 🐐",
165-
diff if diff >= 1_000 => "A Fantastic contribution! ✨🎉",
166-
diff if diff > 750 => "Ay, dios mio, gracias por la contribución!",
170+
diff if diff >= 1_000 => "A fantastic contribution! ✨🎉",
171+
diff if diff > 750 => "Ay, díos mio, gracias por la contribución!",
167172
diff if diff > 500 => "A solid contribution, Спасибо!",
168173
diff if diff > 250 => "A decent contribution. Thank you!",
169-
diff if diff < 100 => "A small but commendable contribution",
174+
diff if diff >= 100 => "A fair and commendable contribution",
175+
diff if diff == 0 => "Zero progress? What are you up to? 👀",
176+
diff if diff < 100 => "A small contribution, every little bit helps!",
170177
diff if diff < 0 => "You're going in the wrong direction..?",
171178
diff if diff < -1_000 => "You really screwed up 🙉",
179+
diff if diff < -10_000 => "You are everything I am against, pure anti-OK evil.",
172180
_ => "I don't have an opinion",
173181
};
174182

0 commit comments

Comments
 (0)