You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# collect the labels for which table this PR should be taken into account
157
157
labels_take = []
158
158
159
-
for label in pr['labels']:
160
-
label_name = label['name']
159
+
pr_labels = [label['name'] for label in pr['labels']]
160
+
for label_name in pr_labels:
161
+
if label_name not in labels_request:
162
+
continue
161
163
if label_name.lower() in ('mc', 'data'):
162
164
# get assigned MC or DATA label if this PR has it
163
-
mc_data.append(label['name'])
164
-
if label_name in labels_request and (not label_accept_suffix or f'{label_name}-{label_accept_suffix}' not in pr['labels']):
165
+
mc_data.append(label_name)
166
+
if not label_accept_suffix or f'{label_name}-{label_accept_suffix}' not in pr_labels:
165
167
# check if that label is one that flags a request. If at the same time there is also the corresponding accepted label, don't take this PR into account for the report.
parser.add_argument('--start-page', dest='start_page', type=int, default=1, help='Start on this page')
200
202
parser.add_argument('--pages', type=int, default=5, help='Number of pages')
201
203
parser.add_argument('--label-regex', dest='label_regex', help='Provide a regular expression to decide which labels to fetch.', default='^async-\w+')
202
-
parser.add_argument('--label-accepted-suffix', dest='label_accepted_suffix', help='Provide a regular expression to decide which labels to fetch.', default='accept')
204
+
parser.add_argument('--label-accepted-suffix', dest='label_accepted_suffix', help='Provide the suffix of labels that indicate acceptance (a dash will be added automatically, so the a corresponding accepted label is expected to have the form <request-label>-<accepted-suffix>).', default='accepted')
203
205
parser.add_argument('--include-accepted', action='store_true', help='By default, only PRs are fetched where at least one label has no "<label>-accepted" label')
0 commit comments