mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 15:57:31 -04:00 
			
		
		
		
	Vendor Update (#14696)
* github.com/yuin/goldmark v1.3.1 -> v1.3.2 * github.com/xanzy/go-gitlab v0.42.0 -> v0.44.0 * github.com/prometheus/client_golang v1.8.0 -> v1.9.0 * github.com/minio/minio-go v7.0.7 -> v7.0.9 * github.com/lafriks/xormstore v1.3.2 -> v1.4.0 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
							
								
								
									
										19
									
								
								vendor/github.com/xanzy/go-gitlab/labels.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/github.com/xanzy/go-gitlab/labels.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,5 +1,5 @@ | ||||
| // | ||||
| // Copyright 2017, Sander van Harmelen | ||||
| // Copyright 2021, Sander van Harmelen | ||||
| // | ||||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| // you may not use this file except in compliance with the License. | ||||
| @@ -19,6 +19,7 @@ package gitlab | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"fmt" | ||||
| 	"net/http" | ||||
| ) | ||||
|  | ||||
| // LabelsService handles communication with the label related methods of the | ||||
| @@ -89,7 +90,7 @@ func (s *LabelsService) ListLabels(pid interface{}, opt *ListLabelsOptions, opti | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels", pathEscape(project)) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("GET", u, opt, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
| @@ -117,7 +118,7 @@ func (s *LabelsService) GetLabel(pid interface{}, labelID interface{}, options . | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels/%s", pathEscape(project), label) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("GET", u, nil, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
| @@ -151,7 +152,7 @@ func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, op | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels", pathEscape(project)) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("POST", u, opt, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
| @@ -182,7 +183,7 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, op | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels", pathEscape(project)) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("DELETE", u, opt, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodDelete, u, opt, options) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| @@ -211,7 +212,7 @@ func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, op | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels", pathEscape(project)) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("PUT", u, opt, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
| @@ -242,7 +243,7 @@ func (s *LabelsService) SubscribeToLabel(pid interface{}, labelID interface{}, o | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels/%s/subscribe", pathEscape(project), label) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("POST", u, nil, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
| @@ -273,7 +274,7 @@ func (s *LabelsService) UnsubscribeFromLabel(pid interface{}, labelID interface{ | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels/%s/unsubscribe", pathEscape(project), label) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("POST", u, nil, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| @@ -296,7 +297,7 @@ func (s *LabelsService) PromoteLabel(pid interface{}, labelID interface{}, optio | ||||
| 	} | ||||
| 	u := fmt.Sprintf("projects/%s/labels/%s/promote", pathEscape(project), label) | ||||
|  | ||||
| 	req, err := s.client.NewRequest("PUT", u, nil, options) | ||||
| 	req, err := s.client.NewRequest(http.MethodPut, u, nil, options) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user