diff --git a/.github/codeowners/README.md b/.github/codeowners/README.md deleted file mode 100644 index 494a570208..0000000000 --- a/.github/codeowners/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This directory contains automation that helped us generate the [`CODEOWNERS`](/CODEOWNERS) file. - -- `main_dirs.txt` is a list of the "main" directories for which we want a list of code owners; this was generated with `find -d`, and manually choosing the "main" directories -- `generate-codeowners.rb` reads `main_dirs.txt` and uses `git` logs to find the unique set of authors for all of the files within each directory; it then writes a new `CODEOWNERS` file -- finally, we go through the `CODEOWNERS` file manually to decide which contributors to keep; those contributors will be notified in PR reviews, so for example we may not want to include contributors who are not involved in the project any more diff --git a/.github/codeowners/generate-codeowners.rb b/.github/codeowners/generate-codeowners.rb deleted file mode 100755 index aa0be23b54..0000000000 --- a/.github/codeowners/generate-codeowners.rb +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env ruby -# run this script from the TOP level directory - -GithubHandles = { - '' => 'ajhobart', - '' => 'afilippi67', - '' => 'drewkenjo', - '' => 'huckb', - '' => 'bleaktwig', - '' => 'c-dilks', - '' => 'forcar', - '' => 'cpecar', - '' => 'heddle', - '' => 'dpayette', - '' => '', - '' => '', - '' => 'hauenst', - '' => 'fbossu', - '' => 'fxgirod', - '' => 'gavalian', - '' => 'gangel85', - '' => 'Guillaum-C', - '' => 'josnewton', - '' => '', - '' => 'forcar', - '' => 'latifkabir', - '' => 'mcontalb', - '' => 'mathieuouillon', - '' => 'mholtrop', - '' => 'mdefurne', - '' => 'miho', - '' => 'baltzell', - '' => 'naharrison', - '' => 'markovnick', - '' => 'N-Plx', - '' => '', - '' => 'PChatagnon', - '' => 'rafopar', - '' => 'raffaelladevita', - '' => '', - '' => '', - '' => '', - '' => 'sly2j', - '' => 'tongtongcao', - '' => 'gurjyan', - '' => 'zieglerv', - '' => 'ajhobart', - '' => 'forcar', - '' => 'cqplatt', - '' => 'dcpayette', - '' => '', - '' => 'efuchey', - '' => 'Hattawy', - '' => 'huckb', - '' => 'jwgibbs', - '' => 'mariangela-bondi', - '' => 'marmstr4', - '' => 'mcontalb', - '' => 'mpaolone', - '' => 'rtysonCLAS12', - '' => 'tongtongcao', - '' => 'zieglerv', -} - -codeowners = File.open('CODEOWNERS.GENERATED', 'w') -unknown_authors = [] - -File.readlines('.github/codeowners/main_dirs.txt').map(&:chomp).each do |line| - if line.match? /^#/ or line.empty? - codeowners.puts line - next - end - - if line == '*' - codeowners.puts [line, '@baltzell', '@raffaelladevita', '@c-dilks'].join(' ') - next - end - - puts line - these_authors = [] - file_list = `git ls-files #{line.sub /\/\*$/, ''}`.split "\n" - file_list.each do |file| - puts " - #{file}" - authors = `git shortlog -s -n -- '#{file}'`.split("\n").map do |line| - "<" + line.split(' ')[1..-1].join(' ') + ">" - end - handles = authors.map do |author| - handle = GithubHandles[author] - if handle != '' - "@#{handle}" - else - unknown_authors << author - author - end - end.reject{|h|h.match?(/dependabot/)} - these_authors += handles - end - codeowners.puts "#{line.gsub(' ','\ ')} #{these_authors.uniq.join(' ')}" - -end - -unless unknown_authors.empty? - $stderr.puts "WARNING: the following authors have unknown GitHub handles:" - $stderr.puts unknown_authors.uniq.sort -end - -codeowners.close diff --git a/.github/codeowners/main_dirs.txt b/.github/codeowners/main_dirs.txt deleted file mode 100644 index 5dbed7793a..0000000000 --- a/.github/codeowners/main_dirs.txt +++ /dev/null @@ -1,97 +0,0 @@ -# primary maintainers -* - -# infrastructure -.github/* -bin/* -docs/* -external-dependencies/* -libexec/* -parent/* - -# common-tools -common-tools/clara-io/* -common-tools/clas-analysis/* -common-tools/clas-io/* -common-tools/clas-jcsg/* -common-tools/clas-logging/* -common-tools/clas-math/* -common-tools/clas-physics/* -common-tools/clas-reco/* -common-tools/clas-tracking/* -common-tools/clas-utils/* -common-tools/cnuphys/* -common-tools/coat-lib/* -common-tools/parent/* -common-tools/swim-tools/* - -# common-tools / clas-detector -common-tools/clas-detector/src/main/java/org/jlab/detector/banks/* -common-tools/clas-detector/src/main/java/org/jlab/detector/base/* -common-tools/clas-detector/src/main/java/org/jlab/detector/calib/* -common-tools/clas-detector/src/main/java/org/jlab/detector/decode/* -common-tools/clas-detector/src/main/java/org/jlab/detector/epics/* -common-tools/clas-detector/src/main/java/org/jlab/detector/examples/* -common-tools/clas-detector/src/main/java/org/jlab/detector/helicity/* -common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/* -common-tools/clas-detector/src/main/java/org/jlab/detector/swaps/* -common-tools/clas-detector/src/main/java/org/jlab/detector/view/* -common-tools/clas-detector/src/test/* - -# common-tools / clas-geometry -common-tools/clas-geometry/src/main/java/org/jlab/detector/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/abs/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/base/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/component/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/bst/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/cnd/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/dc/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ec/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/fmt/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ft/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ftof/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/fx/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/geant/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/gemc/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/gui/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/prim/* -common-tools/clas-geometry/src/main/java/org/jlab/geom/view/* - -# etc -etc/bankdefs/* -etc/benchmarks/* -etc/data/* -etc/ejml/* -etc/logging/* -etc/nnet/* -etc/services/* - -# reconstruction -reconstruction/alert/* -reconstruction/band/* -reconstruction/bg/* -reconstruction/cnd/* -reconstruction/cvt/* -reconstruction/dc/* -reconstruction/eb/* -reconstruction/ec/* -reconstruction/ec/src/* -reconstruction/fmt/* -reconstruction/ft/* -reconstruction/htcc/* -reconstruction/ltcc/* -reconstruction/mc/* -reconstruction/mltn/* -reconstruction/postproc/* -reconstruction/raster/* -reconstruction/rich/* -reconstruction/rtpc/* -reconstruction/swaps/* -reconstruction/tof/* -reconstruction/urwell/* -reconstruction/vtx/* - -# validation -validation/*