title: Using Githup api - -i need to find the most commit person in the last year with java code
body: <p>This way I pulled all the repositories:</p>
  
  <pre><code>public static void getAllCommitUrlReader() throws MalformedURLException, IOException {
  
      HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(
              "https://api.github.com/repositories?since="+ page)
                      .openConnection();
      httpURLConnection.addRequestProperty("User-Agent",
              "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36");
  
      BufferedReader in = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
  
      String line = "", inputLine;
      while ((inputLine = in.readLine()) != null) {
  
          line += "\n" + inputLine;
          //System.out.println(inputLine);
      }
  
      in.close();
  Arrays.stream(line.split("\"full_name\":")).skip(1).map(av-&gt; av.split(",")[0]).forEach(av -&gt; {String owner = av.substring(2, av.indexOf("/")).trim();
  String repoName = av.substring(av.indexOf("/")+1,av.length()-1).trim();
  searchCommit(owner,repoName);
  });
  
  //Arrays.stream(line.split("\"id\":")).skip(1).map(av-&gt; av.split(",")[0]).forEach(av -&gt; {System.out.println(av.valueOf(av.length()));
  //;
  //});
     //  int total  = Arrays.stream(line.split("\"total\":")).skip(1).mapToInt(av -&gt; Integer.parseInt(av.split(",")[0])).sum();
     //  System.out.println(total);
  }
  </code></pre>
  
  <p>This way, I got all commits from all repositories:</p>
  
  <pre><code>public static void searchCommit(String owner, String repoName) {
      final int size = 25;
  
      final RepositoryId repo = new RepositoryId(owner, repoName);
      final String message = "   {0} by {1} on {2}";
      final CommitService service = new CommitService();
      int pages = 1;
       Calendar cal = Calendar.getInstance();
          cal.set(2019, 1, 1);
          Date since = cal.getTime();
          cal.set(2020, 1, 1);
          Date until = cal.getTime();
  
      for (Collection&lt;RepositoryCommit&gt; commits : service.pageCommits(repo,size)) {
          System.out.println("Commit Page " + pages++);
          for (RepositoryCommit commit : commits) {
              String sha = commit.getSha().substring(0, 7);
              String author = commit.getCommit().getAuthor().getName();
              Date date = commit.getCommit().getAuthor().getDate();
              if(date.after(since) &amp;&amp; date.after(until)) {
  
               System.out.println(MessageFormat.format(message, sha, author, date));
  
              }
  
          }
      }
  }
  </code></pre>
  
  <p>I have two questions first - Here's how to sort commit commitments by person. So x person has committed up to y.
  second question -> But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details. 
  what the solution is. Ty for helping :)</p>