Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f51bcc0

Browse files
committedDec 9, 2024
Prepare repository for migration to gitlab.com
1 parent 5626c64 commit f51bcc0

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed
 

‎README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
# go-gitlab
1+
# (deprecated) go-gitlab (migrated to https://gitlab.com/gitlab-org/api/client-go)
2+
3+
🚧 **Project moved to https://gitlab.com/gitlab-org/api/client-go** 🚧
4+
5+
This package, `github.com/xanzy/go-gitlab`, has been moved to
6+
[`gitlab.com/gitlab-org/api/client-go`](https://gitlab.com/gitlab-org/api/client-go).
7+
8+
The project will continue to be a primarily community-maintained project,
9+
more about it [here](https://gitlab.com/gitlab-org/client.go/-/blob/main/README.md#maintenance).
10+
11+
**References**:
12+
13+
- [GitLab Project](https://gitlab.com/gitlab-org/api/client-go)
14+
- [Issue Tracker](https://gitlab.com/gitlab-org/api/client-go/-/issues)
15+
16+
## Migration Steps
17+
18+
- Replace `github.com/xanzy/go-gitlab` with `gitlab.com/gitlab-org/api/client-go` in your code base.
19+
- Profit 🎉
20+
- *(the code is fully backwards-compatible, no breaking changes are expected)*
21+
22+
<details><summary>Former README contents</summary>
223

324
A GitLab API client enabling Go programs to interact with GitLab in a simple and uniform way
425

@@ -207,3 +228,5 @@ Contributions are always welcome. For more information, check out the [contribut
207228
## License
208229

209230
Licensed 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 <http://www.apache.org/licenses/LICENSE-2.0>
231+
232+
</details>

‎gitlab.go

+20
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ const (
7070
var ErrNotFound = errors.New("404 Not Found")
7171

7272
// A Client manages communication with the GitLab API.
73+
//
74+
// Deprecated: use gitlab.com/gitlab-org/api/client-go instead.
75+
// See https://gitlab.com/gitlab-org/api/client-go
76+
//
77+
// This package is completely frozen, nothing will be added, removed or changed.
7378
type Client struct {
7479
// HTTP client used to communicate with the API.
7580
client *retryablehttp.Client
@@ -260,6 +265,11 @@ type RateLimiter interface {
260265

261266
// NewClient returns a new GitLab API client. To use API methods which require
262267
// authentication, provide a valid private or personal token.
268+
//
269+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
270+
// See https://gitlab.com/gitlab-org/api/client-go
271+
//
272+
// This package is completely frozen, nothing will be added, removed or changed.
263273
func NewClient(token string, options ...ClientOptionFunc) (*Client, error) {
264274
client, err := newClient(options...)
265275
if err != nil {
@@ -272,6 +282,11 @@ func NewClient(token string, options ...ClientOptionFunc) (*Client, error) {
272282

273283
// NewBasicAuthClient returns a new GitLab API client. To use API methods which
274284
// require authentication, provide a valid username and password.
285+
//
286+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
287+
// See https://gitlab.com/gitlab-org/api/client-go
288+
//
289+
// This package is completely frozen, nothing will be added, removed or changed.
275290
func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) (*Client, error) {
276291
client, err := newClient(options...)
277292
if err != nil {
@@ -287,6 +302,11 @@ func NewBasicAuthClient(username, password string, options ...ClientOptionFunc)
287302

288303
// NewJobClient returns a new GitLab API client. To use API methods which require
289304
// authentication, provide a valid job token.
305+
//
306+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
307+
// See https://gitlab.com/gitlab-org/api/client-go
308+
//
309+
// This package is completely frozen, nothing will be added, removed or changed.
290310
func NewJobClient(token string, options ...ClientOptionFunc) (*Client, error) {
291311
client, err := newClient(options...)
292312
if err != nil {

‎go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. See https://gitlab.com/gitlab-org/api/client-go
12
module github.com/xanzy/go-gitlab
23

34
go 1.19

0 commit comments

Comments
 (0)
Please sign in to comment.