Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork120
@nodejs-github-bot's heart and soul
License
nodejs/github-bot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Node.js Foundation members use this bot to help managethe repositories of the GitHub organization.
It executesscripts in response to events that arepushed to it via GitHub webhooks. Allrepositories that use this bot have the same webhook url & secret configured (there is only 1 bot instance). Org-wide webhooks are not allowed.
Please do, contributions are more than welcome!SeeCONTRIBUTING.md.
GITHUB_TOKEN
TheGitHub API token 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.GITHUB_WEBHOOK_SECRET
The webhook secret that GitHub signs the POSTed payloads with. This is created when the webhook is defined. The default ishush-hush
.JENKINS_WORKER_IPS
List of valid Jenkins worker IPs allowed to push PR status updates, split by comma:192.168.1.100,192.168.1.101
.JENKINS_API_CREDENTIALS
(optional)
For scripts that communicate with Jenkins onhttp://ci.nodejs.org. The Jenkins API token is visible onyour own profile pagehttps://ci.nodejs.org/user/<YOUR_GITHUB_USERNAME>/configure
, by clicking the"show API token" button. Also See:https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clientsJENKINS_JOB_URL_<REPO_NAME>
(optional)
Only required for the trigger Jenkins build script, to know which job to trigger a build for whenrepository collaborator posts a comment to the bot. E.g.JENKINS_JOB_URL_NODE=https://ci.nodejs.org/job/node-test-pull-request
JENKINS_BUILD_TOKEN_<REPO_NAME>
(optional)
Only required for the trigger Jenkins build script. The authentication token configured for a particularJenkins job, for remote scripts to trigger builds remotely. Found on the job configuration page inBuild Triggers -> Trigger builds remotely (e.g., from scripts)
.LOGIN_CREDENTIALS
Username and password used to protected the log files exposed in /logs. Expected format:username:password
.KEEP_LOGS
Number of days to keep rotated log files, defaults to10
if not set.LOGS_DIR
Directory where logs should be written and exposed by the/logs
endpoint.
The bot will try to load a.env
file at the root of the project if it exists to set environment varaibles. You will need to create one similar to this:
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxSSE_RELAY=https://hook-relay.example.com
Note the additionalSSE_RELAY
variable:When developing locally, it is difficult to setup a GitHub webhookpointing to the computer you are developing on. An easy workaround is to set theSSE_RELAY
to the url ofa SSE relay server that will send the GitHub events viaServer Sent Events instead. Another optionis to usengrok.
You can use theTestOrgPleaseIgnore GitHub Organization, to testyour changes. Actions performed on the repos there will be sent tothe SSE Relay. If you use your own Organization/Repository,remember to set the webhook Secret to the same value asGITHUB_WEBHOOK_SECRET
(defaulthush-hush
), andto change the content type toapplication/json
(default on the GitHub interface isapplication/x-www-form-urlencoded
, which will not work with the bot).
TheGITHUB_WEBHOOK_SECRET
environment variable is not required when using the relay.
Run the bot:
$ npm start
When developing a script, it is likely that you will only want to run the script(s) that you are working on. You maypass an additionalglob argument to specify which scripts to run.
$ SCRIPTS=./scripts/my-new-event-handler.js npm start
About
@nodejs-github-bot's heart and soul
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.