Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
branic committed Aug 12, 2022
1 parent d9606eb commit 4a53216
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions gitlab-stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
reviewed_mrs = {}
project_cache = {}

req_group = 0
req_pagination = 0
is_debug = False


Expand Down Expand Up @@ -60,8 +58,6 @@ def handle_pagination_items(session, url):
print "DEBUG:: handle_pagination_items(): url = {0}".format(url)
pagination_request = session.get(url)
pagination_request.raise_for_status()
global req_pagination
req_pagination += 1

if 'next' in pagination_request.headers["Link"] and pagination_request.links['next']:
return pagination_request.json() + handle_pagination_items(session, pagination_request.links['next']['url'])
Expand All @@ -71,8 +67,6 @@ def handle_pagination_items(session, url):
def get_group(session, server, group_name):
group = session.get("{0}/api/v4/groups/{1}".format(server, urllib.quote(group_name, safe='')))
global req_group
req_group += 1
group.raise_for_status()
result = group.json()

if is_debug:
Expand Down Expand Up @@ -151,7 +145,6 @@ def get_group_project_data(data_type, session, server, group, start_date, repo_m
parser.add_argument("-r", "--human-readable", action="store_true", help="Human readable display")
parser.add_argument("-o", "--organization", help="Organization name", default=GITLAB_GROUP_DEFAULT)
parser.add_argument("-m", "--repo-matcher", help="Repo Matcher", default=".+")
#parser.add_argument("-x","--repo-excluder", help="Repo Excluder")
args = parser.parse_args()

start_date = args.start_date
Expand All @@ -160,8 +153,6 @@ def get_group_project_data(data_type, session, server, group, start_date, repo_m
human_readable=(args.human_readable==True)
gitlab_group = args.organization
repo_matcher = re.compile(args.repo_matcher)
#repo_excluder = args.repo_excluder
repo_excluder = None # this has been broken for now due to method "get_group_with_projects" but isn't used anyway

if start_date is None:
start_date = generate_start_date()
Expand Down

0 comments on commit 4a53216

Please sign in to comment.