Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e59b438

Browse filesBrowse files
committed
Add the node_id to the Discussion Category payload
I reported the fact that the field was missing to the GitHub team and they were kind enough to add it so we can now take it into account.
1 parent 08bff69 commit e59b438
Copy full SHA for e59b438

File tree

Expand file treeCollapse file tree

5 files changed

+11
-0
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-0
lines changed

‎src/main/java/org/kohsuke/github/GHRepositoryDiscussion.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepositoryDiscussion.java
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public String getTimelineUrl() {
113113
public static class Category {
114114

115115
private long id;
116+
private String nodeId;
116117
private long repositoryId;
117118
private String emoji;
118119
private String name;
@@ -126,6 +127,10 @@ public long getId() {
126127
return id;
127128
}
128129

130+
public String getNodeId() {
131+
return nodeId;
132+
}
133+
129134
public long getRepositoryId() {
130135
return repositoryId;
131136
}

‎src/test/java/org/kohsuke/github/GHEventPayloadTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/GHEventPayloadTest.java
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ public void discussion_created() throws Exception {
953953
GHRepositoryDiscussion.Category category = discussion.getCategory();
954954

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

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

10501052
assertThat(category.getId(), is(33522033L));
1053+
assertThat(category.getNodeId(), is("DIC_kwDOEq3cwc4B_4Fx"));
10511054
assertThat(category.getEmoji(), is(":pray:"));
10521055
assertThat(category.getName(), is("Q&A"));
10531056
assertThat(category.getDescription(), is("Ask the community for help"));

‎src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_answered.json

Copy file name to clipboardExpand all lines: src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_answered.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
55
"category": {
66
"id": 33522033,
7+
"node_id": "DIC_kwDOEq3cwc4B_4Fx",
78
"repository_id": 313384129,
89
"emoji": ":pray:",
910
"name": "Q&A",

‎src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_created.json

Copy file name to clipboardExpand all lines: src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_created.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
55
"category": {
66
"id": 33522033,
7+
"node_id": "DIC_kwDOEq3cwc4B_4Fx",
78
"repository_id": 313384129,
89
"emoji": ":pray:",
910
"name": "Q&A",

‎src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_labeled.json

Copy file name to clipboardExpand all lines: src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_labeled.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
55
"category": {
66
"id": 33522033,
7+
"node_id": "DIC_kwDOEq3cwc4B_4Fx",
78
"repository_id": 313384129,
89
"emoji": ":pray:",
910
"name": "Q&A",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.