Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b674abf

Browse files
tacaswelltimhoffm
authored andcommitted
DOC: update the gh_stats code (#12147)
This prevents pulling PRs that are on master but not to be included in this release into the stats.
1 parent ef04ad9 commit b674abf

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

doc/devel/release_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GitHub Stats
3838

3939
We automatically extract GitHub issue, PRs, and authors from GitHub via the API::
4040

41-
python tools/github_stats.py --since-tag $TAG --project 'matplotlib/matplotlib' --links > doc/users/github_stats.rst
41+
python tools/github_stats.py --since-tag v2.2.0 --milestone=v3.0 --project 'matplotlib/matplotlib' --links > doc/users/github_stats.rst
4242

4343
Review and commit changes. Some issue/PR titles may not be valid rst (the most common issue is
4444
``*`` which is interpreted as unclosed markup).

tools/github_stats.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def issues2dict(issues):
4747
idict[i['number']] = i
4848
return idict
4949

50-
def split_pulls(all_issues, project="ipython/ipython"):
50+
def split_pulls(all_issues, project="matplotlib/matplotlib"):
5151
"""split a list of closed issues into non-PR Issues and Pull Requests"""
5252
pulls = []
5353
issues = []
@@ -60,7 +60,7 @@ def split_pulls(all_issues, project="ipython/ipython"):
6060
return issues, pulls
6161

6262

63-
def issues_closed_since(period=timedelta(days=365), project="ipython/ipython", pulls=False):
63+
def issues_closed_since(period=timedelta(days=365), project="matplotlib/matplotlib", pulls=False):
6464
"""Get all issues closed since a particular point in time. period
6565
can either be a datetime object, or a timedelta object. In the
6666
latter case, it is used as a time before the present.
@@ -120,7 +120,7 @@ def report(issues, show_urls=False):
120120
parser.add_argument('--days', type=int,
121121
help="The number of days of data to summarize (use this or --since-tag)."
122122
)
123-
parser.add_argument('--project', type=str, default="ipython/ipython",
123+
parser.add_argument('--project', type=str, default="matplotlib/matplotlib",
124124
help="The project to summarize."
125125
)
126126
parser.add_argument('--links', action='store_true', default=False,
@@ -161,7 +161,7 @@ def report(issues, show_urls=False):
161161
state='closed',
162162
auth=True,
163163
)
164-
issues, pulls = split_pulls(issues_and_pulls)
164+
issues, pulls = split_pulls(issues_and_pulls, project=project)
165165
else:
166166
issues = issues_closed_since(since, project=project, pulls=False)
167167
pulls = issues_closed_since(since, project=project, pulls=True)

0 commit comments

Comments
 (0)