Skip to content
Snippets Groups Projects

Iss #242 - Add support for org-wide projects

Merged Iss #242 - Add support for org-wide projects
2 unresolved threads
Merged Martin Lowe requested to merge malowe/eclipsefdn-github-sync:malowe/master/242 into master
2 unresolved threads

Resolves #242 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 returning octokit.paginate() directly.

    I believe the only use-case of return await on a Promise would be if you want the error to propagate up some try catch. But you are already catching the error here.

  • Author Maintainer

    I honestly overused async in this script for the most part. It's a few years old and needs a rewrite to Typescript at some point, so I don't think investing too much time polishing it makes the most sense.

  • Please register or sign in to reply
  • Olivier Goulet approved this merge request

    approved this merge request

  • Zachary Sabourin approved this merge request

    approved this merge request

  • Martin Lowe mentioned in commit cb85f5bd

    mentioned in commit cb85f5bd

  • merged

  • Please register or sign in to reply
    Loading