Skip to content

Commit

Permalink
Merge pull request #12 from hipstersmoothie/reno
Browse files Browse the repository at this point in the history
must load env vars in function so other scripts have chance to set vars
  • Loading branch information
hipstersmoothie committed Aug 19, 2019
2 parents e52b7ce + 3c5f832 commit aba0999
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@
"plugins": [
"npm",
"released"
],
"labels": {
"dependencies": {
"name": "dependencies",
"title": "Dependency Updates"
}
},
"skipReleaseLabels": [
"dependencies"
]
}
}
5 changes: 2 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": [
"config:base"
]
"extends": ["config:base"],
"labels": ["dependencies"]
}
14 changes: 6 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import pretty from 'eslint-formatter-pretty';

import Octokit from '@octokit/rest';

const APP_ID = process.env.ESLINT_APP_ID
? Number(process.env.ESLINT_APP_ID)
: 38817;
const APP_ID = 38817;
/**
* Before you say anything I *know* this is horribly insecure.
*
Expand All @@ -21,9 +19,7 @@ const APP_ID = process.env.ESLINT_APP_ID
* metadata and read/write checks. So the attack surface is really only
* messing with a users checks, which is not too risky.
*/
const PRIVATE_KEY =
process.env.ESLINT_PRIVATE_KEY ||
`
const PRIVATE_KEY = `
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA5jyJgi6Tx5lpGj4kBJrc72ZOUd0x0ZyAWphv3cuZ7mXLH+eo
4Gg/osi/gxfu8Nznittkc155dbHsk9a2fkIfAWPGPXwloOcBLfBea+c1lp7L63Zn
Expand Down Expand Up @@ -101,8 +97,10 @@ const formatter: eslint.CLIEngine.Formatter = results => {
annotations: createAnnotations(results),
errorCount,
warningCount,
appId: APP_ID,
privateKey: PRIVATE_KEY
appId: process.env.ESLINT_APP_ID
? Number(process.env.ESLINT_APP_ID)
: APP_ID,
privateKey: process.env.ESLINT_PRIVATE_KEY || PRIVATE_KEY
});

return pretty(results);
Expand Down

0 comments on commit aba0999

Please sign in to comment.