Skip to content

Commit

Permalink
Add timeouts to requests in release notes script (#2109)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsheni authored Jul 4, 2024
1 parent f55e51e commit b37827b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/release_notes_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _get_milestone_number(milestone_title):
url = f'{GITHUB_URL}/milestones'
headers = {'Authorization': f'Bearer {GITHUB_TOKEN}'}
query_params = {'milestone': milestone_title, 'state': 'all', 'per_page': 100}
response = requests.get(url, headers=headers, params=query_params)
response = requests.get(url, headers=headers, params=query_params, timeout=10)
body = response.json()
if response.status_code != 200:
raise Exception(str(body))
Expand All @@ -63,7 +63,7 @@ def _get_issues_by_milestone(milestone):
issues = []
while True:
query_params['page'] = page
response = requests.get(url, headers=headers, params=query_params)
response = requests.get(url, headers=headers, params=query_params, timeout=10)
body = response.json()
if response.status_code != 200:
raise Exception(str(body))
Expand Down

0 comments on commit b37827b

Please sign in to comment.