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 947caff

Browse filesBrowse files
committed
Chore: Add method to get a discussion using a number/id
1 parent 870090e commit 947caff
Copy full SHA for 947caff

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+19
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHTeam.java
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,25 @@ public PagedIterable<GHDiscussion> listDiscussions() throws IOException {
147147
});
148148
}
149149

150+
/**
151+
* Gets a single discussion by ID.
152+
*
153+
* @param discussionId
154+
* id of the discussion that we want to query for
155+
* @return the discussion
156+
* @throws IOException
157+
* the io exception
158+
*
159+
* @see <a href= "https://developer.github.com/v3/teams/discussions/#get-a-discussion">documentation</a>
160+
*/
161+
public GHDiscussion getDiscussion(String discussionId) throws IOException {
162+
return root.createRequest()
163+
.withUrlPath("/orgs/" + this.getOrganization().getLogin() + "/teams/" + this.getSlug() + "/discussions/"
164+
+ discussionId)
165+
.fetch(GHDiscussion.class)
166+
.wrapUp(this);
167+
}
168+
150169
/**
151170
* Retrieves the current members.
152171
*

0 commit comments

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