Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the node_id to the Discussion Category payload #1335

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/main/java/org/kohsuke/github/GHRepositoryDiscussion.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public String getTimelineUrl() {
public static class Category {

private long id;
private String nodeId;
private long repositoryId;
private String emoji;
private String name;
Expand All @@ -126,6 +127,10 @@ public long getId() {
return id;
}

public String getNodeId() {
return nodeId;
}

public long getRepositoryId() {
return repositoryId;
}
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/org/kohsuke/github/GHEventPayloadTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ public void discussion_created() throws Exception {
GHRepositoryDiscussion.Category category = discussion.getCategory();

assertThat(category.getId(), is(33522033L));
assertThat(category.getNodeId(), is("DIC_kwDOEq3cwc4B_4Fx"));
assertThat(category.getEmoji(), is(":pray:"));
assertThat(category.getName(), is("Q&A"));
assertThat(category.getDescription(), is("Ask the community for help"));
Expand Down Expand Up @@ -1000,6 +1001,7 @@ public void discussion_answered() throws Exception {
GHRepositoryDiscussion.Category category = discussion.getCategory();

assertThat(category.getId(), is(33522033L));
assertThat(category.getNodeId(), is("DIC_kwDOEq3cwc4B_4Fx"));
assertThat(category.getEmoji(), is(":pray:"));
assertThat(category.getName(), is("Q&A"));
assertThat(category.getDescription(), is("Ask the community for help"));
Expand Down Expand Up @@ -1048,6 +1050,7 @@ public void discussion_labeled() throws Exception {
GHRepositoryDiscussion.Category category = discussion.getCategory();

assertThat(category.getId(), is(33522033L));
assertThat(category.getNodeId(), is("DIC_kwDOEq3cwc4B_4Fx"));
assertThat(category.getEmoji(), is(":pray:"));
assertThat(category.getName(), is("Q&A"));
assertThat(category.getDescription(), is("Ask the community for help"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
"category": {
"id": 33522033,
"node_id": "DIC_kwDOEq3cwc4B_4Fx",
"repository_id": 313384129,
"emoji": ":pray:",
"name": "Q&A",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
"category": {
"id": 33522033,
"node_id": "DIC_kwDOEq3cwc4B_4Fx",
"repository_id": 313384129,
"emoji": ":pray:",
"name": "Q&A",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
"category": {
"id": 33522033,
"node_id": "DIC_kwDOEq3cwc4B_4Fx",
"repository_id": 313384129,
"emoji": ":pray:",
"name": "Q&A",
Expand Down