File tree 1 file changed +6
-13
lines changed 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
- """
2
- Usage: python scripts/release_notes/retrieve_prs.py tags/v0.10.0 \
1
+ """Collect the PRs between the current and previous releases and
2
+ output the commit titles, PR numbers, and labels in a json file.
3
+ Usage: python tools/release_notes/retrieve_prs.py tags/v0.10.0 \
3
4
18685a517ae68353b05b9a0ede5343df31525c76 --file data.json
4
5
"""
5
6
import argparse
8
9
import subprocess
9
10
from collections import namedtuple
10
11
from os .path import expanduser
11
- from pathlib import Path
12
12
13
13
import requests
14
14
15
- ROOT_DIR = Path (__file__ ).parent .resolve ()
16
15
17
16
Features = namedtuple (
18
17
"Features" ,
25
24
26
25
27
26
def _run_cmd (cmd ):
28
- try :
29
- return subprocess .check_output (cmd ).strip ()
30
- except Exception :
31
- return None
27
+ return subprocess .check_output (cmd ).decode ('utf-8' ).strip ()
32
28
33
29
34
30
def commit_title (commit_hash ):
@@ -64,11 +60,8 @@ def get_ghstack_token():
64
60
65
61
def run_query (query ):
66
62
response = requests .post ("https://github.com/api/graphql" , json = {"query" : query }, headers = headers )
67
- try :
68
- response .raise_for_status ()
69
- return response .json ()
70
- except requests .exceptions .HTTPError as e :
71
- print (e )
63
+ response .raise_for_status ()
64
+ return response .json ()
72
65
73
66
74
67
def gh_labels (pr_number ):
You can’t perform that action at this time.
0 commit comments