{"id":18690554,"url":"https://github.com/razo7/githubissues-operator","last_synced_at":"2025-11-08T08:30:32.905Z","repository":{"id":107567743,"uuid":"397862349","full_name":"razo7/githubissues-operator","owner":"razo7","description":"An OCP operator for creating, updating and deleting a Github issues.","archived":false,"fork":false,"pushed_at":"2021-10-13T12:28:40.000Z","size":3627,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T02:32:21.026Z","etag":null,"topics":["first-tech-challenge","golang","operator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/razo7.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":"2021-08-19T07:54:31.000Z","updated_at":"2021-10-17T18:04:21.000Z","dependencies_parsed_at":"2023-06-08T12:30:30.548Z","dependency_job_id":null,"html_url":"https://github.com/razo7/githubissues-operator","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/razo7%2Fgithubissues-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razo7%2Fgithubissues-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razo7%2Fgithubissues-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razo7%2Fgithubissues-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razo7","download_url":"https://codeload.github.com/razo7/githubissues-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550283,"owners_count":19657541,"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":["first-tech-challenge","golang","operator"],"created_at":"2024-11-07T10:48:06.522Z","updated_at":"2025-11-08T08:30:32.860Z","avatar_url":"https://github.com/razo7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# githubissues-operator\nAn operator which creats, updates and deletes Github issues using [GO's Operator SDK](https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/).\n\nThe reconcile loop uses REST API (GET/POST/PATCH) calls for updating Github.com issues, and the task is from [Google Doc](https://docs.google.com/document/d/1z1bqlnBL8GO1FecJ0B2djncFzNPukOL1jw0E5K1xpgI/).\n## Features\n+ The Operator's Spec and Status are (api/v1alpha1/githubissue_types.go):\n    + Spec includes Repo, Title, Description fields.\n    + Status includes State, LastUpdateTimestamp, and Number fields.\n+ CRD validation of the Spec.Repo field by cheking it's pattern with kubebuilder.\n+ The reconcile loop (controllers/githubissue_controller.go):\n    + fetch K8 object\n    + gathers Github token from environment variable (by a secret)\n    + register finalizer\n    + delete the CR if it is needed\n    + create CR if that's the first run of reconcile, otherwise fetch existing githubIssue from Github.com and update it's description (if it is different)\n    + at the end update the status of K8s object or the reconcile object if the finalizer has been resistered/unregistered.\n    + reconcile again after a minute.\n+ Writing unit tests for the following cases (api/v1alpha1/githubissue_types_test.go):\n    + failed attempt to create a real github issue\n    + create if issue not exist\n    + failed attempt to update an issue\n    + close issue on delete\n+ Creation/deletion of the k8s object triggers the github issue to be created/deleted.\n\n## Ongoing Work\n+ Running Webhook cluster\n\n## Usage\n+ To test the unit tests - run `make test` in the main directory.\n+ To run the reconcile\n    + locally - run `make install run`\n    + distributly (on a cluster) - run `make deploy IMG=quay.io/oraz/githubissueimage:1.1.2`\n    and then run `kubectl create secret generic mysecret --from-literal=github-token=PUBLIC_GITHUB_TOKEN -n githubissues-operator-system` where PUBLIC_GITHUB_TOKEN is the github \n+ To test creation or deletion of githubIssue CR - run oc(openshift)/kubectl(K8s) or create/delete `oc create -f config/samples/my_test_samples/ex_X.yaml` where X can be 1 to 5 with five CR samples.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazo7%2Fgithubissues-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazo7%2Fgithubissues-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazo7%2Fgithubissues-operator/lists"}