aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/reportManager/ReportManager.tsx
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-18 01:03:09 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-18 01:03:09 -0400
commit2bfad0eb9e3d8f8d26f66cf8e6daa801a694cab0 (patch)
tree5241f583634f176abe4e6e9c528aff42fc98b88d /src/client/util/reportManager/ReportManager.tsx
parentd561f7d0803205ffded9e374be60853fa90438bd (diff)
nothing much
Diffstat (limited to 'src/client/util/reportManager/ReportManager.tsx')
-rw-r--r--src/client/util/reportManager/ReportManager.tsx26
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();
}
/**