{"id":13603034,"url":"https://github.com/nodejs/github-bot","last_synced_at":"2025-05-15T23:06:40.459Z","repository":{"id":6728081,"uuid":"55435270","full_name":"nodejs/github-bot","owner":"nodejs","description":"@nodejs-github-bot's heart and soul","archived":false,"fork":false,"pushed_at":"2025-05-06T16:41:04.000Z","size":2787,"stargazers_count":279,"open_issues_count":21,"forks_count":116,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-05-06T17:45:55.343Z","etag":null,"topics":["bot","github-bot","javascript","node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"nodejs","open_collective":"nodejs"}},"created_at":"2016-04-04T18:34:37.000Z","updated_at":"2025-05-06T16:40:56.000Z","dependencies_parsed_at":"2023-02-13T20:31:24.172Z","dependency_job_id":"8074e21d-6fb0-4d63-9edb-664aaf25c7f8","html_url":"https://github.com/nodejs/github-bot","commit_stats":{"total_commits":415,"total_committers":34,"mean_commits":"12.205882352941176","dds":0.6650602409638554,"last_synced_commit":"1c0791b0da9d77bc8aa184efb96c8b4297d429ef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fgithub-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fgithub-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fgithub-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fgithub-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodejs","download_url":"https://codeload.github.com/nodejs/github-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253823614,"owners_count":21969871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","github-bot","javascript","node","nodejs"],"created_at":"2024-08-01T18:01:47.262Z","updated_at":"2025-05-15T23:06:35.445Z","avatar_url":"https://github.com/nodejs.png","language":"JavaScript","readme":"# Node.js GitHub Bot\n\nThe Node.js Foundation members use this bot to help manage [the repositories of the GitHub organization](https://github.com/nodejs).\n\nIt executes [scripts](https://github.com/nodejs/github-bot/tree/master/scripts) in response to events that are\npushed to it via GitHub webhooks. All [repositories](https://github.com/nodejs) that use this bot have the same webhook url \u0026 secret configured (there is only 1 bot instance). Org-wide webhooks are not allowed.\n\n## Contributing\n\nPlease do, contributions are more than welcome!\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n### Environment Variables\n\n- **`GITHUB_TOKEN`**\u003cbr\u003e\n  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.\n- **`GITHUB_WEBHOOK_SECRET`**\u003cbr\u003e\n  The webhook secret that GitHub signs the POSTed payloads with. This is created when the webhook is defined. The default is `hush-hush`.\n- **`JENKINS_WORKER_IPS`**\u003cbr\u003e\n  List of valid Jenkins worker IPs allowed to push PR status updates, split by comma: `192.168.1.100,192.168.1.101`.\n- **`JENKINS_API_CREDENTIALS`** (optional)\u003cbr\u003e\n  For scripts that communicate with Jenkins on http://ci.nodejs.org. The Jenkins API token is visible on\n  your own profile page `https://ci.nodejs.org/user/\u003cYOUR_GITHUB_USERNAME\u003e/configure`, by clicking the\n  \"show API token\" button. Also See: https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients\n- **`JENKINS_JOB_URL_\u003cREPO_NAME\u003e`** (optional)\u003cbr\u003e\n  Only required for the trigger Jenkins build script, to know which job to trigger a build for when\n  repository collaborator posts a comment to the bot. E.g. `JENKINS_JOB_URL_NODE=https://ci.nodejs.org/job/node-test-pull-request`\n- **`JENKINS_BUILD_TOKEN_\u003cREPO_NAME\u003e`** (optional)\u003cbr\u003e\n  Only required for the trigger Jenkins build script. The authentication token configured for a particular\n  Jenkins job, for remote scripts to trigger builds remotely. Found on the job configuration page in\n  `Build Triggers -\u003e Trigger builds remotely (e.g., from scripts)`.\n- **`LOGIN_CREDENTIALS`**\u003cbr\u003e\n  Username and password used to protected the log files exposed in /logs. Expected format: `username:password`.\n- **`KEEP_LOGS`**\u003cbr\u003e\n  Number of days to keep rotated log files, defaults to `10` if not set.\n- **`LOGS_DIR`**\u003cbr\u003e\n  Directory where logs should be written and exposed by the `/logs` endpoint.\n\n### Developing Locally\n\nThe 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:\n\n```\nGITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nSSE_RELAY=https://hook-relay.example.com\n```\n\n**Note the additional `SSE_RELAY` variable:**\nWhen developing locally, it is difficult to setup a GitHub webhook\npointing to the computer you are developing on. An easy workaround is to set the `SSE_RELAY` to the url of\n[a SSE relay server](https://github.com/williamkapke/hook-relay) that will send the GitHub events via\n[Server Sent Events](http://www.html5rocks.com/en/tutorials/eventsource/basics/) instead. Another option\nis to use [ngrok](https://ngrok.com/).\n\nYou can use the [TestOrgPleaseIgnore](https://github.com/TestOrgPleaseIgnore) GitHub Organization, to test\nyour changes. Actions performed on the repos there will be sent to\n[the SSE Relay](https://github.com/williamkapke/hook-relay). If you use your own Organization/Repository,\nremember to set the webhook Secret to the same value as `GITHUB_WEBHOOK_SECRET` (default `hush-hush`), and\nto change the content type to `application/json` (default on the GitHub interface is \n`application/x-www-form-urlencoded`, which will not work with the bot).\n\nThe `GITHUB_WEBHOOK_SECRET` environment variable is not required when using the relay.\n\n**Run the bot:**\n```bash\n$ npm start\n```\n\nWhen developing a script, it is likely that you will only want to run the script(s) that you are working on. You may\npass an additional [glob](https://www.npmjs.com/package/glob) argument to specify which scripts to run.\n\n```bash\n$ SCRIPTS=./scripts/my-new-event-handler.js npm start\n```\n\n\n## License\n\n[MIT](LICENSE.md)\n","funding_links":["https://github.com/sponsors/nodejs","https://opencollective.com/nodejs"],"categories":["bot"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejs%2Fgithub-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodejs%2Fgithub-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejs%2Fgithub-bot/lists"}