{"id":45762351,"url":"https://github.com/anipos/sparrow","last_synced_at":"2026-02-25T23:24:45.635Z","repository":{"id":37886233,"uuid":"254286060","full_name":"anipos/sparrow","owner":"anipos","description":"Sparrow is a bot runs jobs on Cloud Build events.","archived":false,"fork":false,"pushed_at":"2026-02-12T03:18:45.000Z","size":752,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-12T13:17:41.220Z","etag":null,"topics":["gitops","google-cloud-build","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anipos.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-09T06:08:36.000Z","updated_at":"2026-02-12T03:18:11.000Z","dependencies_parsed_at":"2026-01-16T06:19:05.691Z","dependency_job_id":null,"html_url":"https://github.com/anipos/sparrow","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/anipos/sparrow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anipos%2Fsparrow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anipos%2Fsparrow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anipos%2Fsparrow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anipos%2Fsparrow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anipos","download_url":"https://codeload.github.com/anipos/sparrow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anipos%2Fsparrow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29844858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"ssl_error","status_checked_at":"2026-02-25T22:37:25.960Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gitops","google-cloud-build","hacktoberfest"],"created_at":"2026-02-25T23:24:44.988Z","updated_at":"2026-02-25T23:24:45.629Z","avatar_url":"https://github.com/anipos.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sparrow\n\n![monorail](docs/assets/mascot.png)\n\nSparrow is a bot runs jobs on Cloud Build events. It subscribes to Cloud Build\nevents through the Cloud PubSub topic `cloud-builds`, which is available out of\nthe box.\n\nSparrow can\n\n- send messages to slack\n- rewrite container image tags in Kubernetes manifest files\n\nSparrow might be helpful if you\n\n- follow Trunk Based Development https://trunkbaseddevelopment.com/\n- follow GitOps https://www.weave.works/technologies/gitops/\n\nSparrow is an alpha project and is subject to change (though it works well on\nour specific use case).\n\n## Features\n\n### Send Messages to Slack\n\nSparrow sends messages to Slack on every Cloud Build event. A slack message\nhas links to\n\n- Cloud Build page of the build\n- GitHub page of the commit\n\nWe plan to support\n\n- filtering (e.g., only failed builds)\n- mention\n- sending messages to different channels (based on rules)\n\n### Rewrite Container Image Tags in Kubernetes Manifests\n\nSparrow rewrites container image tags in Kubernetes manifest files on GitHub\nby creating pull requests or pushing to master branch.\n\nSparrow assumes an app\n\n- to have code repository and source repository\n- to build container images on every push to the master branch\n\nWhen a commit is pushed to the code repository's master branch,\n\n1. Cloud Build builds a container image where its tag is git SHA.\n1. The event is published to Cloud PubSub.\n1. Sparrow rewrites the tag in the config repository and creates a pull request or pushes the change to the master branch.\n\nIt should be noted that if you want to bypass creating pull requests and push to the master branch directly,\nthe branch protection rule needs to be configured correctly that allows bypassing pull requests.\nhttps://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule\n\nFor now, Sparrow supports the GitHub repositories connected to the Cloud Build\nvia GitHub App or through Cloud Source Repositories.\n\nA commit message of tag rewriting contains\n\n- the commit message from the source repository's commit\n- the link the source repository's commit on GitHub\n\nSparrow has many assumptions for tag rewriting to work. We don't have a plan\nto support other use cases (code and config repositories are the same for\nexample) but contributions are welcome.\n\n## Configuration\n\nThe behavior of Sparrow is configured by `SPARROW_CONFIG` that points to a path\nof a YAML file. For example `SPARROW_CONFIG=/etc/sparrow.yml`.\n\n### Configuration YAML Specification\n\nThe sparrow configuration YAML supports the following keys.\n\n```\n# Configuration spec version, currently 0.1.\nversion: 0.1\n\n# `jobs` specifies what jobs to run from Cloud PubSub subscription X of project\n# Y.\njobs:\n  # Run `Slack` job on events streamed from `project-a`'s Cloud PubSub\n  # subscription `slack`. `Slack` job sends messages to slack on every event.\n  - class: Slack\n    project_id: project-a\n    subscription: slack\n\n  # Run `GitOps` job on events streamed from `project-b`'s Cloud PubSub\n  # subscription `gitops`. `GitOps` updates container image tags on kubernetes\n  # manifest files.\n  - class: GitOps\n    project_id: project-b\n    subscription: gitops\n    class_args:\n      targets:\n        # When an event is from repository \"org/app1\", Sparrow evaluates the ERB\n        # template at `overlays/dev/kustomization.yaml.erb` in the\n        # configuration repository `org/app1-conf` and writes the evaluated\n        # result to `overlays/dev/kustomization.yaml`.\n        - source_repo: org/app1\n          config_repo: org/app1-conf\n          rewrites:\n            - name: dev\n              erb_path: overlays/dev/kustomization.yaml.erb\n              out_path: overlays/dev/kustomization.yaml\n              # If set to true, changes are pushed to master branch directly. (default: false)\n              bypass_pull_request: true\n```\n\n## Deployment\n\nYou can deploy Sparrow using Docker. Docker image is available at\nhttps://github.com/anipos/sparrow/pkgs/container/sparrow.\n\nSparrow requires\n\n- `SPARROW_CONFIG`: The path to the sparrow.yml.\n- `SPARROW_SLACK_WEBHOOK`: Slack webhook URL.\n- `GITHUB_TOKEN`: GitHub personal access token with \"repo\" scope.\n\nThe IAM key must have\n\n- roles/pubsub.subscriber\n- roles/pubsub.viewer\n\n## Development\n\nTBA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanipos%2Fsparrow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanipos%2Fsparrow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanipos%2Fsparrow/lists"}