Skip to content

Commit

Permalink
v1.9.0 - add support for GITHUB_API env var
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Nov 10, 2019
1 parent 942925f commit 48b5b8e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ node_js:
- '8'
- '10'
- '12'
- '13'
matrix:
fast_finish: true
allow_failures: []
Expand All @@ -18,4 +17,4 @@ after_success:
notifications:
email:
recipients:
secure: f6/szRoj5YocIDXfVpJii+v6hBtHGQR90gx9mZQBhy+tW5wbiQhpOh8eMl59CUFCyzG2hENL+qrHvmFlE6mwi14cTGAXP/XovKotzb59Ftib/uwhl6cApSh51H0CkTr8Lvvre0DelklAHXLaASywd0i+iPCKnVvc5wUuRRyQP+A=
secure: DYTnnnxuSukbdU2tZpuc90wb4f4kce3scGLub8IYM4PBGuQUryIp6IbcnyZnIuikjKuORGrOjtog/y7zSdiTTkaZg90ChX/eLA3BpPiYkSU+snvk8+m2BjNg2UjTzMsvSHZslIUHWE5KuD81PEKV99QtOQ9oRncV6615koJrfW8=
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# History

## v1.9.0 2019 November 11

- Implemented support for `GITHUB_API` environment variable to access the GitHub API via a proxy

## v1.8.0 2019 November 11

- Updated [base files](https://github.com/bevry/base) and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Projectz",
"name": "projectz",
"version": "1.8.0",
"version": "1.9.0",
"description": "Stop wasting time syncing and updating your project's README and Package Files!",
"homepage": "https://github.com/bevry/projectz",
"license": "MIT",
Expand Down Expand Up @@ -98,7 +98,7 @@
"flow type comments"
],
"engines": {
"node": "8 || 10 || 12 || 13",
"node": "8 || 10 || 12",
"browsers": false
}
}
Expand Down
5 changes: 4 additions & 1 deletion source/lib/projectz.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const installUtil = require('./install-util.js')
const licenseUtil = require('./license-util.js')
const projectzUtil = require('./projectz-util.js')

// Allow the user to make use of a proxy service for the github API if they wish
const ghapi = process.env.GITHUB_API || 'https://api.github.com'

// Definition
// Projects is defined as a class to ensure we can run multiple instances of it
class Projectz {
Expand Down Expand Up @@ -182,7 +185,7 @@ class Projectz {
// Prepare
const githubSlug = this.mergedPackageData.github.slug
const githubAuthQueryString = fetchGithubAuthQueryString()
const url = `https://api.github.com/repos/${githubSlug}/contributors?per_page=100&${githubAuthQueryString}`
const url = `${ghapi}/repos/${githubSlug}/contributors?per_page=100&${githubAuthQueryString}`

// Fetch the github and package contributors for it
log('info', `Loading contributors for repository: ${githubSlug}`)
Expand Down

0 comments on commit 48b5b8e

Please sign in to comment.