File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -686,7 +686,7 @@ Use it in your project:
686686` ` ` js
687687// require modules
688688const Config = require('gitlab-time-tracker/include/config');
689- const Report = require('gitlab-time-tracker/model /report');
689+ const Report = require('gitlab-time-tracker/models /report');
690690
691691// create a default config
692692let config = new Config();
@@ -698,12 +698,16 @@ config.set('project', 'namespace/project');
698698// create report
699699let report = new Report(config);
700700
701- // chain promises to query and process data
702- report.project()
703- .then(report.issues, error => {})
704- .then(report.mergeRequests, error => {})
705- .then(report.processIssues, error => {})
706- .then(report.processMergeRequests, error => {});
701+ // query and process data
702+ try {
703+ await report.getProject()
704+ await report.getIssues()
705+ await report.getMergeRequests()
706+ await report.processIssues()
707+ await report.processMergeRequests()
708+ } catch (error) {
709+ console.log(error)
710+ }
707711
708712// access data on report
709713report.issues.forEach(issue => {
You can’t perform that action at this time.
0 commit comments