sourcecred/config
Dandelion Mané 669f34d009
Add `fetchGithubOrg` for loading organizations (#1117)
This commit adds a module, `fetchGithubOrg`, which loads data on GitHub
organizations, most notably including the list of repositories in that
org.

The structure of this commit is heavily influenced by review feedback
from @wchargin's [review] of a related PR.

Test plan: This logic depends on actually hitting GitHub's API, so the
tests are modeled off the related `fetchGithubRepo` module. There is a
new shell test, `src/plugins/github/fetchGithubOrgTest.sh`, which
verifies that that the org loading logic works via a snapshot.

To verify the correctness of this commit, I've performed the following
checks:

- `yarn test --full` passes
- inspection of `src/plugins/github/example/example-organization.json`
confirms that the list of repositories matches the repos for the
"sourcecred-test-organization" organization
- manually breaking the snapshot (by removing a repo from the snapshot)
causes `yarn test --full` to fail
- running `src/plugins/github/fetchGithubOrgTest.sh -u` restores the
snapshot, afterwhich `yarn test --full` passes again.

[review]: https://github.com/sourcecred/sourcecred/pull/1089#pullrequestreview-204577637
2019-03-19 19:00:08 -07:00
..
jest flow: add typing to Jest transform modules (#790) 2018-09-06 13:30:33 -07:00
RemoveBuildDirectoryPlugin.js webpack: empty build dir instead of removing it (#768) 2018-09-04 21:44:09 -07:00
babel.js babel: transform ES6 modules to CommonJS (#766) 2018-09-04 21:47:36 -07:00
env.js Move repoIdRegistry to core (#992) 2018-11-01 18:11:48 -07:00
paths.js Add `fetchGithubOrg` for loading organizations (#1117) 2019-03-19 19:00:08 -07:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
test.js Add `fetchGithubOrg` for loading organizations (#1117) 2019-03-19 19:00:08 -07:00
webpack.config.backend.js webpack: expose repo registry at build time (#981) 2018-11-01 12:38:18 -07:00
webpack.config.web.js core: allow repo ID registry to store metadata (#1003) 2018-11-09 17:28:39 -08:00