New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup github-file.js #99

Merged
merged 4 commits into from Nov 2, 2017

Conversation

Projects
None yet
1 participant
@50Wliu
Member

50Wliu commented Nov 2, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

  • Rework error validation: previously it was expected that an array of errors would be returned, when in reality only one error would ever be returned. So just switch it to expect a String and also report errors when validating the repo.
  • let -> const where possible
  • Url -> URL
  • Some other minor changes

Alternate Designs

None.

Benefits

Just a bit of code maintenance. Error reporting should be clearer.

Possible Drawbacks

Not sure what the Public and Internal docs mean in this file, since we don't export a service or anything. Therefore I think it's safe to remove the existing error methods and add validateRepo as private. Did a quick search and does not look like anything is relying on those.

Applicable Issues

None.

50Wliu added some commits Nov 2, 2017

🎨
* Remove unnecessary returns
* let -> const where possible
* Some other minor cleanup

@50Wliu 50Wliu merged commit 0834b3a into master Nov 2, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@50Wliu 50Wliu deleted the wl-github-file-cleanup branch Nov 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment