Skip to content

Commit

Permalink
config: Update githubTimeout to issuesTimeout
Browse files Browse the repository at this point in the history
Part of the preparation for #11.
  • Loading branch information
Bland, Mike committed Nov 5, 2017
1 parent cfbf8d3 commit c5b79cc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/slack-emoji-issues.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"collection": "mbland",
"githubApiToken": "<github-api-token>",
"slackApiToken": "<slack-api-token>",
"githubTimeout": 5000,
"issuesTimeout": 5000,
"slackTimeout": 5000,
"successReaction": "heavy_check_mark",
"rules": [
Expand Down
4 changes: 2 additions & 2 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function Config(config, updates) {

this.collection = config.collection
this.githubApiToken = config.githubApiToken
this.githubTimeout = config.githubTimeout
this.issuesTimeout = config.issuesTimeout
this.slackApiToken = config.slackApiToken
this.slackTimeout = config.slackTimeout
this.successReaction = config.successReaction
Expand All @@ -28,7 +28,7 @@ var schema = {
requiredTopLevelFields: {
collection: 'Organization, username, or project',
githubApiToken: 'GitHub API access token',
githubTimeout: 'GitHub API timeout limit in milliseconds',
issuesTimeout: 'Issue tracking system API timeout limit in milliseconds',
slackApiToken: 'Slack API access token',
slackTimeout: 'Slack API timeout limit in milliseconds',
successReaction: 'emoji used to indicate an issue was successfully filed',
Expand Down
2 changes: 1 addition & 1 deletion lib/github-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = GitHubClient
function GitHubClient(config) {
this.collection = config.collection
this.apiToken = config.githubApiToken
this.timeout = config.githubTimeout
this.timeout = config.issuesTimeout
this.baseurl = url.parse(config.githubApiBaseUrl ||
constants.GITHUB_API_BASE_URL)
this.requestFactory = (this.baseurl.protocol === 'https:') ? https : http
Expand Down
2 changes: 1 addition & 1 deletion tests/config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Config', function() {
var errors = [
'missing collection',
'missing githubApiToken',
'missing githubTimeout',
'missing issuesTimeout',
'missing slackApiToken',
'missing slackTimeout',
'missing successReaction',
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test-config-invalid.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"collection": "mbland",
"githubTimeout": 5000,
"issuesTimeout": 5000,
"slackTimeout": 5000,
"successReaction": "heavy_check_mark"
}
2 changes: 1 addition & 1 deletion tests/helpers/test-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"collection": "mbland",
"githubApiToken": "<github-api-token>",
"githubTimeout": 5000,
"issuesTimeout": 5000,
"slackApiToken": "<slack-api-token>",
"slackTimeout": 5000,
"successReaction": "heavy_check_mark",
Expand Down

0 comments on commit c5b79cc

Please sign in to comment.