Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ Use it in your project:
```js
// require modules
const Config = require('gitlab-time-tracker/include/config');
const Report = require('gitlab-time-tracker/model/report');
const Report = require('gitlab-time-tracker/models/report');

// create a default config
let config = new Config();
Expand All @@ -698,12 +698,16 @@ config.set('project', 'namespace/project');
// create report
let report = new Report(config);

// chain promises to query and process data
report.project()
.then(report.issues, error => {})
.then(report.mergeRequests, error => {})
.then(report.processIssues, error => {})
.then(report.processMergeRequests, error => {});
// query and process data
try {
await report.getProject()
await report.getIssues()
await report.getMergeRequests()
await report.processIssues()
await report.processMergeRequests()
} catch (error) {
console.log(error)
}

// access data on report
report.issues.forEach(issue => {
Expand Down