Skip to content

Conversation

@c-dilks
Copy link
Member

@c-dilks c-dilks commented Apr 2, 2024

A CODEOWNERS file provides the following:

  • connects contributors to files they worked on
  • notifies contributors of proposed changes to their files, by automatically requesting them for PR review

TODO

  • generate a CODEOWNERS file
  • replace real names with GitHub handles
  • consider automating its update, e.g, with version-bump.sh let's not.. at least the "default" owners (of *) will be notified for new files

@whit2333
Copy link
Collaborator

whit2333 commented Jan 2, 2025

FWIW, you might already be aware of this useful git command. It might make sense to not bother the likes of me if I have 1 commit out of many:

$ git shortlog -n -s -e --  common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java
    28  Nathan Baltzell <[email protected]>
     9  Raffaella De Vita <[email protected]>
     8  Gagik Gavalian <[email protected]>
     2  Nathan Baltzell <[email protected]>
     1  Veronique Ziegler <[email protected]>
     1  Whitney Armstrong <[email protected]>

Set the threshold to say 10% to not bother infrequent contributors:

commit_threshold=$(echo " $(git shortlog -n -s -e --  common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java | cut -f 1 | paste -s -d+ - | bc ) * 0.1 " | bc)
git shortlog -n -s -e --  common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java  |  awk '$1>'${commit_threshold}' {print $0}'
    28  Nathan Baltzell <[email protected]>
     9  Raffaella De Vita <[email protected]>
     8  Gagik Gavalian <[email protected]>

@c-dilks c-dilks force-pushed the codeowners branch 2 times, most recently from 470af78 to 40840d0 Compare June 26, 2025 14:57
@c-dilks
Copy link
Member Author

c-dilks commented Jun 26, 2025

I think this is good enough to start with. Some notes:

  • I set the primary (a.k.a.) default owners to myself, @raffaelladevita, and @baltzell
  • organized the Java code by POM modules, i.e. ownership applies to full modules
  • some cases have "too many" owners and should be cleaned up (@raffaelladevita and @baltzell I'd need your help here)
    • I may have missed some newer owners (ALERT), double check my additions!
  • when we transition to code.jlab.org, we'll need to replace GitHub handles with code.jlab.org handles, for those of us who have different handles (e.g., c-dilks->dilks)
  • this CODEOWNERS file is compatible with Gitlab too (not that it means much, since we cannot require MR approvals for merging, but at least we have some accountability...)

@c-dilks c-dilks marked this pull request as ready for review June 26, 2025 15:03
@c-dilks
Copy link
Member Author

c-dilks commented Jun 26, 2025

also this is my last PR here before migration to code.jlab.org (and the reason why I suddenly updated this)

@baltzell baltzell merged commit 94539db into development Jul 2, 2025
34 checks passed
@baltzell baltzell deleted the codeowners branch July 2, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants