Skip to content

Commit b4d3022

Browse files
committed
Fix formatting
1 parent 3182851 commit b4d3022

File tree

1 file changed

+34
-35
lines changed

1 file changed

+34
-35
lines changed

llvm/utils/git/github-automation.py

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -498,66 +498,65 @@ def update_issue_project_status(self) -> None:
498498
url
499499
projectItems(first:100){
500500
nodes {
501+
id
502+
project {
501503
id
502-
project {
503-
id
504-
number
505-
field(name: "Status") {
506-
... on ProjectV2SingleSelectField {
504+
number
505+
field(name: "Status") {
506+
... on ProjectV2SingleSelectField {
507+
id
508+
name
509+
options {
507510
id
508511
name
509-
options {
510-
id
511-
name
512-
}
513512
}
514513
}
515514
}
515+
}
516516
}
517517
}
518518
}
519519
}
520520
}
521521
"""
522-
variables = {
523-
"node_id" : pr.node_id
524-
}
522+
variables = {"node_id": pr.node_id }
525523
res_header, res_data = gh._Github__requester.graphql_query(
526524
query=query, variables=variables
527525
)
528526
print(res_header)
529527

530-
for item in res_data['data']['node']['projectItems']['nodes']:
531-
project = item['project']
532-
if project['number'] != 3:
528+
llvm_release_status_project_number = 3
529+
for item in res_data["data"]["node"]["projectItems"]["nodes"]:
530+
project = item["project"]
531+
if project["number"] != llvm_release_status_project_number:
533532
continue
534-
status_field = project['field']
535-
for option in status_field['options']:
536-
if option['name'] != "Done":
533+
status_field = project["field"]
534+
for option in status_field["options"]:
535+
if option["name"] != "Done":
537536
continue
538537
variables = {
539-
"project" : project["id"],
540-
"item" : item["id"],
541-
"status_field" : status_field["id"],
542-
"status_value" : option["id"],
538+
"project": project["id"],
539+
"item": item["id"],
540+
"status_field": status_field["id"],
541+
"status_value": option["id"],
543542
}
544543

545544
query = """
546-
mutation($project: ID!, $item: ID!, $status_field: ID!, $status_value: String!) {
547-
set_status:
548-
updateProjectV2ItemFieldValue(input: {
549-
projectId: $project
550-
itemId: $item
551-
fieldId: $status_field
552-
value: {
553-
singleSelectOptionId: $status_value
554-
}
555-
}) {
556-
projectV2Item {
557-
id
558-
}
545+
mutation($project: ID!, $item: ID!, $status_field: ID!, $status_value: String!) {
546+
set_status:
547+
updateProjectV2ItemFieldValue(input: {
548+
projectId: $project
549+
itemId: $item
550+
fieldId: $status_field
551+
value: {
552+
singleSelectOptionId: $status_value
553+
}
554+
}) {
555+
projectV2Item {
556+
id
559557
}
560558
}
559+
}
561560
"""
562561

563562
res_header, res_data = gh._Github__requester.graphql_query(

0 commit comments

Comments
 (0)