Skip to content

Commit

Permalink
Update the wishlist leaderboard script to handle PRs (paritytech#5256)
Browse files Browse the repository at this point in the history
Addresses
paritytech#5085 (comment)

Luckily, in the rest of the script, github API allows (or forces?) us to
read the state of PRs the same way as we read the state of issues, so it
works without any more changes.
  • Loading branch information
rzadp authored and dharjeezy committed Aug 27, 2024
1 parent 64f1dee commit d4355af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/update-wishlist-leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Regex pattern to match wish format:
wish_pattern = re.compile(
r"I wish for:? (https://github\.com/([a-zA-Z0-9_.-]+)/([a-zA-Z0-9_.-]+)/issues/(\d+))"
r"I wish for:? (https://github\.com/([a-zA-Z0-9_.-]+)/([a-zA-Z0-9_.-]+)/(issues|pull)/(\d+))"
)

wishlist_issue = g.get_repo(os.getenv("WISHLIST_REPOSITORY")).get_issue(
Expand All @@ -28,7 +28,7 @@

matches = wish_pattern.findall(updated_body)
for match in matches:
url, org, repo_name, issue_id = match
url, org, repo_name, _, issue_id = match
issue_key = (url, org, repo_name, issue_id)
if issue_key not in wishes:
wishes[issue_key] = []
Expand Down

0 comments on commit d4355af

Please sign in to comment.