File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,12 @@ def get_label_node_id(label_name):
116116
117117def post_comment (discussion_number , body ):
118118 print (f"Posting comment to discussion #{ discussion_number } " )
119- query = """
120- mutation($input: AddDiscussionCommentInput!) {
121- addDiscussionComment(input: $input) {
122- clientMutationId
123- }
124- }
119+ query = f """
120+ mutation { {
121+ addDiscussionComment(input:{{body: " { body } " , discussionId: " { discussion_number } "}}) { {
122+ comment{{id}}
123+ } }
124+ }}
125125 """
126126 node_id = get_discussion_node_id (discussion_number )
127127 if not node_id :
@@ -133,12 +133,12 @@ def post_comment(discussion_number, body):
133133
134134def close_and_lock (discussion_number ):
135135 print (f"Closing and locking discussion #{ discussion_number } " )
136- query = """
137- mutation($input: UpdateDiscussionInput!) {
138- updateDiscussion (input: $input) {
139- clientMutationId
140- }
141- }
136+ query = f """
137+ mutation { {
138+ closeDiscussion (input:{{discussionId: " { discussion_number } ", reason: "OUTDATED"}}) { {
139+ discussion{{id}}
140+ } }
141+ }}
142142 """
143143 node_id = get_discussion_node_id (discussion_number )
144144 if not node_id :
You can’t perform that action at this time.
0 commit comments