Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit 6b62761

Browse files
committed
Remove unused function
The only usage of `parse_header_links` was removed in #119. This removes the function itself.
1 parent 50c943d commit 6b62761

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

highfive/newpr.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -138,34 +138,6 @@ def is_collaborator(commenter, owner, repo, token):
138138
def add_labels(labels, owner, repo, issue, token):
139139
api_req("POST", issue_labels_url % (owner, repo, issue), labels, token)
140140

141-
142-
# This function is adapted from https://github.com/kennethreitz/requests/blob/209a871b638f85e2c61966f82e547377ed4260d9/requests/utils.py#L562
143-
# Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
144-
def parse_header_links(value):
145-
if not value:
146-
return None
147-
148-
links = {}
149-
replace_chars = " '\""
150-
for val in value.split(","):
151-
try:
152-
url, params = val.split(";", 1)
153-
except ValueError:
154-
url, params = val, ''
155-
156-
url = url.strip("<> '\"")
157-
158-
for param in params.split(";"):
159-
try:
160-
key, value = param.split("=")
161-
except ValueError:
162-
break
163-
key = key.strip(replace_chars)
164-
if key == 'rel':
165-
links[value.strip(replace_chars)] = url
166-
167-
return links
168-
169141
def is_new_contributor(username, owner, repo, token, payload):
170142
# If this is a fork, we do not treat anyone as a new user. This is
171143
# because the API endpoint called in this function indicates all

0 commit comments

Comments
 (0)