File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ interface JiraProject {
1414}
1515
1616interface JiraIssue {
17+ id : string ;
1718 key : string ;
1819 fields : {
1920 summary : string ;
@@ -66,7 +67,7 @@ export class Jira {
6667 }
6768
6869 if ( ! response . ok ) {
69- throw new Error ( `API request failed (${ response . status } ): ${ response . statusText } ` ) ;
70+ throw new Error ( `API request failed (${ response . status } ): ${ response . statusText } . While fetching: ${ url } ` ) ;
7071 }
7172
7273 if ( response . status === 204 ) {
@@ -154,19 +155,14 @@ export class Jira {
154155 } ) ;
155156 }
156157
157- private async getIssuesForVersion ( versionId : string ) : Promise < string [ ] > {
158- const issues = await this . apiRequest < { issues : Array < { key : string } > } > (
159- "GET" ,
160- `/search?jql=fixVersion=${ versionId } `
161- ) ;
162-
163- return issues . issues . map ( issue => issue . key ) ;
164- }
165-
166158 async getIssuesWithDetailsForVersion ( versionId : string ) : Promise < JiraIssue [ ] > {
167159 const response = await this . apiRequest < { issues : JiraIssue [ ] } > (
168160 "GET" ,
169- `/search?jql=fixVersion=${ versionId } &fields=summary`
161+ `/search/jql?` +
162+ new URLSearchParams ( [
163+ [ "jql" , `project = ${ this . projectId } AND fixVersion = ${ versionId } ` ] ,
164+ [ "fields" , "summary" ]
165+ ] ) . toString ( )
170166 ) ;
171167
172168 return response . issues ;
You can’t perform that action at this time.
0 commit comments