nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: whitequark/ipaddr.js
Pull request #154 (2021-06-14 11:13:28)

Add IANA reserved IPv6 addresses of 2001 space
According to https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xml Notes 9 through 13, the following IPv6 addresses should be marked as reserved:
* 2001:2:: 
* 2001:3:: 
* 2001:4:112:: 
* 2001:10:: 
* 2001:20:: 


Patch:
diff --git a/lib/ipaddr.js b/lib/ipaddr.js
index efdd8fb..146838e 100644
--- a/lib/ipaddr.js
+++ b/lib/ipaddr.js
@@ -545,7 +545,12 @@
             // RFC6052, RFC6146
             teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],
             // RFC4291
-            reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]]
+            reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]],
+            benchmarking: [new IPv6([0x2001, 0x2, 0, 0, 0, 0, 0, 0]), 48],
+            amt: [new IPv6([0x2001, 0x3, 0, 0, 0, 0, 0, 0]), 32],
+            as112v6: [new IPv6([0x2001, 0x4, 0x112, 0, 0, 0, 0, 0]), 48],
+            deprecated: [new IPv6([0x2001, 0x10, 0, 0, 0, 0, 0, 0]), 28],
+            orchid2: [new IPv6([0x2001, 0x20, 0, 0, 0, 0, 0, 0]), 28]
         };
 
         // Checks if this address is an IPv4-mapped IPv6 address.


Test patch:
diff --git a/test/ipaddr.test.js b/test/ipaddr.test.js
index d7de7d6..d41cbbc 100644
--- a/test/ipaddr.test.js
+++ b/test/ipaddr.test.js
@@ -415,6 +415,11 @@ describe('ipaddr', () => {
         assert.equal(ipaddr.IPv6.parse('64:ff9b::1234').range(), 'rfc6052');
         assert.equal(ipaddr.IPv6.parse('2002:1f63:45e8::1').range(), '6to4');
         assert.equal(ipaddr.IPv6.parse('2001::4242').range(), 'teredo');
+        assert.equal(ipaddr.IPv6.parse('2001:2::').range(), 'benchmarking');
+        assert.equal(ipaddr.IPv6.parse('2001:3::').range(), 'amt');
+        assert.equal(ipaddr.IPv6.parse('2001:4:112::').range(), 'as112v6');
+        assert.equal(ipaddr.IPv6.parse('2001:10::').range(), 'deprecated');
+        assert.equal(ipaddr.IPv6.parse('2001:20::').range(), 'orchid2');
         assert.equal(ipaddr.IPv6.parse('2001:db8::3210').range(), 'reserved');
         assert.equal(ipaddr.IPv6.parse('2001:470:8:66::1').range(), 'unicast');
         assert.equal(ipaddr.IPv6.parse('2001:470:8:66::1%z').range(), 'unicast');
Repository: stripe/stripe-node
Pull request #827 (2020-03-03 22:48:10)

Improve args check to support optional params for makeRequest
I ran out of time trying to write an automated test for this. I'm not familiar with this nock tooling and was able to get past the root error and my basic test passing locally. Also, didn't see a compact helper so just used this filter.

This is to address #825 

```
(async () => {
  const id = 'acct_1GBs7XDllkSPMYqA';
  const account = await stripe.accounts.retrieve(id)
  console.log(account)
  const account2 = await stripe.accounts.retrieve(id, undefined)
  console.log(account2)
})();
```


r? @rattrayalex-stripe 
cc @stripe/api-libraries 




Patch:
diff --git a/lib/makeRequest.js b/lib/makeRequest.js
index b266fd2d..14740f23 100644
--- a/lib/makeRequest.js
+++ b/lib/makeRequest.js
@@ -33,7 +33,7 @@ function getRequestOpts(self, requestArgs, spec, overrideData) {
   const options = utils.getOptionsFromArgs(args);
 
   // Validate that there are no more args.
-  if (args.length) {
+  if (args.filter((x) => x != null).length) {
     throw new Error(
       `Stripe: Unknown arguments (${args}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${requestMethod} \`${path}\`)`
     );


Test patch:
diff --git a/test/StripeResource.spec.js b/test/StripeResource.spec.js
index b6d01bbb..b7941021 100644
--- a/test/StripeResource.spec.js
+++ b/test/StripeResource.spec.js
@@ -77,6 +77,28 @@ describe('StripeResource', () => {
         });
       });
 
+      it('works correctly with undefined optional arguments', (done) => {
+        const scope = nock(`https://${stripe.getConstant('DEFAULT_HOST')}`)
+          .get('/v1/accounts/acct_123')
+          .reply(200, '{}');
+
+        realStripe.accounts.retrieve('acct_123', undefined, (err, response) => {
+          done(err);
+          scope.done();
+        });
+      });
+
+      it('works correctly with null optional arguments', (done) => {
+        const scope = nock(`https://${stripe.getConstant('DEFAULT_HOST')}`)
+          .get('/v1/accounts/acct_123')
+          .reply(200, '{}');
+
+        realStripe.accounts.retrieve('acct_123', null, (err, response) => {
+          done(err);
+          scope.done();
+        });
+      });
+
       it('encodes data for DELETE requests as query params', (done) => {
         const data = {
           foo: 'bar',
Repository: stripe/stripe-node
Pull request #1021 (2020-09-29 00:13:53)

Add VERSION to instantiated Stripe client.

remi-stripe: Assigning to @richardm-stripe to review
richardm-stripe: LGTM!

Patch:
diff --git a/lib/stripe.js b/lib/stripe.js
index 9ceff591..b330b844 100644
--- a/lib/stripe.js
+++ b/lib/stripe.js
@@ -61,6 +61,8 @@ function Stripe(key, config = {}) {
     writable: false,
   });
 
+  this.VERSION = Stripe.PACKAGE_VERSION;
+
   this.on = this._emitter.on.bind(this._emitter);
   this.once = this._emitter.once.bind(this._emitter);
   this.off = this._emitter.removeListener.bind(this._emitter);


Test patch:
diff --git a/test/stripe.spec.js b/test/stripe.spec.js
index 2de04746..179459bd 100644
--- a/test/stripe.spec.js
+++ b/test/stripe.spec.js
@@ -519,4 +519,12 @@ describe('Stripe Module', function() {
       });
     });
   });
+
+  describe('VERSION', () => {
+    it('should return the current package version', () => {
+      const newStripe = Stripe(testUtils.getUserStripeKey());
+
+      expect(newStripe.VERSION).to.equal(Stripe.PACKAGE_VERSION);
+    });
+  });
 });
Repository: stripe/stripe-node
Pull request #1041 (2020-10-13 22:33:03)

Do not mutate user-supplied opts
### Summary

When a user supplies opts to a function, the user's opts are mutated. This becomes a problem when a user supplies an opt that is deprecated; e.g. `stripe_account` instead of `stripeAccount`. In this scenario:

- Before calling the function:
```javascript
opts = {
  ...
  stripe_account: ...,  // user supplies a deprecated opt
  ...
}
```
- After calling the function, the object is mutated:
```javascript
opts = {
  ...
  stripe_account: ...,
  stripeAccount: ...,  // the function unexpectedly inserts the non-deprecated version of the opt
  ...
}
```
Because of this mutation, the user is warned that they have supplied both of these args, when in fact they have only supplied one.

This change makes a shallow copy of the user's opts so that this does not happen.

### Motivation
fixes https://github.com/stripe/stripe-node/issues/1029

### Test plan
- Unit tests




Patch:
diff --git a/lib/utils.js b/lib/utils.js
index 16c9f95b..5bca895a 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -149,7 +149,7 @@ const utils = (module.exports = {
       if (typeof arg === 'string') {
         opts.auth = args.pop();
       } else if (utils.isOptionsHash(arg)) {
-        const params = args.pop();
+        const params = {...args.pop()};
 
         const extraKeys = Object.keys(params).filter(
           (key) => !OPTIONS_KEYS.includes(key)


Test patch:
diff --git a/test/makeRequest.spec.js b/test/makeRequest.spec.js
new file mode 100644
index 00000000..93fe5e67
--- /dev/null
+++ b/test/makeRequest.spec.js
@@ -0,0 +1,29 @@
+'use strict';
+
+require('../testUtils');
+
+const makeRequest = require('../lib/makeRequest');
+const expect = require('chai').expect;
+
+describe('makeRequest', () => {
+  describe('args', () => {
+    it('does not mutate user-supplied deprecated opts', () => {
+      const args = [
+        {
+          stripe_account: 'bad',
+        },
+      ];
+      const mockSelf = {
+        createResourcePathWithSymbols: () => {},
+        createFullPath: () => {},
+        _request: () => {},
+      };
+      makeRequest(mockSelf, args, {}, {});
+      expect(args).to.deep.equal([
+        {
+          stripe_account: 'bad',
+        },
+      ]);
+    });
+  });
+});
Repository: stripe/stripe-node
Pull request #1118 (2021-02-05 19:00:36)

API Updates
Codegen for openapi 79b5ae3.
r? @remi-stripe
cc @stripe/api-libraries

## Changelog
* `LineItem.amount_subtotal` and `LineItem.amount_total` changed from `nullable(integer)` to `integer`
* Improve error message for `EphemeralKeys.create`



Patch:
diff --git a/lib/resources/EphemeralKeys.js b/lib/resources/EphemeralKeys.js
index 6db8357f..cfe14083 100644
--- a/lib/resources/EphemeralKeys.js
+++ b/lib/resources/EphemeralKeys.js
@@ -16,7 +16,7 @@ module.exports = StripeResource.extend({
     validator: (data, options) => {
       if (!options.headers || !options.headers['Stripe-Version']) {
         throw new Error(
-          'stripe_version must be specified to create an ephemeral key'
+          'Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node'
         );
       }
     },
diff --git a/types/2020-08-27/LineItems.d.ts b/types/2020-08-27/LineItems.d.ts
index 04623643..a5ddfe52 100644
--- a/types/2020-08-27/LineItems.d.ts
+++ b/types/2020-08-27/LineItems.d.ts
@@ -19,12 +19,12 @@ declare module 'stripe' {
       /**
        * Total before any discounts or taxes are applied.
        */
-      amount_subtotal: number | null;
+      amount_subtotal: number;
 
       /**
        * Total after discounts and taxes.
        */
-      amount_total: number | null;
+      amount_total: number;
 
       /**
        * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).


Test patch:
diff --git a/test/resources/EphemeralKeys.spec.js b/test/resources/EphemeralKeys.spec.js
index 4149ac74..2a64f5a9 100644
--- a/test/resources/EphemeralKeys.spec.js
+++ b/test/resources/EphemeralKeys.spec.js
@@ -6,7 +6,9 @@ const expect = require('chai').expect;
 function errorsOnNoStripeVersion() {
   return expect(
     stripe.ephemeralKeys.create({customer: 'cus_123'})
-  ).to.be.eventually.rejectedWith(/stripe_version must be specified/i);
+  ).to.be.eventually.rejectedWith(
+    /Passing apiVersion in a separate options hash is required/i
+  );
 }
 
 function sendsCorrectStripeVersion() {
Repository: stripe/stripe-node
Pull request #1206 (2021-07-28 18:58:56)

Fix Typescript definition for `StripeResource.LastResponse.headers`
## Notify
cc @stripe/api-libraries 

## Summary
Move typescript definition for `headers` to the correct location. 

You can see that they are added to the object that eventually becomes `.lastResponse` [here](https://github.com/stripe/stripe-node/blob/master/lib/StripeResource.js#L174)

## Motivation
Fixes https://github.com/stripe/stripe-node/issues/1204

richardm-stripe: r? @stripe/api-library-reviewers 

Patch:
diff --git a/types/lib.d.ts b/types/lib.d.ts
index cb090ab5..41545642 100644
--- a/types/lib.d.ts
+++ b/types/lib.d.ts
@@ -156,8 +156,8 @@ declare module 'stripe' {
     }
 
     export type Response<T> = T & {
-      headers: {[key: string]: string};
       lastResponse: {
+        headers: {[key: string]: string};
         requestId: string;
         statusCode: number;
         apiVersion?: string;


Test patch:
diff --git a/test/stripe.spec.js b/test/stripe.spec.js
index 74027c6e..215c8ae1 100644
--- a/test/stripe.spec.js
+++ b/test/stripe.spec.js
@@ -404,6 +404,8 @@ describe('Stripe Module', function() {
                 const headers = customer.lastResponse.headers;
                 expect(headers).to.contain.keys('request-id');
 
+                expect(customer.headers).to.be.undefined;
+
                 resolve('Called!');
               });
             })
diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts
index 9c763be3..721cc256 100644
--- a/types/test/typescriptTest.ts
+++ b/types/test/typescriptTest.ts
@@ -144,8 +144,8 @@ stripe.setHost('host', 'port', 'protocol');
     const statusCode: number = lr.statusCode;
     const apiVersion: string | undefined = lr.apiVersion;
     const idempotencyKey: string | undefined = lr.idempotencyKey;
-    const headers = custs.headers;
-    const header: string | undefined = custs.headers['request-id'];
+    const headers = lr.headers;
+    const header: string | undefined = headers['request-id'];
   }
 
   {
@@ -155,8 +155,8 @@ stripe.setHost('host', 'port', 'protocol');
     const statusCode: number = lr.statusCode;
     const apiVersion: string | undefined = lr.apiVersion;
     const idempotencyKey: string | undefined = lr.idempotencyKey;
-    const headers = cust.headers;
-    const header: string | undefined = cust.headers['request-id'];
+    const headers = lr.headers;
+    const header: string | undefined = lr.headers['request-id'];
   }
   {
     const acct = await stripe.accounts.createExternalAccount('foo', {
Repository: stripe/stripe-node
Pull request #1219 (2021-08-13 19:32:01)

Update user agent computation to handle environments without process.
### Notify

r? @richardm-stripe

### Summary

Updates the user agent computation to handle JS environments which don't have a global `process` variable (eg. browser, Cloudflare Worker). This moves towards unblocking https://github.com/stripe/stripe-node/issues/997.



Patch:
diff --git a/lib/stripe.js b/lib/stripe.js
index 14751435..41586c06 100644
--- a/lib/stripe.js
+++ b/lib/stripe.js
@@ -11,14 +11,16 @@ const DEFAULT_TIMEOUT = 80000;
 
 Stripe.PACKAGE_VERSION = require('../package.json').version;
 
+const utils = require('./utils');
+const {determineProcessUserAgentProperties, emitWarning} = utils;
+
 Stripe.USER_AGENT = {
   bindings_version: Stripe.PACKAGE_VERSION,
   lang: 'node',
-  lang_version: process.version,
-  platform: process.platform,
   publisher: 'stripe',
   uname: null,
   typescript: false,
+  ...determineProcessUserAgentProperties(),
 };
 
 /** @private */
@@ -44,8 +46,6 @@ const ALLOWED_CONFIG_PROPERTIES = [
 ];
 
 const EventEmitter = require('events').EventEmitter;
-const utils = require('./utils');
-const {emitWarning} = utils;
 
 Stripe.StripeResource = require('./StripeResource');
 Stripe.resources = resources;
diff --git a/lib/utils.js b/lib/utils.js
index ae4c0047..7eed41de 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -429,6 +429,15 @@ const utils = (module.exports = {
 
     return n;
   },
+
+  determineProcessUserAgentProperties: () => {
+    return typeof process === 'undefined'
+      ? {}
+      : {
+          lang_version: process.version,
+          platform: process.platform,
+        };
+  },
 });
 
 function emitWarning(warning) {


Test patch:
diff --git a/test/stripe.spec.js b/test/stripe.spec.js
index 366a4614..0f5dd5f7 100644
--- a/test/stripe.spec.js
+++ b/test/stripe.spec.js
@@ -160,6 +160,21 @@ describe('Stripe Module', function() {
         })
       ).to.eventually.have.property('lang', 'node'));
 
+    it('Should return platform and version in the serialized user agent JSON object', async () => {
+      // Check that the testing environment actually has a process global.
+      expect(process.version).to.not.be.empty;
+      expect(process.platform).to.not.be.empty;
+
+      const userAgent = await new Promise((resolve, reject) => {
+        stripe.getClientUserAgent((c) => {
+          resolve(JSON.parse(c));
+        });
+      });
+
+      expect(userAgent).to.have.property('lang_version', process.version);
+      expect(userAgent).to.have.property('platform', process.platform);
+    });
+
     it('Should include whether typescript: true was passed, respecting reinstantiations', () => {
       return new Promise((resolve) => resolve())
         .then(() => {
Repository: stripe/stripe-node
Pull request #1243 (2021-09-15 20:53:22)

Add stripe-mock for testing along with a sample integration test.
### Notify

r? @richardm-stripe 

### Summary

Adds support for `stripe-mock` tests by running the Docker image as part of CI and adding utility functions for creating a stripe-mock client.

### Test plan

Added a sample integration test which uses this client.


Patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index e78edc19..31d88832 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -28,7 +28,7 @@ jobs:
       - name: Get yarn cache directory path
         id: yarn-cache-dir-path
         run: echo "::set-output name=dir::$(yarn cache dir)"
-      
+
       - uses: actions/cache@v2
         id: yarn-cache
         with:
@@ -37,5 +37,8 @@ jobs:
           restore-keys: |
             ${{ runner.os }}-yarn-
 
+      - name: Start stripe-mock
+        run: docker run -d -p 12111-12112:12111-12112 stripemock/stripe-mock && sleep 5
+
       - name: Lint, typecheck, and test
         run: yarn && yarn test
diff --git a/README.md b/README.md
index db7c023c..6b54388f 100644
--- a/README.md
+++ b/README.md
@@ -477,6 +477,15 @@ $ yarn test
 
 If you do not have `yarn` installed, you can get it with `npm install --global yarn`.
 
+The tests also depends on [stripe-mock][stripe-mock], so make sure to fetch and
+run it from a background terminal ([stripe-mock's README][stripe-mock-usage]
+also contains instructions for installing via Homebrew and other methods):
+
+```bash
+go get -u github.com/stripe/stripe-mock
+stripe-mock
+```
+
 Run a single test suite without a coverage report:
 
 ```bash


Test patch:
diff --git a/test/resources/Integration.spec.js b/test/resources/Integration.spec.js
new file mode 100644
index 00000000..23a4f9ca
--- /dev/null
+++ b/test/resources/Integration.spec.js
@@ -0,0 +1,16 @@
+'use strict';
+
+// Resource integration tests which use stripe-mock.
+
+const stripe = require('../../testUtils').getStripeMockClient();
+const expect = require('chai').expect;
+
+describe('Customers Resource', () => {
+  describe('retrieve', () => {
+    it('Sends the correct request', async () => {
+      const customer = await stripe.customers.retrieve('cus_123');
+      expect(customer).to.not.be.null;
+      expect(customer.id).to.equal('cus_123');
+    });
+  });
+});
diff --git a/testUtils/index.js b/testUtils/index.js
index 2aa03459..0611b012 100644
--- a/testUtils/index.js
+++ b/testUtils/index.js
@@ -41,6 +41,16 @@ const utils = (module.exports = {
     });
   },
 
+  getStripeMockClient: () => {
+    const stripe = require('../lib/stripe');
+
+    return stripe('sk_test_123', {
+      host: process.env.STRIPE_MOCK_HOST || 'localhost',
+      port: process.env.STRIPE_MOCK_PORT || 12111,
+      protocol: 'http',
+    });
+  },
+
   getUserStripeKey: () => {
     const key =
       process.env.STRIPE_TEST_API_KEY || 'tGN0bIwXnHdwOa85VABjPdSn8nWY7G7I';
Repository: stripe/stripe-node
Pull request #1257 (2021-09-24 20:42:33)

API Updates
Codegen for openapi 8442a02.
r? @dcr-stripe
cc @stripe/api-libraries

## Changelog
* Add support for `amount_authorized` and `overcapture_supported` on `Charge.payment_method_details.card_present`




Patch:
diff --git a/types/2020-08-27/Charges.d.ts b/types/2020-08-27/Charges.d.ts
index a98cddba..e67ce669 100644
--- a/types/2020-08-27/Charges.d.ts
+++ b/types/2020-08-27/Charges.d.ts
@@ -918,6 +918,11 @@ declare module 'stripe' {
         }
 
         interface CardPresent {
+          /**
+           * The authorized amount
+           */
+          amount_authorized: number | null;
+
           /**
            * Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
            */
@@ -990,6 +995,11 @@ declare module 'stripe' {
            */
           network: string | null;
 
+          /**
+           * Defines whether the authorized amount can be over-captured or not
+           */
+          overcapture_supported: boolean | null;
+
           /**
            * How card details were read in this transaction.
            */


Test patch:
diff --git a/test/resources/GeneratedTests.spec.js b/test/resources/GeneratedTests.spec.js
index 107cc96c..7f6d698c 100644
--- a/test/resources/GeneratedTests.spec.js
+++ b/test/resources/GeneratedTests.spec.js
@@ -768,8 +768,8 @@ describe('TaxId', function() {
 
   it('retrieveTaxId method', async function() {
     const taxId = await stripe.customers.retrieveTaxId(
-      'txi_xxxxxxxxxxxxx',
-      'cus_xxxxxxxxxxxxx'
+      'cus_xxxxxxxxxxxxx',
+      'txi_xxxxxxxxxxxxx'
     );
     expect(taxId).not.to.be.null;
   });
Repository: electron-userland/electron-forge
Pull request #124 (2017-02-06 03:43:07)

fix(publisher): throw an exception if a GitHub token isn't specified
**Have you read the [section in CONTRIBUTING.md about pull requests](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md#filing-pull-requests)?**

Yes

**Are your changes appropriately documented?**

N/A

**Do your changes have sufficient test coverage?**

Yes

**Does the testsuite pass successfully on your local machine?**

Yes

**Summarize your changes:**

Based on a problem someone had in the Atom #electron Slack channel.


Patch:
diff --git a/src/publishers/github.js b/src/publishers/github.js
index fd021762b..56edf5a02 100644
--- a/src/publishers/github.js
+++ b/src/publishers/github.js
@@ -9,7 +9,7 @@ export default async (artifacts, packageJSON, forgeConfig, authToken, tag) => {
     throw 'In order to publish to github you must set the "github_repository.owner" and "github_repository.name" properties in your forge config. See the docs for more info'; // eslint-disable-line
   }
 
-  const github = new GitHub(authToken);
+  const github = new GitHub(authToken, true);
 
   let release;
   await asyncOra('Searching for target Release', async () => {
diff --git a/src/util/github.js b/src/util/github.js
index 76aa9b918..65d808249 100644
--- a/src/util/github.js
+++ b/src/util/github.js
@@ -1,11 +1,13 @@
 import GitHubAPI from 'github';
 
 export default class GitHub {
-  constructor(authToken) {
+  constructor(authToken, requireAuth) {
     if (authToken) {
       this.token = authToken;
     } else if (process.env.GITHUB_TOKEN) {
       this.token = process.env.GITHUB_TOKEN;
+    } else if (requireAuth) {
+      throw 'Please set GITHUB_TOKEN in your environment to access these features';
     }
   }
 


Test patch:
diff --git a/test/fast/github_spec.js b/test/fast/github_spec.js
index 98d91eb80..67fa8b628 100644
--- a/test/fast/github_spec.js
+++ b/test/fast/github_spec.js
@@ -56,5 +56,12 @@ describe('GitHub', () => {
       gh.getGitHub();
       expect(gitHubAuthSpy.callCount).to.equal(0);
     });
+
+    it('should throw an exception if a token is required', () => {
+      expect(() => {
+        const gh = new GitHub(null, true);
+        gh.getGitHub();
+      }).to.throw('Please set GITHUB_TOKEN in your environment to access these features');
+    });
   });
 });