{"id":13471716,"url":"https://github.com/xanzy/go-gitlab","last_synced_at":"2025-08-25T23:32:21.543Z","repository":{"id":29534282,"uuid":"33072974","full_name":"xanzy/go-gitlab","owner":"xanzy","description":"GitLab Go SDK","archived":true,"fork":false,"pushed_at":"2024-12-10T16:01:54.000Z","size":6652,"stargazers_count":2436,"open_issues_count":16,"forks_count":949,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-08-21T22:37:35.009Z","etag":null,"topics":[],"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/xanzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit_events.go","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-03-29T13:01:43.000Z","updated_at":"2025-08-19T03:06:22.000Z","dependencies_parsed_at":"2023-01-14T15:08:39.862Z","dependency_job_id":"867bc086-e962-4247-bb8c-0cbdb547a18c","html_url":"https://github.com/xanzy/go-gitlab","commit_stats":{"total_commits":2351,"total_committers":646,"mean_commits":"3.6393188854489162","dds":0.8702679710761378,"last_synced_commit":"fc07191f67c92d9ab9f0ff54df8f3c08832912d7"},"previous_names":[],"tags_count":194,"template":false,"template_full_name":null,"purl":"pkg:github/xanzy/go-gitlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanzy%2Fgo-gitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanzy%2Fgo-gitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanzy%2Fgo-gitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanzy%2Fgo-gitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xanzy","download_url":"https://codeload.github.com/xanzy/go-gitlab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanzy%2Fgo-gitlab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271711132,"owners_count":24807693,"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-22T02:00:08.480Z","response_time":65,"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":[],"created_at":"2024-07-31T16:00:48.612Z","updated_at":"2025-08-25T23:32:21.070Z","avatar_url":"https://github.com/xanzy.png","language":"Go","funding_links":[],"categories":["Go","others","Web"],"sub_categories":["HTTP and Networking Clients"],"readme":"This repository is archived as it's development has been moved to GitLab!\n\n# go-gitlab (deprecated)\n\n🚧 **Project moved to https://gitlab.com/gitlab-org/api/client-go** 🚧\n\nThis package, `github.com/xanzy/go-gitlab`, has been moved to\n[`gitlab.com/gitlab-org/api/client-go`](https://gitlab.com/gitlab-org/api/client-go).\n\nThe project will continue to be a primarily community-maintained project,\nmore about it [here](https://gitlab.com/gitlab-org/client.go/-/blob/main/README.md#maintenance).\n\n**References**:\n\n- [GitLab Project](https://gitlab.com/gitlab-org/api/client-go)\n- [Issue Tracker](https://gitlab.com/gitlab-org/api/client-go/-/issues)\n\n## Migration Steps\n\n- Replace `github.com/xanzy/go-gitlab` with `gitlab.com/gitlab-org/api/client-go` in your code base.\n- Profit 🎉\n- *(the code is fully backwards-compatible, no breaking changes are expected)*\n\n\u003cdetails\u003e\u003csummary\u003eFormer README contents\u003c/summary\u003e\n\nA GitLab API client enabling Go programs to interact with GitLab in a simple and uniform way\n\n[![Build Status](https://github.com/xanzy/go-gitlab/workflows/Lint%20and%20Test/badge.svg)](https://github.com/xanzy/go-gitlab/actions?workflow=Lint%20and%20Test)\n[![Sourcegraph](https://sourcegraph.com/github.com/xanzy/go-gitlab/-/badge.svg)](https://sourcegraph.com/github.com/xanzy/go-gitlab?badge)\n[![GoDoc](https://godoc.org/github.com/xanzy/go-gitlab?status.svg)](https://godoc.org/github.com/xanzy/go-gitlab)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xanzy/go-gitlab)](https://goreportcard.com/report/github.com/xanzy/go-gitlab)\n[![Coverage](https://github.com/xanzy/go-gitlab/wiki/coverage.svg)](https://raw.githack.com/wiki/xanzy/go-gitlab/coverage.html)\n\n## NOTE\n\nRelease v0.6.0 (released on 25-08-2017) no longer supports the older V3 GitLab API. If\nyou need V3 support, please use the `f-api-v3` branch. This release contains some backwards\nincompatible changes that were needed to fully support the V4 GitLab API.\n\n## Coverage\n\nThis API client package covers most of the existing GitLab API calls and is updated regularly\nto add new and/or missing endpoints. Currently, the following services are supported:\n\n- [x] Applications\n- [x] Award Emojis\n- [x] Branches\n- [x] Broadcast Messages\n- [x] Commits\n- [x] Container Registry\n- [x] Custom Attributes\n- [x] Dependency List Export\n- [x] Deploy Keys\n- [x] Deployments\n- [x] Discussions (threaded comments)\n- [x] Environments\n- [x] Epic Issues\n- [x] Epics\n- [x] Error Tracking\n- [x] Events\n- [x] Feature Flags\n- [x] Geo Nodes\n- [x] Generic Packages\n- [x] GitLab CI Config Templates\n- [x] Gitignores Templates\n- [x] Group Access Requests\n- [x] Group Issue Boards\n- [x] Group Members\n- [x] Group Milestones\n- [x] Group Wikis\n- [x] Group-Level Variables\n- [x] Groups\n- [x] Instance Clusters\n- [x] Invites\n- [x] Issue Boards\n- [x] Issues\n- [x] Jobs\n- [x] Keys\n- [x] Labels\n- [x] License\n- [x] Markdown\n- [x] Merge Request Approvals\n- [x] Merge Requests\n- [x] Namespaces\n- [x] Notes (comments)\n- [x] Notification Settings\n- [x] Open Source License Templates\n- [x] Packages\n- [x] Pages\n- [x] Pages Domains\n- [x] Personal Access Tokens\n- [x] Pipeline Schedules\n- [x] Pipeline Triggers\n- [x] Pipelines\n- [x] Plan limits\n- [x] Project Access Requests\n- [x] Project Badges\n- [x] Project Clusters\n- [x] Project Import/export\n- [x] Project Members\n- [x] Project Milestones\n- [x] Project Repository Storage Moves\n- [x] Project Snippets\n- [x] Project Vulnerabilities\n- [x] Project-Level Variables\n- [x] Projects (including setting Webhooks)\n- [x] Protected Branches\n- [x] Protected Environments\n- [x] Protected Tags\n- [x] Repositories\n- [x] Repository Files\n- [x] Repository Submodules\n- [x] Runners\n- [x] Search\n- [x] Services\n- [x] Settings\n- [x] Sidekiq Metrics\n- [x] System Hooks\n- [x] Tags\n- [x] Todos\n- [x] Topics\n- [x] Users\n- [x] Validate CI Configuration\n- [x] Version\n- [x] Wikis\n\n## Usage\n\n```go\nimport \"github.com/xanzy/go-gitlab\"\n```\n\nConstruct a new GitLab client, then use the various services on the client to\naccess different parts of the GitLab API. For example, to list all\nusers:\n\n```go\ngit, err := gitlab.NewClient(\"yourtokengoeshere\")\nif err != nil {\n  log.Fatalf(\"Failed to create client: %v\", err)\n}\nusers, _, err := git.Users.ListUsers(\u0026gitlab.ListUsersOptions{})\n```\n\nThere are a few `With...` option functions that can be used to customize\nthe API client. For example, to set a custom base URL:\n\n```go\ngit, err := gitlab.NewClient(\"yourtokengoeshere\", gitlab.WithBaseURL(\"https://git.mydomain.com/api/v4\"))\nif err != nil {\n  log.Fatalf(\"Failed to create client: %v\", err)\n}\nusers, _, err := git.Users.ListUsers(\u0026gitlab.ListUsersOptions{})\n```\n\nSome API methods have optional parameters that can be passed. For example,\nto list all projects for user \"svanharmelen\":\n\n```go\ngit := gitlab.NewClient(\"yourtokengoeshere\")\nopt := \u0026gitlab.ListProjectsOptions{Search: gitlab.Ptr(\"svanharmelen\")}\nprojects, _, err := git.Projects.ListProjects(opt)\n```\n\n### Examples\n\nThe [examples](https://github.com/xanzy/go-gitlab/tree/master/examples) directory\ncontains a couple for clear examples, of which one is partially listed here as well:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/xanzy/go-gitlab\"\n)\n\nfunc main() {\n\tgit, err := gitlab.NewClient(\"yourtokengoeshere\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create client: %v\", err)\n\t}\n\n\t// Create new project\n\tp := \u0026gitlab.CreateProjectOptions{\n\t\tName:                     gitlab.Ptr(\"My Project\"),\n\t\tDescription:              gitlab.Ptr(\"Just a test project to play with\"),\n\t\tMergeRequestsAccessLevel: gitlab.Ptr(gitlab.EnabledAccessControl),\n\t\tSnippetsAccessLevel:      gitlab.Ptr(gitlab.EnabledAccessControl),\n\t\tVisibility:               gitlab.Ptr(gitlab.PublicVisibility),\n\t}\n\tproject, _, err := git.Projects.CreateProject(p)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Add a new snippet\n\ts := \u0026gitlab.CreateProjectSnippetOptions{\n\t\tTitle:           gitlab.Ptr(\"Dummy Snippet\"),\n\t\tFileName:        gitlab.Ptr(\"snippet.go\"),\n\t\tContent:         gitlab.Ptr(\"package main....\"),\n\t\tVisibility:      gitlab.Ptr(gitlab.PublicVisibility),\n\t}\n\t_, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\nFor complete usage of go-gitlab, see the full [package docs](https://godoc.org/github.com/xanzy/go-gitlab).\n\n## ToDo\n\n- The biggest thing this package still needs is tests :disappointed:\n\n## Issues\n\n- If you have an issue: report it on the [issue tracker](https://github.com/xanzy/go-gitlab/issues)\n\n## Author\n\nSander van Harmelen (\u003csander@vanharmelen.nl\u003e)\n\n## Contributing\n\nContributions are always welcome. For more information, check out the [contributing guide](https://github.com/xanzy/go-gitlab/blob/master/CONTRIBUTING.md)\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanzy%2Fgo-gitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxanzy%2Fgo-gitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanzy%2Fgo-gitlab/lists"}