You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ja...@apache.org on 2024/01/12 11:00:13 UTC

(solr) branch main updated: githubPRs script: Exclude solrbot and draft PRs (#2187)

This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new ac1aae44bdd githubPRs script: Exclude solrbot and draft PRs (#2187)
ac1aae44bdd is described below

commit ac1aae44bdd39b17e27f9161423223beaa143178
Author: Jan Høydahl <ja...@apache.org>
AuthorDate: Fri Jan 12 12:00:07 2024 +0100

    githubPRs script: Exclude solrbot and draft PRs (#2187)
---
 dev-tools/scripts/githubPRs.py     | 6 ++++--
 dev-tools/scripts/requirements.txt | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dev-tools/scripts/githubPRs.py b/dev-tools/scripts/githubPRs.py
index 457455e4aef..b947da563fa 100755
--- a/dev-tools/scripts/githubPRs.py
+++ b/dev-tools/scripts/githubPRs.py
@@ -92,14 +92,16 @@ def main():
   out("============================")
   out("Number of open Pull Requests: %s" % open_prs.totalCount)
   result['open_count'] = open_prs.totalCount
+  active_prs = list(filter(lambda x: not x.draft and not x.user.login == 'solrbot', open_prs))
+  out("Number of active non-draft, non-solrbot Pull Requests: %s" % len(active_prs))
 
-  lack_jira = list(filter(lambda x: not re.match(r'.*\b(SOLR)-\d{3,6}\b', x.title), open_prs))
+  lack_jira = list(filter(lambda x: not re.match(r'.*\b(SOLR)-\d{3,6}\b', x.title), active_prs))
   result['no_jira_count'] = len(lack_jira)
   lack_jira_list = []
   for pr in lack_jira:
     lack_jira_list.append({'title': pr.title, 'number': pr.number, 'user': pr.user.login, 'created': pr.created_at.strftime("%Y-%m-%d")})
   result['no_jira'] = lack_jira_list
-  out("\nPRs lacking JIRA reference in title")
+  out("\nActive PRs lacking JIRA reference in title")
   for pr in lack_jira_list:
     out("  #%s: %s %s (%s)" % (pr['number'], pr['created'], pr['title'], pr['user'] ))
 
diff --git a/dev-tools/scripts/requirements.txt b/dev-tools/scripts/requirements.txt
index 0617ad153f5..1ef4fd25b45 100644
--- a/dev-tools/scripts/requirements.txt
+++ b/dev-tools/scripts/requirements.txt
@@ -4,5 +4,5 @@ PyYAML~=6.0
 holidays~=0.16
 ics~=0.7.2
 console-menu~=0.7.1
-PyGithub~=1.56
+PyGithub~=2.1.1
 jira~=3.4.1
\ No newline at end of file