{"id":36661350,"url":"https://github.com/tvandinther/gitops-manager","last_synced_at":"2026-01-12T10:28:12.308Z","repository":{"id":313361404,"uuid":"978000694","full_name":"tvandinther/gitops-manager","owner":"tvandinther","description":"A library for building applications to manage automated GitOps operations.","archived":false,"fork":false,"pushed_at":"2025-09-15T20:26:04.000Z","size":153,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T20:32:26.887Z","etag":null,"topics":["gitops"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvandinther.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-05T10:10:33.000Z","updated_at":"2025-09-15T20:22:58.000Z","dependencies_parsed_at":"2025-09-05T15:42:44.066Z","dependency_job_id":"d8c7c8b0-9da7-45cf-aae8-966124c29807","html_url":"https://github.com/tvandinther/gitops-manager","commit_stats":null,"previous_names":["tvandinther/gitops-manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tvandinther/gitops-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Fgitops-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Fgitops-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Fgitops-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Fgitops-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvandinther","download_url":"https://codeload.github.com/tvandinther/gitops-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvandinther%2Fgitops-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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"],"created_at":"2026-01-12T10:28:09.216Z","updated_at":"2026-01-12T10:28:12.303Z","avatar_url":"https://github.com/tvandinther.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitOps Manager\n\nThe GitOps Manager is a Go package that allows you to easily build a GitOps bot with a client-server architecture. The server component is configured to run a predetermined flow to ensure a principled approach to managing GitOps operations.\n\n```mermaid\n---\nconfig:\n  layout: dagre\n  look: handDrawn\n---\nflowchart LR\n  REQ[Request] --\u003e AUTHZ(Authorise)\n  AUTHZ --\u003e UPLOAD(Upload Manifests)\n  UPLOAD --\u003e INIT(Initialise Configuration Repository)\n  INIT --\u003e MUT(Mutate Manifests)\n  MUT --\u003e VAL(Validate Manifests)\n  VAL --\u003e COM(Commit Updated Manifests)\n  COM --\u003e DR?{Dry Run?}\n  DR? --true--\u003eDONE\n  DR? --false--\u003e PUSH(Push Changes to Remote)\n  PUSH --\u003e CPR(Create Review / Pull Request)\n  CPR --\u003e AM?{Auto Complete Review?}\n  AM? --true--\u003e MPR(Complete Review / Merge Pull Request)\n  AM? --false--\u003eDONE\n  MPR--\u003eDONE\n  DONE[Done]\n```\n\nThe way in which parts of the flow work are implemented using interfaces that can be swapped out for different implementations. This allows for a high degree of customization and flexibility in how the GitOps bot operates.\n\n## Flow Components\n\n- [Strategies Reference](./docs/strategies.md)\n- [Processors Reference](./docs/processors.md)\n\n### Strategies\nStrategies define how each step in the flow is executed.\n\n#### Authorisor\nThe authorisor is responsible for authenticating and authorizing incoming requests to the GitOps bot. This could involve checking API keys, OAuth tokens, or other forms of authentication to ensure that only authorized users can trigger the GitOps operations and that they are being performed with valid payloads, e.g. targetting an allowed repository.\n\n#### Targeter\nThe targeter is responsible for determining the target configuration repository, branch, and directory where the manifests will be committed. Customising this strategy allows you to define how environments are managed by matching a GitOps target to an incoming request.\n\n#### URL Authenticator\nThe URL authenticator is a strategy that enriches a clone URL with authentication information so that private repositories can be accessed.\n\n#### File Copier\nThe file copier strategy determines how desired manifests are integrated into the configuration repository. This could be as simple as copying all files to a specified subpath, or it could involve more complex logic specific to your configuration repository's structure.\n\n#### Committer\nThe committer allows you to define how commits are made to the configuration repository. This includes setting the commit message, author information, and any other metadata associated with the commit. It also allows you to control the granularity of commits by exposing the git repository and worktree.\n\n### Reviewer\nThe reviewer is responsible for creating and managing code reviews or pull requests in the remote repository. This includes defining the title and description of the review, as well as handling the submission of the review to the remote repository using the appropriate API. The reviewer also provides the ability to automatically complete the review or merge the pull request if desired.\n\n### Processors\nProcessors are used to modify or validate the manifests before they are committed to the configuration repository. This can include tasks such as linting, formatting, or applying custom transformations to the manifests. Unlike strategies, processors can be chained together to create a sequence of operations that are applied to the manifests in order.\n\nDocumentation on the available processors can be found in [here](./docs/processors.md).\n\n#### Mutators\nMutators are processors that modify the manifests in some way. This could involve adding or updating fields, changing values, or applying templates to generate new content based on existing data.\n\n#### Validators\nValidators are processors that check the manifests for correctness and compliance with predefined rules. This could include schema validation, checking for required fields.\n\n#### Why is it a package and not a distributed application?\n\nRather than providing a pre-compiled application with extensive configuration options, this project aims to offer a flexible library that is configured and extended through code. In its most trivial implementation, it can be configured with just a few lines of code in a `main.go` file. This approach allows developers to tailor the GitOps bot to their specific needs and integrate it seamlessly into their existing workflows.\n\n## Getting Started\n\nTo create your own GitOps bot, you must implement two Go binaries: a server and a client. Examples of both can be found in the [cmd](./cmd) directory.\n\nA minimal `main.go` for the server could look like this:\n```go\nfunc main() {\n\tauthenticator := \u0026authenticator.UserPassword{\n\t\tUsername: os.Getenv(\"GIT_USERNAME\"),\n\t\tPassword: os.Getenv(\"GIT_ACCESS_TOKEN\"),\n\t}\n\n\tgitAuthor := \u0026git.Author{\n\t\tName:  \"gitops-manager\",\n\t\tEmail: \"gitops-manager@example.com\",\n\t}\n\n\treviewer := \u0026reviewer.Dummy{\n\t\tURL:      \"https://example.com/review/1\",\n\t\tComplete: true,\n\t}\n\n\tflow := flow.New(\u0026flow.Strategies{\n\t\tRequestAuthorisation: gitops.NoAuthorisation,\n\t\tCloneAuthentication:  authenticator,\n\t\tBranch:               nil,\n\t\tFileCopy: \u0026copier.Subpath{\n\t\t\tPath: \".\",\n\t\t},\n\t\tCommit: \u0026committer.Standard{\n\t\t\tAuthor:        gitAuthor,\n\t\t\tCommitSubject: \"Update rendered manifests\",\n\t\t\tCommitMessageFn: func(req *gitops.Request) string {\n\t\t\t\treturn \"Update rendered manifests\"\n\t\t\t},\n\t\t},\n\t\tCreateReview:   reviewer,\n\t\tCompleteReview: reviewer,\n\t})\n\n\tserver := server.New(flow, \u0026server.ManagerOpts{\n\t\tGitOptions: server.GitOptions{\n\t\t\tAuthor: gitAuthor,\n\t\t},\n\t}).WithDefaultLogger()\n\t\n    server.Run()\n}\n\n```\n\nThe client can be as simple as:\n```go\nfunc main() {\n\tclient := client.New()\n\tclient.Run()\n}\n\n```\n\n## Development\n\n### Gitea\n\nGitea is running on http://localhost:3000.\nLogin with `admin:admin`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvandinther%2Fgitops-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvandinther%2Fgitops-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvandinther%2Fgitops-manager/lists"}