Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
fix function names and use async/await instead of chained promises
  • Loading branch information
leschekfm committed Aug 4, 2017
commit 170e639cfc0061797c712cf626b3f60e7147c88e
16 changes: 10 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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