Iss #242 - Add support for org-wide projects
Resolves #242 (closed)
Merge request reports
Activity
added 1 commit
- 49043c29 - Update Github org-wide project settings to use real values
requested review from @cguindon, @epoirier, @oliviergoulet, and @zacharysabourin
Added you 4 as this is a JS change, and Eric also did the work pushing the project API changes for Github project-wide organizations. This code should be stable in fetching the repos for the structure of the data on production, with IoT Sparkplug as an example
Please make sure to include @theodoreb on any Javascript project.
He's very knowledgeable on the topic and I would like him to be involved in those reviews.
Edited by Christopher Guindon
requested review from @theodoreb
542 542 .then(result => result) 543 543 .catch(err => logError(err, 'teams:listRepos')); 544 544 } 545 546 /** 547 * Retrieves repos for a given organization. Returns raw results with no cache. 548 */ 549 async getReposForOrg(org) { 550 if (this.#verbose === true) { 551 this.#logger.debug(`getReposForOrg(org = ${org})`); 552 } 553 this.#logger.verbose(`Getting repos associated with org: ${org}`); 554 var options = octokit.teams.listReposInOrg.endpoint.merge({ 555 org: org, 556 }); 557 return await octokit.paginate(options) Probably a nitpick:
This
await
seems redundant.async
functions implicitly return promises so nothing stops you from returningoctokit.paginate()
directly.I believe the only use-case of
return await
on a Promise would be if you want the error to propagate up sometry catch
. But you are already catching the error here.
mentioned in commit cb85f5bd