We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8478bf commit 00068c9Copy full SHA for 00068c9
src/services/Issues.ts
@@ -26,8 +26,20 @@ class Issues extends BaseService {
26
});
27
}
28
29
- all({ projectId, ...options }: { projectId?: ProjectId } & PaginatedRequestOptions = {}) {
30
- const url = projectId ? `projects/${encodeURIComponent(projectId)}/issues` : 'issues';
+ all({
+ projectId,
31
+ groupId,
32
+ ...options
33
+ }: ({ projectId: ProjectId } | { groupId: GroupId } | {}) & PaginatedRequestOptions) {
34
+ let url;
35
+
36
+ if (projectId) {
37
+ url = `projects/${encodeURIComponent(projectId)}/issues`;
38
+ } else if (groupId) {
39
+ url = `groups/${encodeURIComponent(groupId)}/issues`;
40
+ } else {
41
+ url = 'issues';
42
+ }
43
44
return RequestHelper.get(this, url, options);
45
0 commit comments