Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 6ccacb5

Browse files
committed
Put the Discussion spread in the right place
1 parent 81b1fc9 commit 6ccacb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/discussions-trigger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ async function addLabel(discussion: Discussion, labelName: string, description?:
124124
labelID = existingLabel.label.id;
125125
} else {
126126
const color = "eeeeee";
127-
const responseSubquery = "... on Discussion { id }";
127+
const responseSubquery = "labelable { ... on Discussion { id } }";
128128
const newLabel = await client.mutate(createMutation("createLabel" as any, { name: labelName, repositoryId: existingLabel.repoID, color, description }, responseSubquery)) as any;
129-
labelID = newLabel.data.id;
129+
labelID = newLabel.data.labelable.id;
130130
}
131131
await client.mutate(createMutation<any>("addLabelsToLabelable" as any, { labelableId: discussion.node_id, labelIds: [labelID] }));
132132
}

0 commit comments

Comments
 (0)