Skip to content

Commit b617c7b

Browse files
authored
travis: delete polling code in favor of Travis CI GitHub app (nodejs#183)
We have recently found that we can enable Travis CI per repo with the Travis CI GitHub app, rather than the old GitHub Service that required organization wide private access, which the nodejs organization didn't want to provide. Since using the GitHub app per repo instead, there is no need for this bot to do any Travis CI polling anymore -- hoooray!
1 parent 3d60243 commit b617c7b

14 files changed

+4
-1325
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22
=====================
33

4-
Copyright (c) 2016 Node.js Github Bot contributors
4+
Copyright (c) 2016-2018 Node.js Github Bot contributors
55
--------------------------------------------------
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
1616
The [GitHub API token](https://github.com/blog/1509-personal-api-tokens) for your account (or bot account) that will be used to make API calls to GitHub. The account must have proper access to perform the actions required by your script.
1717
- **`GITHUB_WEBHOOK_SECRET`**<br>
1818
The webhook secret that GitHub signs the POSTed payloads with. This is created when the webhook is defined. The default is `hush-hush`.
19-
- **`TRAVIS_CI_TOKEN`**<br>
20-
For scripts that communicate with Travis CI. Your Travis token is visible on [yourprofile](https://travis-ci.org/profile) page, by clicking the "show token" link. Also See: https://blog.travis-ci.com/2013-01-28-token-token-token
21-
- **`TRAVIS_POLL_RETRY`**<br>
22-
Default number of retries that the bot should attempt to poll for the Travis build status.
23-
- **`TRAVIS_POLL_INTERVAL`**<br>
24-
Default interval that the bot should use to poll for the Travis build status.
2519
- **`JENKINS_WORKER_IPS`**<br>
2620
List of valid Jenkins worker IPs allowed to push PR status updates, split by comma: `192.168.1.100,192.168.1.101`.
2721
- **`JENKINS_API_CREDENTIALS`** (optional)<br>
@@ -48,7 +42,6 @@ The bot will try to load a `.env` file at the root of the project if it exists t
4842

4943
```
5044
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
51-
TRAVIS_CI_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5245
SSE_RELAY=https://hook-relay.herokuapp.com
5346
```
5447

lib/pollTravis.js

Lines changed: 0 additions & 124 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"express": "^4.13.4",
2424
"github": "^7.0.1",
2525
"glob": "^7.0.3",
26-
"lru-cache": "^4.0.1",
27-
"travis-ci": "^2.1.0"
26+
"lru-cache": "^4.0.1"
2827
},
2928
"devDependencies": {
3029
"eventsource": "^0.2.1",

scripts/display-travis-status.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

scripts/trigger-jenkins-build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ module.exports = (app) => {
166166
triggerBuild(options, replyToCollabWithBuildStarted)
167167
}
168168

169-
if (repo === 'node')
169+
if (repo === 'node') {
170170
githubClient.repos.checkCollaborator({ owner, repo, username: pullRequestAuthor }, triggerBuildWhenCollaborator)
171+
}
171172
})
172173
}

0 commit comments

Comments
 (0)