Skip to content

Commit 7f86f7e

Browse files
committed
try again
1 parent abe746c commit 7f86f7e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/comment-close-old-discussions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,21 @@ def get_label_id(label_name):
105105
return data['repository']['label']['id']
106106
return None
107107

108+
108109
def add_label(discussion_id, label):
109110
print(f"Adding label '{label}' to discussion {discussion_id}")
110111
label_id = get_label_id(label)
111112
if not label_id:
112113
print(f"Label '{label}' not found.")
113114
return
114115
query = """
115-
mutation($id: ID!, $labelId: ID!) {
116-
addLabelsToLabelable(input: {labelableId: $id, labelIds: [$labelId]}) {
116+
mutation($discussionId: ID!, $labelIds: [ID!]!) {
117+
addLabelsToDiscussion(input: {discussionId: $discussionId, labelIds: $labelIds}) {
117118
clientMutationId
118119
}
119120
}
120121
"""
121-
graphql(query, {"id": discussion_id, "labelId": label_id})
122+
graphql(query, {"discussionId": discussion_id, "labelIds": [label_id]})
122123

123124

124125
def post_comment(discussion_id, body):

0 commit comments

Comments
 (0)