File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -105,20 +105,21 @@ def get_label_id(label_name):
105105 return data ['repository' ]['label' ]['id' ]
106106 return None
107107
108+
108109def 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
124125def post_comment (discussion_id , body ):
You can’t perform that action at this time.
0 commit comments