{"id":15171815,"url":"https://github.com/chefe/gitlabcodeowners","last_synced_at":"2026-01-25T02:32:12.858Z","repository":{"id":214879102,"uuid":"737537190","full_name":"chefe/gitlabcodeowners","owner":"chefe","description":"A golang library to parse and query a CODEOWNERS file from Gitlab.","archived":false,"fork":false,"pushed_at":"2023-12-31T15:45:58.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T02:49:28.185Z","etag":null,"topics":["codeowners","gitlab","gitlab-codeowners"],"latest_commit_sha":null,"homepage":"","language":"Go","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/chefe.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":"2023-12-31T12:32:37.000Z","updated_at":"2023-12-31T15:06:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"50b74397-f386-451b-93dd-609abb1bff7c","html_url":"https://github.com/chefe/gitlabcodeowners","commit_stats":null,"previous_names":["chefe/gitlabcodeowners"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chefe/gitlabcodeowners","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefe%2Fgitlabcodeowners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefe%2Fgitlabcodeowners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefe%2Fgitlabcodeowners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefe%2Fgitlabcodeowners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chefe","download_url":"https://codeload.github.com/chefe/gitlabcodeowners/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefe%2Fgitlabcodeowners/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28742510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T01:40:51.112Z","status":"online","status_checked_at":"2026-01-25T02:00:06.841Z","response_time":113,"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":["codeowners","gitlab","gitlab-codeowners"],"created_at":"2024-09-27T09:04:07.911Z","updated_at":"2026-01-25T02:32:12.842Z","avatar_url":"https://github.com/chefe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/chefe/gitlabcodeowners)](https://goreportcard.com/report/github.com/chefe/gitlabcodeowners)\n[![GitHub Actions](https://github.com/chefe/gitlabcodeowners/workflows/default/badge.svg)](https://github.com/chefe/gitlabcodeowners/actions/workflows/default.yml?query=branch%3Amain)\n[![Go Reference](https://pkg.go.dev/badge/github.com/chefe/gitlabcodeowners.svg)](https://pkg.go.dev/github.com/chefe/gitlabcodeowners)\n\n# gitlabcodeowners\n\n```go\nimport \"github.com/chefe/gitlabcodeowners\"\n```\n\nPackage gitlabcodeowners provides parsing and querying function to work with \\`CODEOWNERS\\` file from Gitlab. See https://docs.gitlab.com/ee/user/project/codeowners for more details.\n\n## Index\n\n- [func GetPossibleCodeOwnersLocations\\(\\) \\[\\]string](\u003c#GetPossibleCodeOwnersLocations\u003e)\n- [type Approval](\u003c#Approval\u003e)\n- [type File](\u003c#File\u003e)\n  - [func NewCodeOwnersFile\\(reader io.Reader\\) \\(File, error\\)](\u003c#NewCodeOwnersFile\u003e)\n  - [func \\(f File\\) GetRequiredApprovalsForFile\\(path string\\) map\\[string\\]Approval](\u003c#File.GetRequiredApprovalsForFile\u003e)\n  - [func \\(f File\\) GetRequiredApprovalsForFiles\\(paths \\[\\]string\\) map\\[string\\]\\[\\]Approval](\u003c#File.GetRequiredApprovalsForFiles\u003e)\n\n\n\u003ca name=\"GetPossibleCodeOwnersLocations\"\u003e\u003c/a\u003e\n## func [GetPossibleCodeOwnersLocations](\u003chttps://github.com/chefe/gitlabcodeowners/blob/main/file.go#L25\u003e)\n\n```go\nfunc GetPossibleCodeOwnersLocations() []string\n```\n\nGetPossibleCodeOwnersLocations returns a list of possible locations where a \\`CODEOWNERS\\` file can be located according to Gitlab.\n\n\u003ca name=\"Approval\"\u003e\u003c/a\u003e\n## type [Approval](\u003chttps://github.com/chefe/gitlabcodeowners/blob/main/file.go#L17-L21\u003e)\n\nApproval describes an approval required by a rule in the \\`CODEOWNERS\\` file.\n\n```go\ntype Approval struct {\n    Pattern   string\n    Approvals int\n    Owners    []string\n}\n```\n\n\u003ca name=\"File\"\u003e\u003c/a\u003e\n## type [File](\u003chttps://github.com/chefe/gitlabcodeowners/blob/main/file.go#L12-L14\u003e)\n\nFile is a representation of a parsed \\`CODEOWNERS\\` file.\n\n```go\ntype File struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewCodeOwnersFile\"\u003e\u003c/a\u003e\n### func [NewCodeOwnersFile](\u003chttps://github.com/chefe/gitlabcodeowners/blob/main/file.go#L31\u003e)\n\n```go\nfunc NewCodeOwnersFile(reader io.Reader) (File, error)\n```\n\nNewCodeOwnersFile tries to parse the given description and returns a \\`File\\` instance if parsing succeeded otherwise it return an error.\n\n\u003ca name=\"File.GetRequiredApprovalsForFile\"\u003e\u003c/a\u003e\n### func \\(File\\) [GetRequiredApprovalsForFile](\u003chttps://github.com/chefe/gitlabcodeowners/blob/main/file.go#L43\u003e)\n\n```go\nfunc (f File) GetRequiredApprovalsForFile(path string) map[string]Approval\n```\n\nGetRequiredApprovalsForFile returns a map of all approvals which apply to the file given by it's path. All path need to start with a \\`/\\` which represents the root folder of the repository.\n\n\u003ca name=\"File.GetRequiredApprovalsForFiles\"\u003e\u003c/a\u003e\n### func \\(File\\) [GetRequiredApprovalsForFiles](\u003chttps://github.com/chefe/gitlabcodeowners/blob/main/file.go#L77\u003e)\n\n```go\nfunc (f File) GetRequiredApprovalsForFiles(paths []string) map[string][]Approval\n```\n\nGetRequiredApprovalsForFiles returns a map of all approvals which apply to the files given by their path. All paths need to start with a \\`/\\` which represents the root folder of the repository.\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchefe%2Fgitlabcodeowners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchefe%2Fgitlabcodeowners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchefe%2Fgitlabcodeowners/lists"}