{"id":13523322,"url":"https://github.com/rust-lang/homu","last_synced_at":"2025-05-16T13:08:01.527Z","repository":{"id":31282445,"uuid":"127407146","full_name":"rust-lang/homu","owner":"rust-lang","description":"A bot that integrates with GitHub and your favorite continuous integration service","archived":false,"fork":false,"pushed_at":"2025-05-10T08:32:30.000Z","size":802,"stargazers_count":194,"open_issues_count":70,"forks_count":63,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-15T00:05:40.391Z","etag":null,"topics":["rust-infra"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"servo/homu","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-30T09:06:01.000Z","updated_at":"2025-05-10T08:32:33.000Z","dependencies_parsed_at":"2024-01-13T21:45:29.746Z","dependency_job_id":"976e7262-4285-42fa-9d71-1f9608b82def","html_url":"https://github.com/rust-lang/homu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhomu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhomu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhomu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhomu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-lang","download_url":"https://codeload.github.com/rust-lang/homu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535829,"owners_count":22087399,"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":["rust-infra"],"created_at":"2024-08-01T06:00:58.907Z","updated_at":"2025-05-16T13:08:01.475Z","avatar_url":"https://github.com/rust-lang.png","language":"Python","funding_links":[],"categories":["CI/CD"],"sub_categories":[],"readme":"# Homu\n\n[![Hommando]][Akemi Homura]\n\nHomu is a bot that integrates with GitHub and your favorite continuous\nintegration service such as [Travis CI], [Appveyor] or [Buildbot].\n\n[Hommando]: https://i.imgur.com/j0jNvHF.png\n[Akemi Homura]: https://wiki.puella-magi.net/Homura_Akemi\n[Buildbot]: http://buildbot.net/\n[Travis CI]: https://travis-ci.org/\n[Appveyor]: https://www.appveyor.com/\n\n## Why is it needed?\n\nLet's take Travis CI as an example. If you send a pull request to a repository,\nTravis CI instantly shows you the test result, which is great. However, after\nseveral other pull requests are merged into the `master` branch, your pull\nrequest can *still* break things after being merged into `master`. The\ntraditional continuous integration solutions don't protect you from this.\n\nIn fact, that's why they provide the build status badges. If anything pushed to\n`master` is completely free from any breakage, those badges will **not** be\nnecessary, as they will always be green. The badges themselves prove that there\ncan still be some breakages, even when continuous integration services are used.\n\nTo solve this problem, the test procedure should be executed *just before the\nmerge*, not just after the pull request is received. You can manually click the\n\"restart build\" button each time before you merge a pull request, but Homu can\nautomate this process. It listens to the pull request comments, waiting for an\napproval comment from one of the configured reviewers. When the pull request is\napproved, Homu tests it using your favorite continuous integration service, and\nonly when it passes all the tests, it is merged into `master`.\n\nNote that Homu is **not** a replacement of Travis CI, Buildbot or Appveyor. It\nworks on top of them. Homu itself doesn't have the ability to test pull\nrequests.\n\n## Influences of bors\n\nHomu is largely inspired by [bors]. The concept of \"tests should be done just\nbefore the merge\" came from bors. However, there are also some differences:\n\n1. Stateful: Unlike bors, which intends to be stateless, Homu is stateful. It\n   means that Homu does not need to retrieve all the information again and again\n   from GitHub at every run. This is essential because of GitHub's rate\n   limiting. Once it downloads the initial state, the following changes are\n   delivered with the [Webhooks] API.\n2. Pushing over polling: Homu prefers pushing wherever possible. The pull\n   requests from GitHub are retrieved using Webhooks, as stated above. The test\n   results from Buildbot are pushed back to Homu with the [HttpStatusPush]\n   feature. This approach improves the overall performance and the response\n   time, because the bot is informed about the status changes immediately.\n\nAnd also, Homu has more features, such as `rollup`, `try`, and the Travis CI \u0026\nAppveyor support.\n\n[bors]: https://github.com/graydon/bors\n[Webhooks]: https://developer.github.com/webhooks/\n[HttpStatusPush]: http://docs.buildbot.net/current/manual/cfg-statustargets.html#httpstatuspush\n\n## Usage\n\n### How to install\n\n```sh\n$ sudo apt-get install python3-venv python3-wheel\n$ python3 -m venv .venv\n$ . .venv/bin/activate\n$ pip install -U pip\n$ git clone https://github.com/rust-lang/homu.git\n$ pip install -e homu\n```\n\n### How to configure\n\nIn the following instructions, `HOST` refers to the hostname (or IP address)\nwhere you are running your custom homu instance. `PORT` is the port the service\nis listening to and is configured in `web.port` in `cfg.toml`. `NAME` refers to\nthe name of the repository you are configuring homu for.\n\n1. Copy `cfg.sample.toml` to `cfg.toml`. You'll need to edit this file to set up\n   your configuration. The following steps explain where you can find important\n   config values. \n\n2. Create a GitHub account that will be used by Homu. You can also use an\n   existing account. In the [developer settings][settings], go to \"OAuth\n   Apps\" and create a new application:\n   - Make note of the \"Client ID\" and \"Client Secret\"; you will need to put them in\n   your `cfg.toml`.\n   - The OAuth Callback URL should be `http://HOST:PORT/callback`.\n   - The homepage URL isn't necessary; you could set `http://HOST:PORT/`.\n   \n3. Go back to the developer settings of the GitHub account you created/used in the\n   previous step. Go to \"Personal access tokens\". Click \"Generate new token\" and\n   choose the \"repo\" and \"user\" scopes. Put the token value in your `cfg.toml`.\n   \n4. Add your new GitHub account as a Collaborator to the GitHub repo you are\n   setting up homu for. This can be done in repo (NOT user) \"Settings\", then\n   \"Collaborators\". Enable \"Write\" access.\n   \n     4.1. Make sure you login as the new GitHub account and that you **accept \n          the collaborator invitation** you just sent! \n\n5. Add a Webhook to your repository. This is done under repo (NOT user)\n   \"Settings\", then \"Webhooks\". Click \"Add webhook\", then set:\n   - Payload URL: `http://HOST:PORT/github`\n   - Content type: `application/json`\n   - Secret: The same as `repo.NAME.github.secret` in `cfg.toml`\n   - Events: click \"Let me select individual events\", then pick\n       `Issue comments`, `Pull requests`, `Pushes`, `Statuses`, `Check runs`\n\n6. Add a Webhook to your continuous integration service, if necessary. You don't\n   need this if using Travis/Appveyor.\n   - Buildbot \n\n     Insert the following code to the `master.cfg` file:\n\n     ```python\n     from buildbot.status.status_push import HttpStatusPush\n\n     c['status'].append(HttpStatusPush(\n        serverUrl='http://HOST:PORT/buildbot',\n        extra_post_params={'secret': 'repo.NAME.buildbot.secret in cfg.toml'},\n     ))\n     ```\n\n7. Go through the rest of your `cfg.toml` and uncomment (and change, if needed)\n   parts of the config you'll need.\n\n[settings]: https://github.com/settings/apps\n[travis]: https://travis-ci.org/profile/info\n\n### How to run\n\n```sh\n$ . .venv/bin/activate\n$ homu\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fhomu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-lang%2Fhomu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fhomu/lists"}