Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ This API is available for authenticated users, {% data variables.product.prodnam

### Repository.discussions

List the discussions within a repository. If `categoryId` is specified, only results within that category will be returned.
If `answered` is not specified, both answered and unanswered discussions will be returned.
List the discussions within a repository. If `categoryId` is specified, only results within that category will be returned. {% ifversion answered-fields-for-discussions %}If `answered` is not specified, both answered and unanswered discussions will be returned.{% endif %}

_Signature:_

Expand All @@ -26,7 +25,9 @@ discussions(
first: Int,
last: Int,
categoryId: ID = null,
{%- ifversion answered-fields-for-discussions %}
answered: Boolean = null,
{%- endif %}
orderBy: DiscussionOrder = {field: UPDATED_AT, direction: DESC}
) : Discussion
```
Expand Down Expand Up @@ -159,10 +160,12 @@ type Discussion implements Comment & Deletable & Lockable & Node & Reactable & R
"""
activeLockReason: LockReason

{%- ifversion answered-fields-for-discussions %}
"""
Check if this discussion has been answered
"""
isAnswered: Boolean!
{%- endif %}

"""
The comment chosen as this discussion's answer, if any.
Expand Down
6 changes: 6 additions & 0 deletions data/features/answered-fields-for-discussions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference: #12006

versions:
fpt: '*'
ghec: '*'
ghes: '>=3.12'
1 change: 1 addition & 0 deletions data/features/markdown-alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.12'
2 changes: 1 addition & 1 deletion data/features/merge-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.11'
ghes: '>=3.12'