Unverified Commit eebae19a authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #259990 from eclairevoyant/fix-maintainers

maintainers/fix-maintainers.pl: fix and run script
parents 6edf239b 2e722bdf
Loading
Loading
Loading
Loading
+2 −17
Original line number Diff line number Diff line
@@ -3968,7 +3968,7 @@
  };
  davidarmstronglewis = {
    email = "davidlewis@mac.com";
    github = "davidarmstronglewis";
    github = "oceanlewis";
    githubId = 6754950;
    name = "David Armstrong Lewis";
  };
@@ -15134,15 +15134,6 @@
    }];
    name = "Rahul Butani";
  };
  rs0vere = {
    email = "rs0vere@proton.me";
    github = "rs0vere";
    githubId = 140035635;
    keys = [{
      fingerprint = "C6D8 B5C2 FA79 901B DCCF  95E1 FEC4 5C5A ED00 C58D";
    }];
    name = "Red Star Over Earth";
  };
  rski = {
    name = "rski";
    email = "rom.skiad+nix@gmail.com";
@@ -15398,7 +15389,7 @@
  };
  SamirTalwar = {
    email = "lazy.git@functional.computer";
    github = "SamirTalwar";
    github = "abstracte";
    githubId = 47852;
    name = "Samir Talwar";
  };
@@ -17813,12 +17804,6 @@
    githubId = 10110;
    name = "Travis B. Hartwell";
  };
  travisdavis-ops = {
    email = "travisdavismedia@gmail.com";
    github = "TravisDavis-ops";
    githubId = 52011418;
    name = "Travis Davis";
  };
  traxys = {
    email = "quentin+dev@familleboyer.net";
    github = "traxys";
+10 −4
Original line number Diff line number Diff line
@@ -13,12 +13,15 @@ STDOUT->autoflush(1);

my $ua = LWP::UserAgent->new();

if (!defined $ENV{GH_TOKEN}) {
    die "Set GH_TOKEN before running this script";
}

keys %$maintainers_json; # reset the internal iterator so a prior each() doesn't affect the loop
while(my($k, $v) = each %$maintainers_json) {
    my $current_user = %$v{'github'};
    if (!defined $current_user) {
        print "$k has no github handle\n";
        next;
    }
    my $github_id = %$v{'githubId'};
    if (!defined $github_id) {
@@ -37,13 +40,16 @@ while(my($k, $v) = each %$maintainers_json) {
        sleep($ratelimit_reset - time() + 5);
    }
    if ($resp->code != 200) {
        print $current_user . " likely deleted their github account\n";
        print "$k likely deleted their github account\n";
        next;
    }
    my $resp_json = from_json($resp->content);
    my $api_user = %$resp_json{"login"};
    if (lc($current_user) ne lc($api_user)) {
        print $current_user . " is now known on github as " . $api_user . ". Editing maintainer-list.nix…\n";
    if (!defined $current_user) {
        print "$k is known on github as $api_user.\n";
    }
    elsif (lc($current_user) ne lc($api_user)) {
        print "$k is now known on github as $api_user. Editing maintainer-list.nix…\n";
        my $file = path($maintainers_list_nix);
        my $data = $file->slurp_utf8;
        $data =~ s/github = "$current_user";$/github = "$api_user";/m;
+1 −1
Original line number Diff line number Diff line
@@ -21,6 +21,6 @@ python3Packages.buildPythonApplication rec {
    homepage = "https://github.com/RicterZ/nhentai";
    description = "nHentai is a CLI tool for downloading doujinshi from <http://nhentai.net>";
    license = licenses.mit;
    maintainers = with maintainers; [ travisdavis-ops ];
    maintainers = with maintainers; [ ];
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://www.nongnu.org/lzip/clzip.html";
    description = "C language version of lzip";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ rs0vere ];
    maintainers = with maintainers; [ ];
    platforms = platforms.all;
  };
})
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://github.com/AmokHuginnsson/replxx";
    description = "A readline and libedit replacement that supports UTF-8, syntax highlighting, hints and Windows and is BSD licensed";
    license = licenses.bsd3;
    maintainers = with maintainers; [ rs0vere ];
    maintainers = with maintainers; [ ];
    platforms = platforms.all;
  };
})
Loading