hartmannathan commented on code in PR #16962:
URL: https://github.com/apache/nuttx/pull/16962#discussion_r2320485764


##########
tools/codeowners.py:
##########
@@ -0,0 +1,179 @@
+#!/usr/bin/env python3
+
+import re
+import subprocess
+import sys
+from typing import TypeAlias
+
+# Number of past logs to check
+LAST_N_LOGS: int = 25
+
+# Top `n` authors to list as code owners in the CODEOWNERS file
+TOP_N_AUTHORS: int = 5
+
+# Command to get author email and number of changes
+CHANGE_STATS_CMD: list[str] = [

Review Comment:
   Rather than check the last 25 logs with git status, would it make sense to 
get the authors by line using git blame? Otherwise, if someone wrote much of a 
file but then other people contributed 25 minor changes, the person who wrote 
much of the file would be dropped from codeowners.



##########
tools/codeowners.py:
##########
@@ -0,0 +1,179 @@
+#!/usr/bin/env python3
+
+import re
+import subprocess
+import sys
+from typing import TypeAlias
+
+# Number of past logs to check
+LAST_N_LOGS: int = 25
+
+# Top `n` authors to list as code owners in the CODEOWNERS file
+TOP_N_AUTHORS: int = 5
+
+# Command to get author email and number of changes
+CHANGE_STATS_CMD: list[str] = [

Review Comment:
   Alternatively maybe do both: use git blame and weight top 5 authors by line 
count, and also git log last 25 commits and weight top 5 authors by number of 
commits?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to