getcontributors
Advanced tools
Comparing version 2.16.0-next.1592740627.ab407aedc41133a4a2bfb0dd7cc8fc8384c2c101 to 2.16.0-next.1593046150.3845d008cfc71cd8b34d19d02d2371244c173f82
@@ -6,3 +6,4 @@ /* eslint camelcase:0 */ | ||
import { getHeaders } from 'githubauthreq' | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
import { env } from 'process' | ||
const { GITHUB_API = 'https://api.github.com' } = env | ||
/** Export the Fellow class we have imported and are using, such that consumers of this package and ensure they are interacting with the same singletons */ | ||
@@ -26,3 +27,3 @@ export { Fellow } | ||
// Fetch | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100` | ||
const url = `${GITHUB_API}/repos/${slug}/contributors?per_page=100` | ||
const resp = await fetch(url, { | ||
@@ -29,0 +30,0 @@ headers: getHeaders(), |
@@ -15,3 +15,4 @@ 'use strict' | ||
const githubauthreq_1 = require('githubauthreq') | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
const process_1 = require('process') | ||
const { GITHUB_API = 'https://api.github.com' } = process_1.env | ||
/** Fetch the full profile information for a contributor */ | ||
@@ -34,3 +35,3 @@ async function getContributorProfile(url) { | ||
// Fetch | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100` | ||
const url = `${GITHUB_API}/repos/${slug}/contributors?per_page=100` | ||
const resp = await cross_fetch_1.default(url, { | ||
@@ -37,0 +38,0 @@ headers: githubauthreq_1.getHeaders(), |
{ | ||
"title": "Get Contributors", | ||
"name": "getcontributors", | ||
"version": "2.16.0-next.1592740627.ab407aedc41133a4a2bfb0dd7cc8fc8384c2c101", | ||
"version": "2.16.0-next.1593046150.3845d008cfc71cd8b34d19d02d2371244c173f82", | ||
"description": "Fetch all the contributors from a github repository, github organisation, or github search", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/bevry/getcontributors", |
@@ -9,3 +9,4 @@ /* eslint camelcase:0 */ | ||
import { getHeaders } from 'githubauthreq' | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
import { env } from 'process' | ||
const { GITHUB_API = 'https://api.github.com' } = env | ||
@@ -114,3 +115,3 @@ /** Collection of fellows */ | ||
// Fetch | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100` | ||
const url = `${GITHUB_API}/repos/${slug}/contributors?per_page=100` | ||
const resp = await fetch(url, { | ||
@@ -117,0 +118,0 @@ headers: getHeaders(), |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
48882
650
0