{"id":13523293,"url":"https://github.com/barosl/homu","last_synced_at":"2025-04-01T00:31:19.495Z","repository":{"id":24769910,"uuid":"28183233","full_name":"barosl/homu","owner":"barosl","description":"A bot that integrates with GitHub and your favorite continuous integration service","archived":false,"fork":false,"pushed_at":"2019-01-05T00:18:12.000Z","size":213,"stargazers_count":661,"open_issues_count":67,"forks_count":108,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-14T12:09:47.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://homu.io/","language":"Python","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/barosl.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}},"created_at":"2014-12-18T12:46:18.000Z","updated_at":"2024-09-18T03:35:57.000Z","dependencies_parsed_at":"2022-08-23T05:21:12.933Z","dependency_job_id":null,"html_url":"https://github.com/barosl/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/barosl%2Fhomu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barosl%2Fhomu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barosl%2Fhomu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barosl%2Fhomu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barosl","download_url":"https://codeload.github.com/barosl/homu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222688173,"owners_count":17023297,"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":[],"created_at":"2024-08-01T06:00:58.578Z","updated_at":"2024-11-02T07:31:32.059Z","avatar_url":"https://github.com/barosl.png","language":"Python","funding_links":[],"categories":["CI/CD","Python"],"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 [Buildbot] or [Travis CI].\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\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 or Buildbot. It works on\ntop of them. Homu itself doesn't have the ability to test pull requests.\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 the 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\nsupport.\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\nsudo apt-get install python3-venv\n\npyvenv .venv\n. .venv/bin/activate\n\n# Stable version\n\npip install homu\n\n# Development version\n\ngit clone https://github.com/barosl/homu.git\npip install -e homu\n```\n\n### How to configure\n\n1. Copy `cfg.sample.toml` to `cfg.toml`, and edit it accordingly.\n\n2. Create a GitHub account that will be used by Homu. You can also use an\n   existing account. In the [account settings][settings], register a new\n   application and generate a new access token (with the `repo` permission).\n   The OAuth Callback URL should be `http://HOST:PORT/callback`, the homepage URL\n   isn't needed and can be anything, for example `http://HOST:PORT/`.\n\n3. Add a Webhook to your repository:\n\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: Issue Comment, Pull Request, Push\n\n4. Add a Webhook to your continuous integration service:\n\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\n - Travis CI\n\n   Add [your Travis token][travis] as `repo.NAME.travis.token` in cfg.toml.\n   Insert the following code to the `.travis.yml` file:\n\n    ```yaml\n    notifications:\n        webhooks: http://HOST:PORT/travis\n\n    branches:\n        only:\n            - auto\n    ```\n\n[settings]: https://github.com/settings/applications\n[travis]: https://travis-ci.org/profile/info\n\n### How to run\n\n```sh\n. .venv/bin/activate\n\nhomu\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarosl%2Fhomu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarosl%2Fhomu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarosl%2Fhomu/lists"}