From c621815155f1525b5a6b56325689ced08371c3f9 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Fri, 31 Mar 2023 10:16:50 -0700 Subject: [PATCH] Avoid printing messages to the console. --- CONTRIBUTING.md | 12 ++++++++++++ lib/src/common/github.dart | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ac480095..15f2d03b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,6 +30,18 @@ GitHub.dart is committed to efficiency as much as possible. If your code is not Pull Request rejections are not a bad thing. It just means you need to fix something. Perhaps it is important to define 'rejection' as it is used in this case. A rejection is when a GitHub.dart committer comments on a Pull Request with a comment like 'rejected due to incorrect formatting'. +## Tests + +To run the complete test suite you will need to install +`octokit/fixtures-server`. + +``` +npm install --global @octokit/fixtures-server +``` + +Tests can be run using `make test`, which will start up a local mock +GitHub and execute tests against it using your localhost port 3000. + ## Contacting Us - IRC: `#directcode on irc.esper.net and irc.freenode.net` diff --git a/lib/src/common/github.dart b/lib/src/common/github.dart index 0aead228..62358bd8 100644 --- a/lib/src/common/github.dart +++ b/lib/src/common/github.dart @@ -433,7 +433,6 @@ class GitHub { /// Internal method to handle status codes /// Never handleStatusCode(http.Response response) { - print(response.body); String? message = ''; List>? errors; if (response.headers['content-type']!.contains('application/json')) { @@ -450,7 +449,7 @@ class GitHub { } } } catch (ex) { - print(ex); + throw UnknownError(this, ex.toString()); } } switch (response.statusCode) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy