{"id":13897218,"url":"https://github.com/jelmer/janitor","last_synced_at":"2025-08-10T10:22:22.189Z","repository":{"id":42224090,"uuid":"249263513","full_name":"jelmer/janitor","owner":"jelmer","description":"Platform for making incremental changes to code in VCSes","archived":false,"fork":false,"pushed_at":"2025-08-04T09:31:47.000Z","size":19011,"stargazers_count":12,"open_issues_count":48,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-04T13:38:36.833Z","etag":null,"topics":["bzr","debian","git","lintian","lintian-brush","silver-platter","vcs"],"latest_commit_sha":null,"homepage":"https://jelmer.uk/code/janitor","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jelmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"jelmer"}},"created_at":"2020-03-22T20:08:31.000Z","updated_at":"2025-08-04T09:31:44.000Z","dependencies_parsed_at":"2023-11-09T00:34:54.189Z","dependency_job_id":"c788a546-49ae-4b18-96d2-b5b66cb62376","html_url":"https://github.com/jelmer/janitor","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jelmer/janitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fjanitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fjanitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fjanitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fjanitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jelmer","download_url":"https://codeload.github.com/jelmer/janitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fjanitor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269709909,"owners_count":24462877,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bzr","debian","git","lintian","lintian-brush","silver-platter","vcs"],"created_at":"2024-08-06T18:03:26.071Z","updated_at":"2025-08-10T10:22:22.133Z","avatar_url":"https://github.com/jelmer.png","language":"Python","funding_links":["https://github.com/sponsors/jelmer"],"categories":["Python"],"sub_categories":[],"readme":"This repository contains the setup for a \"Janitor\" bot. This is basically\na platform for managing large-scale automated code improvements on\ntop of [silver-platter](https://github.com/jelmer/silver-platter).\n\nAny code that is not related to the platform but to actually making changes\nshould probably live in either ``silver-platter``, ``breezy`` or a\nspecific codemod (such as [lintian-brush](https://salsa.debian.org/jelmer/lintian-brush)).\n\nThere are currently several instances of the Janitor running. For their configuration, see:\n\n* [Debian Janitor](https://janitor.debian.net/) - Setup at https://salsa.debian.org/janitor-team/janitor.debian.net\n* [Kali Janitor](https://janitor.kali.org/) - Configuration repository is private\n* [Upstream Janitor aka ``Scruffy``](https://www.scruffy.dev/) - Setup at https://github.com/scruffy-team/scruffy\n\nPhilosophy\n==========\n\nThere are some straightforward changes to code that can be made\nusing scripting. The janitor's job is to opportunistically make those changes\nwhen it is certain it can do so with a high confidence, and to back off\notherwise.\n\nThe janitor continuously tries to run changes on the set of repositories it\nknows about. It tries to be clever about scheduling those operations that\nare more likely to yield results and be published (i.e. merged or pushed).\n\nDesign\n======\n\nThe janitor is made up out of multiple components. he janitor is built on top of\n[silver-platter](https://github.com/jelmer/silver-platter) and relies\non that project for most of the grunt work.\n\nSeveral permanently running jobs:\n\n* the *publisher* proposes or pushes changes that have been successfully\n  created and built previously, and which can provide VCS diffs\n* the *vcs store* manages and stores VCS repositories (git, bzr) [optional]\n* the [ognibuild](https://github.com/jelmer/ognibuild) dep server is used to\n  resolve missing dependencies\n* the *runner* processes the queue, kicks off workers for\n  each package and stores the results.\n* one or more *workers* which are responsible for actual generating and\n  building changes.\n* an *archiver* that takes care of managing the apt archives and publishes them\n* a *site* job that renders the web site\n* the *differ* takes care of running e.g. debdiff or diffoscope between binary runs\n\nEach instance of the janitor should somehow upload \"codebase\" entries and\n\"candidates\", which describe where to find code and what to do with it.\n\nThere are no requirements that these jobs run on the same machine, but they are\nexpected to have secure network access to each other.\n\nEvery job runs a HTTP server to allow API requests and use of /metrics, for\nprometheus monitoring.\n\nWorkers are fairly naive; they simply run a ``silver-platter`` subcommand\nto create branches and they build the resulting branches. The runner\nthen fetches the results from each run and (if the run was successful)\nuploads the .debs and optionally proposes a change.\n\nThe publisher is responsible for enforcing rate limiting, i.e. making sure\nthat there are no more than X pull requests open per maintainer.\n\nSee the various files in ``devnotes/`` for details.\n\nWorker\n======\nThe actual changes are made by various codemod scripts that implement\nthe [silver-platter protocol](https://github.com/jelmer/silver-platter/blob/master/codemod-protocol.rst).\n\nInstallation\n============\n\nThere are two common ways of deploying a new janitor instance.\n\n * On top of kubernetes (see the configuration for the Debian \u0026 Upstream janitor)\n * Using e.g. ansible and/or a venv\n\nDocker\n------\n\nSeveral docker images are provided\n\n * ghcr.io/jelmer/janitor/archive - APT archive generator\n * ghcr.io/jelmer/janitor/differ - diffoscope/debdiff generator\n * ghcr.io/jelmer/janitor/publish - VCS publisher\n * ghcr.io/jelmer/janitor/runner - Queue management \u0026 Run handling\n * ghcr.io/jelmer/janitor/site - Example web site \u0026 public API\n * ghcr.io/jelmer/janitor/git_store - storage for Git\n * ghcr.io/jelmer/janitor/bzr_store - storage for Bazaar\n * ghcr.io/jelmer/janitor/worker - Base for workers\n\nContributing\n============\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on e.g. setting up\na development environment.\n\nIf you're interested in working on adding another campaign for a janitor\ninstance, see [adding-a-new-campaign](devnotes/adding-a-new-campaign.rst).\n\nThe Matrix channel for the Janitor project can be found at\n[#janitor:matrix.org](https://matrix.to/#/#janitor:matrix.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelmer%2Fjanitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjelmer%2Fjanitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelmer%2Fjanitor/lists"}