From b75450ad361bd7c468af5a01f42d203010206f62 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Fri, 30 Dec 2016 20:15:45 -0500 Subject: API endpoints for forks (#509) --- vendor/code.gitea.io/sdk/gitea/fork.go | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 vendor/code.gitea.io/sdk/gitea/fork.go (limited to 'vendor/code.gitea.io') diff --git a/vendor/code.gitea.io/sdk/gitea/fork.go b/vendor/code.gitea.io/sdk/gitea/fork.go new file mode 100644 index 0000000000..e2158e1a16 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/fork.go @@ -0,0 +1,38 @@ +// Copyright 2016 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// ListForks list a repository's forks +func (c *Client) ListForks(user, repo string) ([]*Repository, error) { + forks := make([]*Repository, 10) + err := c.getParsedResponse("GET", + fmt.Sprintf("/repos/%s/%s/forks", user, repo), + nil, nil, &forks) + return forks, err +} + +// CreateForkOption options for creating a fork +type CreateForkOption struct { + Organization *string `json:"organization"` +} + +// CreateFork create a fork of a repository +func (c *Client) CreateFork(user, repo string, form CreateForkOption) (*Repository, error) { + body, err := json.Marshal(form) + if err != nil { + return nil, err + } + fork := new(Repository) + err = c.getParsedResponse("POST", + fmt.Sprintf("/repos/%s/%s/forks", user, repo), + jsonHeader, bytes.NewReader(body), &fork) + return fork, err +} -- cgit v1.2.3 -better-devices-wipe-action-wording'>Jerome-Herbinet-better-devices-wipe-action-wording Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/l10n/it.json
blob: 8b589df64d77aad44bba806cd9714310875fcb7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115