diff options
author | Sophie Zhang <sophie_zhang@brown.edu> | 2023-07-18 01:03:09 -0400 |
---|---|---|
committer | Sophie Zhang <sophie_zhang@brown.edu> | 2023-07-18 01:03:09 -0400 |
commit | 2bfad0eb9e3d8f8d26f66cf8e6daa801a694cab0 (patch) | |
tree | 5241f583634f176abe4e6e9c528aff42fc98b88d | |
parent | d561f7d0803205ffded9e374be60853fa90438bd (diff) |
nothing much
-rw-r--r-- | src/client/util/reportManager/ReportManager.tsx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/client/util/reportManager/ReportManager.tsx b/src/client/util/reportManager/ReportManager.tsx index 7d2d8d277..b65ada7ec 100644 --- a/src/client/util/reportManager/ReportManager.tsx +++ b/src/client/util/reportManager/ReportManager.tsx @@ -177,7 +177,6 @@ export class ReportManager extends React.Component<{}> { }); console.log(res); - const links = await this.uploadFilesToServer(); console.log(links); if (!links) { @@ -186,19 +185,19 @@ export class ReportManager extends React.Component<{}> { } const formattedLinks = (links ?? []).map(this.fileLinktoServerLink); - // const req = await this.octokit.request('POST /repos/{owner}/{repo}/issues', { - // owner: 'brown-dash', - // repo: 'Dash-Web', - // title: this.formatTitle(this.bugTitle, Doc.CurrentUserEmail), - // body: `${this.bugDescription} ${formattedLinks.length > 0 && `\n\nFiles:\n${formattedLinks.join('\n')}`}`, - // labels: ['from-dash-app', this.bugType, this.bugPriority], - // }); + const req = await this.octokit.request('POST /repos/{owner}/{repo}/issues', { + owner: 'brown-dash', + repo: 'Dash-Web', + title: this.formatTitle(this.bugTitle, Doc.CurrentUserEmail), + body: `${this.bugDescription} ${formattedLinks.length > 0 && `\n\nFiles:\n${formattedLinks.join('\n')}`}`, + labels: ['from-dash-app', this.bugType, this.bugPriority], + }); - // // 201 status means success - // if (req.status !== 201) { - // alert('Error creating issue on github.'); - // return; - // } + // 201 status means success + if (req.status !== 201) { + alert('Error creating issue on github.'); + return; + } // Reset fields this.setBugTitle(''); @@ -218,7 +217,6 @@ export class ReportManager extends React.Component<{}> { } this.setFetchingIssues(false); alert('Successfully submitted issue.'); - // this.close(); } /** |