diff --git a/Makefile b/Makefile
index 27b2c30295..8bcd4c3947 100644
--- a/Makefile
+++ b/Makefile
@@ -147,6 +147,7 @@ ESLINT_CONCURRENCY ?= 2
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
SWAGGER_SPEC_INPUT := templates/swagger/v1_input.json
+SWAGGER_SPEC_GROUP_INPUT := templates/swagger/v1_groups.json
SWAGGER_EXCLUDE := code.gitea.io/sdk
OPENAPI3_SPEC := templates/swagger/v1_openapi3_json.tmpl
@@ -228,6 +229,8 @@ generate-swagger: $(SWAGGER_SPEC) $(OPENAPI3_SPEC) ## generate the swagger spec
$(SWAGGER_SPEC): $(GO_SOURCES) $(SWAGGER_SPEC_INPUT)
$(GO) run $(SWAGGER_PACKAGE) generate spec --exclude "$(SWAGGER_EXCLUDE)" --input "$(SWAGGER_SPEC_INPUT)" --output './$(SWAGGER_SPEC)'
+ $(GO) generate -v ./build_tools/...
+ $(GO) run $(SWAGGER_PACKAGE) mixin -o './$(SWAGGER_SPEC)' $(SWAGGER_SPEC) $(SWAGGER_SPEC_GROUP_INPUT)
.PHONY: swagger-check
swagger-check: generate-swagger
diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go
new file mode 100644
index 0000000000..1fef78548c
--- /dev/null
+++ b/build_tools/swagger/main.go
@@ -0,0 +1,308 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//go:generate go run main.go ../../
+
+package main
+
+import (
+ "bytes"
+ encjson "encoding/json" //nolint:depguard // this package wraps it
+ "errors"
+ "fmt"
+ "iter"
+ "log"
+ "os"
+ "path/filepath"
+ "regexp"
+
+ "code.gitea.io/gitea/modules/json"
+)
+
+type Pair struct {
+ Key string
+ Value any
+}
+
+type OrderedMap struct {
+ Pairs []Pair
+ indices map[string]int
+}
+
+func (o OrderedMap) Get(key string) (any, bool) {
+ if _, ok := o.indices[key]; ok {
+ return o.Pairs[o.indices[key]].Value, true
+ }
+ return nil, false
+}
+
+func (o *OrderedMap) Set(key string, value any) {
+ if _, ok := o.indices[key]; ok {
+ o.Pairs[o.indices[key]] = Pair{key, value}
+ } else {
+ o.Pairs = append(o.Pairs, Pair{key, value})
+ o.indices[key] = len(o.Pairs) - 1
+ }
+}
+
+func (o OrderedMap) Iter() iter.Seq2[string, any] {
+ return func(yield func(string, any) bool) {
+ for _, it := range o.Pairs {
+ yield(it.Key, it.Value)
+ }
+ }
+}
+
+var errNilSentinel = errors.New("nil sentinel")
+
+func (o *OrderedMap) UnmarshalJSON(data []byte) error {
+ trimmed := bytes.TrimSpace(data)
+ if bytes.Equal(trimmed, []byte("null")) {
+ o.Pairs = nil
+ o.indices = nil
+ return nil
+ }
+
+ dec := encjson.NewDecoder(bytes.NewReader(data))
+ dec.UseNumber()
+
+ tok, err := dec.Token()
+ if err != nil {
+ return err
+ }
+ delim, ok := tok.(encjson.Delim)
+ if !ok || delim != '{' {
+ return errors.New("OrderedMap: expected '{' at start of object")
+ }
+
+ // Reset storage
+ if o.indices == nil {
+ o.indices = make(map[string]int)
+ } else {
+ for k := range o.indices {
+ delete(o.indices, k)
+ }
+ }
+ o.Pairs = o.Pairs[:0]
+
+ for dec.More() {
+ tk, err := dec.Token()
+ if err != nil {
+ return err
+ }
+ key, ok := tk.(string)
+ if !ok {
+ return fmt.Errorf(
+ "OrderedMap: expected string key, got %T (%v)",
+ tk,
+ tk,
+ )
+ }
+
+ var raw encjson.RawMessage
+ if err := dec.Decode(&raw); err != nil {
+ return fmt.Errorf("OrderedMap: decode value for %q: %w", key, err)
+ }
+
+ val, err := decodeJSONValue(raw)
+ if err != nil {
+ return fmt.Errorf("OrderedMap: unmarshal value for %q: %w", key, err)
+ }
+
+ if idx, exists := o.indices[key]; exists {
+ o.Pairs[idx].Value = val
+ } else {
+ o.indices[key] = len(o.Pairs)
+ o.Pairs = append(o.Pairs, Pair{Key: key, Value: val})
+ }
+ }
+
+ end, err := dec.Token()
+ if err != nil {
+ return err
+ }
+ if d, ok := end.(encjson.Delim); !ok || d != '}' {
+ return errors.New("OrderedMap: expected '}' at end of object")
+ }
+
+ return nil
+}
+
+func decodeJSONValue(raw encjson.RawMessage) (any, error) {
+ t := bytes.TrimSpace(raw)
+ if bytes.Equal(t, []byte("null")) {
+ return nil, errNilSentinel
+ }
+
+ d := encjson.NewDecoder(bytes.NewReader(raw))
+ d.UseNumber()
+
+ tok, err := d.Token()
+ if err != nil {
+ return nil, err
+ }
+
+ switch tt := tok.(type) {
+ case encjson.Delim:
+ switch tt {
+ case '{':
+ var inner OrderedMap
+ if err := inner.UnmarshalJSON(raw); err != nil {
+ return nil, err
+ }
+ return inner, nil
+ case '[':
+ var arr []any
+ for d.More() {
+ var elemRaw encjson.RawMessage
+ if err := d.Decode(&elemRaw); err != nil {
+ return nil, err
+ }
+ v, err := decodeJSONValue(elemRaw)
+ if err != nil && !errors.Is(err, errNilSentinel) {
+ return nil, err
+ }
+ arr = append(arr, v)
+ }
+ if end, err := d.Token(); err != nil {
+ return nil, err
+ } else if end != encjson.Delim(']') {
+ return nil, errors.New("expected ']'")
+ }
+ return arr, nil
+ default:
+ return nil, fmt.Errorf("unexpected delimiter %q", tt)
+ }
+ default:
+ var v any
+ d = encjson.NewDecoder(bytes.NewReader(raw))
+ d.UseNumber()
+ if err := d.Decode(&v); err != nil {
+ return nil, err
+ }
+ return v, nil
+ }
+}
+
+func (o OrderedMap) MarshalJSON() ([]byte, error) {
+ var buf bytes.Buffer
+
+ buf.WriteString("{")
+ for i, kv := range o.Pairs {
+ if i != 0 {
+ buf.WriteString(",")
+ }
+ key, err := json.Marshal(kv.Key)
+ if err != nil {
+ return nil, err
+ }
+ buf.Write(key)
+ buf.WriteString(":")
+ val, err := json.Marshal(kv.Value)
+ if err != nil {
+ return nil, err
+ }
+ buf.Write(val)
+ }
+
+ buf.WriteString("}")
+ return buf.Bytes(), nil
+}
+
+var rxPath = regexp.MustCompile(`(?m)^(/repos/\{owner})/(\{repo})`)
+
+func generatePaths(root string) *OrderedMap {
+ pathData := &OrderedMap{
+ indices: make(map[string]int),
+ }
+ endpoints := &OrderedMap{
+ indices: make(map[string]int),
+ }
+ fileToRead, err := filepath.Rel(root, "./templates/swagger/v1_json.tmpl")
+ if err != nil {
+ log.Fatal(err)
+ }
+ swaggerBytes, err := os.ReadFile(fileToRead)
+ if err != nil {
+ log.Fatal(err)
+ }
+ raw := OrderedMap{
+ indices: make(map[string]int),
+ }
+ err = json.Unmarshal(swaggerBytes, &raw)
+ if err != nil {
+ log.Fatal(err)
+ }
+ rpaths, has := raw.Get("paths")
+ if !has {
+ log.Fatal("paths not found")
+ }
+ paths := rpaths.(OrderedMap)
+ for k, v := range paths.Iter() {
+ if !rxPath.MatchString(k) {
+ // skip if this endpoint does not start with `/repos/{owner}/{repo}`
+ continue
+ }
+ // generate new endpoint path with `/group/{group_id}` in between the `owner` and `repo` params
+ nk := rxPath.ReplaceAllString(k, "$1/group/{group_id}/$2")
+ methodMap := v.(OrderedMap)
+
+ for method, methodSpec := range methodMap.Iter() {
+ specMap := methodSpec.(OrderedMap)
+ var params []OrderedMap
+ aparams, has := specMap.Get("parameters")
+ if !has {
+ continue
+ }
+ rparams := aparams.([]any)
+ for _, rparam := range rparams {
+ params = append(params, rparam.(OrderedMap))
+ }
+ param := OrderedMap{
+ indices: make(map[string]int),
+ }
+ param.Set("description", "group ID of the repo")
+ param.Set("name", "group_id")
+ param.Set("type", "integer")
+ param.Set("format", "int64")
+ param.Set("required", true)
+ param.Set("in", "path")
+ params = append(params, param)
+ // i believe for...range loops create copies of each item that's iterated over,
+ // so we need to take extra care to ensure we're mutating the original map entry
+ specMap.Set("parameters", params)
+ methodMap.Set(method, specMap)
+ //(methodMap[method].(map[string]any))["parameters"] = params
+ }
+ endpoints.Set(nk, methodMap)
+ }
+ pathData.Set("paths", endpoints)
+ return pathData
+}
+
+func writeMapToFile(filename string, data *OrderedMap) {
+ marshaledBytes, err := json.MarshalIndent(data, "", " ")
+ if err != nil {
+ log.Fatal(err)
+ }
+ marshaledBytes = append(marshaledBytes, '\n')
+ err = os.WriteFile(filename, marshaledBytes, 0o666)
+ if err != nil {
+ log.Fatal(err)
+ }
+}
+
+func main() {
+ var err error
+ root := "../../"
+ if len(os.Args) > 1 {
+ root = os.Args[1]
+ }
+ err = os.Chdir(root)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ pathData := generatePaths(".")
+ out := "./templates/swagger/v1_groups.json"
+ writeMapToFile(out, pathData)
+}
diff --git a/cmd/hook.go b/cmd/hook.go
index 4a6c7c2905..4b4edd8936 100644
--- a/cmd/hook.go
+++ b/cmd/hook.go
@@ -200,6 +200,7 @@ Gitea or set your environment appropriately.`, "")
// the environment is set by serv command
isWiki, _ := strconv.ParseBool(os.Getenv(repo_module.EnvRepoIsWiki))
username := os.Getenv(repo_module.EnvRepoUsername)
+ groupID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvRepoGroupID), 10, 64)
reponame := os.Getenv(repo_module.EnvRepoName)
userID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvPusherID), 10, 64)
prID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvPRID), 10, 64)
@@ -271,7 +272,7 @@ Gitea or set your environment appropriately.`, "")
hookOptions.OldCommitIDs = oldCommitIDs
hookOptions.NewCommitIDs = newCommitIDs
hookOptions.RefFullNames = refFullNames
- extra := private.HookPreReceive(ctx, username, reponame, hookOptions)
+ extra := private.HookPreReceive(ctx, username, reponame, groupID, hookOptions)
if extra.HasError() {
return fail(ctx, extra.UserMsg, "HookPreReceive(batch) failed: %v", extra.Error)
}
@@ -297,7 +298,7 @@ Gitea or set your environment appropriately.`, "")
fmt.Fprintf(out, " Checking %d references\n", count)
- extra := private.HookPreReceive(ctx, username, reponame, hookOptions)
+ extra := private.HookPreReceive(ctx, username, reponame, groupID, hookOptions)
if extra.HasError() {
return fail(ctx, extra.UserMsg, "HookPreReceive(last) failed: %v", extra.Error)
}
@@ -370,6 +371,7 @@ Gitea or set your environment appropriately.`, "")
pusherID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvPusherID), 10, 64)
prID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvPRID), 10, 64)
pusherName := os.Getenv(repo_module.EnvPusherName)
+ groupID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvRepoGroupID), 10, 64)
hookOptions := private.HookOptions{
UserName: pusherName,
@@ -417,7 +419,7 @@ Gitea or set your environment appropriately.`, "")
hookOptions.OldCommitIDs = oldCommitIDs
hookOptions.NewCommitIDs = newCommitIDs
hookOptions.RefFullNames = refFullNames
- resp, extra := private.HookPostReceive(ctx, repoUser, repoName, hookOptions)
+ resp, extra := private.HookPostReceive(ctx, repoUser, repoName, groupID, hookOptions)
if extra.HasError() {
_ = dWriter.Close()
hookPrintResults(results)
@@ -437,7 +439,7 @@ Gitea or set your environment appropriately.`, "")
if count == 0 {
if wasEmpty && masterPushed {
// We need to tell the repo to reset the default branch to master
- extra := private.SetDefaultBranch(ctx, repoUser, repoName, "master")
+ extra := private.SetDefaultBranch(ctx, repoUser, repoName, groupID, "master")
if extra.HasError() {
return fail(ctx, extra.UserMsg, "SetDefaultBranch failed: %v", extra.Error)
}
@@ -455,7 +457,7 @@ Gitea or set your environment appropriately.`, "")
fmt.Fprintf(out, " Processing %d references\n", count)
- resp, extra := private.HookPostReceive(ctx, repoUser, repoName, hookOptions)
+ resp, extra := private.HookPostReceive(ctx, repoUser, repoName, groupID, hookOptions)
if resp == nil {
_ = dWriter.Close()
hookPrintResults(results)
@@ -468,7 +470,7 @@ Gitea or set your environment appropriately.`, "")
if wasEmpty && masterPushed {
// We need to tell the repo to reset the default branch to master
- extra := private.SetDefaultBranch(ctx, repoUser, repoName, "master")
+ extra := private.SetDefaultBranch(ctx, repoUser, repoName, groupID, "master")
if extra.HasError() {
return fail(ctx, extra.UserMsg, "SetDefaultBranch failed: %v", extra.Error)
}
@@ -537,6 +539,7 @@ Gitea or set your environment appropriately.`, "")
repoName := os.Getenv(repo_module.EnvRepoName)
pusherID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvPusherID), 10, 64)
pusherName := os.Getenv(repo_module.EnvPusherName)
+ groupID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvRepoGroupID), 10, 64)
// 1. Version and features negotiation.
// S: PKT-LINE(version=1\0push-options atomic...) / PKT-LINE(version=1\n)
@@ -651,7 +654,7 @@ Gitea or set your environment appropriately.`, "")
}
// 3. run hook
- resp, extra := private.HookProcReceive(ctx, repoUser, repoName, hookOptions)
+ resp, extra := private.HookProcReceive(ctx, repoUser, repoName, groupID, hookOptions)
if extra.HasError() {
return fail(ctx, extra.UserMsg, "HookProcReceive failed: %v", extra.Error)
}
diff --git a/cmd/serv.go b/cmd/serv.go
index a35d476c86..7b00cce382 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -201,8 +201,17 @@ func runServ(ctx context.Context, c *cli.Command) error {
repoPath := strings.TrimPrefix(sshCmdArgs[1], "/")
repoPathFields := strings.SplitN(repoPath, "/", 2)
+ rawGroup, _, _ := strings.Cut(repoPathFields[1], "/")
+ var groupID int64
if len(repoPathFields) != 2 {
- return fail(ctx, "Invalid repository path", "Invalid repository path: %v", repoPath)
+ if len(repoPathFields) == 3 {
+ groupID, err = strconv.ParseInt(rawGroup, 10, 64)
+ if err != nil {
+ return fail(ctx, "Invalid repository path", "Invalid repository path: %v", repoPath)
+ }
+ } else {
+ return fail(ctx, "Invalid repository path", "Invalid repository path: %v", repoPath)
+ }
}
username := repoPathFields[0]
@@ -249,16 +258,16 @@ func runServ(ctx context.Context, c *cli.Command) error {
requestedMode := getAccessMode(verb, lfsVerb)
- results, extra := private.ServCommand(ctx, keyID, username, reponame, requestedMode, verb, lfsVerb)
+ results, extra := private.ServCommand(ctx, keyID, username, reponame, groupID, requestedMode, verb, lfsVerb)
if extra.HasError() {
return fail(ctx, extra.UserMsg, "ServCommand failed: %s", extra.Error)
}
// because the original repoPath maybe redirected, we need to use the returned actual repository information
if results.IsWiki {
- repoPath = repo_model.RelativeWikiPath(results.OwnerName, results.RepoName)
+ repoPath = repo_model.RelativeWikiPath(results.OwnerName, results.RepoName, groupID)
} else {
- repoPath = repo_model.RelativePath(results.OwnerName, results.RepoName)
+ repoPath = repo_model.RelativePath(results.OwnerName, results.RepoName, groupID)
}
// LFS SSH protocol
@@ -322,6 +331,7 @@ func runServ(ctx context.Context, c *cli.Command) error {
repo_module.EnvRepoUsername+"="+results.OwnerName,
repo_module.EnvPusherName+"="+results.UserName,
repo_module.EnvPusherEmail+"="+results.UserEmail,
+ repo_module.EnvRepoGroupID+"="+strconv.FormatInt(groupID, 10),
repo_module.EnvPusherID+"="+strconv.FormatInt(results.UserID, 10),
repo_module.EnvRepoID+"="+strconv.FormatInt(results.RepoID, 10),
repo_module.EnvPRID+"="+strconv.Itoa(0),
diff --git a/models/activities/action.go b/models/activities/action.go
index 4ffdca842a..54296ea14f 100644
--- a/models/activities/action.go
+++ b/models/activities/action.go
@@ -259,6 +259,14 @@ func (a *Action) GetRepoName(ctx context.Context) string {
return a.Repo.Name
}
+func (a *Action) GetRepoGroup(ctx context.Context) string {
+ _ = a.LoadRepo(ctx)
+ if a.Repo == nil || a.Repo.GroupID == 0 {
+ return ""
+ }
+ return strconv.FormatInt(a.Repo.GroupID, 10)
+}
+
// ShortRepoName returns the name of the action repository
// trimmed to max 33 chars.
func (a *Action) ShortRepoName(ctx context.Context) string {
@@ -267,19 +275,26 @@ func (a *Action) ShortRepoName(ctx context.Context) string {
// GetRepoPath returns the virtual path to the action repository.
func (a *Action) GetRepoPath(ctx context.Context) string {
- return path.Join(a.GetRepoUserName(ctx), a.GetRepoName(ctx))
+ return path.Join(a.GetRepoUserName(ctx), a.GetRepoGroup(ctx), a.GetRepoName(ctx))
}
// ShortRepoPath returns the virtual path to the action repository
// trimmed to max 20 + 1 + 33 chars.
func (a *Action) ShortRepoPath(ctx context.Context) string {
- return path.Join(a.ShortRepoUserName(ctx), a.ShortRepoName(ctx))
+ return path.Join(a.ShortRepoUserName(ctx), a.makeGroupSegment(ctx), a.GetRepoGroup(ctx), a.ShortRepoName(ctx))
}
// GetRepoLink returns relative link to action repository.
func (a *Action) GetRepoLink(ctx context.Context) string {
// path.Join will skip empty strings
- return path.Join(setting.AppSubURL, "/", url.PathEscape(a.GetRepoUserName(ctx)), url.PathEscape(a.GetRepoName(ctx)))
+ return path.Join(setting.AppSubURL, "/", url.PathEscape(a.GetRepoUserName(ctx)), a.makeGroupSegment(ctx), a.GetRepoGroup(ctx), url.PathEscape(a.GetRepoName(ctx)))
+}
+
+func (a *Action) makeGroupSegment(ctx context.Context) string {
+ if a.GetRepoGroup(ctx) != "" {
+ return "group"
+ }
+ return ""
}
// GetRepoAbsoluteLink returns the absolute link to action repository.
diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml
index d8eb796207..7048b5c2b1 100644
--- a/models/fixtures/repository.yml
+++ b/models/fixtures/repository.yml
@@ -29,6 +29,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 2
@@ -60,6 +61,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: true
+ group_id: 0
-
id: 3
@@ -91,6 +93,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 4
@@ -124,6 +127,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 5
@@ -154,6 +158,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 1
-
id: 6
@@ -184,6 +190,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 7
@@ -214,6 +221,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 8
@@ -244,6 +252,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 9
@@ -274,6 +283,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 10
@@ -305,6 +315,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 11
@@ -336,6 +347,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 12
@@ -366,6 +378,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 13
@@ -396,6 +409,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 14
@@ -427,6 +441,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 15
@@ -458,6 +473,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 16
@@ -489,6 +505,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 17
@@ -519,6 +536,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 18
@@ -549,6 +567,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 19
@@ -579,6 +598,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 20
@@ -609,6 +629,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 21
@@ -639,6 +660,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 22
@@ -669,6 +691,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 23
@@ -699,6 +722,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
-
id: 24
@@ -729,6 +754,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 1
-
id: 25
@@ -759,6 +786,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 26
@@ -789,6 +817,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 27
@@ -819,6 +848,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
-
id: 28
@@ -849,6 +880,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 1
-
id: 29
@@ -879,6 +912,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 30
@@ -909,6 +943,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 31
@@ -940,6 +975,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 32 # org public repo
@@ -970,6 +1006,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 2
-
id: 33
@@ -1001,6 +1039,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 34
@@ -1031,6 +1070,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 35
@@ -1061,6 +1101,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 36
@@ -1092,6 +1133,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 37
@@ -1123,6 +1165,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 38
@@ -1154,6 +1197,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
-
id: 39
@@ -1185,6 +1230,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 1
-
id: 40
@@ -1216,6 +1263,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
-
id: 41
@@ -1247,6 +1296,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 1
-
id: 42
@@ -1278,6 +1329,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 43
@@ -1308,6 +1360,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
-
id: 44
@@ -1339,6 +1393,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 45
@@ -1369,6 +1424,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 46
@@ -1400,6 +1456,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 1
-
id: 47
@@ -1431,6 +1489,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 2
-
id: 48
@@ -1462,6 +1522,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 3
-
id: 49
@@ -1493,6 +1555,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 50
@@ -1524,6 +1587,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 51
@@ -1555,6 +1619,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 52
@@ -1586,6 +1651,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 53
@@ -1614,6 +1680,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 54
@@ -1695,6 +1762,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 60
@@ -1726,6 +1794,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
-
id: 61
@@ -1757,6 +1826,8 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
-
id: 62
@@ -1788,5 +1859,7 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
+ group_id: 0
+ group_sort_order: 0
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly
diff --git a/models/git/lfs_test.go b/models/git/lfs_test.go
index 4c0242f439..cd7001458e 100644
--- a/models/git/lfs_test.go
+++ b/models/git/lfs_test.go
@@ -26,7 +26,7 @@ func TestIterateLFSMetaObjectsForRepoUpdatesDoNotSkip(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
ctx := t.Context()
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, "user2", "repo1")
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, "user2", "repo1", 0)
assert.NoError(t, err)
defer test.MockVariableValue(&setting.Database.IterateBufferSize, 1)()
diff --git a/models/group/avatar.go b/models/group/avatar.go
new file mode 100644
index 0000000000..04f507279c
--- /dev/null
+++ b/models/group/avatar.go
@@ -0,0 +1,41 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "net/url"
+
+ "code.gitea.io/gitea/models/avatars"
+ "code.gitea.io/gitea/modules/httplib"
+ "code.gitea.io/gitea/modules/setting"
+)
+
+func (g *Group) CustomAvatarRelativePath() string {
+ return g.Avatar
+}
+
+func (g *Group) relAvatarLink() string {
+ // If no avatar - path is empty
+ avatarPath := g.CustomAvatarRelativePath()
+ if len(avatarPath) == 0 {
+ return ""
+ }
+ return setting.AppSubURL + "/group-avatars/" + url.PathEscape(g.Avatar)
+}
+
+func (g *Group) AvatarLink(ctx context.Context) string {
+ relLink := g.relAvatarLink()
+ if relLink != "" {
+ return httplib.MakeAbsoluteURL(ctx, relLink)
+ }
+ return ""
+}
+
+func (g *Group) AvatarLinkWithSize(size int) string {
+ if g.Avatar == "" {
+ return avatars.DefaultAvatarLink()
+ }
+ return avatars.GenerateUserAvatarImageLink(g.Avatar, size)
+}
diff --git a/models/group/errors.go b/models/group/errors.go
new file mode 100644
index 0000000000..52aafbf655
--- /dev/null
+++ b/models/group/errors.go
@@ -0,0 +1,62 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "errors"
+ "fmt"
+
+ "code.gitea.io/gitea/modules/util"
+)
+
+type ErrGroupNotExist struct {
+ ID int64
+}
+
+// IsErrGroupNotExist checks if an error is a ErrCommentNotExist.
+func IsErrGroupNotExist(err error) bool {
+ var errGroupNotExist ErrGroupNotExist
+ ok := errors.As(err, &errGroupNotExist)
+ return ok
+}
+
+func (err ErrGroupNotExist) Error() string {
+ return fmt.Sprintf("group does not exist [id: %d]", err.ID)
+}
+
+func (err ErrGroupNotExist) Unwrap() error {
+ return util.ErrNotExist
+}
+
+type ErrGroupTooDeep struct {
+ ID int64
+}
+
+func IsErrGroupTooDeep(err error) bool {
+ var errGroupTooDeep ErrGroupTooDeep
+ ok := errors.As(err, &errGroupTooDeep)
+ return ok
+}
+
+func (err ErrGroupTooDeep) Error() string {
+ return fmt.Sprintf("group has reached or exceeded the subgroup nesting limit [id: %d]", err.ID)
+}
+
+type ErrUserDoesNotHaveAccessToGroup struct {
+ UserID, GroupID int64
+}
+
+func (e ErrUserDoesNotHaveAccessToGroup) Error() string {
+ return fmt.Sprintf("user %d does not have access to group %d", e.UserID, e.GroupID)
+}
+
+func (e ErrUserDoesNotHaveAccessToGroup) Unwrap() error {
+ return util.ErrPermissionDenied
+}
+
+func IsErrUserDoesNotHaveAccessToGroup(err error) bool {
+ var eNoAccess ErrUserDoesNotHaveAccessToGroup
+ ok := errors.As(err, &eNoAccess)
+ return ok
+}
diff --git a/models/group/group.go b/models/group/group.go
new file mode 100644
index 0000000000..115a455bcf
--- /dev/null
+++ b/models/group/group.go
@@ -0,0 +1,502 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "slices"
+ "strconv"
+
+ "code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+ user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/container"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/optional"
+ "code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/modules/util"
+
+ "xorm.io/builder"
+)
+
+// Group represents a group of repositories for a user or organization
+type Group struct {
+ ID int64 `xorm:"pk autoincr"`
+ OwnerID int64 `xorm:"INDEX NOT NULL"`
+ OwnerName string
+ Owner *user_model.User `xorm:"-"`
+ LowerName string `xorm:"TEXT NOT NULL"`
+ Name string `xorm:"TEXT NOT NULL"`
+ Description string `xorm:"TEXT"`
+ Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"`
+ Avatar string `xorm:"VARCHAR(64)"`
+
+ ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"`
+ ParentGroup *Group `xorm:"-"`
+ Subgroups RepoGroupList `xorm:"-"`
+
+ SortOrder int `xorm:"INDEX"`
+}
+
+// GroupLink returns the link to this group
+func (g *Group) GroupLink() string {
+ return setting.AppSubURL + "/" + url.PathEscape(g.OwnerName) + "/groups/" + strconv.FormatInt(g.ID, 10)
+}
+
+func (g *Group) OrgGroupLink() string {
+ return setting.AppSubURL + "/org/" + url.PathEscape(g.OwnerName) + "/groups/" + strconv.FormatInt(g.ID, 10)
+}
+
+func (Group) TableName() string { return "repo_group" }
+
+func init() {
+ db.RegisterModel(new(Group))
+ db.RegisterModel(new(RepoGroupTeam))
+ db.RegisterModel(new(RepoGroupUnit))
+}
+
+func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, cond builder.Cond, currentLevel int) error {
+ if currentLevel >= 20 {
+ return ErrGroupTooDeep{
+ g.ID,
+ }
+ }
+ if g.Subgroups != nil {
+ return nil
+ }
+ var err error
+ g.Subgroups, err = FindGroupsByCond(ctx, &FindGroupsOptions{
+ ParentGroupID: g.ID,
+ }, cond)
+ if err != nil {
+ return err
+ }
+ slices.SortStableFunc(g.Subgroups, func(a, b *Group) int {
+ return a.SortOrder - b.SortOrder
+ })
+ if recursive {
+ for _, group := range g.Subgroups {
+ err = group.doLoadSubgroups(ctx, recursive, cond, currentLevel+1)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (g *Group) LoadSubgroups(ctx context.Context, recursive bool) error {
+ fgo := &FindGroupsOptions{
+ ParentGroupID: g.ID,
+ }
+ return g.doLoadSubgroups(ctx, recursive, fgo.ToConds(), 0)
+}
+
+func (g *Group) LoadAccessibleSubgroups(ctx context.Context, recursive bool, doer *user_model.User) error {
+ return g.doLoadSubgroups(ctx, recursive, AccessibleGroupCondition(doer, g.OwnerID, unit.TypeInvalid, perm.AccessModeRead), 0)
+}
+
+func (g *Group) LoadAttributes(ctx context.Context) error {
+ err := g.LoadOwner(ctx)
+ if err != nil {
+ return err
+ }
+ return g.LoadParentGroup(ctx)
+}
+
+func (g *Group) LoadParentGroup(ctx context.Context) error {
+ if g.ParentGroup != nil {
+ return nil
+ }
+ if g.ParentGroupID == 0 {
+ return nil
+ }
+ parentGroup, err := GetGroupByID(ctx, g.ParentGroupID)
+ if err != nil {
+ return err
+ }
+ g.ParentGroup = parentGroup
+ return nil
+}
+
+func (g *Group) LoadOwner(ctx context.Context) error {
+ if g.Owner != nil {
+ return nil
+ }
+ var err error
+ g.Owner, err = user_model.GetUserByID(ctx, g.OwnerID)
+ return err
+}
+
+func (g *Group) CanAccess(ctx context.Context, user *user_model.User) (bool, error) {
+ return g.CanAccessAtLevel(ctx, user, perm.AccessModeRead)
+}
+
+func (g *Group) CanAccessAtLevel(ctx context.Context, user *user_model.User, level perm.AccessMode) (bool, error) {
+ return g.CanAccessUnitAtLevel(ctx, user, unit.TypeInvalid, level)
+}
+
+func (g *Group) CanAccessUnitAtLevel(ctx context.Context, user *user_model.User, u unit.Type, level perm.AccessMode) (bool, error) {
+ if user != nil {
+ ownedBy, err := g.IsOwnedBy(ctx, user.ID)
+ if err != nil {
+ return false, err
+ }
+ if ownedBy {
+ return true, nil
+ }
+ }
+ orCond := builder.Or(AccessibleGroupCondition(user, g.OwnerID, u, level))
+ if level == perm.AccessModeRead {
+ orCond = orCond.Or(builder.Eq{"`repo_group`.visibility": structs.VisibleTypePublic})
+ }
+ return db.GetEngine(ctx).Table(g.TableName()).Where(builder.And(builder.Eq{"`repo_group`.id": g.ID}, orCond)).Exist()
+}
+
+func (g *Group) IsOwnedBy(ctx context.Context, userID int64) (bool, error) {
+ return db.GetEngine(ctx).
+ Where(
+ builder.Or(
+ UserOrgTeamPermCond("`repo_group`.id", userID, g.OwnerID, perm.AccessModeOwner),
+ universalGroupPermBuilder("`repo_group`.id", userID, g.OwnerID, false)).
+ And(builder.Eq{"`repo_group`.id": g.ID})).
+ Table(g.TableName()).
+ Exist()
+}
+
+func (g *Group) CanCreateIn(ctx context.Context, userID int64) (bool, error) {
+ cond := builder.Eq{
+ "team_user.uid": userID,
+ "repo_group_team.group_id": g.ID,
+ "repo_group_team.can_create_in": true,
+ }
+
+ isAdmin, err := g.IsAdminOf(ctx, userID)
+ if err != nil {
+ return false, err
+ }
+
+ res, err := db.GetEngine(ctx).
+ Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id").
+ Where(cond).
+ Table("repo_group_team").
+ Exist()
+ if err != nil {
+ return false, err
+ }
+ return isAdmin || res, nil
+}
+
+func (g *Group) IsAdminOf(ctx context.Context, userID int64) (bool, error) {
+ return db.GetEngine(ctx).
+ Where(
+ builder.Or(
+ UserOrgTeamPermCond("`repo_group`.id", userID, g.OwnerID, perm.AccessModeAdmin),
+ universalGroupPermBuilder("`repo_group`.id", userID, g.OwnerID, false)).
+ And(builder.Eq{"`repo_group`.id": g.ID})).
+ Table(g.TableName()).
+ Exist()
+}
+
+func (g *Group) ShortName(length int) string {
+ return util.EllipsisDisplayString(g.Name, length)
+}
+
+func (g *Group) IsPrivateBecauseOfParentPermissions(ctx context.Context, user *user_model.User) (bool, error) {
+ cond := AccessibleParentGroupCond(ctx, "`repo_group`.`id`", g.ID, user)
+ has, err := db.GetEngine(ctx).Where(cond.And(builder.Eq{
+ "`repo_group`.id": g.ID,
+ })).Table(g.TableName()).Exist()
+ return !has, err
+}
+
+func GetGroupByIDAndCond(ctx context.Context, id int64, cond builder.Cond) (*Group, error) {
+ group := new(Group)
+
+ has, err := db.GetEngine(ctx).
+ Where(cond.And(builder.Eq{"`repo_group`.id": id})).Get(group)
+ if err != nil {
+ return nil, err
+ } else if !has {
+ return nil, ErrGroupNotExist{id}
+ }
+ return group, nil
+}
+
+func GetGroupByID(ctx context.Context, id int64) (*Group, error) {
+ return GetGroupByIDAndCond(ctx, id, builder.Expr("1 = 1"))
+}
+
+func GetGroupByRepoID(ctx context.Context, repoID int64) (*Group, error) {
+ group := new(Group)
+ _, err := db.GetEngine(ctx).
+ Join("INNER", "repository", "repository.group_id = repo_group.id").
+ Where(builder.Eq{"repository.`id`": repoID}).
+ Get(group)
+ return group, err
+}
+
+func ParentGroupCondByRepoID(ctx context.Context, repoID int64, idStr string) builder.Cond {
+ g, err := GetGroupByRepoID(ctx, repoID)
+ if err != nil {
+ return builder.In(idStr)
+ }
+ return ParentGroupCond(ctx, idStr, g.ID)
+}
+
+type FindGroupsOptions struct {
+ db.ListOptions
+ OwnerID int64
+ ParentGroupID int64
+ CanCreateIn optional.Option[bool]
+ ActorID int64
+ Name string
+}
+
+func (opts FindGroupsOptions) ToConds() builder.Cond {
+ cond := builder.NewCond()
+ if opts.OwnerID != 0 {
+ cond = cond.And(builder.Eq{"owner_id": opts.OwnerID})
+ }
+ if opts.ParentGroupID > 0 {
+ cond = cond.And(builder.Eq{"parent_group_id": opts.ParentGroupID})
+ } else if opts.ParentGroupID == 0 {
+ cond = cond.And(builder.Eq{"parent_group_id": 0})
+ }
+ if opts.CanCreateIn.Has() && opts.ActorID > 0 {
+ cond = cond.And(builder.In("id",
+ builder.Select("repo_group_team.group_id").
+ From("repo_group_team").
+ Where(builder.Eq{"team_user.uid": opts.ActorID}).
+ Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id").
+ And(builder.Eq{"repo_group_team.can_create_in": true})))
+ }
+ if opts.Name != "" {
+ cond = cond.And(builder.Eq{"lower_name": opts.Name})
+ }
+ return cond
+}
+
+func FindGroups(ctx context.Context, opts *FindGroupsOptions) (RepoGroupList, error) {
+ sess := db.GetEngine(ctx).Where(opts.ToConds())
+ if opts.Page > 0 {
+ sess = db.SetSessionPagination(sess, opts)
+ }
+
+ groups := make([]*Group, 0, 10)
+ return groups, sess.
+ Asc("repo_group.sort_order").
+ Find(&groups)
+}
+
+func findGroupsByCond(ctx context.Context, opts *FindGroupsOptions, cond builder.Cond) db.Engine {
+ if opts.Page <= 0 {
+ opts.Page = 1
+ }
+
+ sess := db.GetEngine(ctx).Where(cond.And(opts.ToConds()))
+ if opts.PageSize > 0 {
+ sess = sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize)
+ }
+ return sess.Asc("sort_order")
+}
+
+func FindGroupsByCond(ctx context.Context, opts *FindGroupsOptions, cond builder.Cond) (RepoGroupList, error) {
+ defaultSize := 50
+ if opts.PageSize > 0 {
+ defaultSize = opts.PageSize
+ }
+ sess := findGroupsByCond(ctx, opts, cond)
+ groups := make([]*Group, 0, defaultSize)
+ if err := sess.Find(&groups); err != nil {
+ return nil, err
+ }
+ return groups, nil
+}
+
+func CountGroups(ctx context.Context, opts *FindGroupsOptions) (int64, error) {
+ return db.GetEngine(ctx).Where(opts.ToConds()).Count(new(Group))
+}
+
+func UpdateGroupOwnerName(ctx context.Context, oldUser, newUser string) error {
+ if _, err := db.GetEngine(ctx).Exec("UPDATE `repo_group` SET owner_name=? WHERE owner_name=?", newUser, oldUser); err != nil {
+ return fmt.Errorf("change group owner name: %w", err)
+ }
+ return nil
+}
+
+// GetParentGroupChain returns a slice containing a group and its ancestors
+func GetParentGroupChain(ctx context.Context, groupID int64) (RepoGroupList, error) {
+ groupList := make([]*Group, 0, 20)
+ currentGroupID := groupID
+ for {
+ if currentGroupID < 1 {
+ break
+ }
+ if len(groupList) >= 20 {
+ return nil, ErrGroupTooDeep{currentGroupID}
+ }
+ currentGroup, err := GetGroupByID(ctx, currentGroupID)
+ if err != nil {
+ return nil, err
+ }
+ groupList = append(groupList, currentGroup)
+ currentGroupID = currentGroup.ParentGroupID
+ }
+ slices.Reverse(groupList)
+ return groupList, nil
+}
+
+func GetParentGroupIDChain(ctx context.Context, groupID int64) ([]int64, error) {
+ var ids []int64
+ groupList, err := GetParentGroupChain(ctx, groupID)
+ if err != nil {
+ return nil, err
+ }
+ ids = util.SliceMap(groupList, func(g *Group) int64 {
+ return g.ID
+ })
+ return ids, err
+}
+
+func groupHierarchyCTEBuilder(cond builder.Cond) builder.Cond {
+ firstPart := builder.Select(fmt.Sprintf("repo_group.*"), "1 as depth").
+ From("repo_group").
+ Where(builder.And(builder.Eq{
+ "parent_group_id": 0,
+ }, cond))
+ secondPart := builder.Select("r.*", "h.depth + 1").
+ From("repo_group", "r").
+ Join("INNER", "group_hierarchy h", "r.parent_group_id = h.id")
+
+ firstSql, _ := firstPart.ToBoundSQL()
+ secondSql, _ := secondPart.ToBoundSQL()
+ return builder.Expr(firstSql + " UNION ALL " + secondSql)
+}
+
+func AccessibleParentGroupCond(ctx context.Context, idStr string, groupID int64, user *user_model.User) builder.Cond {
+ owner, err := GetOwnerByGroupID(ctx, groupID)
+ if err != nil {
+ return builder.Exists(builder.Select("1 as dummy").Where(builder.Eq{
+ "dummy": 1,
+ }))
+ }
+ accessibleCond := AccessibleGroupCondition(user, owner.ID, unit.TypeInvalid, perm.AccessModeRead)
+ unionBldr := groupHierarchyCTEBuilder(accessibleCond)
+ unionSql, err := builder.ToBoundSQL(unionBldr)
+ if err != nil {
+
+ }
+ s := db.GetEngine(ctx)
+ s.SQL("WITH RECURSIVE group_hierarchy AS ("+unionSql+") SELECT id from group_hierarchy", unionSql)
+ var g []*Group
+ err = s.Find(&g)
+ if err != nil {
+ log.Info("%s", err.Error())
+ }
+ return builder.In(idStr, builder.Expr("(WITH RECURSIVE group_hierarchy AS ("+unionSql+") SELECT id from group_hierarchy)"))
+ //db.GetEngine(ctx).SQL()
+}
+
+// ParentGroupCond returns a condition matching a group and its ancestors
+func ParentGroupCond(ctx context.Context, idStr string, groupID int64) builder.Cond {
+ groupList, err := GetParentGroupIDChain(ctx, groupID)
+ if err != nil {
+ log.Info("Error building group cond: %w", err)
+ return builder.NotIn(idStr)
+ }
+ return builder.In(idStr, groupList)
+}
+
+func UpdateGroup(ctx context.Context, group *Group) error {
+ sess := db.GetEngine(ctx)
+ _, err := sess.Table(group.TableName()).ID(group.ID).Update(group)
+ return err
+}
+
+func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error {
+ sess := db.GetEngine(ctx)
+ ng, err := GetGroupByID(ctx, newParent)
+ if err != nil && !IsErrGroupNotExist(err) {
+ return err
+ }
+
+ var siblings RepoGroupList
+ var tmpSiblings RepoGroupList
+ if ng != nil {
+ if ng.OwnerID != group.OwnerID {
+ return fmt.Errorf("group[%d]'s ownerID is not equal to new parent group[%d]'s owner ID", group.ID, ng.ID)
+ }
+ if err = ng.LoadSubgroups(ctx, false); err != nil {
+ return err
+ }
+ filtered := container.Filter(ng.Subgroups, func(e *Group) bool {
+ return e.ID != group.ID
+ })
+ siblings = append(append(filtered[0:min(newSortOrder, len(ng.Subgroups))], group), filtered[newSortOrder:]...)
+ } else if newParent <= 0 {
+ tmpSiblings, err = FindGroups(ctx, &FindGroupsOptions{
+ OwnerID: group.OwnerID,
+ ParentGroupID: 0,
+ })
+ tmpSiblings = container.Filter(tmpSiblings, func(e *Group) bool {
+ return group.ID != e.ID
+ })
+ tmpSiblings2 := make(RepoGroupList, newSortOrder)
+ copy(tmpSiblings2, tmpSiblings[0:newSortOrder])
+ tmpSiblings2 = append(tmpSiblings2, group)
+
+ siblings = append(tmpSiblings2, tmpSiblings[newSortOrder:]...)
+ }
+ parentGroupChain, err := GetParentGroupChain(ctx, newParent)
+ if err != nil {
+ return err
+ }
+ if len(parentGroupChain) >= 20 {
+ return ErrGroupTooDeep{
+ ID: group.ID,
+ }
+ }
+ err = group.LoadOwner(ctx)
+ if err != nil {
+ return err
+ }
+ group.OwnerName = group.Owner.Name
+ group.ParentGroupID = newParent
+ group.SortOrder = newSortOrder
+ for i, gg := range siblings {
+ log.Info("ITEM %+v", gg)
+ gg.SortOrder = i
+ if _, err = sess.Table(group.TableName()).
+ ID(gg.ID).
+ AllCols().
+ Update(gg); err != nil {
+ return err
+ }
+ }
+
+ if group.ParentGroup != nil && newParent != 0 {
+ group.ParentGroup = nil
+ if err = group.LoadParentGroup(ctx); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func GetOwnerByGroupID(ctx context.Context, groupID int64) (*user_model.User, error) {
+ e := db.GetEngine(ctx)
+ tableName := "repo_group"
+ user := new(user_model.User)
+ has, err := e.Join("INNER", tableName, fmt.Sprintf("`%s`.owner_id = `user`.`id`", tableName)).
+ Where(builder.Eq{fmt.Sprintf("`%s`.id", tableName): groupID}).Get(user)
+ if !has {
+ return nil, user_model.ErrUserNotExist{}
+ }
+ return user, err
+}
diff --git a/models/group/group_list.go b/models/group/group_list.go
new file mode 100644
index 0000000000..fdc976c94d
--- /dev/null
+++ b/models/group/group_list.go
@@ -0,0 +1,128 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+ user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/structs"
+
+ "xorm.io/builder"
+)
+
+type RepoGroupList []*Group
+
+func (groups RepoGroupList) LoadOwners(ctx context.Context) error {
+ for _, g := range groups {
+ if g.Owner == nil {
+ err := g.LoadOwner(ctx)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func universalGroupPermBuilder(idStr string, userID, orgID int64, includeAdmin bool) builder.Cond {
+ adminSubquery := builder.Select("1").
+ From("`user`").
+ Where(builder.Eq{"`user`.is_admin": true, "`user`.`id`": userID})
+ eqCond := builder.Eq{"`team_user`.uid": userID}
+
+ teamSubquery := builder.Select("`team`.id").From("`team`").
+ Join("LEFT", "team_user", "team.id = team_user.team_id").
+ Join("LEFT", "`user` as iu", "iu.`id` = `team_user`.uid").
+ Where(builder.And(
+ builder.Eq{"`team`.org_id": orgID},
+ eqCond,
+ builder.Gte{"`team`.authorize": perm.AccessModeOwner},
+ ))
+
+ sq := builder.Select("`repo_group`.id").
+ From("`repo_group`").
+ Join("LEFT", "team", "`team`.org_id = `repo_group`.owner_id").
+ Where(
+ builder.And(
+ builder.Eq{"`repo_group`.owner_id": orgID},
+ builder.And(
+ builder.In("`team`.id", teamSubquery),
+ )))
+ cond := builder.In(idStr, sq)
+ if includeAdmin {
+ cond = cond.Or(builder.Exists(adminSubquery))
+ }
+ return cond
+}
+
+// userOrgTeamGroupBuilder returns group ids where user's teams can access.
+func userOrgTeamGroupBuilder(userID, orgID int64) *builder.Builder {
+ return builder.Select("`repo_group_team`.group_id").
+ From("repo_group_team").
+ Join("INNER", "team_user", "`team_user`.team_id = `repo_group_team`.team_id").
+ Where(builder.And(builder.Eq{"`team_user`.uid": userID}, builder.Eq{"`repo_group_team`.org_id": orgID}))
+}
+
+// UserOrgTeamPermCond returns a condition to select ids of groups that a user can access at the level described by `level`
+func UserOrgTeamPermCond(idStr string, userID, orgID int64, level perm.AccessMode) builder.Cond {
+ selCond := userOrgTeamGroupBuilder(userID, orgID)
+ selCond = selCond.InnerJoin("team", "`team`.id = `repo_group_team`.team_id").
+ And(builder.Or(builder.Gte{"`team`.authorize": level}, builder.Gte{"`repo_group_team`.access_mode": level}))
+ return builder.In(idStr, selCond)
+}
+
+// UserOrgTeamGroupCond returns a condition to select ids of groups that a user's team can access
+func UserOrgTeamGroupCond(idStr string, userID, orgID int64) builder.Cond {
+ return builder.In(idStr, userOrgTeamGroupBuilder(userID, orgID))
+}
+
+// userOrgTeamUnitGroupCond returns a condition to select group ids where user's teams can access the special unit.
+func userOrgTeamUnitGroupCond(idStr string, userID, orgID int64, unitType unit.Type) builder.Cond {
+ return builder.Or(builder.In(
+ idStr, userOrgTeamUnitGroupBuilder(userID, orgID, unitType)))
+}
+
+// userOrgTeamUnitGroupBuilder returns group ids where user's teams can access the special unit.
+func userOrgTeamUnitGroupBuilder(userID, orgID int64, unitType unit.Type) *builder.Builder {
+ return userOrgTeamGroupBuilder(userID, orgID).
+ Join("INNER", "team_unit", "`team_unit`.team_id = `repo_group_team`.team_id").
+ Where(builder.Eq{"`team_unit`.`type`": unitType}).
+ And(builder.Gt{"`team_unit`.`access_mode`": int(perm.AccessModeNone)})
+}
+
+// AccessibleGroupCondition returns a condition that matches groups which a user can access via the specified unit
+func AccessibleGroupCondition(user *user_model.User, orgID int64, unitType unit.Type, minMode perm.AccessMode) builder.Cond {
+ cond := builder.NewCond()
+ if user == nil || !user.IsRestricted || user.ID <= 0 {
+ orgVisibilityLimit := []int{int(structs.VisibleTypePrivate)}
+ if user == nil || user.ID <= 0 {
+ orgVisibilityLimit = append(orgVisibilityLimit, int(structs.VisibleTypeLimited))
+ }
+ condAnd := builder.And(
+ builder.NotIn("`repo_group`.owner_id", builder.Select("`user`.`id`").From("`user`").Where(
+ builder.And(
+ builder.Eq{"type": user_model.UserTypeOrganization},
+ builder.In("visibility", orgVisibilityLimit)),
+ )))
+ condAnd = condAnd.And(builder.NotIn("`repo_group`.visibility", orgVisibilityLimit))
+ cond = cond.Or(condAnd)
+ }
+ if user != nil {
+ cond = cond.Or(universalGroupPermBuilder("`repo_group`.id", user.ID, orgID, true))
+ cond = cond.Or(UserOrgTeamPermCond("`repo_group`.id", user.ID, orgID, minMode))
+ if unitType == unit.TypeInvalid {
+ cond = cond.Or(
+ UserOrgTeamGroupCond("`repo_group`.id", user.ID, orgID),
+ )
+ } else {
+ cond = cond.Or(
+ userOrgTeamUnitGroupCond("`repo_group`.id", user.ID, orgID, unitType),
+ )
+ }
+ }
+ return cond
+}
diff --git a/models/group/group_team.go b/models/group/group_team.go
new file mode 100644
index 0000000000..44c86e4b9a
--- /dev/null
+++ b/models/group/group_team.go
@@ -0,0 +1,158 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+
+ "code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/util"
+)
+
+// RepoGroupTeam represents a relation for a team's access to a group
+type RepoGroupTeam struct {
+ ID int64 `xorm:"pk autoincr"`
+ OrgID int64 `xorm:"INDEX"`
+ TeamID int64 `xorm:"UNIQUE(s)"`
+ GroupID int64 `xorm:"UNIQUE(s)"`
+ AccessMode perm.AccessMode
+ CanCreateIn bool
+ Units []*RepoGroupUnit `xorm:"-"`
+}
+
+func (g *RepoGroupTeam) LoadGroupUnits(ctx context.Context) error {
+ var err error
+ g.Units, err = GetUnitsByGroupID(ctx, g.GroupID, g.TeamID)
+ return err
+}
+
+func (g *RepoGroupTeam) UnitAccessModeEx(ctx context.Context, tp unit.Type) (accessMode perm.AccessMode, exist bool) {
+ accessMode = perm.AccessModeNone
+ if err := g.LoadGroupUnits(ctx); err != nil {
+ log.Warn("Error loading units of team for group[%d] (ID: %d): %s", g.GroupID, g.TeamID, err.Error())
+ return accessMode, false
+ }
+ for _, u := range g.Units {
+ if u.Type == tp {
+ accessMode = u.AccessMode
+ exist = true
+ break
+ }
+ }
+ return accessMode, exist
+}
+
+// HasTeamGroup returns true if the given group belongs to a team.
+func HasTeamGroup(ctx context.Context, orgID, teamID, groupID int64) bool {
+ has, _ := db.GetEngine(ctx).
+ Where("org_id=?", orgID).
+ And("team_id=?", teamID).
+ And("group_id=?", groupID).
+ And("access_mode >= ?", perm.AccessModeRead).
+ Get(new(RepoGroupTeam))
+ return has
+}
+
+// AddTeamGroup adds a group to a team
+func AddTeamGroup(ctx context.Context, orgID, teamID, groupID int64, access perm.AccessMode, canCreateIn bool) error {
+ if access < perm.AccessModeWrite {
+ canCreateIn = false
+ }
+ _, err := db.GetEngine(ctx).Insert(&RepoGroupTeam{
+ OrgID: orgID,
+ GroupID: groupID,
+ TeamID: teamID,
+ AccessMode: access,
+ CanCreateIn: canCreateIn,
+ })
+ return err
+}
+
+func UpdateTeamGroup(ctx context.Context, orgID, teamID, groupID int64, access perm.AccessMode, canCreateIn, isNew bool) (err error) {
+ if access <= perm.AccessModeNone {
+ canCreateIn = false
+ }
+ if isNew {
+ err = AddTeamGroup(ctx, orgID, teamID, groupID, access, canCreateIn)
+ } else {
+ _, err = db.GetEngine(ctx).
+ Table("repo_group_team").
+ Where("org_id=?", orgID).
+ And("team_id=?", teamID).
+ And("group_id =?", groupID).
+ Update(&RepoGroupTeam{
+ OrgID: orgID,
+ TeamID: teamID,
+ GroupID: groupID,
+ AccessMode: access,
+ CanCreateIn: canCreateIn,
+ })
+ }
+
+ return err
+}
+
+// RemoveTeamGroup removes a group from a team
+func RemoveTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error {
+ _, err := db.DeleteByBean(ctx, &RepoGroupTeam{
+ TeamID: teamID,
+ GroupID: groupID,
+ OrgID: orgID,
+ })
+ return err
+}
+
+func FindGroupTeams(ctx context.Context, groupID int64) (gteams []*RepoGroupTeam, err error) {
+ return gteams, db.GetEngine(ctx).
+ Where("group_id=?", groupID).
+ Table("repo_group_team").
+ Find(>eams)
+}
+
+func FindUserGroupTeams(ctx context.Context, groupID, userID int64) (gteams []*RepoGroupTeam, err error) {
+ return gteams, db.GetEngine(ctx).
+ Where("group_id=?", groupID).
+ And("team_user.uid = ?", userID).
+ Table("repo_group_team").
+ Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id").
+ Find(>eams)
+}
+
+func FindGroupTeamByTeamID(ctx context.Context, groupID, teamID int64) (gteam *RepoGroupTeam, err error) {
+ gteam = new(RepoGroupTeam)
+ has, err := db.GetEngine(ctx).
+ Where("group_id=?", groupID).
+ And("team_id = ?", teamID).
+ Table("repo_group_team").
+ Get(gteam)
+ if !has {
+ gteam = nil
+ }
+ return gteam, err
+}
+
+func GetAncestorPermissions(ctx context.Context, groupID, teamID int64) (perm.AccessMode, error) {
+ sess := db.GetEngine(ctx)
+ groups, err := GetParentGroupIDChain(ctx, groupID)
+ if err != nil {
+ return perm.AccessModeNone, err
+ }
+ gteams := make([]*RepoGroupTeam, 0)
+ err = sess.In("group_id", groups).And("team_id = ?", teamID).Find(>eams)
+ if err != nil {
+ return perm.AccessModeNone, err
+ }
+ mapped := util.SliceMap(gteams, func(g *RepoGroupTeam) perm.AccessMode {
+ return g.AccessMode
+ })
+ maxMode := max(mapped[0])
+
+ for _, m := range mapped[1:] {
+ maxMode = max(maxMode, m)
+ }
+ return maxMode, nil
+}
diff --git a/models/group/group_unit.go b/models/group/group_unit.go
new file mode 100644
index 0000000000..f7a484d6e7
--- /dev/null
+++ b/models/group/group_unit.go
@@ -0,0 +1,56 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+
+ "code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+)
+
+// RepoGroupUnit describes all units of a repository group
+type RepoGroupUnit struct {
+ ID int64 `xorm:"pk autoincr"`
+ GroupID int64 `xorm:"UNIQUE(s)"`
+ TeamID int64 `xorm:"UNIQUE(s)"`
+ Type unit.Type `xorm:"UNIQUE(s)"`
+ AccessMode perm.AccessMode
+}
+
+func (g *RepoGroupUnit) Unit() unit.Unit {
+ return unit.Units[g.Type]
+}
+
+func GetUnitsByGroupID(ctx context.Context, groupID, teamID int64) (units []*RepoGroupUnit, err error) {
+ return units, db.GetEngine(ctx).Where("group_id = ?", groupID).And("team_id = ?", teamID).Find(&units)
+}
+
+func GetGroupUnit(ctx context.Context, groupID, teamID int64, unitType unit.Type) (unit *RepoGroupUnit, err error) {
+ unit = new(RepoGroupUnit)
+ _, err = db.GetEngine(ctx).
+ Where("group_id = ?", groupID).
+ And("team_id = ?", teamID).
+ And("type = ?", unitType).
+ Get(unit)
+ return unit, err
+}
+
+func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (unit *RepoGroupUnit, err error) {
+ units := make([]*RepoGroupUnit, 0)
+ err = db.GetEngine(ctx).
+ Where("group_id = ?", groupID).
+ And("type = ?", unitType).
+ Find(&units)
+ if err != nil {
+ return nil, err
+ }
+ for _, u := range units {
+ if unit == nil || u.AccessMode > unit.AccessMode {
+ unit = u
+ }
+ }
+ return unit, err
+}
diff --git a/models/issues/issue_xref.go b/models/issues/issue_xref.go
index 41a867c892..3c21409bf6 100644
--- a/models/issues/issue_xref.go
+++ b/models/issues/issue_xref.go
@@ -148,7 +148,7 @@ func (issue *Issue) getCrossReferences(stdCtx context.Context, ctx *crossReferen
refRepo = ctx.OrigIssue.Repo
} else {
// Issues in other repositories
- refRepo, err = repo_model.GetRepositoryByOwnerAndName(stdCtx, ref.Owner, ref.Name)
+ refRepo, err = repo_model.GetRepositoryByOwnerAndName(stdCtx, ref.Owner, ref.Name, ref.GroupID)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
continue
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go
index c3a8f08b5d..003cdd7e25 100644
--- a/models/migrations/migrations.go
+++ b/models/migrations/migrations.go
@@ -409,6 +409,7 @@ func prepareMigrationTasks() []*migration {
// Gitea 1.26.0 ends at migration ID number 330 (database version 331)
newMigration(331, "Add ActionRunAttempt model and related action fields", v1_27.AddActionRunAttemptModel),
+ newMigration(332, "Add group_id and group_sort_order columns to repository table", v1_27.AddGroupColumnsToRepositoryTable),
}
return preparedMigrations
}
diff --git a/models/migrations/v1_12/v136.go b/models/migrations/v1_12/v136.go
index 20b892b6cc..c31a4c0c08 100644
--- a/models/migrations/v1_12/v136.go
+++ b/models/migrations/v1_12/v136.go
@@ -84,7 +84,7 @@ func AddCommitDivergenceToPulls(x *xorm.Engine) error {
log.Error("Missing base repo with id %d for PR ID %d", pr.BaseRepoID, pr.ID)
continue
}
- repoStore := repo_model.StorageRepo(repo_model.RelativePath(baseRepo.OwnerName, baseRepo.Name))
+ repoStore := repo_model.StorageRepo(repo_model.RelativePath(baseRepo.OwnerName, baseRepo.Name, 0))
gitRefName := fmt.Sprintf("refs/pull/%d/head", pr.Index)
divergence, err := gitrepo.GetDivergingCommits(graceful.GetManager().HammerContext(), repoStore, pr.BaseBranch, gitRefName)
if err != nil {
diff --git a/models/migrations/v1_21/v276.go b/models/migrations/v1_21/v276.go
index be24b31902..a4cbee13d3 100644
--- a/models/migrations/v1_21/v276.go
+++ b/models/migrations/v1_21/v276.go
@@ -160,7 +160,7 @@ func migratePushMirrors(x *xorm.Engine) error {
func getRemoteAddress(ownerName, repoName, remoteName string) (string, error) {
ctx := context.Background()
- relativePath := repo_model.RelativePath(ownerName, repoName)
+ relativePath := repo_model.RelativePath(ownerName, repoName, 0)
if exist, _ := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(relativePath)); !exist {
return "", nil
}
diff --git a/models/migrations/v1_27/v332.go b/models/migrations/v1_27/v332.go
new file mode 100644
index 0000000000..c3ed24d395
--- /dev/null
+++ b/models/migrations/v1_27/v332.go
@@ -0,0 +1,20 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package v1_27
+
+import "xorm.io/xorm"
+
+func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error {
+ type Repository struct {
+ LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"`
+ GroupID int64 `xorm:"UNIQUE(s) INDEX DEFAULT 0"`
+ OwnerID int64 `xorm:"UNIQUE(s) UNIQUE(g) index"`
+ GroupSortOrder int
+ }
+ _, err := x.SyncWithOptions(xorm.SyncOptions{
+ IgnoreConstrains: false,
+ IgnoreIndices: false,
+ }, new(Repository))
+ return err
+}
diff --git a/models/migrations/v1_9/v82.go b/models/migrations/v1_9/v82.go
index 8796b0563d..3950d61b6d 100644
--- a/models/migrations/v1_9/v82.go
+++ b/models/migrations/v1_9/v82.go
@@ -88,7 +88,7 @@ func FixReleaseSha1OnReleaseTable(ctx context.Context, x *xorm.Engine) error {
userCache[repo.OwnerID] = user
}
- gitRepo, err = gitrepo.OpenRepository(ctx, repo_model.StorageRepo(repo_model.RelativePath(user.Name, repo.Name)))
+ gitRepo, err = gitrepo.OpenRepository(ctx, repo_model.StorageRepo(repo_model.RelativePath(user.Name, repo.Name, 0)))
if err != nil {
return err
}
diff --git a/models/organization/team_group.go b/models/organization/team_group.go
new file mode 100644
index 0000000000..e81a4e0aa2
--- /dev/null
+++ b/models/organization/team_group.go
@@ -0,0 +1,37 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package organization
+
+import (
+ "context"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+)
+
+func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode perm.AccessMode) ([]*Team, error) {
+ teams := make([]*Team, 0)
+ inCond := group_model.ParentGroupCond(ctx, "repo_group_team.group_id", groupID)
+ return teams, db.GetEngine(ctx).Distinct("team.*").Where("repo_group_team.access_mode >= ?", mode).
+ Join("INNER", "repo_group_team", "repo_group_team.team_id = team.id and repo_group_team.org_id = ?", orgID).
+ And("repo_group_team.org_id = ?", orgID).
+ And(inCond).
+ OrderBy("name").
+ Find(&teams)
+}
+
+func GetTeamsWithAccessToGroupUnit(ctx context.Context, orgID, groupID int64, mode perm.AccessMode, unitType unit.Type) ([]*Team, error) {
+ teams := make([]*Team, 0)
+ inCond := group_model.ParentGroupCond(ctx, "repo_group_team.group_id", groupID)
+ return teams, db.GetEngine(ctx).Where("repo_group_team.access_mode >= ?", mode).
+ Join("INNER", "repo_group_team", "repo_group_team.team_id = team.id").
+ Join("INNER", "repo_group_unit", "repo_group_unit.team_id = team.id").
+ And("repo_group_team.org_id = ?", orgID).
+ And(inCond).
+ And("repo_group_unit.type = ?", unitType).
+ OrderBy("name").
+ Find(&teams)
+}
diff --git a/models/organization/team_list.go b/models/organization/team_list.go
index 5629cec366..6b24da0dd1 100644
--- a/models/organization/team_list.go
+++ b/models/organization/team_list.go
@@ -126,6 +126,17 @@ func GetUserRepoTeams(ctx context.Context, orgID, userID, repoID int64) (teams T
Find(&teams)
}
+// GetUserGroupTeams returns teams in a group that a user has access to
+func GetUserGroupTeams(ctx context.Context, groupID, userID int64) (teams TeamList, err error) {
+ return teams, db.GetEngine(ctx).
+ Where("`repo_group_team`.group_id = ?", groupID).
+ Join("INNER", "repo_group_team", "`repo_group_team`.team_id = `team`.id").
+ Join("INNER", "team_user", "`team_user`.team_id = `team`.id").
+ And("`team_user`.uid = ?", userID).
+ Asc("`team`.name").
+ Find(&teams)
+}
+
func GetTeamsByOrgIDs(ctx context.Context, orgIDs []int64) (TeamList, error) {
teams := make([]*Team, 0, 10)
return teams, db.GetEngine(ctx).Where(builder.In("org_id", orgIDs)).Find(&teams)
diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go
index 21821f1746..6b6c03094c 100644
--- a/models/perm/access/repo_permission.go
+++ b/models/perm/access/repo_permission.go
@@ -13,6 +13,7 @@ import (
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
"code.gitea.io/gitea/models/organization"
perm_model "code.gitea.io/gitea/models/perm"
repo_model "code.gitea.io/gitea/models/repo"
@@ -482,6 +483,14 @@ func GetIndividualUserRepoPermission(ctx context.Context, repo *repo_model.Repos
return perm, nil
}
}
+ groupTeams, err := group_model.FindUserGroupTeams(ctx, repo.GroupID, user.ID)
+ for _, team := range groupTeams {
+ if team.AccessMode >= perm_model.AccessModeAdmin {
+ perm.AccessMode = perm_model.AccessModeOwner
+ perm.unitsMode = nil
+ return perm, nil
+ }
+ }
for _, u := range repo.Units {
for _, team := range teams {
@@ -489,6 +498,11 @@ func GetIndividualUserRepoPermission(ctx context.Context, repo *repo_model.Repos
unitAccessMode := max(perm.unitsMode[u.Type], minAccessMode, teamMode)
perm.unitsMode[u.Type] = unitAccessMode
}
+ for _, team := range groupTeams {
+ teamMode, _ := team.UnitAccessModeEx(ctx, u.Type)
+ unitAccessMode := max(perm.unitsMode[u.Type], minAccessMode, teamMode)
+ perm.unitsMode[u.Type] = unitAccessMode
+ }
}
return perm, err
@@ -529,6 +543,17 @@ func IsUserRepoAdmin(ctx context.Context, repo *repo_model.Repository, user *use
return true, nil
}
+ groupTeams, err := organization.GetUserGroupTeams(ctx, repo.GroupID, user.ID)
+ if err != nil {
+ return false, err
+ }
+
+ for _, team := range groupTeams {
+ if team.AccessMode >= perm_model.AccessModeAdmin {
+ return true, nil
+ }
+ }
+
teams, err := organization.GetUserRepoTeams(ctx, repo.OwnerID, user.ID, repo.ID)
if err != nil {
return false, err
diff --git a/models/repo/org_repo.go b/models/repo/org_repo.go
index d8c2c91fec..40be7c69b5 100644
--- a/models/repo/org_repo.go
+++ b/models/repo/org_repo.go
@@ -37,10 +37,14 @@ type SearchTeamRepoOptions struct {
func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) (RepositoryList, error) {
sess := db.GetEngine(ctx)
if opts.TeamID > 0 {
- sess = sess.In("id",
- builder.Select("repo_id").
- From("team_repo").
- Where(builder.Eq{"team_id": opts.TeamID}),
+ sess = sess.Where(
+ builder.Or(
+ builder.In("id", builder.Select("repo_id").
+ From("team_repo").
+ Where(builder.Eq{"team_id": opts.TeamID}),
+ ),
+ builder.In("id", ReposAccessibleByGroupTeamBuilder(opts.TeamID)),
+ ),
)
}
if opts.PageSize > 0 {
diff --git a/models/repo/repo.go b/models/repo/repo.go
index 7814bb4876..3610b0cc1b 100644
--- a/models/repo/repo.go
+++ b/models/repo/repo.go
@@ -153,10 +153,10 @@ const (
// Repository represents a git repository.
type Repository struct {
ID int64 `xorm:"pk autoincr"`
- OwnerID int64 `xorm:"UNIQUE(s) index"`
+ OwnerID int64 `xorm:"UNIQUE(s) UNIQUE(g) index"`
OwnerName string
Owner *user_model.User `xorm:"-"`
- LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
+ LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"`
Name string `xorm:"INDEX NOT NULL"`
Description string `xorm:"TEXT"`
Website string `xorm:"VARCHAR(2048)"`
@@ -219,19 +219,30 @@ type Repository struct {
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"`
+
+ GroupID int64 `xorm:"UNIQUE(g) INDEX DEFAULT 0"`
+ GroupSortOrder int `xorm:"INDEX"`
}
func init() {
db.RegisterModel(new(Repository))
}
-func RelativePath(ownerName, repoName string) string {
- return strings.ToLower(ownerName) + "/" + strings.ToLower(repoName) + ".git"
+func RelativePathBaseName(ownerName, repoName string, groupID int64) string {
+ var groupSegment string
+ if groupID > 0 {
+ groupSegment = strconv.FormatInt(groupID, 10) + "/"
+ }
+ return strings.ToLower(ownerName) + "/" + groupSegment + strings.ToLower(repoName)
+}
+
+func RelativePath(ownerName, repoName string, groupID int64) string {
+ return RelativePathBaseName(ownerName, repoName, groupID) + ".git"
}
// RelativePath should be an unix style path like username/reponame.git
func (repo *Repository) RelativePath() string {
- return RelativePath(repo.OwnerName, repo.Name)
+ return RelativePath(repo.OwnerName, repo.Name, repo.GroupID)
}
type StorageRepo string
@@ -354,7 +365,7 @@ func (repo *Repository) LoadAttributes(ctx context.Context) error {
// FullName returns the repository full name
func (repo *Repository) FullName() string {
- return repo.OwnerName + "/" + repo.Name
+ return repo.OwnerName + "/" + groupSegmentWithTrailingSlash(repo.GroupID) + repo.Name
}
// HTMLURL returns the repository HTML URL
@@ -378,7 +389,11 @@ func (repo *Repository) CommitLink(commitID string) (result string) {
// APIURL returns the repository API URL
func (repo *Repository) APIURL(ctxOpt ...context.Context) string {
ctx := util.OptionalArg(ctxOpt, context.TODO())
- return httplib.MakeAbsoluteURL(ctx, setting.AppSubURL+"/api/v1/repos/"+url.PathEscape(repo.OwnerName)+"/"+url.PathEscape(repo.Name))
+ var groupSegment string
+ if repo.GroupID > 0 {
+ groupSegment = fmt.Sprintf("group/%d/", repo.GroupID)
+ }
+ return httplib.MakeAbsoluteURL(ctx, setting.AppSubURL+"/api/v1/repos/"+url.PathEscape(repo.OwnerName)+"/"+groupSegment+url.PathEscape(repo.Name))
}
// GetCommitsCountCacheKey returns cache key used for commits count caching.
@@ -580,18 +595,24 @@ func (repo *Repository) IsGenerated() bool {
}
// RepoPath returns repository path by given user and repository name.
-func RepoPath(userName, repoName string) string { //revive:disable-line:exported
- return filepath.Join(setting.RepoRootPath, filepath.Clean(strings.ToLower(userName)), filepath.Clean(strings.ToLower(repoName)+".git"))
+func RepoPath(userName, repoName string, groupID int64) string { //revive:disable-line:exported
+ var joinArgs []string
+ joinArgs = append(joinArgs, user_model.UserPath(userName))
+ if groupID > 0 {
+ joinArgs = append(joinArgs, strconv.FormatInt(groupID, 10))
+ }
+ joinArgs = append(joinArgs, strings.ToLower(repoName)+".git")
+ return filepath.Join(joinArgs...)
}
// RepoPath returns the repository path
func (repo *Repository) RepoPath() string {
- return RepoPath(repo.OwnerName, repo.Name)
+ return RepoPath(repo.OwnerName, repo.Name, repo.GroupID)
}
// Link returns the repository relative url
func (repo *Repository) Link() string {
- return setting.AppSubURL + "/" + url.PathEscape(repo.OwnerName) + "/" + url.PathEscape(repo.Name)
+ return setting.AppSubURL + "/" + url.PathEscape(repo.OwnerName) + "/" + groupSegmentWithTrailingSlash(repo.GroupID) + url.PathEscape(repo.Name)
}
// ComposeCompareURL returns the repository comparison URL
@@ -656,13 +677,28 @@ type CloneLink struct {
Tea string
}
+func getGroupSegment(gid int64) string {
+ var groupSegment string
+ if gid > 0 {
+ groupSegment = fmt.Sprintf("group/%d", gid)
+ }
+ return groupSegment
+}
+
+func groupSegmentWithTrailingSlash(gid int64) string {
+ if gid < 1 {
+ return ""
+ }
+ return getGroupSegment(gid) + "/"
+}
+
// ComposeHTTPSCloneURL returns HTTPS clone URL based on the given owner and repository name.
-func ComposeHTTPSCloneURL(ctx context.Context, owner, repo string) string {
- return fmt.Sprintf("%s%s/%s.git", httplib.GuessCurrentAppURL(ctx), url.PathEscape(owner), url.PathEscape(repo))
+func ComposeHTTPSCloneURL(ctx context.Context, owner, repo string, groupID int64) string {
+ return fmt.Sprintf("%s%s/%s%s.git", httplib.GuessCurrentAppURL(ctx), url.PathEscape(owner), groupSegmentWithTrailingSlash(groupID), url.PathEscape(repo))
}
// ComposeSSHCloneURL returns SSH clone URL based on the given owner and repository name.
-func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string) string {
+func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string, groupID int64) string {
sshUser := setting.SSH.User
sshDomain := setting.SSH.Domain
@@ -681,7 +717,7 @@ func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string) strin
// non-standard port, it must use full URI
if setting.SSH.Port != 22 {
sshHost := net.JoinHostPort(sshDomain, strconv.Itoa(setting.SSH.Port))
- return fmt.Sprintf("ssh://%s@%s/%s/%s.git", sshUser, sshHost, url.PathEscape(ownerName), url.PathEscape(repoName))
+ return fmt.Sprintf("ssh://%s@%s/%s/%s%s.git", sshUser, sshHost, url.PathEscape(ownerName), groupSegmentWithTrailingSlash(groupID), url.PathEscape(repoName))
}
// for standard port, it can use a shorter URI (without the port)
@@ -690,31 +726,31 @@ func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string) strin
sshHost = "[" + sshHost + "]" // for IPv6 address, wrap it with brackets
}
if setting.Repository.UseCompatSSHURI {
- return fmt.Sprintf("ssh://%s@%s/%s/%s.git", sshUser, sshHost, url.PathEscape(ownerName), url.PathEscape(repoName))
+ return fmt.Sprintf("ssh://%s@%s/%s/%s%s.git", sshUser, sshHost, url.PathEscape(ownerName), groupSegmentWithTrailingSlash(groupID), url.PathEscape(repoName))
}
- return fmt.Sprintf("%s@%s:%s/%s.git", sshUser, sshHost, url.PathEscape(ownerName), url.PathEscape(repoName))
+ return fmt.Sprintf("%s@%s:%s/%s%s.git", sshUser, sshHost, url.PathEscape(ownerName), groupSegmentWithTrailingSlash(groupID), url.PathEscape(repoName))
}
// ComposeTeaCloneCommand returns Tea CLI clone command based on the given owner and repository name.
-func ComposeTeaCloneCommand(ctx context.Context, owner, repo string) string {
- return fmt.Sprintf("tea clone %s/%s", url.PathEscape(owner), url.PathEscape(repo))
+func ComposeTeaCloneCommand(ctx context.Context, owner, repo string, groupID int64) string {
+ return fmt.Sprintf("tea clone %s/%s%s", url.PathEscape(owner), url.PathEscape(repo), groupSegmentWithTrailingSlash(groupID))
}
-func (repo *Repository) cloneLink(ctx context.Context, doer *user_model.User, repoPathName string) *CloneLink {
+func (repo *Repository) cloneLink(ctx context.Context, doer *user_model.User, repoPathName string, groupID int64) *CloneLink {
return &CloneLink{
- SSH: ComposeSSHCloneURL(doer, repo.OwnerName, repoPathName),
- HTTPS: ComposeHTTPSCloneURL(ctx, repo.OwnerName, repoPathName),
- Tea: ComposeTeaCloneCommand(ctx, repo.OwnerName, repoPathName),
+ SSH: ComposeSSHCloneURL(doer, repo.OwnerName, repoPathName, groupID),
+ HTTPS: ComposeHTTPSCloneURL(ctx, repo.OwnerName, repoPathName, groupID),
+ Tea: ComposeTeaCloneCommand(ctx, repo.OwnerName, repoPathName, groupID),
}
}
// CloneLink returns clone URLs of repository.
func (repo *Repository) CloneLink(ctx context.Context, doer *user_model.User) (cl *CloneLink) {
- return repo.cloneLink(ctx, doer, repo.Name)
+ return repo.cloneLink(ctx, doer, repo.Name, repo.GroupID)
}
func (repo *Repository) CloneLinkGeneral(ctx context.Context) (cl *CloneLink) {
- return repo.cloneLink(ctx, nil /* no doer, use a general git user */, repo.Name)
+ return repo.cloneLink(ctx, nil /* no doer, use a general git user */, repo.Name, repo.GroupID)
}
// GetOriginalURLHostname returns the hostname of a URL or the URL
@@ -779,11 +815,17 @@ func (err ErrRepoNotExist) Unwrap() error {
}
// GetRepositoryByOwnerAndName returns the repository by given owner name and repo name
-func GetRepositoryByOwnerAndName(ctx context.Context, ownerName, repoName string) (*Repository, error) {
+func GetRepositoryByOwnerAndName(ctx context.Context, ownerName, repoName string, groupID int64) (*Repository, error) {
var repo Repository
+ var gid any = groupID
+ if groupID == 0 {
+ gid = nil
+ }
+ _ = gid
has, err := db.GetEngine(ctx).Table("repository").Select("repository.*").
Join("INNER", "`user`", "`user`.id = repository.owner_id").
Where("repository.lower_name = ?", strings.ToLower(repoName)).
+ And("`repository`.group_id = ?", groupID).
And("`user`.lower_name = ?", strings.ToLower(ownerName)).
Get(&repo)
if err != nil {
@@ -795,10 +837,11 @@ func GetRepositoryByOwnerAndName(ctx context.Context, ownerName, repoName string
}
// GetRepositoryByName returns the repository by given name under user if exists.
-func GetRepositoryByName(ctx context.Context, ownerID int64, name string) (*Repository, error) {
+func GetRepositoryByName(ctx context.Context, ownerID, groupID int64, name string) (*Repository, error) {
var repo Repository
has, err := db.GetEngine(ctx).
Where("`owner_id`=?", ownerID).
+ And("`group_id`=?", groupID).
And("`lower_name`=?", strings.ToLower(name)).
NoAutoCondition().
Get(&repo)
@@ -816,7 +859,7 @@ func GetRepositoryByURL(ctx context.Context, repoURL string) (*Repository, error
if err != nil || ret.OwnerName == "" {
return nil, errors.New("unknown or malformed repository URL")
}
- return GetRepositoryByOwnerAndName(ctx, ret.OwnerName, ret.RepoName)
+ return GetRepositoryByOwnerAndName(ctx, ret.OwnerName, ret.RepoName, ret.GroupID)
}
// GetRepositoryByURLRelax also accepts an SSH clone URL without user part
@@ -852,10 +895,11 @@ func GetRepositoriesMapByIDs(ctx context.Context, ids []int64) (map[int64]*Repos
return repos, db.GetEngine(ctx).In("id", ids).Find(&repos)
}
-func IsRepositoryModelExist(ctx context.Context, u *user_model.User, repoName string) (bool, error) {
+func IsRepositoryModelExist(ctx context.Context, u *user_model.User, repoName string, groupID int64) (bool, error) {
return db.GetEngine(ctx).Get(&Repository{
OwnerID: u.ID,
LowerName: strings.ToLower(repoName),
+ GroupID: groupID,
})
}
diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go
index e927174a55..f17a5f0f7c 100644
--- a/models/repo/repo_list.go
+++ b/models/repo/repo_list.go
@@ -158,6 +158,7 @@ type SearchRepoOptions struct {
OwnerID int64
PriorityOwnerID int64
TeamID int64
+ GroupID int64
OrderBy db.SearchOrderBy
Private bool // Include private repositories in results
StarredByID int64
@@ -289,9 +290,9 @@ func UserCollaborationRepoCond(idStr string, userID int64) builder.Cond {
)
}
-// UserOrgTeamRepoCond selects repos that the given user has access to through team membership
+// UserOrgTeamRepoCond selects repos that the given user has access to through team membership and/or group permissions
func UserOrgTeamRepoCond(idStr string, userID int64) builder.Cond {
- return builder.In(idStr, userOrgTeamRepoBuilder(userID))
+ return builder.In(idStr, userOrgTeamRepoBuilder(userID), userOrgTeamRepoGroupBuilder(userID))
}
// userOrgTeamRepoBuilder returns repo ids where user's teams can access.
@@ -302,6 +303,12 @@ func userOrgTeamRepoBuilder(userID int64) *builder.Builder {
Where(builder.Eq{"`team_user`.uid": userID})
}
+// userOrgTeamRepoGroupBuilder selects repos that the given user has access to through team membership and group permissions
+func userOrgTeamRepoGroupBuilder(userID int64) *builder.Builder {
+ return userOrgTeamRepoBuilder(userID).
+ Join("INNER", "repo_group_team", "`repo_group_team`.team_id=`team_repo`.team_id")
+}
+
// userOrgTeamUnitRepoBuilder returns repo ids where user's teams can access the special unit.
func userOrgTeamUnitRepoBuilder(userID int64, unitType unit.Type) *builder.Builder {
return userOrgTeamRepoBuilder(userID).
@@ -310,9 +317,18 @@ func userOrgTeamUnitRepoBuilder(userID int64, unitType unit.Type) *builder.Build
And(builder.Gt{"`team_unit`.`access_mode`": int(perm.AccessModeNone)})
}
+func userOrgTeamUnitRepoGroupBuilder(userID int64, unitType unit.Type) *builder.Builder {
+ return userOrgTeamRepoGroupBuilder(userID).
+ Join("INNER", "team_unit", "`team_unit`.team_id = `team_repo`.team_id").
+ Where(builder.Eq{"`team_unit`.`type`": unitType}).
+ And(builder.Gt{"`team_unit`.`access_mode`": int(perm.AccessModeNone)})
+}
+
// userOrgTeamUnitRepoCond returns a condition to select repo ids where user's teams can access the special unit.
func userOrgTeamUnitRepoCond(idStr string, userID int64, unitType unit.Type) builder.Cond {
- return builder.In(idStr, userOrgTeamUnitRepoBuilder(userID, unitType))
+ return builder.Or(builder.In(
+ idStr, userOrgTeamUnitRepoBuilder(userID, unitType)),
+ builder.In(idStr, userOrgTeamUnitRepoGroupBuilder(userID, unitType)))
}
// UserOrgUnitRepoCond selects repos that the given user has access to through org and the special unit
@@ -320,7 +336,18 @@ func UserOrgUnitRepoCond(idStr string, userID, orgID int64, unitType unit.Type)
return builder.In(idStr,
userOrgTeamUnitRepoBuilder(userID, unitType).
And(builder.Eq{"`team_unit`.org_id": orgID}),
- )
+ userOrgTeamUnitRepoGroupBuilder(userID, unitType).And(builder.Eq{"`team_unit`.org_id": orgID}))
+}
+
+// ReposAccessibleByGroupTeamBuilder returns repositories that are accessible by a team via group permissions
+func ReposAccessibleByGroupTeamBuilder(teamID int64) *builder.Builder {
+ innerGroupCond := builder.Select("`repo_group`.id").
+ From("repo_group").
+ InnerJoin("repo_group_team", "`repo_group_team`.group_id = `repo_group`.id").
+ Where(builder.Eq{"`repo_group_team`.team_id": teamID})
+ return builder.Select("`repository`.id").
+ From("repository").
+ Where(builder.In("`repository`.group_id", innerGroupCond))
}
// userOrgPublicRepoCond returns the condition that one user could access all public repositories in organizations
@@ -445,6 +472,11 @@ func SearchRepositoryCondition(opts SearchRepoOptions) builder.Cond {
if opts.TeamID > 0 {
cond = cond.And(builder.In("`repository`.id", builder.Select("`team_repo`.repo_id").From("team_repo").Where(builder.Eq{"`team_repo`.team_id": opts.TeamID})))
}
+ if opts.GroupID > 0 {
+ cond = cond.And(builder.Eq{"`repository`.group_id": opts.GroupID})
+ } else if opts.GroupID == -1 {
+ cond = cond.And(builder.Lt{"`repository`.group_id": 1})
+ }
if opts.Keyword != "" {
// separate keyword
diff --git a/models/repo/repo_test.go b/models/repo/repo_test.go
index ce17789a3b..5385c22ded 100644
--- a/models/repo/repo_test.go
+++ b/models/repo/repo_test.go
@@ -182,30 +182,30 @@ func TestComposeSSHCloneURL(t *testing.T) {
setting.SSH.Domain = "domain"
setting.SSH.Port = 22
setting.Repository.UseCompatSSHURI = false
- assert.Equal(t, "git@domain:user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo"))
+ assert.Equal(t, "git@domain:user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo", 0))
setting.Repository.UseCompatSSHURI = true
- assert.Equal(t, "ssh://git@domain/user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo"))
+ assert.Equal(t, "ssh://git@domain/user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo", 0))
// test SSH_DOMAIN while use non-standard SSH port
setting.SSH.Port = 123
setting.Repository.UseCompatSSHURI = false
- assert.Equal(t, "ssh://git@domain:123/user/repo.git", ComposeSSHCloneURL(nil, "user", "repo"))
+ assert.Equal(t, "ssh://git@domain:123/user/repo.git", ComposeSSHCloneURL(nil, "user", "repo", 0))
setting.Repository.UseCompatSSHURI = true
- assert.Equal(t, "ssh://git@domain:123/user/repo.git", ComposeSSHCloneURL(nil, "user", "repo"))
+ assert.Equal(t, "ssh://git@domain:123/user/repo.git", ComposeSSHCloneURL(nil, "user", "repo", 0))
// test IPv6 SSH_DOMAIN
setting.Repository.UseCompatSSHURI = false
setting.SSH.Domain = "::1"
setting.SSH.Port = 22
- assert.Equal(t, "git@[::1]:user/repo.git", ComposeSSHCloneURL(nil, "user", "repo"))
+ assert.Equal(t, "git@[::1]:user/repo.git", ComposeSSHCloneURL(nil, "user", "repo", 0))
setting.SSH.Port = 123
- assert.Equal(t, "ssh://git@[::1]:123/user/repo.git", ComposeSSHCloneURL(nil, "user", "repo"))
+ assert.Equal(t, "ssh://git@[::1]:123/user/repo.git", ComposeSSHCloneURL(nil, "user", "repo", 0))
setting.SSH.User = "(DOER_USERNAME)"
setting.SSH.Domain = "domain"
setting.SSH.Port = 22
- assert.Equal(t, "doer@domain:user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo"))
+ assert.Equal(t, "doer@domain:user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo", 0))
setting.SSH.Port = 123
- assert.Equal(t, "ssh://doer@domain:123/user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo"))
+ assert.Equal(t, "ssh://doer@domain:123/user/repo.git", ComposeSSHCloneURL(&user_model.User{Name: "doer"}, "user", "repo", 0))
}
func TestIsUsableRepoName(t *testing.T) {
diff --git a/models/repo/transfer.go b/models/repo/transfer.go
index 3fb8cb69ab..f611da1d23 100644
--- a/models/repo/transfer.go
+++ b/models/repo/transfer.go
@@ -254,7 +254,7 @@ func CreatePendingRepositoryTransfer(ctx context.Context, doer, newOwner *user_m
}
// Check if new owner has repository with same name.
- if has, err := IsRepositoryModelExist(ctx, newOwner, repo.Name); err != nil {
+ if has, err := IsRepositoryModelExist(ctx, newOwner, repo.Name, repo.GroupID); err != nil {
return fmt.Errorf("IsRepositoryExist: %w", err)
} else if has {
return ErrRepoAlreadyExist{
diff --git a/models/repo/wiki.go b/models/repo/wiki.go
index 47c8fa43ab..6e71677357 100644
--- a/models/repo/wiki.go
+++ b/models/repo/wiki.go
@@ -7,7 +7,6 @@ package repo
import (
"context"
"fmt"
- "strings"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/util"
@@ -72,15 +71,13 @@ func (err ErrWikiInvalidFileName) Unwrap() error {
// WikiCloneLink returns clone URLs of repository wiki.
func (repo *Repository) WikiCloneLink(ctx context.Context, doer *user_model.User) *CloneLink {
- return repo.cloneLink(ctx, doer, repo.Name+".wiki")
+ return repo.cloneLink(ctx, doer, repo.Name+".wiki", repo.GroupID)
}
-func RelativeWikiPath(ownerName, repoName string) string {
- return strings.ToLower(ownerName) + "/" + strings.ToLower(repoName) + ".wiki.git"
+func RelativeWikiPath(ownerName, repoName string, groupID int64) string {
+ return RelativePathBaseName(ownerName, repoName, groupID) + ".wiki.git"
}
-// WikiStorageRepo returns the storage repo for the wiki
-// The wiki repository should have the same object format as the code repository
func (repo *Repository) WikiStorageRepo() StorageRepo {
- return StorageRepo(RelativeWikiPath(repo.OwnerName, repo.Name))
+ return StorageRepo(RelativeWikiPath(repo.OwnerName, repo.Name, repo.GroupID))
}
diff --git a/models/repo/wiki_test.go b/models/repo/wiki_test.go
index 636c78009b..3bbb0d06e3 100644
--- a/models/repo/wiki_test.go
+++ b/models/repo/wiki_test.go
@@ -25,6 +25,6 @@ func TestRepository_RelativeWikiPath(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
- assert.Equal(t, "user2/repo1.wiki.git", repo_model.RelativeWikiPath(repo.OwnerName, repo.Name))
+ assert.Equal(t, "user2/repo1.wiki.git", repo_model.RelativeWikiPath(repo.OwnerName, repo.Name, repo.GroupID))
assert.Equal(t, "user2/repo1.wiki.git", repo.WikiStorageRepo().RelativePath())
}
diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go
new file mode 100644
index 0000000000..5fb4fe3561
--- /dev/null
+++ b/models/shared/group/org_group.go
@@ -0,0 +1,71 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ organization_model "code.gitea.io/gitea/models/organization"
+ repo_model "code.gitea.io/gitea/models/repo"
+ user_model "code.gitea.io/gitea/models/user"
+
+ "xorm.io/builder"
+)
+
+// FindGroupMembers finds all users who have access to a group via team membership
+func FindGroupMembers(ctx context.Context, groupID int64, opts *organization_model.FindOrgMembersOpts) (user_model.UserList, error) {
+ cond := builder.
+ Select("`team_user`.uid").
+ From("team_user").
+ InnerJoin("org_user", "`org_user`.uid = team_user.uid").
+ InnerJoin("repo_group_team", "`repo_group_team`.team_id = team_user.team_id").
+ Where(builder.Eq{"`org_user`.org_id": opts.OrgID}).
+ And(group_model.ParentGroupCond(context.TODO(), "`repo_group_team`.group_id", groupID))
+ if opts.PublicOnly() {
+ cond = cond.And(builder.Eq{"`org_user`.is_public": true})
+ }
+ sess := db.GetEngine(ctx).Where(builder.In("`user`.id", cond))
+ if opts.ListOptions.PageSize > 0 {
+ sess = db.SetSessionPagination(sess, opts)
+ users := make([]*user_model.User, 0, opts.ListOptions.PageSize)
+ return users, sess.Find(&users)
+ }
+
+ var users []*user_model.User
+ err := sess.Find(&users)
+ return users, err
+}
+
+func GetGroupTeams(ctx context.Context, groupID int64) ([]*organization_model.Team, error) {
+ var teams []*organization_model.Team
+ return teams, db.GetEngine(ctx).
+ Where("`repo_group_team`.group_id = ?", groupID).
+ Join("INNER", "repo_group_team", "`repo_group_team`.team_id = `team`.id").
+ Asc("`team`.name").
+ Find(&teams)
+}
+
+func IsGroupMember(ctx context.Context, groupID int64, user *user_model.User) (bool, error) {
+ if user == nil {
+ return false, nil
+ }
+ return db.GetEngine(ctx).
+ Where("`repo_group_team`.group_id = ?", groupID).
+ Join("INNER", "repo_group_team", "`repo_group_team`.team_id = `team_user`.team_id").
+ And("`team_user`.uid = ?", user.ID).
+ Table("team_user").
+ Exist()
+}
+
+func GetGroupRepos(ctx context.Context, groupID int64, doer *user_model.User) ([]*repo_model.Repository, error) {
+ sess := db.GetEngine(ctx)
+ repos := make([]*repo_model.Repository, 0)
+ return repos, sess.Table("repository").
+ Where("group_id = ?", groupID).
+ And(builder.In("id", repo_model.AccessibleRepoIDsQuery(doer))).
+ OrderBy("group_sort_order").
+ Find(&repos)
+}
diff --git a/models/user/user.go b/models/user/user.go
index 8a39eca634..097218492e 100644
--- a/models/user/user.go
+++ b/models/user/user.go
@@ -596,6 +596,7 @@ var (
"avatar", // avatar by email hash
"avatars", // user avatars by file name
"repo-avatars",
+ "group-avatars",
"captcha",
"login", // oauth2 login
@@ -606,6 +607,8 @@ var (
"explore",
"issues",
"pulls",
+ "groups",
+ "group",
"milestones",
"notifications",
diff --git a/modules/container/filter.go b/modules/container/filter.go
index 37ec7c3d56..6dac7c97f2 100644
--- a/modules/container/filter.go
+++ b/modules/container/filter.go
@@ -19,3 +19,26 @@ func FilterSlice[E any, T comparable](s []E, include func(E) (T, bool)) []T {
}
return slices.Clip(filtered)
}
+
+func Filter[E any](s []E, include func(E) bool) []E {
+ filtered := make([]E, 0, len(s)) // slice will be clipped before returning
+ for i := range s {
+ if ok := include(s[i]); ok {
+ filtered = append(filtered, s[i])
+ }
+ }
+ return slices.Clip(filtered)
+}
+
+func DedupeBy[E any, I comparable](s []E, id func(E) I) []E {
+ filtered := make([]E, 0, len(s)) // slice will be clipped before returning
+ seen := make(map[I]bool, len(s))
+ for i := range s {
+ itemID := id(s[i])
+ if _, ok := seen[itemID]; !ok {
+ filtered = append(filtered, s[i])
+ seen[itemID] = true
+ }
+ }
+ return slices.Clip(filtered)
+}
diff --git a/modules/git/url/url.go b/modules/git/url/url.go
index aa6fa31c5e..2283bff5db 100644
--- a/modules/git/url/url.go
+++ b/modules/git/url/url.go
@@ -8,6 +8,7 @@ import (
"fmt"
"net"
stdurl "net/url"
+ "strconv"
"strings"
"code.gitea.io/gitea/modules/httplib"
@@ -102,6 +103,7 @@ type RepositoryURL struct {
// if the URL belongs to current Gitea instance, then the below fields have values
OwnerName string
+ GroupID int64
RepoName string
RemainingPath string
}
@@ -123,12 +125,23 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er
fillPathParts := func(s string) {
s = strings.TrimPrefix(s, "/")
- fields := strings.SplitN(s, "/", 3)
+ fields := strings.SplitN(s, "/", 4)
+ var pathErr error
if len(fields) >= 2 {
ret.OwnerName = fields[0]
- ret.RepoName = strings.TrimSuffix(fields[1], ".git")
- if len(fields) == 3 {
- ret.RemainingPath = "/" + fields[2]
+ if len(fields) >= 3 {
+ ret.GroupID, pathErr = strconv.ParseInt(fields[1], 10, 64)
+ if pathErr != nil {
+ ret.RepoName = strings.TrimSuffix(fields[1], ".git")
+ ret.RemainingPath = "/" + fields[2]
+ return
+ }
+ ret.RepoName = strings.TrimSuffix(fields[2], ".git")
+ if len(fields) >= 4 {
+ ret.RemainingPath = "/" + fields[3]
+ }
+ } else {
+ ret.RepoName = strings.TrimSuffix(fields[1], ".git")
}
}
}
@@ -161,7 +174,11 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er
// MakeRepositoryWebLink generates a web link (http/https) for a git repository (by guessing sometimes)
func MakeRepositoryWebLink(repoURL *RepositoryURL) string {
if repoURL.OwnerName != "" {
- return setting.AppSubURL + "/" + repoURL.OwnerName + "/" + repoURL.RepoName
+ var groupSegment string
+ if repoURL.GroupID > 0 {
+ groupSegment = strconv.FormatInt(repoURL.GroupID, 10) + "/"
+ }
+ return setting.AppSubURL + "/" + repoURL.OwnerName + "/" + groupSegment + repoURL.RepoName
}
// now, let's guess, for example:
diff --git a/modules/indexer/code/elasticsearch/elasticsearch.go b/modules/indexer/code/elasticsearch/elasticsearch.go
index f9a3d4156d..9f46bdba7b 100644
--- a/modules/indexer/code/elasticsearch/elasticsearch.go
+++ b/modules/indexer/code/elasticsearch/elasticsearch.go
@@ -274,7 +274,7 @@ func convertResult(searchResult *es.SearchResponse, kw string, pageSize int) (in
// and tags? If elastic search has handled that?
startIndex, endIndex = contentMatchIndexPos(c[0], "", "")
if startIndex == -1 {
- panic(fmt.Sprintf("1===%s,,,%#v,,,%s", kw, hit.Highlight, c[0]))
+ panic(fmt.Sprintf("1===%s,,%#v,,%s", kw, hit.Highlight, c[0]))
}
} else {
panic(fmt.Sprintf("2===%#v", hit.Highlight))
diff --git a/modules/issue/template/template_test.go b/modules/issue/template/template_test.go
index 7fec9431b6..75e616975f 100644
--- a/modules/issue/template/template_test.go
+++ b/modules/issue/template/template_test.go
@@ -662,7 +662,7 @@ body:
name: Name
title: Title
about: About
-labels: label1,label2,,label3 ,,
+labels: label1,label2,label3 ,
ref: Ref
body:
- type: markdown
@@ -731,7 +731,7 @@ body:
name: Name
title: Title
about: About
-labels: label1,label2,,label3 ,,
+labels: label1,label2,label3 ,
ref: Ref
---
Content
diff --git a/modules/markup/html.go b/modules/markup/html.go
index 0fe37ae305..5302837e79 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -63,10 +63,10 @@ var globalVars = sync.OnceValue(func() *globalVarsType {
v.shortLinkPattern = regexp.MustCompile(`\[\[(.*?)\]\](\w*)`)
// anyHashPattern splits url containing SHA into parts
- v.anyHashPattern = regexp.MustCompile(`https?://(?:\S+/){4,5}([0-9a-f]{40,64})((\.\w+)*)(/[-+~%./\w]+)?(\?[-+~%.\w&=]+)?(#[-+~%.\w]+)?`)
+ v.anyHashPattern = regexp.MustCompile(`https?://(?:\S+/){4,6}([0-9a-f]{40,64})((\.\w+)*)(/[-+~%./\w]+)?(\?[-+~%.\w&=]+)?(#[-+~%.\w]+)?`)
// comparePattern matches "http://domain/org/repo/compare/COMMIT1...COMMIT2#hash"
- v.comparePattern = regexp.MustCompile(`https?://(?:\S+/){4,5}([0-9a-f]{7,64})(\.\.\.?)([0-9a-f]{7,64})?(#[-+~_%.a-zA-Z0-9]+)?`)
+ v.comparePattern = regexp.MustCompile(`https?://(?:\S+/){4,6}([0-9a-f]{7,64})(\.\.\.?)([0-9a-f]{7,64})?(#[-+~_%.a-zA-Z0-9]+)?`)
// fullURLPattern matches full URL like "mailto:...", "https://..." and "ssh+git://..."
v.fullURLPattern = regexp.MustCompile(`^[a-z][-+\w]+:`)
@@ -82,13 +82,13 @@ var globalVars = sync.OnceValue(func() *globalVarsType {
v.emojiShortCodeRegex = regexp.MustCompile(`:[-+\w]+:`)
// example: https://domain/org/repo/pulls/27#hash
- v.issueFullPattern = regexp.MustCompile(`https?://(?:\S+/)[\w_.-]+/[\w_.-]+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#](\S+)?)?\b`)
+ v.issueFullPattern = regexp.MustCompile(`https?://(?:\S+/)[\w_.-]+/(?:[\w_.-]+/)?[\w_.-]+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#](\S+)?)?\b`)
// example: https://domain/org/repo/pulls/27/files#hash
- v.filesChangedFullPattern = regexp.MustCompile(`https?://(?:\S+/)[\w_.-]+/[\w_.-]+/pulls/((?:\w{1,10}-)?[1-9][0-9]*)/files([\?|#](\S+)?)?\b`)
+ v.filesChangedFullPattern = regexp.MustCompile(`https?://(?:\S+/)[\w_.-]+/(?:[\w_.-]+/)?[\w_.-]+/pulls/((?:\w{1,10}-)?[1-9][0-9]*)/files([\?|#](\S+)?)?\b`)
// codePreviewPattern matches "http://domain/.../{owner}/{repo}/src/commit/{commit}/{filepath}#L10-L20"
- v.codePreviewPattern = regexp.MustCompile(`https?://\S+/([^\s/]+)/([^\s/]+)/src/commit/([0-9a-f]{7,64})(/\S+)#(L\d+(-L\d+)?)`)
+ v.codePreviewPattern = regexp.MustCompile(`https?://\S+/([^\s/]+)/((?:[^\s/]+/)?)([^\s/]+)/src/commit/([0-9a-f]{7,64})(/\S+)#(L\d+(-L\d+)?)`)
// cleans: "= 12 {
+ opts.GroupID, _ = strconv.ParseInt(node.Data[m[4]:m[5]], 10, 64)
+ opts.RepoName, opts.CommitID, opts.FilePath = node.Data[m[6]:m[7]], node.Data[m[8]:m[9]], node.Data[m[10]:m[11]]
+ } else {
+ opts.RepoName, opts.CommitID, opts.FilePath = node.Data[m[4]:m[5]], node.Data[m[6]:m[7]], node.Data[m[8]:m[9]]
+ }
+
if !httplib.IsCurrentGiteaSiteURL(ctx, opts.FullURL) {
return 0, 0, "", nil
}
diff --git a/modules/markup/html_issue.go b/modules/markup/html_issue.go
index a94abb3883..b3a1ab7e1d 100644
--- a/modules/markup/html_issue.go
+++ b/modules/markup/html_issue.go
@@ -23,6 +23,7 @@ import (
type RenderIssueIconTitleOptions struct {
OwnerName string
RepoName string
+ GroupID int64
LinkHref string
IssueIndex int64
}
diff --git a/modules/private/hook.go b/modules/private/hook.go
index ce87ccd801..65146fef62 100644
--- a/modules/private/hook.go
+++ b/modules/private/hook.go
@@ -82,8 +82,16 @@ type HookProcReceiveRefResult struct {
HeadBranch string
}
-func newInternalRequestAPIForHooks(ctx context.Context, hookName, ownerName, repoName string, opts HookOptions) *httplib.Request {
- reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/%s/%s/%s", hookName, url.PathEscape(ownerName), url.PathEscape(repoName))
+func genGroupSegment(groupID int64) string {
+ var groupSegment string
+ if groupID > 0 {
+ groupSegment = fmt.Sprintf("group/%d/", groupID)
+ }
+ return groupSegment
+}
+
+func newInternalRequestAPIForHooks(ctx context.Context, hookName, ownerName, repoName string, groupID int64, opts HookOptions) *httplib.Request {
+ reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/%s/%s/%s%s", hookName, url.PathEscape(ownerName), genGroupSegment(groupID), url.PathEscape(repoName))
req := newInternalRequestAPI(ctx, reqURL, "POST", opts)
// This "timeout" applies to http.Client's timeout: A Timeout of zero means no timeout.
// This "timeout" was previously set to `time.Duration(60+len(opts.OldCommitIDs))` seconds, but it caused unnecessary timeout failures.
@@ -93,28 +101,29 @@ func newInternalRequestAPIForHooks(ctx context.Context, hookName, ownerName, rep
}
// HookPreReceive check whether the provided commits are allowed
-func HookPreReceive(ctx context.Context, ownerName, repoName string, opts HookOptions) ResponseExtra {
- req := newInternalRequestAPIForHooks(ctx, "pre-receive", ownerName, repoName, opts)
+func HookPreReceive(ctx context.Context, ownerName, repoName string, groupID int64, opts HookOptions) ResponseExtra {
+ req := newInternalRequestAPIForHooks(ctx, "pre-receive", ownerName, repoName, groupID, opts)
_, extra := requestJSONResp(req, &ResponseText{})
return extra
}
// HookPostReceive updates services and users
-func HookPostReceive(ctx context.Context, ownerName, repoName string, opts HookOptions) (*HookPostReceiveResult, ResponseExtra) {
- req := newInternalRequestAPIForHooks(ctx, "post-receive", ownerName, repoName, opts)
+func HookPostReceive(ctx context.Context, ownerName, repoName string, groupID int64, opts HookOptions) (*HookPostReceiveResult, ResponseExtra) {
+ req := newInternalRequestAPIForHooks(ctx, "post-receive", ownerName, repoName, groupID, opts)
return requestJSONResp(req, &HookPostReceiveResult{})
}
// HookProcReceive proc-receive hook
-func HookProcReceive(ctx context.Context, ownerName, repoName string, opts HookOptions) (*HookProcReceiveResult, ResponseExtra) {
- req := newInternalRequestAPIForHooks(ctx, "proc-receive", ownerName, repoName, opts)
+func HookProcReceive(ctx context.Context, ownerName, repoName string, groupID int64, opts HookOptions) (*HookProcReceiveResult, ResponseExtra) {
+ req := newInternalRequestAPIForHooks(ctx, "proc-receive", ownerName, repoName, groupID, opts)
return requestJSONResp(req, &HookProcReceiveResult{})
}
// SetDefaultBranch will set the default branch to the provided branch for the provided repository
-func SetDefaultBranch(ctx context.Context, ownerName, repoName, branch string) ResponseExtra {
- reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/set-default-branch/%s/%s/%s",
+func SetDefaultBranch(ctx context.Context, ownerName, repoName string, groupID int64, branch string) ResponseExtra {
+ reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/set-default-branch/%s/%s%s/%s",
url.PathEscape(ownerName),
+ genGroupSegment(groupID),
url.PathEscape(repoName),
url.PathEscape(branch),
)
diff --git a/modules/private/serv.go b/modules/private/serv.go
index b1dafbd81b..2d6bfb94db 100644
--- a/modules/private/serv.go
+++ b/modules/private/serv.go
@@ -46,10 +46,15 @@ type ServCommandResults struct {
}
// ServCommand preps for a serv call
-func ServCommand(ctx context.Context, keyID int64, ownerName, repoName string, mode perm.AccessMode, verb, lfsVerb string) (*ServCommandResults, ResponseExtra) {
- reqURL := setting.LocalURL + fmt.Sprintf("api/internal/serv/command/%d/%s/%s?mode=%d",
+func ServCommand(ctx context.Context, keyID int64, ownerName, repoName string, groupID int64, mode perm.AccessMode, verb, lfsVerb string) (*ServCommandResults, ResponseExtra) {
+ var groupSegment string
+ if groupID > 0 {
+ groupSegment = fmt.Sprintf("%d/", groupID)
+ }
+ reqURL := setting.LocalURL + fmt.Sprintf("api/internal/serv/command/%d/%s/%s%s?mode=%d",
keyID,
url.PathEscape(ownerName),
+ groupSegment,
url.PathEscape(repoName),
mode,
)
diff --git a/modules/references/references.go b/modules/references/references.go
index ef3568ebea..2115de0368 100644
--- a/modules/references/references.go
+++ b/modules/references/references.go
@@ -35,7 +35,7 @@ var (
issueAlphanumericPattern = regexp.MustCompile(`(?:\s|^|\(|\[|\"|\')([A-Z]{1,10}-[1-9][0-9]*)(?:\s|$|\)|\]|:|\.(\s|$)|\"|\'|,)`)
// crossReferenceIssueNumericPattern matches string that references a numeric issue in a different repository
// e.g. org/repo#12345
- crossReferenceIssueNumericPattern = regexp.MustCompile(`(?:\s|^|\(|\[)([0-9a-zA-Z-_\.]+/[0-9a-zA-Z-_\.]+[#!][0-9]+)(?:\s|$|\)|\]|[:;,.?!]\s|[:;,.?!]$)`)
+ crossReferenceIssueNumericPattern = regexp.MustCompile(`(?:\s|^|\(|\[)([0-9a-zA-Z-_\.]+/(?:group/\d+/)?[0-9a-zA-Z-_\.]+[#!][0-9]+)(?:\s|$|\)|\]|[:;,.?!]\s|[:;,.?!]$)`)
// crossReferenceCommitPattern matches a string that references a commit in a different repository
// e.g. go-gitea/gitea@d8a994ef, go-gitea/gitea@d8a994ef243349f321568f9e36d5c3f444b99cae (7-40 characters)
crossReferenceCommitPattern = regexp.MustCompile(`(?:\s|^|\(|\[)([0-9a-zA-Z-_\.]+)/([0-9a-zA-Z-_\.]+)@([0-9a-f]{7,64})(?:\s|$|\)|\]|[:;,.?!]\s|[:;,.?!]$)`)
@@ -81,6 +81,7 @@ func (a XRefAction) String() string {
type IssueReference struct {
Index int64
Owner string
+ GroupID int64
Name string
Action XRefAction
TimeLog string
@@ -93,6 +94,7 @@ type IssueReference struct {
type RenderizableReference struct {
Issue string
Owner string
+ GroupID int64
Name string
CommitSha string
IsPull bool
@@ -104,6 +106,7 @@ type RenderizableReference struct {
type rawReference struct {
index int64
owner string
+ groupID int64
name string
isPull bool
action XRefAction
@@ -119,6 +122,7 @@ func rawToIssueReferenceList(reflist []*rawReference) []IssueReference {
refarr[i] = IssueReference{
Index: r.index,
Owner: r.owner,
+ GroupID: r.groupID,
Name: r.name,
Action: r.action,
TimeLog: r.timeLog,
@@ -177,7 +181,7 @@ func getGiteaHostName() string {
giteaIssuePullPattern = regexp.MustCompile(
`(\s|^|\(|\[)` +
regexp.QuoteMeta(strings.TrimSpace(setting.AppURL)) +
- `([0-9a-zA-Z-_\.]+/[0-9a-zA-Z-_\.]+)/` +
+ `([0-9a-zA-Z-_\.]+/(?:group/\d+/)?[0-9a-zA-Z-_\.]+)/` +
`((?:issues)|(?:pulls))/([0-9]+)(?:\s|$|\)|\]|[:;,.?!]\s|[:;,.?!]$)`)
} else {
giteaHost = ""
@@ -563,10 +567,19 @@ func getCrossReference(content []byte, start, end int, fromLink, prOnly bool) *r
}
}
parts := strings.Split(strings.ToLower(repo), "/")
- if len(parts) != 2 {
+ var owner, rawGroup, name string
+ var gid int64
+ if len(parts) > 4 {
return nil
}
- owner, name := parts[0], parts[1]
+ if len(parts) == 4 {
+ owner, rawGroup, name = parts[0], parts[2], parts[3]
+ } else {
+ owner, name = parts[0], parts[1]
+ }
+ if rawGroup != "" {
+ gid, _ = strconv.ParseInt(rawGroup, 10, 64)
+ }
if !validNamePattern.MatchString(owner) || !validNamePattern.MatchString(name) {
return nil
}
@@ -574,6 +587,7 @@ func getCrossReference(content []byte, start, end int, fromLink, prOnly bool) *r
return &rawReference{
index: index,
owner: owner,
+ groupID: gid,
name: name,
action: action,
issue: issue,
diff --git a/modules/repository/env.go b/modules/repository/env.go
index ed2c6fef81..653dd00b3b 100644
--- a/modules/repository/env.go
+++ b/modules/repository/env.go
@@ -18,6 +18,7 @@ import (
const (
EnvRepoName = "GITEA_REPO_NAME"
EnvRepoUsername = "GITEA_REPO_USER_NAME"
+ EnvRepoGroupID = "GITEA_REPO_GROUP_ID"
EnvRepoID = "GITEA_REPO_ID"
EnvRepoIsWiki = "GITEA_REPO_IS_WIKI"
EnvPusherName = "GITEA_PUSHER_NAME"
@@ -63,6 +64,7 @@ func DoerPushingEnvironment(doer *user_model.User, repo *repo_model.Repository,
EnvRepoID + "=" + strconv.FormatInt(repo.ID, 10),
EnvRepoIsWiki + "=" + strconv.FormatBool(isWiki),
EnvPusherName + "=" + doer.Name,
+ EnvRepoGroupID + "=" + strconv.FormatInt(repo.GroupID, 10),
EnvPusherID + "=" + strconv.FormatInt(doer.ID, 10),
}
if !doer.KeepEmailPrivate {
diff --git a/modules/repository/push.go b/modules/repository/push.go
index cf047847b6..ddbcf9065f 100644
--- a/modules/repository/push.go
+++ b/modules/repository/push.go
@@ -12,6 +12,7 @@ type PushUpdateOptions struct {
PusherID int64
PusherName string
RepoUserName string
+ RepoGroupID int64
RepoName string
RefFullName git.RefName // branch, tag or other name to push
OldCommitID string
diff --git a/modules/structs/issue.go b/modules/structs/issue.go
index f108cf3d0a..d1292da617 100644
--- a/modules/structs/issue.go
+++ b/modules/structs/issue.go
@@ -277,8 +277,9 @@ func (it IssueTemplate) Type() IssueTemplateType {
type IssueMeta struct {
Index int64 `json:"index"`
// owner of the issue's repo
- Owner string `json:"owner"`
- Name string `json:"repo"`
+ Owner string `json:"owner"`
+ Name string `json:"repo"`
+ GroupID int64 `json:"group_id"`
}
// LockIssueOption options to lock an issue
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index 0c3a0ab44e..528231b57c 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -129,6 +129,9 @@ type Repository struct {
RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
Topics []string `json:"topics"`
Licenses []string `json:"licenses"`
+
+ GroupID int64 `json:"group_id"`
+ GroupSortOrder int `json:"group_sort_order"`
}
// CreateRepoOption options when creating repository
@@ -162,6 +165,8 @@ type CreateRepoOption struct {
TrustModel string `json:"trust_model"`
// ObjectFormatName of the underlying git repository, empty string for default (sha1)
ObjectFormatName ObjectFormatName `json:"object_format_name" binding:"MaxSize(6)"`
+ // GroupID of the group which will contain this repository. ignored if the repo owner is not an organization.
+ GroupID int64 `json:"group_id"`
}
// EditRepoOption options when editing a repository's properties
diff --git a/modules/structs/repo_group.go b/modules/structs/repo_group.go
new file mode 100644
index 0000000000..1bd48ea71f
--- /dev/null
+++ b/modules/structs/repo_group.go
@@ -0,0 +1,53 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package structs
+
+// Group represents a group of repositories and subgroups in an organization
+type Group struct {
+ ID int64 `json:"id"`
+ Owner *User `json:"owner"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ ParentGroupID int64 `json:"parentGroupID"`
+ NumRepos int64 `json:"num_repos"`
+ NumSubgroups int64 `json:"num_subgroups"`
+ Link string `json:"link"`
+ SortOrder int `json:"sort_order"`
+ AvatarURL string `json:"avatar_url"`
+}
+
+// NewGroupOption represents options for creating a new group in an organization
+// swagger:model
+type NewGroupOption struct {
+ // the name for the newly created group
+ //
+ // required: true
+ Name string `json:"name" binding:"Required"`
+ // the description of the newly created group
+ Description string `json:"description"`
+ // the visibility of the newly created group
+ Visibility VisibleType `json:"visibility"`
+}
+
+// MoveGroupOption represents options for changing a group or repo's parent and sort order
+// swagger:model
+type MoveGroupOption struct {
+ // the new parent group. can be 0 to specify no parent
+ //
+ // required: true
+ NewParent int64 `json:"newParent"`
+ // the position of this group in its new parent
+ NewPos *int `json:"newPos,omitempty"`
+}
+
+// EditGroupOption represents options for editing a repository group
+// swagger:model
+type EditGroupOption struct {
+ // the new name of the group
+ Name *string `json:"name,omitempty"`
+ // the new description of the group
+ Description *string `json:"description,omitempty"`
+ // the new visibility of the group
+ Visibility *VisibleType `json:"visibility,omitempty"`
+}
diff --git a/modules/structs/repo_group_team.go b/modules/structs/repo_group_team.go
new file mode 100644
index 0000000000..749649d37e
--- /dev/null
+++ b/modules/structs/repo_group_team.go
@@ -0,0 +1,13 @@
+// Copyright 2026 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package structs
+
+// CreateOrUpdateRepoGroupTeamOption options for adding a team to a repo group
+type CreateOrUpdateRepoGroupTeamOption struct {
+ // Whether the team can create repositories and subgroups in the group
+ CanCreateIn *bool `json:"can_create_in"`
+ // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"}
+ UnitsMap map[string]string `json:"units_map"`
+ Permission *RepoWritePermission `json:"permission"`
+}
diff --git a/modules/templates/util_avatar.go b/modules/templates/util_avatar.go
index 524c64d0b6..13de803b82 100644
--- a/modules/templates/util_avatar.go
+++ b/modules/templates/util_avatar.go
@@ -11,6 +11,7 @@ import (
activities_model "code.gitea.io/gitea/models/activities"
"code.gitea.io/gitea/models/avatars"
+ group_model "code.gitea.io/gitea/models/group"
"code.gitea.io/gitea/models/organization"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
@@ -55,6 +56,11 @@ func (au *AvatarUtils) Avatar(item any, others ...any) template.HTML {
if src != "" {
return AvatarHTML(src, size, class, t.AsUser().DisplayName())
}
+ case *group_model.Group:
+ src := t.AvatarLinkWithSize(size * setting.Avatar.RenderedSizeFactor)
+ if src != "" {
+ return AvatarHTML(src, size, class, t.Name)
+ }
}
return AvatarHTML(avatars.DefaultAvatarLink(), size, class, "")
diff --git a/modules/templates/util_misc.go b/modules/templates/util_misc.go
index ac179e7178..f78aade214 100644
--- a/modules/templates/util_misc.go
+++ b/modules/templates/util_misc.go
@@ -58,6 +58,7 @@ type Actioner interface {
GetActUserName(ctx context.Context) string
GetRepoUserName(ctx context.Context) string
GetRepoName(ctx context.Context) string
+ GetRepoGroup(ctx context.Context) string
GetRepoPath(ctx context.Context) string
GetRepoLink(ctx context.Context) string
GetBranch() string
diff --git a/modules/util/slice.go b/modules/util/slice.go
index aaa729c1c9..a1ebd89b99 100644
--- a/modules/util/slice.go
+++ b/modules/util/slice.go
@@ -77,3 +77,11 @@ func SliceNilAsEmpty[T any](a []T) []T {
}
return a
}
+
+func SliceMap[T, R any](slice []T, mapper func(it T) R) []R {
+ ret := make([]R, 0)
+ for _, it := range slice {
+ ret = append(ret, mapper(it))
+ }
+ return ret
+}
diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go
index 9f1175a1ff..57421ecc28 100644
--- a/routers/api/v1/admin/adopt.go
+++ b/routers/api/v1/admin/adopt.go
@@ -55,6 +55,47 @@ func ListUnadoptedRepositories(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, repoNames)
}
+func commonAdoptRepository(ctx *context.APIContext) {
+ ownerName := ctx.PathParam("username")
+ repoName := ctx.PathParam("reponame")
+ groupID := ctx.PathParamInt64("group_id")
+
+ ctxUser, err := user_model.GetUserByName(ctx, ownerName)
+ if err != nil {
+ if user_model.IsErrUserNotExist(err) {
+ ctx.APIErrorNotFound()
+ return
+ }
+ ctx.APIErrorInternal(err)
+ return
+ }
+
+ // check not a repo
+ has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, repoName, groupID)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, repoName, groupID)))
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ if has || !exist {
+ ctx.APIErrorNotFound()
+ return
+ }
+ if _, err := repo_service.AdoptRepository(ctx, ctx.Doer, ctxUser, repo_service.CreateRepoOptions{
+ Name: repoName,
+ IsPrivate: true,
+ }); err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+
+ ctx.Status(http.StatusNoContent)
+}
+
// AdoptRepository will adopt an unadopted repository
func AdoptRepository(ctx *context.APIContext) {
// swagger:operation POST /admin/unadopted/{owner}/{repo} admin adminAdoptRepository
@@ -80,8 +121,46 @@ func AdoptRepository(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
// "403":
// "$ref": "#/responses/forbidden"
+ commonAdoptRepository(ctx)
+}
+
+func AdoptGroupRepository(ctx *context.APIContext) {
+ // swagger:operation POST /admin/unadopted/{owner}/group/{group_id}/{repo} admin adminAdoptRepositoryInGroup
+ // ---
+ // summary: Adopt unadopted files as a repository
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: owner
+ // in: path
+ // description: owner of the repo
+ // type: string
+ // required: true
+ // - name: repo
+ // in: path
+ // description: name of the repo
+ // type: string
+ // required: true
+ // - name: group_id
+ // in: path
+ // description: group ID of the repo
+ // type: integer
+ // format: int64
+ // required: true
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ // "403":
+ // "$ref": "#/responses/forbidden"
+ commonAdoptRepository(ctx)
+}
+
+func commonDeleteUnadoptedRepo(ctx *context.APIContext) {
ownerName := ctx.PathParam("username")
repoName := ctx.PathParam("reponame")
+ groupID := ctx.PathParamInt64("group_id")
ctxUser, err := user_model.GetUserByName(ctx, ownerName)
if err != nil {
@@ -94,12 +173,12 @@ func AdoptRepository(ctx *context.APIContext) {
}
// check not a repo
- has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, repoName)
+ has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, repoName, groupID)
if err != nil {
ctx.APIErrorInternal(err)
return
}
- exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, repoName)))
+ exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, repoName, groupID)))
if err != nil {
ctx.APIErrorInternal(err)
return
@@ -108,10 +187,8 @@ func AdoptRepository(ctx *context.APIContext) {
ctx.APIErrorNotFound()
return
}
- if _, err := repo_service.AdoptRepository(ctx, ctx.Doer, ctxUser, repo_service.CreateRepoOptions{
- Name: repoName,
- IsPrivate: true,
- }); err != nil {
+
+ if err := repo_service.DeleteUnadoptedRepository(ctx, ctx.Doer, ctxUser, repoName, groupID); err != nil {
ctx.APIErrorInternal(err)
return
}
@@ -142,39 +219,36 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) {
// "$ref": "#/responses/empty"
// "403":
// "$ref": "#/responses/forbidden"
- ownerName := ctx.PathParam("username")
- repoName := ctx.PathParam("reponame")
-
- ctxUser, err := user_model.GetUserByName(ctx, ownerName)
- if err != nil {
- if user_model.IsErrUserNotExist(err) {
- ctx.APIErrorNotFound()
- return
- }
- ctx.APIErrorInternal(err)
- return
- }
-
- // check not a repo
- has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, repoName)
- if err != nil {
- ctx.APIErrorInternal(err)
- return
- }
- exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, repoName)))
- if err != nil {
- ctx.APIErrorInternal(err)
- return
- }
- if has || !exist {
- ctx.APIErrorNotFound()
- return
- }
-
- if err := repo_service.DeleteUnadoptedRepository(ctx, ctx.Doer, ctxUser, repoName); err != nil {
- ctx.APIErrorInternal(err)
- return
- }
-
- ctx.Status(http.StatusNoContent)
+ commonDeleteUnadoptedRepo(ctx)
+}
+
+func DeleteUnadoptedRepositoryInGroup(ctx *context.APIContext) {
+ // swagger:operation DELETE /admin/unadopted/{owner}/group/{group_id}/{repo} admin adminDeleteUnadoptedRepositoryInGroup
+ // ---
+ // summary: Delete unadopted files
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: owner
+ // in: path
+ // description: owner of the repo
+ // type: string
+ // required: true
+ // - name: repo
+ // in: path
+ // description: name of the repo
+ // type: string
+ // required: true
+ // - name: group_id
+ // in: path
+ // description: group ID of the repo
+ // type: integer
+ // format: int64
+ // required: true
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "403":
+ // "$ref": "#/responses/forbidden"
+ commonDeleteUnadoptedRepo(ctx)
}
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index a8bfa0965e..c504ffe40d 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -66,6 +66,7 @@ import (
"errors"
"fmt"
"net/http"
+ "strconv"
"strings"
auth_model "code.gitea.io/gitea/models/auth"
@@ -82,6 +83,7 @@ import (
"code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/routers/api/v1/activitypub"
"code.gitea.io/gitea/routers/api/v1/admin"
+ "code.gitea.io/gitea/routers/api/v1/group"
"code.gitea.io/gitea/routers/api/v1/misc"
"code.gitea.io/gitea/routers/api/v1/notify"
"code.gitea.io/gitea/routers/api/v1/org"
@@ -135,7 +137,15 @@ func repoAssignment() func(ctx *context.APIContext) {
return func(ctx *context.APIContext) {
userName := ctx.PathParam("username")
repoName := ctx.PathParam("reponame")
-
+ var gid int64
+ groupParam := ctx.PathParam("group_id")
+ if groupParam != "" {
+ gid, _ = strconv.ParseInt(groupParam, 10, 64)
+ if gid == 0 {
+ ctx.Redirect(strings.Replace(ctx.Req.URL.RequestURI(), "/0/", "/", 1), 307)
+ return
+ }
+ }
var (
owner *user_model.User
err error
@@ -165,7 +175,7 @@ func repoAssignment() func(ctx *context.APIContext) {
ctx.ContextUser = owner
// Get repository.
- repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, repoName)
+ repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, gid, repoName)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
redirectRepoID, err := repo_model.LookupRedirect(ctx, owner.ID, repoName)
@@ -181,6 +191,10 @@ func repoAssignment() func(ctx *context.APIContext) {
}
return
}
+ if repo.GroupID != gid {
+ ctx.APIErrorNotFound()
+ return
+ }
repo.Owner = owner
ctx.Repo.Repository = repo
@@ -424,7 +438,7 @@ func reqAdmin() func(ctx *context.APIContext) {
// reqRepoWriter user should have a permission to write to a repo, or be a site admin
func reqRepoWriter(unitTypes ...unit.Type) func(ctx *context.APIContext) {
return func(ctx *context.APIContext) {
- if !ctx.IsUserRepoWriter(unitTypes) && !ctx.IsUserRepoAdmin() && !ctx.IsUserSiteAdmin() {
+ if !ctx.IsUserRepoWriter(unitTypes) && !ctx.IsUserRepoAdmin() && !ctx.IsUserSiteAdmin() && !(ctx.RepoGroup != nil && ctx.IsUserGroupWriter(unitTypes)) {
ctx.APIError(http.StatusForbidden, "user should have a permission to write to a repo")
return
}
@@ -451,6 +465,37 @@ func reqAnyRepoReader() func(ctx *context.APIContext) {
}
}
+// reqOrgAdmin user should be an organization or site-wide admin
+func reqOrgAdmin() func(ctx *context.APIContext) {
+ return func(ctx *context.APIContext) {
+ if ctx.IsUserSiteAdmin() {
+ return
+ }
+ var orgID int64
+ if ctx.Org.Organization != nil {
+ orgID = ctx.Org.Organization.ID
+ } else if ctx.Org.Team != nil {
+ orgID = ctx.Org.Team.OrgID
+ } else {
+ setting.PanicInDevOrTesting("reqOrgOwnership: unprepared context")
+ ctx.APIErrorInternal(errors.New("reqOrgOwnership: unprepared context"))
+ return
+ }
+ isAdmin, err := organization.IsOrganizationAdmin(ctx, orgID, ctx.Doer.ID)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ } else if !isAdmin {
+ if ctx.Org.Organization != nil {
+ ctx.APIError(http.StatusForbidden, "Must be an organization owner")
+ } else {
+ ctx.APIErrorNotFound()
+ }
+ return
+ }
+ }
+}
+
// reqOrgOwnership user should be an organization owner, or a site admin
func reqOrgOwnership() func(ctx *context.APIContext) {
return func(ctx *context.APIContext) {
@@ -484,6 +529,55 @@ func reqOrgOwnership() func(ctx *context.APIContext) {
}
}
+// reqGroupMembership user should be organization owner,
+// a member of a team with access to the group, or site admin
+func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *context.APIContext) {
+ return func(ctx *context.APIContext) {
+ if ctx.IsUserSiteAdmin() {
+ return
+ }
+ var err error
+ isOrgOwner := false
+ isOrgAdmin := false
+ g := ctx.RepoGroup.Group
+
+ if ctx.Doer != nil {
+ isOrgOwner, err = organization.IsOrganizationOwner(ctx, g.OwnerID, ctx.Doer.ID)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ isOrgAdmin, err = organization.IsOrganizationAdmin(ctx, g.OwnerID, ctx.Doer.ID)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ if isOrgOwner || isOrgAdmin {
+ return
+ }
+ }
+
+ canAccess, err := ctx.RepoGroup.Group.CanAccessAtLevel(ctx, ctx.Doer, mode)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ igm := ctx.RepoGroup.IsMember
+
+ if !igm && !canAccess {
+ ctx.APIErrorNotFound()
+ return
+ }
+ if needsCreatePerm {
+ canCreateIn := ctx.RepoGroup.CanCreateRepoOrGroup
+ if !(canCreateIn || isOrgOwner || isOrgAdmin) {
+ ctx.APIError(http.StatusForbidden, fmt.Sprintf("User[%d] does not have permission to create new items in group[%d]", ctx.Doer.ID, g.ID))
+ return
+ }
+ }
+ }
+}
+
// reqTeamMembership user should be an team member, or a site admin
func reqTeamMembership() func(ctx *context.APIContext) {
return func(ctx *context.APIContext) {
@@ -1094,11 +1188,13 @@ func Routes() *web.Router {
// (repo scope)
m.Group("/starred", func() {
m.Get("", user.GetMyStarredRepos)
- m.Group("/{username}/{reponame}", func() {
+ fn := func() {
m.Get("", user.IsStarring)
m.Put("", user.Star)
m.Delete("", user.Unstar)
- }, repoAssignment(), checkTokenPublicOnly())
+ }
+ m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly())
+ m.Group("/{username}/group/{group_id}/{reponame}", fn, context.GroupAssignmentAPI(), repoAssignment(), reqGroupMembership(perm.AccessModeRead, false), checkTokenPublicOnly())
}, reqStarsEnabled(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository))
m.Get("/times", repo.ListMyTrackedTimes)
m.Get("/stopwatches", repo.GetStopwatches)
@@ -1145,13 +1241,13 @@ func Routes() *web.Router {
// (repo scope)
m.Post("/migrate", reqToken(), bind(api.MigrateRepoOptions{}), repo.Migrate)
-
- m.Group("/{username}/{reponame}", func() {
+ fn := func() {
m.Get("/compare/*", reqRepoReader(unit.TypeCode), repo.CompareDiff)
m.Combo("").Get(reqAnyRepoReader(), repo.Get).
Delete(reqToken(), reqOwner(), repo.Delete).
Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), repo.Edit)
+ m.Post("/groups/move", reqToken(), bind(api.MoveGroupOption{}), reqOrgMembership(), reqGroupMembership(perm.AccessModeWrite, false), repo.MoveRepoToGroup)
m.Post("/generate", reqToken(), reqRepoReader(unit.TypeCode), bind(api.GenerateRepoOption{}), repo.Generate)
m.Group("/transfer", func() {
m.Post("", reqOwner(), bind(api.TransferRepoOption{}), repo.Transfer)
@@ -1443,27 +1539,31 @@ func Routes() *web.Router {
}, reqAdmin(), reqToken())
m.Methods("HEAD,GET", "/{ball_type:tarball|zipball|bundle}/*", reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(true), repo.DownloadArchive)
- }, repoAssignment(), checkTokenPublicOnly())
+ }
+ m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly())
+ m.Group("/{username}/group/{group_id}/{reponame}", fn, context.GroupAssignmentAPI(), repoAssignment(), checkTokenPublicOnly())
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository))
// Artifacts direct download endpoint authenticates via signed url
// it is protected by the "sig" parameter (to help to access private repo), so no need to use other middlewares
m.Get("/repos/{username}/{reponame}/actions/artifacts/{artifact_id}/zip/raw", repo.DownloadArtifactRaw)
+ m.Get("/repos/{username}/group/{group_id}/{reponame}/actions/artifacts/{artifact_id}/zip/raw", repo.DownloadArtifactRaw)
// Notifications (requires notifications scope)
m.Group("/repos", func() {
- m.Group("/{username}/{reponame}", func() {
+ fn := func() {
m.Combo("/notifications", reqToken()).
Get(notify.ListRepoNotifications).
Put(notify.ReadRepoNotifications)
- }, repoAssignment(), checkTokenPublicOnly())
+ }
+ m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly())
+ m.Group("/{username}/group/{group_id}/{reponame}", fn, repoAssignment(), context.GroupAssignmentAPI(), reqGroupMembership(perm.AccessModeRead, false), checkTokenPublicOnly())
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryNotification))
// Issue (requires issue scope)
m.Group("/repos", func() {
m.Get("/issues/search", repo.SearchIssues)
-
- m.Group("/{username}/{reponame}", func() {
+ fn := func() {
m.Group("/issues", func() {
m.Combo("").Get(repo.ListIssues).
Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueOption{}), reqRepoReader(unit.TypeIssues), repo.CreateIssue)
@@ -1575,7 +1675,9 @@ func Routes() *web.Router {
Patch(reqToken(), reqRepoWriter(unit.TypeIssues, unit.TypePullRequests), bind(api.EditMilestoneOption{}), repo.EditMilestone).
Delete(reqToken(), reqRepoWriter(unit.TypeIssues, unit.TypePullRequests), repo.DeleteMilestone)
})
- }, repoAssignment(), checkTokenPublicOnly())
+ }
+ m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly())
+ m.Group("/{username}/group/{group_id}/{reponame}", fn, context.GroupAssignmentAPI(), repoAssignment(), checkTokenPublicOnly())
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryIssue))
// NOTE: these are Gitea package management API - see packages.CommonRoutes and packages.DockerContainerRoutes for endpoints that implement package manager APIs
@@ -1666,6 +1768,10 @@ func Routes() *web.Router {
m.Delete("", org.UnblockUser)
})
}, reqToken(), reqOrgOwnership())
+ m.Group("/groups", func() {
+ m.Get("", org.GetOrgGroups)
+ m.Post("/new", reqToken(), reqOrgAdmin(), bind(api.NewGroupOption{}), group.NewGroup)
+ })
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization), orgAssignment(true), checkTokenPublicOnly())
m.Group("/teams/{teamid}", func() {
m.Combo("").Get(reqToken(), org.GetTeam).
@@ -1680,6 +1786,10 @@ func Routes() *web.Router {
})
m.Group("/repos", func() {
m.Get("", reqToken(), org.GetTeamRepos)
+ m.Combo("/{org}/group/{group_id}/{reponame}").
+ Put(reqToken(), org.AddTeamRepository).
+ Delete(reqToken(), org.RemoveTeamRepository).
+ Get(reqToken(), org.GetTeamRepo)
m.Combo("/{org}/{reponame}").
Put(reqToken(), org.AddTeamRepository).
Delete(reqToken(), org.RemoveTeamRepository).
@@ -1719,8 +1829,12 @@ func Routes() *web.Router {
})
m.Group("/unadopted", func() {
m.Get("", admin.ListUnadoptedRepositories)
- m.Post("/{username}/{reponame}", admin.AdoptRepository)
- m.Delete("/{username}/{reponame}", admin.DeleteUnadoptedRepository)
+ m.Group("/{username}", func() {
+ m.Post("/{reponame}", admin.AdoptRepository)
+ m.Delete("/{reponame}", admin.DeleteUnadoptedRepository)
+ m.Post("/group/{group_id}/{reponame}", admin.AdoptGroupRepository)
+ m.Delete("/group/{group_id}/{reponame}", admin.DeleteUnadoptedRepositoryInGroup)
+ })
})
m.Group("/hooks", func() {
m.Combo("").Get(admin.ListHooks).
@@ -1746,6 +1860,25 @@ func Routes() *web.Router {
m.Get("/search", repo.TopicSearch)
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository))
}, sudo())
-
+ m.Group("/groups", func() {
+ m.Group("/{group_id}", func() {
+ m.Combo("").
+ Get(reqGroupMembership(perm.AccessModeRead, false), group.GetGroup).
+ Patch(reqToken(), reqGroupMembership(perm.AccessModeWrite, false), bind(api.EditGroupOption{}), group.EditGroup).
+ Delete(reqToken(), reqGroupMembership(perm.AccessModeAdmin, false), group.DeleteGroup)
+ m.Post("/move", reqToken(), reqGroupMembership(perm.AccessModeWrite, false), bind(api.MoveGroupOption{}), group.MoveGroup)
+ m.Post("/new", reqToken(), reqGroupMembership(perm.AccessModeWrite, true), bind(api.NewGroupOption{}), group.NewSubGroup)
+ m.Get("/subgroups", reqGroupMembership(perm.AccessModeRead, false), group.GetGroupSubGroups)
+ m.Get("/repos", tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository), reqGroupMembership(perm.AccessModeRead, false), group.GetGroupRepos)
+ m.Group("/teams", func() {
+ m.Get("", group.ListTeams)
+ m.Combo("/{team}").
+ Get(group.IsTeam).
+ Put(reqGroupMembership(perm.AccessModeAdmin, false), bind(api.CreateOrUpdateRepoGroupTeamOption{}), group.AddTeam).
+ Patch(reqGroupMembership(perm.AccessModeAdmin, false), bind(api.CreateOrUpdateRepoGroupTeamOption{}), group.EditTeam).
+ Delete(reqGroupMembership(perm.AccessModeAdmin, false), group.DeleteTeam)
+ }, reqToken(), reqGroupMembership(perm.AccessModeRead, false))
+ }, context.GroupAssignmentAPI(), checkTokenPublicOnly())
+ })
return m
}
diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go
new file mode 100644
index 0000000000..7515f0c8b0
--- /dev/null
+++ b/routers/api/v1/group/group.go
@@ -0,0 +1,392 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "errors"
+ "net/http"
+ "strings"
+
+ group_model "code.gitea.io/gitea/models/group"
+ org_model "code.gitea.io/gitea/models/organization"
+ access_model "code.gitea.io/gitea/models/perm/access"
+ shared_group_model "code.gitea.io/gitea/models/shared/group"
+ "code.gitea.io/gitea/modules/optional"
+ api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/modules/web"
+ "code.gitea.io/gitea/services/context"
+ "code.gitea.io/gitea/services/convert"
+ group_service "code.gitea.io/gitea/services/group"
+)
+
+func createCommonGroup(ctx *context.APIContext, parentGroupID, ownerID int64) *api.Group {
+ if ownerID < 1 {
+ if parentGroupID < 1 {
+ ctx.APIError(http.StatusUnprocessableEntity,
+ errors.New("cannot determine new group's owner"))
+ return nil
+ }
+ npg, err := group_model.GetGroupByID(ctx, parentGroupID)
+ if err != nil {
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ }
+ return nil
+ }
+ ownerID = npg.OwnerID
+ }
+ form := web.GetForm(ctx).(*api.NewGroupOption)
+ group := &group_model.Group{
+ Name: form.Name,
+ Description: form.Description,
+ OwnerID: ownerID,
+ LowerName: strings.ToLower(form.Name),
+ Visibility: form.Visibility,
+ ParentGroupID: parentGroupID,
+ }
+ if err := group_service.NewGroup(ctx, group); err != nil {
+ if group_model.IsErrGroupTooDeep(err) {
+ ctx.APIError(http.StatusUnprocessableEntity, err)
+ } else if org_model.IsErrOrgNotExist(err) {
+ ctx.APIErrorNotFound()
+ }
+ return nil
+ }
+ val, err := convert.ToAPIGroup(ctx, group, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return nil
+ }
+ return val
+}
+
+// NewGroup create a new root-level group in an organization
+func NewGroup(ctx *context.APIContext) {
+ // swagger:operation POST /orgs/{org}/groups/new repository-group groupNew
+ // ---
+ // summary: create a root-level repository group for an organization
+ // consumes:
+ // - application/json
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: org
+ // in: path
+ // description: name of the organization
+ // type: string
+ // required: true
+ // - name: body
+ // in: body
+ // required: true
+ // schema:
+ // "$ref": "#/definitions/NewGroupOption"
+ // responses:
+ // "201":
+ // "$ref": "#/responses/Group"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ ag := createCommonGroup(ctx, 0, ctx.Org.Organization.ID)
+ ctx.JSON(http.StatusCreated, ag)
+}
+
+// NewSubGroup create a new subgroup inside a group
+func NewSubGroup(ctx *context.APIContext) {
+ // swagger:operation POST /groups/{group_id}/new repository-group groupNewSubGroup
+ // ---
+ // summary: create a subgroup inside a group
+ // consumes:
+ // - application/json
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group to create a subgroup in
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: body
+ // in: body
+ // required: true
+ // schema:
+ // "$ref": "#/definitions/NewGroupOption"
+ // responses:
+ // "201":
+ // "$ref": "#/responses/Group"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ var (
+ group *api.Group
+ )
+ gid := ctx.PathParamInt64("group_id")
+ group = createCommonGroup(ctx, gid, 0)
+ ctx.JSON(http.StatusCreated, group)
+}
+
+// MoveGroup - move a group to a different group in the same organization, or to the root level if
+func MoveGroup(ctx *context.APIContext) {
+ // swagger:operation POST /groups/{group_id}/move repository-group groupMove
+ // ---
+ // summary: move a group to a different parent group
+ // consumes:
+ // - application/json
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group to move
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: body
+ // in: body
+ // required: true
+ // schema:
+ // "$ref": "#/definitions/MoveGroupOption"
+ // responses:
+ // "200":
+ // "$ref": "#/responses/Group"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ form := web.GetForm(ctx).(*api.MoveGroupOption)
+ id := ctx.PathParamInt64("group_id")
+ var err error
+ npos := -1
+ if form.NewPos != nil {
+ npos = *form.NewPos
+ }
+ err = group_service.MoveGroupItem(ctx, group_service.MoveGroupOptions{
+ NewParent: form.NewParent,
+ ItemID: id,
+ IsGroup: true,
+ NewPos: npos,
+ }, ctx.Doer)
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ return
+ }
+ if group_model.IsErrUserDoesNotHaveAccessToGroup(err) {
+ ctx.APIError(http.StatusForbidden, err)
+ return
+ }
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ var (
+ ng *group_model.Group
+ apiGroup *api.Group
+ )
+ ng, err = group_model.GetGroupByID(ctx, id)
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ return
+ }
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ apiGroup, err = convert.ToAPIGroup(ctx, ng, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ }
+ ctx.JSON(http.StatusOK, apiGroup)
+}
+
+// EditGroup - update a group in an organization
+func EditGroup(ctx *context.APIContext) {
+ // swagger:operation PATCH /groups/{group_id} repository-group groupEdit
+ // ---
+ // summary: edits a group in an organization. only fields that are set will be changed.
+ // consumes:
+ // - application/json
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group to edit
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: body
+ // in: body
+ // required: true
+ // schema:
+ // "$ref": "#/definitions/EditGroupOption"
+ // responses:
+ // "200":
+ // "$ref": "#/responses/Group"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ var (
+ err error
+ group *group_model.Group
+ )
+ form := web.GetForm(ctx).(*api.EditGroupOption)
+ group = ctx.RepoGroup.Group
+
+ serviceOpts := &group_service.UpdateOptions{}
+ serviceOpts.Visibility = optional.FromPtr(form.Visibility)
+ serviceOpts.Description = optional.FromPtr(form.Description)
+ serviceOpts.Name = optional.FromPtr(form.Name)
+
+ err = group_service.UpdateGroup(ctx, group, serviceOpts)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ var newAPIGroup *api.Group
+ newAPIGroup, err = convert.ToAPIGroup(ctx, group, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ ctx.JSON(http.StatusOK, newAPIGroup)
+}
+
+func GetGroup(ctx *context.APIContext) {
+ // swagger:operation GET /groups/{group_id} repository-group groupGet
+ // ---
+ // summary: gets a group in an organization
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group to retrieve
+ // type: integer
+ // format: int64
+ // required: true
+ // responses:
+ // "200":
+ // "$ref": "#/responses/Group"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ apiGroup, err := convert.ToAPIGroup(ctx, ctx.RepoGroup.Group, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ ctx.JSON(http.StatusOK, apiGroup)
+}
+
+func DeleteGroup(ctx *context.APIContext) {
+ // swagger:operation DELETE /groups/{group_id} repository-group groupDelete
+ // ---
+ // summary: Delete a repository group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group to delete
+ // type: string
+ // required: true
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "403":
+ // "$ref": "#/responses/forbidden"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ err := group_service.DeleteGroup(ctx, ctx.PathParamInt64("group_id"))
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ ctx.Status(http.StatusNoContent)
+}
+
+func GetGroupRepos(ctx *context.APIContext) {
+ // swagger:operation GET /groups/{group_id}/repos repository-group groupGetRepos
+ // ---
+ // summary: gets the repos contained within a group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group containing the repositories
+ // type: integer
+ // format: int64
+ // required: true
+ // responses:
+ // "200":
+ // "$ref": "#/responses/RepositoryList"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ gid := ctx.PathParamInt64("group_id")
+ _, err := group_model.GetGroupByID(ctx, gid)
+ if err != nil {
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ } else {
+ ctx.APIErrorInternal(err)
+ }
+ return
+ }
+
+ groupRepos, err := shared_group_model.GetGroupRepos(ctx, gid, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ repos := make([]*api.Repository, len(groupRepos))
+ for i, repo := range groupRepos {
+ permission, err := access_model.GetIndividualUserRepoPermission(ctx, repo, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ repos[i] = convert.ToRepo(ctx, repo, permission)
+ }
+ ctx.SetTotalCountHeader(int64(len(repos)))
+ ctx.JSON(http.StatusOK, repos)
+}
+
+func GetGroupSubGroups(ctx *context.APIContext) {
+ // swagger:operation GET /groups/{group_id}/subgroups repository-group groupGetSubGroups
+ // ---
+ // summary: gets the subgroups contained within a group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the parent group
+ // type: integer
+ // format: int64
+ // required: true
+ // responses:
+ // "200":
+ // "$ref": "#/responses/GroupList"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ g := ctx.RepoGroup.Group
+ err := g.LoadAccessibleSubgroups(ctx, false, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ groups := make([]*api.Group, len(g.Subgroups))
+ for i, group := range g.Subgroups {
+ groups[i], err = convert.ToAPIGroup(ctx, group, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ }
+ ctx.SetTotalCountHeader(int64(len(groups)))
+ ctx.JSON(http.StatusOK, groups)
+}
diff --git a/routers/api/v1/group/team.go b/routers/api/v1/group/team.go
new file mode 100644
index 0000000000..5251a47232
--- /dev/null
+++ b/routers/api/v1/group/team.go
@@ -0,0 +1,302 @@
+// Copyright 2026 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "fmt"
+ "net/http"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ org_model "code.gitea.io/gitea/models/organization"
+ perm_model "code.gitea.io/gitea/models/perm"
+ org_group_model "code.gitea.io/gitea/models/shared/group"
+ api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/modules/web"
+ "code.gitea.io/gitea/services/context"
+ "code.gitea.io/gitea/services/convert"
+ group_service "code.gitea.io/gitea/services/group"
+)
+
+// ListTeams list a repository group's teams
+func ListTeams(ctx *context.APIContext) {
+ // swagger:operation GET /groups/{group_id}/teams repository-group repoGroupListTeams
+ // ---
+ // summary: List a repository group's teams
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group
+ // type: integer
+ // format: int64
+ // required: true
+ // responses:
+ // "200":
+ // "$ref": "#/responses/TeamList"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ var (
+ err error
+ group *group_model.Group
+ )
+ group, err = group_model.GetGroupByID(ctx, ctx.PathParamInt64("group_id"))
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ return
+ }
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+
+ teams, err := org_group_model.GetGroupTeams(ctx, group.ID)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ apiTeams, err := convert.ToTeams(ctx, teams, false)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ ctx.JSON(http.StatusOK, apiTeams)
+}
+
+// AddTeam add a team to a repository group
+func AddTeam(ctx *context.APIContext) {
+ // swagger:operation PUT /groups/{group_id}/teams/{team} repository-group repoGroupAddTeam
+ // ---
+ // summary: Add a team to a repository group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: team
+ // in: path
+ // description: team name
+ // type: string
+ // required: true
+ // - name: body
+ // in: body
+ // schema:
+ // "$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ // "404":
+ // "$ref": "#/responses/notFound"
+
+ form := web.GetForm(ctx).(*api.CreateOrUpdateRepoGroupTeamOption)
+
+ changeGroupTeam(ctx, form, true)
+}
+
+// EditTeam update a team assigned to a repository group
+func EditTeam(ctx *context.APIContext) {
+ // swagger:operation PATCH /groups/{group_id}/teams/{team} repository-group repoGroupEditTeam
+ // ---
+ // summary: Update a team assigned to a repository group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: team
+ // in: path
+ // description: team name
+ // type: string
+ // required: true
+ // - name: body
+ // in: body
+ // schema:
+ // "$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ form := web.GetForm(ctx).(*api.CreateOrUpdateRepoGroupTeamOption)
+
+ group := ctx.RepoGroup.Group
+
+ team := getTeamFromGroup(ctx, group)
+ gt, err := group_model.FindGroupTeamByTeamID(ctx, group.ID, team.ID)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ if gt == nil {
+ ctx.APIErrorNotFound()
+ return
+ }
+ if form.CanCreateIn != nil {
+ gt.CanCreateIn = *form.CanCreateIn
+ }
+ if form.Permission != nil {
+ gt.AccessMode = perm_model.ParseAccessMode(string(*form.Permission))
+ }
+ err = group_service.UpdateGroupTeam(ctx, gt, form.UnitsMap)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+
+ ctx.Status(http.StatusNoContent)
+}
+
+// DeleteTeam delete a team from a repository group
+func DeleteTeam(ctx *context.APIContext) {
+ // swagger:operation DELETE /groups/{group_id}/teams/{team} repository-group repoGroupDeleteTeam
+ // ---
+ // summary: Add a team to a repository group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: team
+ // in: path
+ // description: team name
+ // type: string
+ // required: true
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ // "404":
+ // "$ref": "#/responses/notFound"
+
+ changeGroupTeam(ctx, nil, false)
+}
+
+// IsTeam check if a team is assigned to a repository
+func IsTeam(ctx *context.APIContext) {
+ // swagger:operation GET /groups/{group_id}/teams/{team} repository-group repoGroupCheckTeam
+ // ---
+ // summary: Check if a team is assigned to a repository group
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: group_id
+ // in: path
+ // description: id of the group
+ // type: integer
+ // format: int64
+ // required: true
+ // - name: team
+ // in: path
+ // description: team name
+ // type: string
+ // required: true
+ // responses:
+ // "200":
+ // "$ref": "#/responses/Team"
+ // "404":
+ // "$ref": "#/responses/notFound"
+
+ group := ctx.RepoGroup.Group
+ team := getTeamFromGroup(ctx, group)
+ if team == nil {
+ return
+ }
+
+ if group_model.HasTeamGroup(ctx, group.OwnerID, team.ID, group.ID) {
+ apiTeam, err := convert.ToTeam(ctx, team)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ ctx.JSON(http.StatusOK, apiTeam)
+ return
+ }
+
+ ctx.APIErrorNotFound()
+}
+
+func getTeamFromGroup(ctx *context.APIContext, group *group_model.Group) *org_model.Team {
+ teamName := ctx.PathParam("team")
+
+ team, err := org_model.GetTeam(ctx, group.OwnerID, teamName)
+ if err != nil {
+ if org_model.IsErrTeamNotExist(err) {
+ ctx.APIErrorNotFound()
+ return nil
+ }
+ ctx.APIErrorInternal(err)
+ return nil
+ }
+ return team
+}
+
+func changeGroupTeam(ctx *context.APIContext, options *api.CreateOrUpdateRepoGroupTeamOption, add bool) {
+ gid := ctx.PathParamInt64("group_id")
+ group, err := group_model.GetGroupByID(ctx, gid)
+ if err != nil {
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ return
+ }
+ ctx.APIErrorInternal(err)
+ return
+ }
+ err = group.LoadOwner(ctx)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+
+ team := getTeamFromGroup(ctx, group)
+ if team == nil {
+ return
+ }
+
+ groupHasTeam := group_model.HasTeamGroup(ctx, group.OwnerID, team.ID, gid)
+
+ if add {
+ if groupHasTeam {
+ ctx.APIError(http.StatusUnprocessableEntity, fmt.Errorf("team '%s' is already added to group", team.Name))
+ return
+ }
+ var accessModeArg *perm_model.AccessMode
+ if options.Permission != nil {
+ accessModeArg = new(perm_model.ParseAccessMode(string(*options.Permission)))
+ }
+ err = group_service.AddTeamToGroup(ctx, group, team.Name, options.UnitsMap, options.CanCreateIn, accessModeArg)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ } else {
+ err = group_service.DeleteTeamFromGroup(ctx, group, group.OwnerID, team.Name)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ if _, err = db.GetEngine(ctx).Where("group_id = ?", gid).Delete(new(group_model.RepoGroupUnit)); err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ }
+ ctx.Status(http.StatusNoContent)
+}
diff --git a/routers/api/v1/org/group.go b/routers/api/v1/org/group.go
new file mode 100644
index 0000000000..6f11ca8733
--- /dev/null
+++ b/routers/api/v1/org/group.go
@@ -0,0 +1,81 @@
+// Copyright 2026 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package org
+
+import (
+ "net/http"
+
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/models/organization"
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+ api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/services/context"
+ "code.gitea.io/gitea/services/convert"
+)
+
+func GetOrgGroups(ctx *context.APIContext) {
+ // swagger:operation GET /orgs/{org}/groups organization orgListGroups
+ // ---
+ // summary: List an organization's root-level groups
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: org
+ // in: path
+ // description: name of the organization
+ // type: string
+ // required: true
+ // - name: page
+ // in: query
+ // description: page number of results to return (1-based)
+ // type: integer
+ // - name: limit
+ // in: query
+ // description: page size of results
+ // type: integer
+ // responses:
+ // "200":
+ // "$ref": "#/responses/GroupList"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ var doerID int64
+ if ctx.Doer != nil {
+ doerID = ctx.Doer.ID
+ }
+ org, err := organization.GetOrgByName(ctx, ctx.PathParam("org"))
+ if err != nil {
+ if organization.IsErrOrgNotExist(err) {
+ ctx.APIError(http.StatusUnprocessableEntity, err)
+ } else {
+ ctx.APIErrorInternal(err)
+ }
+ return
+ }
+
+ if !organization.HasOrgOrUserVisible(ctx, org.AsUser(), ctx.Doer) {
+ ctx.APIErrorNotFound("HasOrgOrUserVisible", nil)
+ return
+ }
+ groups, err := group_model.FindGroupsByCond(ctx, &group_model.FindGroupsOptions{
+ ParentGroupID: 0,
+ ActorID: doerID,
+ OwnerID: org.ID,
+ }, group_model.
+ AccessibleGroupCondition(ctx.Doer, org.ID, unit.TypeInvalid, perm.AccessModeRead))
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ apiGroups := make([]*api.Group, len(groups))
+ for i, group := range groups {
+ apiGroups[i], err = convert.ToAPIGroup(ctx, group, ctx.Doer)
+ if err != nil {
+ ctx.APIErrorInternal(err)
+ return
+ }
+ }
+ ctx.SetTotalCountHeader(int64(len(groups)))
+ ctx.JSON(http.StatusOK, apiGroups)
+}
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index 74ad987540..06002673d5 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -639,7 +639,7 @@ func GetTeamRepo(ctx *context.APIContext) {
// getRepositoryByParams get repository by a team's organization ID and repo name
func getRepositoryByParams(ctx *context.APIContext) *repo_model.Repository {
- repo, err := repo_model.GetRepositoryByName(ctx, ctx.Org.Team.OrgID, ctx.PathParam("reponame"))
+ repo, err := repo_model.GetRepositoryByName(ctx, ctx.Org.Team.OrgID, ctx.PathParamInt64("group_id"), ctx.PathParam("reponame"))
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.APIErrorNotFound()
diff --git a/routers/api/v1/packages/package.go b/routers/api/v1/packages/package.go
index c7c66f549c..c3debeb06f 100644
--- a/routers/api/v1/packages/package.go
+++ b/routers/api/v1/packages/package.go
@@ -390,7 +390,7 @@ func LinkPackage(ctx *context.APIContext) {
return
}
- repo, err := repo_model.GetRepositoryByName(ctx, ctx.ContextUser.ID, ctx.PathParam("repo_name"))
+ repo, err := repo_model.GetRepositoryByName(ctx, ctx.ContextUser.ID, ctx.PathParamInt64("group_id"), ctx.PathParam("repo_name"))
if err != nil {
if errors.Is(err, util.ErrNotExist) {
ctx.APIError(http.StatusNotFound, err)
diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go
index d23fc849ac..342cdec610 100644
--- a/routers/api/v1/repo/action.go
+++ b/routers/api/v1/repo/action.go
@@ -1946,7 +1946,11 @@ func buildSignature(endp string, expires, artifactID int64) []byte {
}
func buildDownloadRawEndpoint(repo *repo_model.Repository, artifactID int64) string {
- return fmt.Sprintf("api/v1/repos/%s/%s/actions/artifacts/%d/zip/raw", url.PathEscape(repo.OwnerName), url.PathEscape(repo.Name), artifactID)
+ var groupSegment string
+ if repo.GroupID > 0 {
+ groupSegment = fmt.Sprintf("%d/", repo.GroupID)
+ }
+ return fmt.Sprintf("api/v1/repos/%s/%s%s/actions/artifacts/%d/zip/raw", url.PathEscape(repo.OwnerName), groupSegment, url.PathEscape(repo.Name), artifactID)
}
func buildSigURL(ctx go_context.Context, endPoint string, artifactID int64) string {
@@ -2018,7 +2022,7 @@ func DownloadArtifact(ctx *context.APIContext) {
// DownloadArtifactRaw Downloads a specific artifact for a workflow run directly.
func DownloadArtifactRaw(ctx *context.APIContext) {
// it doesn't use repoAssignment middleware, so it needs to prepare the repo and check permission (sig) by itself
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, ctx.PathParam("username"), ctx.PathParam("reponame"))
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, ctx.PathParam("username"), ctx.PathParam("reponame"), ctx.PathParamInt64("group_id"))
if err != nil {
if errors.Is(err, util.ErrNotExist) {
ctx.APIErrorNotFound()
diff --git a/routers/api/v1/repo/issue_dependency.go b/routers/api/v1/repo/issue_dependency.go
index 28cdbb3091..5b583913c8 100644
--- a/routers/api/v1/repo/issue_dependency.go
+++ b/routers/api/v1/repo/issue_dependency.go
@@ -506,7 +506,7 @@ func getFormIssue(ctx *context.APIContext, form *api.IssueMeta) *issues_model.Is
return nil
}
var err error
- repo, err = repo_model.GetRepositoryByOwnerAndName(ctx, form.Owner, form.Name)
+ repo, err = repo_model.GetRepositoryByOwnerAndName(ctx, form.Owner, form.Name, form.GroupID)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.APIErrorNotFound("IsErrRepoNotExist", err)
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index 2702f6864f..6af6a11ee5 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -256,15 +256,22 @@ func GetPullRequestByBaseHead(ctx *context.APIContext) {
split := strings.SplitN(head, ":", 2)
headBranch = split[1]
var owner, name string
+ var gid int64
if strings.Contains(split[0], "/") {
split = strings.Split(split[0], "/")
- owner = split[0]
- name = split[1]
+ if len(split) == 3 {
+ owner = split[0]
+ gid, _ = strconv.ParseInt(split[1], 10, 64)
+ name = split[2]
+ } else {
+ owner, name = split[0], split[1]
+ }
} else {
owner = split[0]
+ gid = ctx.Repo.Repository.GroupID
name = ctx.Repo.Repository.Name
}
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner, name)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner, name, gid)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.APIErrorNotFound()
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 8b0dc7c863..71729c0776 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -15,6 +15,7 @@ import (
activities_model "code.gitea.io/gitea/models/activities"
"code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/perm"
access_model "code.gitea.io/gitea/models/perm/access"
@@ -37,6 +38,7 @@ import (
"code.gitea.io/gitea/services/context"
"code.gitea.io/gitea/services/convert"
feed_service "code.gitea.io/gitea/services/feed"
+ group_service "code.gitea.io/gitea/services/group"
"code.gitea.io/gitea/services/issue"
"code.gitea.io/gitea/services/migrations"
mirror_service "code.gitea.io/gitea/services/mirror"
@@ -266,6 +268,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *user_model.User, opt api.Cre
TrustModel: repo_model.ToTrustModel(opt.TrustModel),
IsTemplate: opt.Template,
ObjectFormatName: string(opt.ObjectFormatName),
+ GroupID: opt.GroupID,
})
if err != nil {
if repo_model.IsErrRepoAlreadyExist(err) {
@@ -1322,3 +1325,60 @@ func ListRepoActivityFeeds(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, convert.ToActivities(ctx, feeds, ctx.Doer))
}
+
+func MoveRepoToGroup(ctx *context.APIContext) {
+ // swagger:operation POST /repo/{owner}/{repo}/move
+ // ---
+ // summary: move a repository to another group
+ // consumes:
+ // - application/json
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: owner
+ // in: path
+ // description: owner of the repo
+ // type: string
+ // required: true
+ // - name: repo
+ // in: path
+ // description: name of the repo
+ // type: string
+ // required: true // - name: body
+ // in: body
+ // schema:
+ // "$ref": "#/definitions/MoveGroupOption"
+ // responses:
+ // "204":
+ // "$ref": "#/responses/empty"
+ // "400":
+ // "$ref": "#/responses/error"
+ // "404":
+ // "$ref": "#/responses/notFound"
+ // "422":
+ // "$ref": "#/responses/validationError"
+ form := web.GetForm(ctx).(*api.MoveGroupOption)
+ npos := -1
+ if form.NewPos != nil {
+ npos = *form.NewPos
+ }
+ err := group_service.MoveGroupItem(ctx, group_service.MoveGroupOptions{
+ IsGroup: false,
+ NewPos: npos,
+ ItemID: ctx.Repo.Repository.ID,
+ NewParent: form.NewParent,
+ }, ctx.Doer)
+ if err != nil {
+ if group_model.IsErrUserDoesNotHaveAccessToGroup(err) {
+ ctx.APIError(http.StatusForbidden, err)
+ return
+ }
+ if group_model.IsErrGroupNotExist(err) {
+ ctx.APIErrorNotFound()
+ return
+ }
+ ctx.APIErrorInternal(err)
+ return
+ }
+ ctx.Status(http.StatusNoContent)
+}
diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go
index 1a442d1146..06a7027f12 100644
--- a/routers/api/v1/swagger/options.go
+++ b/routers/api/v1/swagger/options.go
@@ -233,4 +233,16 @@ type swaggerParameterBodies struct {
// in:body
LockIssueOption api.LockIssueOption
+
+ // in:body
+ NewGroupOption api.NewGroupOption
+
+ // in:body
+ EditGroupOption api.EditGroupOption
+
+ // in:body
+ MoveGroupOption api.MoveGroupOption
+
+ // in:body
+ CreateOrUpdateGroupTeamOption api.CreateOrUpdateRepoGroupTeamOption
}
diff --git a/routers/api/v1/swagger/repo_group.go b/routers/api/v1/swagger/repo_group.go
new file mode 100644
index 0000000000..65d0fb452b
--- /dev/null
+++ b/routers/api/v1/swagger/repo_group.go
@@ -0,0 +1,20 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package swagger
+
+import api "code.gitea.io/gitea/modules/structs"
+
+// Group
+// swagger:response Group
+type swaggerResponseGroup struct {
+ // in:body
+ Body api.Group `json:"body"`
+}
+
+// GroupList
+// swagger:response GroupList
+type swaggerResponseGroupList struct {
+ // in:body
+ Body []api.Group `json:"body"`
+}
diff --git a/routers/common/compare.go b/routers/common/compare.go
index 8b1e1715d2..326054fde6 100644
--- a/routers/common/compare.go
+++ b/routers/common/compare.go
@@ -5,6 +5,7 @@ package common
import (
"context"
+ "strconv"
"strings"
repo_model "code.gitea.io/gitea/models/repo"
@@ -20,6 +21,7 @@ type CompareRouterReq struct {
CompareSeparator string
HeadOwner string
+ HeadGroupID int64
HeadRepoName string
HeadOriRef string
}
@@ -30,16 +32,25 @@ func (cr *CompareRouterReq) DirectComparison() bool {
return cr.CompareSeparator == ".."
}
-func parseHead(head string) (headOwnerName, headRepoName, headRef string) {
+func parseHead(head string) (headOwnerName, headRepoName string, headGroupID int64, headRef string) {
paths := strings.SplitN(head, ":", 2)
if len(paths) == 1 {
- return "", "", paths[0]
+ /*var gid int64
+ _, rawGid, _ := strings.Cut(paths[0], "group/")
+ gid, _ = strconv.ParseInt(rawGid, 10, 64)*/
+
+ return "", "", 0, paths[0]
}
ownerRepo := strings.SplitN(paths[0], "/", 2)
if len(ownerRepo) == 1 {
- return paths[0], "", paths[1]
+ // -1 means use base repo's group ID
+ return paths[0], "", -1, paths[1]
}
- return ownerRepo[0], ownerRepo[1], paths[1]
+ var gid int64
+ _, rawGid, _ := strings.Cut(paths[0], "group/")
+ gid, _ = strconv.ParseInt(rawGid, 10, 64)
+
+ return ownerRepo[0], ownerRepo[1], gid, paths[1]
}
// ParseCompareRouterParam Get compare information from the router parameter.
@@ -79,9 +90,10 @@ func ParseCompareRouterParam(routerParam string) *CompareRouterReq {
sep = ".."
basePart, headPart, ok = strings.Cut(routerParam, sep)
if !ok {
- headOwnerName, headRepoName, headRef := parseHead(routerParam)
+ headOwnerName, headRepoName, headGid, headRef := parseHead(routerParam)
return &CompareRouterReq{
HeadOriRef: headRef,
+ HeadGroupID: headGid,
HeadOwner: headOwnerName,
HeadRepoName: headRepoName,
CompareSeparator: "...",
@@ -91,7 +103,7 @@ func ParseCompareRouterParam(routerParam string) *CompareRouterReq {
ci := &CompareRouterReq{CompareSeparator: sep}
ci.BaseOriRef, ci.BaseOriRefSuffix = git.ParseRefSuffix(basePart)
- ci.HeadOwner, ci.HeadRepoName, ci.HeadOriRef = parseHead(headPart)
+ ci.HeadOwner, ci.HeadRepoName, ci.HeadGroupID, ci.HeadOriRef = parseHead(headPart)
return ci
}
@@ -150,7 +162,8 @@ func GetHeadOwnerAndRepo(ctx context.Context, baseRepo *repo_model.Repository, c
if compareReq.HeadOwner == baseRepo.Owner.Name && compareReq.HeadRepoName == baseRepo.Name {
headRepo = baseRepo
} else {
- headRepo, err = repo_model.GetRepositoryByName(ctx, headOwner.ID, compareReq.HeadRepoName)
+ gid := util.Iif(compareReq.HeadGroupID == -1, baseRepo.GroupID, compareReq.HeadGroupID)
+ headRepo, err = repo_model.GetRepositoryByName(ctx, headOwner.ID, gid, compareReq.HeadRepoName)
if err != nil {
return nil, nil, err
}
diff --git a/routers/common/compare_test.go b/routers/common/compare_test.go
index e4e24a03cf..7abd725e0f 100644
--- a/routers/common/compare_test.go
+++ b/routers/common/compare_test.go
@@ -65,6 +65,7 @@ func TestCompareRouterReq(t *testing.T) {
CompareSeparator: "...",
HeadOwner: "teabot",
HeadOriRef: "feature1",
+ HeadGroupID: -1,
},
},
{
diff --git a/routers/common/lfs.go b/routers/common/lfs.go
index 1d2b71394b..5a6b8456e7 100644
--- a/routers/common/lfs.go
+++ b/routers/common/lfs.go
@@ -14,7 +14,7 @@ const RouterMockPointCommonLFS = "common-lfs"
func AddOwnerRepoGitLFSRoutes(m *web.Router, middlewares ...any) {
// shared by web and internal routers
- m.Group("/{username}/{reponame}/info/lfs", func() {
+ fn := func() {
m.Post("/objects/batch", lfs.CheckAcceptMediaType, lfs.BatchHandler)
m.Put("/objects/{oid}/{size}", lfs.UploadHandler)
m.Get("/objects/{oid}/{filename}", lfs.DownloadHandler)
@@ -27,5 +27,7 @@ func AddOwnerRepoGitLFSRoutes(m *web.Router, middlewares ...any) {
m.Post("/{lid}/unlock", lfs.UnLockHandler)
}, lfs.CheckAcceptMediaType)
m.Any("/*", http.NotFound)
- }, append([]any{web.RouterMockPoint(RouterMockPointCommonLFS)}, middlewares...)...)
+ }
+ m.Group("/{username}/{reponame}/info/lfs", fn, append([]any{web.RouterMockPoint(RouterMockPointCommonLFS)}, middlewares...)...)
+ m.Group("/{username}/group/{group_id}/{reponame}/info/lfs", fn, append([]any{web.RouterMockPoint(RouterMockPointCommonLFS)}, middlewares...)...)
}
diff --git a/routers/private/actions.go b/routers/private/actions.go
index 696634b5e7..06934128dc 100644
--- a/routers/private/actions.go
+++ b/routers/private/actions.go
@@ -83,7 +83,7 @@ func parseScope(ctx *context.PrivateContext, scope string) (ownerID, repoID int6
return ownerID, repoID, nil
}
- r, err := repo_model.GetRepositoryByName(ctx, u.ID, repoName)
+ r, err := repo_model.GetRepositoryByName(ctx, u.ID, ctx.PathParamInt64("group_id"), repoName)
if err != nil {
return ownerID, repoID, err
}
diff --git a/routers/private/hook_post_receive.go b/routers/private/hook_post_receive.go
index 3d070a18ab..738099bcd0 100644
--- a/routers/private/hook_post_receive.go
+++ b/routers/private/hook_post_receive.go
@@ -41,6 +41,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
ownerName := ctx.PathParam("owner")
repoName := ctx.PathParam("repo")
+ groupID := ctx.PathParamInt64("group_id")
// defer getting the repository at this point - as we should only retrieve it if we're going to call update
var (
@@ -61,7 +62,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
// may be a very large number of them).
if refFullName.IsBranch() || refFullName.IsTag() {
if repo == nil {
- repo = loadRepository(ctx, ownerName, repoName)
+ repo = loadRepository(ctx, ownerName, repoName, groupID)
if ctx.Written() {
// Error handled in loadRepository
return
@@ -75,6 +76,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
NewCommitID: opts.NewCommitIDs[i],
PusherID: opts.UserID,
PusherName: opts.UserName,
+ RepoGroupID: groupID,
RepoUserName: ownerName,
RepoName: repoName,
}
@@ -98,7 +100,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
continue
}
if repo == nil {
- repo = loadRepository(ctx, ownerName, repoName)
+ repo = loadRepository(ctx, ownerName, repoName, groupID)
if ctx.Written() {
return
}
@@ -176,7 +178,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
if isPrivate.Has() || isTemplate.Has() {
// load the repository
if repo == nil {
- repo = loadRepository(ctx, ownerName, repoName)
+ repo = loadRepository(ctx, ownerName, repoName, groupID)
if ctx.Written() {
// Error handled in loadRepository
return
@@ -239,7 +241,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
if !git.IsEmptyCommitID(newCommitID) && refFullName.IsBranch() {
// First ensure we have the repository loaded, we're allowed pulls requests and we can get the base repo
if repo == nil {
- repo = loadRepository(ctx, ownerName, repoName)
+ repo = loadRepository(ctx, ownerName, repoName, groupID)
if ctx.Written() {
return
}
diff --git a/routers/private/internal.go b/routers/private/internal.go
index d4918455f1..0072419c20 100644
--- a/routers/private/internal.go
+++ b/routers/private/internal.go
@@ -64,11 +64,16 @@ func Routes() *web.Router {
r.Post("/ssh/authorized_keys", AuthorizedPublicKeyByContent)
r.Post("/ssh/{id}/update/{repoid}", UpdatePublicKeyInRepo)
r.Post("/ssh/log", bind(private.SSHLogOption{}), SSHLog)
+ r.Post("/hook/pre-receive/{owner}/group/{group_id}/{repo}", RepoAssignment, bind(private.HookOptions{}), HookPreReceive)
r.Post("/hook/pre-receive/{owner}/{repo}", RepoAssignment, bind(private.HookOptions{}), HookPreReceive)
+ r.Post("/hook/post-receive/{owner}/group/{group_id}/{repo}", context.OverrideContext(), bind(private.HookOptions{}), HookPostReceive)
r.Post("/hook/post-receive/{owner}/{repo}", context.OverrideContext(), bind(private.HookOptions{}), HookPostReceive)
+ r.Post("/hook/proc-receive/{owner}/group/{group_id}/{repo}", context.OverrideContext(), RepoAssignment, bind(private.HookOptions{}), HookProcReceive)
r.Post("/hook/proc-receive/{owner}/{repo}", context.OverrideContext(), RepoAssignment, bind(private.HookOptions{}), HookProcReceive)
+ r.Post("/hook/set-default-branch/{owner}/group/{group_id}/{repo}/{branch}", RepoAssignment, SetDefaultBranch)
r.Post("/hook/set-default-branch/{owner}/{repo}/{branch}", RepoAssignment, SetDefaultBranch)
r.Get("/serv/none/{keyid}", ServNoCommand)
+ r.Get("/serv/command/{keyid}/{owner}/group/{group_id}/{repo}", ServCommand)
r.Get("/serv/command/{keyid}/{owner}/{repo}", ServCommand)
r.Post("/manager/shutdown", Shutdown)
r.Post("/manager/restart", Restart)
diff --git a/routers/private/internal_repo.go b/routers/private/internal_repo.go
index e111d6689e..5f7f166944 100644
--- a/routers/private/internal_repo.go
+++ b/routers/private/internal_repo.go
@@ -20,8 +20,9 @@ import (
func RepoAssignment(ctx *gitea_context.PrivateContext) {
ownerName := ctx.PathParam("owner")
repoName := ctx.PathParam("repo")
+ gid := ctx.PathParamInt64("group_id")
- repo := loadRepository(ctx, ownerName, repoName)
+ repo := loadRepository(ctx, ownerName, repoName, gid)
if ctx.Written() {
// Error handled in loadRepository
return
@@ -41,8 +42,8 @@ func RepoAssignment(ctx *gitea_context.PrivateContext) {
}
}
-func loadRepository(ctx *gitea_context.PrivateContext, ownerName, repoName string) *repo_model.Repository {
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, ownerName, repoName)
+func loadRepository(ctx *gitea_context.PrivateContext, ownerName, repoName string, groupID int64) *repo_model.Repository {
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, ownerName, repoName, groupID)
if err != nil {
log.Error("Failed to get repository: %s/%s Error: %v", ownerName, repoName, err)
ctx.JSON(http.StatusInternalServerError, private.Response{
diff --git a/routers/private/serv.go b/routers/private/serv.go
index 7c6eb907fa..4efaeafaf6 100644
--- a/routers/private/serv.go
+++ b/routers/private/serv.go
@@ -152,7 +152,7 @@ func ServCommand(ctx *context.PrivateContext) {
// Now get the Repository and set the results section
repoExist := true
- repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, results.RepoName)
+ repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, ctx.PathParamInt64("group_id"), results.RepoName)
if err != nil {
if !repo_model.IsErrRepoNotExist(err) {
log.Error("Unable to get repository: %s/%s Error: %v", results.OwnerName, results.RepoName, err)
diff --git a/routers/web/admin/repos.go b/routers/web/admin/repos.go
index 424219815c..799ee828d3 100644
--- a/routers/web/admin/repos.go
+++ b/routers/web/admin/repos.go
@@ -6,6 +6,7 @@ package admin
import (
"net/http"
"net/url"
+ "strconv"
"strings"
"code.gitea.io/gitea/models/db"
@@ -127,14 +128,18 @@ func AdoptOrDeleteRepository(ctx *context.Context) {
}
repoName := dirSplit[1]
+ var groupID int64
+ if len(dirSplit) >= 3 {
+ groupID, _ = strconv.ParseInt(dirSplit[2], 10, 64)
+ }
// check not a repo
- has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, repoName)
+ has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, repoName, groupID)
if err != nil {
ctx.ServerError("IsRepositoryExist", err)
return
}
- exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, repoName)))
+ exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, repoName, groupID)))
if err != nil {
ctx.ServerError("IsDir", err)
return
@@ -151,7 +156,7 @@ func AdoptOrDeleteRepository(ctx *context.Context) {
}
ctx.Flash.Success(ctx.Tr("repo.adopt_preexisting_success", dir))
} else if action == "delete" {
- if err := repo_service.DeleteUnadoptedRepository(ctx, ctx.Doer, ctxUser, dirSplit[1]); err != nil {
+ if err := repo_service.DeleteUnadoptedRepository(ctx, ctx.Doer, ctxUser, dirSplit[1], groupID); err != nil {
ctx.ServerError("repository.AdoptRepository", err)
return
}
diff --git a/routers/web/githttp.go b/routers/web/githttp.go
index c738b68c8d..e23aeb3b06 100644
--- a/routers/web/githttp.go
+++ b/routers/web/githttp.go
@@ -9,7 +9,7 @@ import (
)
func addOwnerRepoGitHTTPRouters(m *web.Router, middlewares ...any) {
- m.Group("/{username}/{reponame}", func() {
+ fn := func() {
m.Methods("POST,OPTIONS", "/git-upload-pack", repo.ServiceUploadPack)
m.Methods("POST,OPTIONS", "/git-receive-pack", repo.ServiceReceivePack)
m.Methods("POST,OPTIONS", "/git-upload-archive", repo.ServiceUploadArchive)
@@ -22,5 +22,7 @@ func addOwnerRepoGitHTTPRouters(m *web.Router, middlewares ...any) {
m.Methods("GET,OPTIONS", "/objects/{head:[0-9a-f]{2}}/{hash:[0-9a-f]{38,62}}", repo.GetLooseObject)
m.Methods("GET,OPTIONS", "/objects/pack/pack-{file:[0-9a-f]{40,64}}.pack", repo.GetPackFile)
m.Methods("GET,OPTIONS", "/objects/pack/pack-{file:[0-9a-f]{40,64}}.idx", repo.GetIdxFile)
- }, middlewares...)
+ }
+ m.Group("/{username}/{reponame}", fn, middlewares...)
+ m.Group("/{username}/group/{group_id}/{reponame}", fn, middlewares...)
}
diff --git a/routers/web/goget.go b/routers/web/goget.go
index 67e0bee866..be4fd9dd6f 100644
--- a/routers/web/goget.go
+++ b/routers/web/goget.go
@@ -9,6 +9,7 @@ import (
"net/http"
"net/url"
"path"
+ "strconv"
"strings"
repo_model "code.gitea.io/gitea/models/repo"
@@ -22,14 +23,18 @@ func goGet(ctx *context.Context) {
return
}
- parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 4)
+ parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 6)
if len(parts) < 3 {
return
}
-
+ var group string
ownerName := parts[1]
repoName := parts[2]
+ if len(parts) > 4 {
+ repoName = parts[4]
+ group = parts[3]
+ }
// Quick responses appropriate go-get meta with status 200
// regardless of if user have access to the repository,
@@ -51,12 +56,16 @@ func goGet(ctx *context.Context) {
return
}
branchName := setting.Repository.DefaultBranch
-
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, ownerName, repoName)
+ gid, _ := strconv.ParseInt(group, 10, 64)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, ownerName, repoName, gid)
if err == nil && len(repo.DefaultBranch) > 0 {
branchName = repo.DefaultBranch
}
- prefix := setting.AppURL + path.Join(url.PathEscape(ownerName), url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName))
+ prefix := setting.AppURL + url.PathEscape(ownerName)
+ if group != "" {
+ prefix = prefix + "/" + group
+ }
+ prefix = prefix + "/" + path.Join(url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName))
appURL, _ := url.Parse(setting.AppURL)
@@ -69,9 +78,9 @@ func goGet(ctx *context.Context) {
var cloneURL string
if setting.Repository.GoGetCloneURLProtocol == "ssh" {
- cloneURL = repo_model.ComposeSSHCloneURL(ctx.Doer, ownerName, repoName)
+ cloneURL = repo_model.ComposeSSHCloneURL(ctx.Doer, ownerName, repoName, gid)
} else {
- cloneURL = repo_model.ComposeHTTPSCloneURL(ctx, ownerName, repoName)
+ cloneURL = repo_model.ComposeHTTPSCloneURL(ctx, ownerName, repoName, gid)
}
goImportContent := fmt.Sprintf("%s git %s", goGetImport, cloneURL /*CloneLink*/)
goSourceContent := fmt.Sprintf("%s _ %s %s", goGetImport, prefix+"{/dir}" /*GoDocDirectory*/, prefix+"{/dir}/{file}#L{line}" /*GoDocFile*/)
diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go
index 7312478299..728ef63779 100644
--- a/routers/web/org/teams.go
+++ b/routers/web/org/teams.go
@@ -278,7 +278,7 @@ func TeamsRepoAction(ctx *context.Context) {
case "add":
repoName := path.Base(ctx.FormString("repo_name"))
var repo *repo_model.Repository
- repo, err = repo_model.GetRepositoryByName(ctx, ctx.Org.Organization.ID, repoName)
+ repo, err = repo_model.GetRepositoryByName(ctx, ctx.Org.Organization.ID, ctx.PathParamInt64("group_id"), repoName)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.Flash.Error(ctx.Tr("org.teams.add_nonexistent_repo"))
diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go
index ce0e0b03ab..8bd770e8ec 100644
--- a/routers/web/repo/branch.go
+++ b/routers/web/repo/branch.go
@@ -161,6 +161,7 @@ func RestoreBranchPost(ctx *context.Context) {
PusherName: ctx.Doer.Name,
RepoUserName: ctx.Repo.Owner.Name,
RepoName: ctx.Repo.Repository.Name,
+ RepoGroupID: ctx.Repo.Repository.GroupID,
}); err != nil {
log.Error("RestoreBranch: Update: %v", err)
}
diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go
index 6c973696ff..9e4f186fc8 100644
--- a/routers/web/repo/commit.go
+++ b/routers/web/repo/commit.go
@@ -265,6 +265,7 @@ func Diff(ctx *context.Context) {
userName := ctx.Repo.Owner.Name
repoName := ctx.Repo.Repository.Name
+ repoGroup := ctx.Repo.Repository.GroupID
commitID := ctx.PathParam("sha")
diffBlobExcerptData := &gitdiff.DiffBlobExcerptData{
@@ -348,7 +349,7 @@ func Diff(ctx *context.Context) {
}
parentCommitID = parentCommit.ID.String()
}
- setCompareContext(ctx, parentCommit, commit, userName, repoName)
+ setCompareContext(ctx, parentCommit, commit, userName, repoName, repoGroup)
ctx.Data["Title"] = commit.MessageTitle() + " · " + base.ShortSha(commitID)
ctx.Data["Commit"] = commit
ctx.Data["Diff"] = diff
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go
index 46867e80bb..e121f8e413 100644
--- a/routers/web/repo/compare.go
+++ b/routers/web/repo/compare.go
@@ -7,6 +7,7 @@ import (
gocontext "context"
"encoding/csv"
"errors"
+ "fmt"
"io"
"net/http"
"net/url"
@@ -52,7 +53,7 @@ const (
)
// setCompareContext sets context data.
-func setCompareContext(ctx *context.Context, before, head *git.Commit, headOwner, headName string) {
+func setCompareContext(ctx *context.Context, before, head *git.Commit, headOwner, headName string, headGID int64) {
ctx.Data["BeforeCommit"] = before
ctx.Data["HeadCommit"] = head
@@ -83,28 +84,36 @@ func setCompareContext(ctx *context.Context, before, head *git.Commit, headOwner
return st
}
- setPathsCompareContext(ctx, before, head, headOwner, headName)
+ setPathsCompareContext(ctx, before, head, headOwner, headName, headGID)
setImageCompareContext(ctx)
setCsvCompareContext(ctx)
}
// SourceCommitURL creates a relative URL for a commit in the given repository
-func SourceCommitURL(owner, name string, commit *git.Commit) string {
- return setting.AppSubURL + "/" + url.PathEscape(owner) + "/" + url.PathEscape(name) + "/src/commit/" + url.PathEscape(commit.ID.String())
+func SourceCommitURL(owner, name string, gid int64, commit *git.Commit) string {
+ var groupSegment string
+ if gid > 0 {
+ groupSegment = fmt.Sprintf("group/%d/", gid)
+ }
+ return setting.AppSubURL + "/" + url.PathEscape(owner) + "/" + groupSegment + url.PathEscape(name) + "/src/commit/" + url.PathEscape(commit.ID.String())
}
// RawCommitURL creates a relative URL for the raw commit in the given repository
-func RawCommitURL(owner, name string, commit *git.Commit) string {
- return setting.AppSubURL + "/" + url.PathEscape(owner) + "/" + url.PathEscape(name) + "/raw/commit/" + url.PathEscape(commit.ID.String())
+func RawCommitURL(owner, name string, gid int64, commit *git.Commit) string {
+ var groupSegment string
+ if gid > 0 {
+ groupSegment = fmt.Sprintf("group/%d/", gid)
+ }
+ return setting.AppSubURL + "/" + url.PathEscape(owner) + "/" + groupSegment + url.PathEscape(name) + "/raw/commit/" + url.PathEscape(commit.ID.String())
}
// setPathsCompareContext sets context data for source and raw paths
-func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOwner, headName string) {
- ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head)
- ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head)
+func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOwner, headName string, headGID int64) {
+ ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, headGID, head)
+ ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, headGID, head)
if base != nil {
- ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, base)
- ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, base)
+ ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, headGID, base)
+ ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, headGID, base)
}
}
@@ -523,7 +532,7 @@ func (cpi *comparePageInfoType) prepareCompareDiff(ctx *context.Context, whitesp
ctx.Data["title"], ctx.Data["content"] = prepareNewPullRequestTitleContent(ci, commits, setting.Repository.PullRequest.DefaultTitleSource)
- setCompareContext(ctx, beforeCommit, headCommit, ci.HeadRepo.OwnerName, repo.Name)
+ setCompareContext(ctx, beforeCommit, headCommit, ci.HeadRepo.OwnerName, repo.Name, repo.GroupID)
}
func getBranchesAndTagsForRepo(ctx gocontext.Context, repo *repo_model.Repository) (branches, tags []string, err error) {
diff --git a/routers/web/repo/editor_fork.go b/routers/web/repo/editor_fork.go
index b78a634c00..19fb42f0f5 100644
--- a/routers/web/repo/editor_fork.go
+++ b/routers/web/repo/editor_fork.go
@@ -20,7 +20,7 @@ func ForkToEdit(ctx *context.Context) {
func ForkToEditPost(ctx *context.Context) {
ForkRepoTo(ctx, ctx.Doer, repo_service.ForkRepoOptions{
BaseRepo: ctx.Repo.Repository,
- Name: getUniqueRepositoryName(ctx, ctx.Doer.ID, ctx.Repo.Repository.Name),
+ Name: getUniqueRepositoryName(ctx, ctx.Doer.ID, 0, ctx.Repo.Repository.Name),
Description: ctx.Repo.Repository.Description,
SingleBranch: ctx.Repo.Repository.DefaultBranch, // maybe we only need the default branch in the fork?
})
diff --git a/routers/web/repo/editor_util.go b/routers/web/repo/editor_util.go
index 7155b6e99d..efdd3c5b56 100644
--- a/routers/web/repo/editor_util.go
+++ b/routers/web/repo/editor_util.go
@@ -114,10 +114,10 @@ func getParentTreeFields(treePath string) (treeNames, treePaths []string) {
// getUniqueRepositoryName Gets a unique repository name for a user
// It will append a - postfix if the name is already taken
-func getUniqueRepositoryName(ctx context.Context, ownerID int64, name string) string {
+func getUniqueRepositoryName(ctx context.Context, ownerID, groupID int64, name string) string {
uniqueName := name
for i := 1; i < 1000; i++ {
- _, err := repo_model.GetRepositoryByName(ctx, ownerID, uniqueName)
+ _, err := repo_model.GetRepositoryByName(ctx, ownerID, groupID, uniqueName)
if err != nil || repo_model.IsErrRepoNotExist(err) {
return uniqueName
}
diff --git a/routers/web/repo/githttp.go b/routers/web/repo/githttp.go
index 928c78a61f..a1262533f9 100644
--- a/routers/web/repo/githttp.go
+++ b/routers/web/repo/githttp.go
@@ -107,7 +107,7 @@ func httpBase(ctx *context.Context, optGitService ...string) *serviceHandler {
}
repoExist := true
- repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, reponame)
+ repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, ctx.PathParamInt64("group_id"), reponame)
if err != nil {
if !repo_model.IsErrRepoNotExist(err) {
ctx.ServerError("GetRepositoryByName", err)
diff --git a/routers/web/repo/migrate.go b/routers/web/repo/migrate.go
index bb6f1e6b7e..1cf2f26b52 100644
--- a/routers/web/repo/migrate.go
+++ b/routers/web/repo/migrate.go
@@ -238,7 +238,7 @@ func MigratePost(ctx *context.Context) {
opts.AWSSecretAccessKey = form.AWSSecretAccessKey
}
- err = repo_service.CheckCreateRepository(ctx, ctx.Doer, ctxUser, opts.RepoName, false)
+ err = repo_service.CheckCreateRepository(ctx, ctx.Doer, ctxUser, opts.RepoName, 0, false)
if err != nil {
handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, form)
return
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index d20bbdc36c..61b31cb584 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -857,7 +857,7 @@ func viewPullFiles(ctx *context.Context, beforeCommitID, afterCommitID string) {
return
}
- setCompareContext(ctx, beforeCommit, afterCommit, ctx.Repo.Owner.Name, ctx.Repo.Repository.Name)
+ setCompareContext(ctx, beforeCommit, afterCommit, ctx.Repo.Owner.Name, ctx.Repo.Repository.Name, ctx.Repo.Repository.GroupID)
assigneeUsers, err := repo_model.GetRepoAssignees(ctx, ctx.Repo.Repository)
if err != nil {
diff --git a/routers/web/repo/star.go b/routers/web/repo/star.go
index c93c877d63..a049bae994 100644
--- a/routers/web/repo/star.go
+++ b/routers/web/repo/star.go
@@ -21,7 +21,7 @@ func ActionStar(ctx *context.Context) {
}
ctx.Data["IsStaringRepo"] = repo_model.IsStaring(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID)
- ctx.Data["Repository"], err = repo_model.GetRepositoryByName(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.Name)
+ ctx.Data["Repository"], err = repo_model.GetRepositoryByName(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.GroupID, ctx.Repo.Repository.Name)
if err != nil {
ctx.ServerError("GetRepositoryByName", err)
return
diff --git a/routers/web/repo/watch.go b/routers/web/repo/watch.go
index 616e1ee89c..69048b1573 100644
--- a/routers/web/repo/watch.go
+++ b/routers/web/repo/watch.go
@@ -21,7 +21,7 @@ func ActionWatch(ctx *context.Context) {
}
ctx.Data["IsWatchingRepo"] = repo_model.IsWatching(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID)
- ctx.Data["Repository"], err = repo_model.GetRepositoryByName(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.Name)
+ ctx.Data["Repository"], err = repo_model.GetRepositoryByName(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.GroupID, ctx.Repo.Repository.Name)
if err != nil {
ctx.ServerError("GetRepositoryByName", err)
return
diff --git a/routers/web/shared/actions/general.go b/routers/web/shared/actions/general.go
index 8a924f6e1f..9fbe211954 100644
--- a/routers/web/shared/actions/general.go
+++ b/routers/web/shared/actions/general.go
@@ -118,7 +118,7 @@ func UpdateGeneralSettings(ctx *context.Context) {
if ctx.FormBool("cross_repo_add_target") {
targetRepoName := ctx.FormString("cross_repo_add_target_name")
if targetRepoName != "" {
- targetRepo, err := repo_model.GetRepositoryByName(ctx, rCtx.OwnerID, targetRepoName)
+ targetRepo, err := repo_model.GetRepositoryByName(ctx, rCtx.OwnerID, rCtx.GroupID, targetRepoName)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.JSONError("Repository doesn't exist")
diff --git a/routers/web/shared/actions/runners.go b/routers/web/shared/actions/runners.go
index 9d8b2f08eb..eaa4a47400 100644
--- a/routers/web/shared/actions/runners.go
+++ b/routers/web/shared/actions/runners.go
@@ -36,6 +36,7 @@ const (
type runnersCtx struct {
OwnerID int64
RepoID int64
+ GroupID int64
IsRepo bool
IsOrg bool
IsAdmin bool
@@ -49,6 +50,7 @@ func getRunnersCtx(ctx *context.Context) (*runnersCtx, error) {
if ctx.Data["PageIsRepoSettings"] == true {
return &runnersCtx{
RepoID: ctx.Repo.Repository.ID,
+ GroupID: ctx.Repo.Repository.GroupID,
OwnerID: 0,
IsRepo: true,
RunnersTemplate: tplRepoRunners,
diff --git a/routers/web/shared/user/header.go b/routers/web/shared/user/header.go
index b1ff9db7a2..76a1a6105c 100644
--- a/routers/web/shared/user/header.go
+++ b/routers/web/shared/user/header.go
@@ -93,7 +93,7 @@ func prepareContextForProfileBigAvatar(ctx *context.Context) {
func FindOwnerProfileReadme(ctx *context.Context, doer *user_model.User, optProfileRepoName ...string) (profileDbRepo *repo_model.Repository, profileReadmeBlob *git.Blob) {
profileRepoName := util.OptionalArg(optProfileRepoName, RepoNameProfile)
- profileDbRepo, err := repo_model.GetRepositoryByName(ctx, ctx.ContextUser.ID, profileRepoName)
+ profileDbRepo, err := repo_model.GetRepositoryByName(ctx, ctx.ContextUser.ID, ctx.PathParamInt64("group_id"), profileRepoName)
if err != nil {
if !repo_model.IsErrRepoNotExist(err) {
log.Error("FindOwnerProfileReadme failed to GetRepositoryByName: %v", err)
diff --git a/routers/web/user/package.go b/routers/web/user/package.go
index d25dc45ba8..c830b0e977 100644
--- a/routers/web/user/package.go
+++ b/routers/web/user/package.go
@@ -479,7 +479,7 @@ func packageSettingsPostActionLink(ctx *context.Context, form *forms.PackageSett
return
}
- repo, err := repo_model.GetRepositoryByName(ctx, pd.Owner.ID, form.RepoName)
+ repo, err := repo_model.GetRepositoryByName(ctx, pd.Owner.ID, form.RepoGroup, form.RepoName)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.JSONError(ctx.Tr("packages.settings.link.repo_not_found", form.RepoName))
diff --git a/routers/web/user/setting/adopt.go b/routers/web/user/setting/adopt.go
index abf9d8c6db..98b6b5912b 100644
--- a/routers/web/user/setting/adopt.go
+++ b/routers/web/user/setting/adopt.go
@@ -4,6 +4,9 @@
package setting
import (
+ "strconv"
+ "strings"
+
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/modules/gitrepo"
"code.gitea.io/gitea/modules/setting"
@@ -21,18 +24,24 @@ func AdoptOrDeleteRepository(ctx *context.Context) {
ctx.Data["allowDelete"] = allowDelete
dir := ctx.FormString("id")
+ var gid int64
+ if len(strings.Split(dir, "/")) > 1 {
+ split := strings.Split(dir, "/")
+ dir = split[0]
+ gid, _ = strconv.ParseInt(split[1], 10, 64)
+ }
action := ctx.FormString("action")
ctxUser := ctx.Doer
// check not a repo
- has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, dir)
+ has, err := repo_model.IsRepositoryModelExist(ctx, ctxUser, dir, 0)
if err != nil {
ctx.ServerError("IsRepositoryExist", err)
return
}
- exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, dir)))
+ exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(repo_model.RelativePath(ctxUser.Name, dir, gid)))
if err != nil {
ctx.ServerError("IsDir", err)
return
@@ -49,7 +58,7 @@ func AdoptOrDeleteRepository(ctx *context.Context) {
}
ctx.Flash.Success(ctx.Tr("repo.adopt_preexisting_success", dir))
} else if action == "delete" && allowDelete {
- if err := repo_service.DeleteUnadoptedRepository(ctx, ctxUser, ctxUser, dir); err != nil {
+ if err := repo_service.DeleteUnadoptedRepository(ctx, ctxUser, ctxUser, dir, gid); err != nil {
ctx.ServerError("repository.AdoptRepository", err)
return
}
diff --git a/routers/web/web.go b/routers/web/web.go
index ecd75250d2..7e00d9d012 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -1134,19 +1134,23 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
}, optSignIn, context.UserAssignmentWeb(), context.OrgAssignment(context.OrgAssignmentOptions{}))
// end "/{username}/-": packages, projects, code
- m.Group("/{username}/{reponame}/-", func() {
+ repoDashFn := func() {
m.Group("/migrate", func() {
m.Get("/status", repo.MigrateStatus)
})
- }, optSignIn, context.RepoAssignment, reqUnitCodeReader)
- // end "/{username}/{reponame}/-": migrate
+ }
+ m.Group("/{username}/{reponame}/-", repoDashFn, optSignIn, context.RepoAssignment, reqUnitCodeReader)
+ m.Group("/{username}/group/{group_id}/{reponame}/-", repoDashFn, optSignIn, context.RepoAssignment, reqUnitCodeReader)
+ // end "/{username}/{group_id}/{reponame}/-": migrate
- m.Group("/{username}/{reponame}/-", func() {
+ mentionsFn := func() {
m.Get("/mentions-in-repo", repo.GetMentionsInRepo)
- }, optSignIn, context.RepoAssignment, reqUnitsWithMentions)
+ }
+ m.Group("/{username}/{reponame}/-", mentionsFn, optSignIn, context.RepoAssignment, reqUnitsWithMentions)
+ m.Group("/{username}/{group_id}/{reponame}/-", mentionsFn, optSignIn, context.RepoAssignment, reqUnitsWithMentions)
// end "/{username}/{reponame}/-": mentions
- m.Group("/{username}/{reponame}/settings", func() {
+ settingsFn := func() {
m.Group("", func() {
m.Combo("").Get(repo_setting.Settings).
Post(web.Bind(forms.RepoSettingForm{}), repo_setting.SettingsPost)
@@ -1245,7 +1249,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Post("/retry", repo.MigrateRetryPost)
m.Post("/cancel", repo.MigrateCancelPost)
})
- },
+ }
+ m.Group("/{username}/{reponame}/settings", settingsFn,
+ reqSignIn, context.RepoAssignment, reqRepoAdmin,
+ ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer),
+ )
+ m.Group("/{username}/group/{group_id}/{reponame}/settings", settingsFn,
reqSignIn, context.RepoAssignment, reqRepoAdmin,
ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer),
)
@@ -1253,10 +1262,11 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
// user/org home, including rss feeds like "/{username}/{reponame}.rss"
m.Get("/{username}/{reponame}", optSignIn, webAuth.AllowBasic, context.RepoAssignment, context.RepoRefByType(git.RefTypeBranch), repo.SetEditorconfigIfExists, repo.Home)
+ m.Get("/{username}/group/{group_id}/{reponame}", optSignIn, webAuth.AllowBasic, context.RepoAssignment, context.RepoRefByType(git.RefTypeBranch), repo.SetEditorconfigIfExists, repo.Home)
m.Post("/{username}/{reponame}/markup", optSignIn, context.RepoAssignment, reqUnitsWithMarkdown, web.Bind(structs.MarkupOption{}), misc.Markup)
-
- m.Group("/{username}/{reponame}", func() {
+ m.Post("/{username}/group/{group_id}/{reponame}/markup", optSignIn, context.RepoAssignment, reqUnitsWithMarkdown, web.Bind(structs.MarkupOption{}), misc.Markup)
+ rootRepoFn := func() {
m.Group("/tree-list", func() {
m.Get("/branch/*", context.RepoRefByType(git.RefTypeBranch), repo.TreeList)
m.Get("/tag/*", context.RepoRefByType(git.RefTypeTag), repo.TreeList)
@@ -1272,11 +1282,13 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
Get(repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff).
Post(reqSignIn, context.RepoMustNotBeArchived(), reqUnitPullsReader, repo.MustAllowPulls, web.Bind(forms.CreateIssueForm{}), repo.SetWhitespaceBehavior, repo.CompareAndPullRequestPost)
m.Get("/pulls/new/*", repo.PullsNewRedirect)
- }, optSignIn, context.RepoAssignment, reqUnitCodeReader)
- // end "/{username}/{reponame}": repo code: find, compare, list
+ }
+ m.Group("/{username}/{reponame}", rootRepoFn, optSignIn, context.RepoAssignment, reqUnitCodeReader)
+ m.Group("/{username}/group/{group_id}/{reponame}", rootRepoFn, optSignIn, context.RepoAssignment, reqUnitCodeReader)
+ // end "/{username}/{group_id}/{reponame}": repo code: find, compare, list
addIssuesPullsViewRoutes := func() {
- // for /{username}/{reponame}/issues" or "/{username}/{reponame}/pulls"
+ // for /{username}/{group_id}/{reponame}/issues" or "/{username}/{group_id}/{reponame}/pulls"
m.Get("/posters", repo.IssuePullPosters)
m.Group("/{index}", func() {
m.Get("/info", repo.GetIssueInfo)
@@ -1290,26 +1302,32 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
})
}
// FIXME: many "pulls" requests are sent to "issues" endpoints correctly, so the issue endpoints have to tolerate pull request permissions at the moment
+ m.Group("/{username}/group/{group_id}/{reponame}/{type:issues}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests))
m.Group("/{username}/{reponame}/{type:issues}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests))
+ m.Group("/{username}/group/{group_id}/{reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader)
m.Group("/{username}/{reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader)
- m.Group("/{username}/{reponame}", func() {
+ repoIssueAttachmentFn := func() {
m.Get("/comments/{id}/attachments", repo.GetCommentAttachments)
m.Get("/labels", repo.RetrieveLabelsForList, repo.Labels)
m.Get("/milestones", repo.Milestones)
m.Get("/milestone/{id}", repo.MilestoneIssuesAndPulls)
m.Get("/issues/suggestions", repo.IssueSuggestions)
- }, optSignIn, context.RepoAssignment, reqRepoIssuesOrPullsReader) // issue/pull attachments, labels, milestones
- // end "/{username}/{reponame}": view milestone, label, issue, pull, etc
+ }
- m.Group("/{username}/{reponame}/{type:issues}", func() {
- // these handlers also check unit permissions internally
+ m.Group("/{username}/group/{group_id}/{reponame}", repoIssueAttachmentFn, optSignIn, context.RepoAssignment, reqRepoIssuesOrPullsReader) // issue/pull attachments, labels, milestones
+ m.Group("/{username}/{reponame}", repoIssueAttachmentFn, optSignIn, context.RepoAssignment, reqRepoIssuesOrPullsReader) // issue/pull attachments, labels, milestones
+ // end "/{username}/{group_id}/{reponame}": view milestone, label, issue, pull, etc
+
+ issueViewFn := func() {
m.Get("", repo.Issues)
- m.Get("/{index}", repo.ViewIssue) // also do pull-request redirection (".../issues/{PR-number}" -> ".../pulls/{PR-number}")
- }, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests, unit.TypeExternalTracker))
- // end "/{username}/{reponame}": issue list, issue view (pull-request redirection), external tracker
+ m.Get("/{index}", repo.ViewIssue)
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests, unit.TypeExternalTracker))
+ m.Group("/{username}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests, unit.TypeExternalTracker))
+ // end "/{username}/{group_id}/{reponame}": issue/pull list, issue/pull view, external tracker
- m.Group("/{username}/{reponame}", func() { // edit issues, pulls, labels, milestones, etc
+ editIssueFn := func() { // edit issues, pulls, labels, milestones, etc
m.Group("/issues", func() {
m.Group("/new", func() {
m.Combo("").Get(repo.NewIssue).
@@ -1320,7 +1338,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
}, reqUnitIssuesReader)
addIssuesPullsUpdateRoutes := func() {
- // for "/{username}/{reponame}/issues" or "/{username}/{reponame}/pulls"
+ // for "/{username}/{group_id}/{reponame}/issues" or "/{username}/{group_id}/{reponame}/pulls"
m.Group("/{index}", func() {
m.Post("/title", repo.UpdateIssueTitle)
m.Post("/content", repo.UpdateIssueContent)
@@ -1397,10 +1415,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Post("/resolve_conversation", repo.SetShowOutdatedComments, repo.UpdateResolveConversation)
}, reqUnitPullsReader)
m.Post("/pull/{index}/target_branch", reqUnitPullsReader, repo.UpdatePullRequestTarget)
- }, reqSignIn, context.RepoAssignment, context.RepoMustNotBeArchived())
- // end "/{username}/{reponame}": create or edit issues, pulls, labels, milestones
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", editIssueFn, reqSignIn, context.RepoAssignment, context.RepoMustNotBeArchived())
+ m.Group("/{username}/{reponame}", editIssueFn, reqSignIn, context.RepoAssignment, context.RepoMustNotBeArchived())
+ // end "/{username}/{group_id}/{reponame}": create or edit issues, pulls, labels, milestones
- m.Group("/{username}/{reponame}", func() { // repo code (at least "code reader")
+ codeFn := func() { // repo code (at least "code reader")
m.Group("", func() {
m.Group("", func() {
// "GET" requests only need "code reader" permission, "POST" requests need "code writer" permission.
@@ -1448,10 +1468,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
}, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty)
m.Combo("/fork").Get(repo.Fork).Post(web.Bind(forms.CreateRepoForm{}), repo.ForkPost)
- }, reqSignIn, context.RepoAssignment, reqUnitCodeReader)
- // end "/{username}/{reponame}": repo code
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader)
+ m.Group("/{username}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader)
+ // end "/{username}/{group_id}/{reponame}": repo code
- m.Group("/{username}/{reponame}", func() { // repo tags
+ repoTagFn := func() { // repo tags
m.Group("/tags", func() {
m.Get("", context.RepoRefByDefaultBranch() /* for the "commits" tab */, repo.TagsList)
m.Get(".rss", webAuth.AllowBasic, feedEnabled, repo.TagsListFeedRSS)
@@ -1459,10 +1481,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Get("/list", repo.GetTagList)
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed))
m.Post("/tags/delete", reqSignIn, reqRepoCodeWriter, context.RepoMustNotBeArchived(), repo.DeleteTag)
- }, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqUnitCodeReader)
- // end "/{username}/{reponame}": repo tags
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoTagFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqUnitCodeReader)
+ m.Group("/{username}/{reponame}", repoTagFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqUnitCodeReader)
+ // end "/{username}/{group_id}/{reponame}": repo tags
- m.Group("/{username}/{reponame}", func() { // repo releases
+ repoReleaseFn := func() { // repo releases
m.Group("/releases", func() {
m.Get("", repo.Releases)
m.Get(".rss", webAuth.AllowBasic, feedEnabled, repo.ReleasesFeedRSS)
@@ -1484,25 +1508,33 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Get("/edit/*", repo.EditRelease)
m.Post("/edit/*", web.Bind(forms.EditReleaseForm{}), repo.EditReleasePost)
}, reqSignIn, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, repo.CommitInfoCache)
- }, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoReleaseReader)
- // end "/{username}/{reponame}": repo releases
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoReleaseFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoReleaseReader)
+ m.Group("/{username}/{reponame}", repoReleaseFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoReleaseReader)
+ // end "/{username}/{group_id}/{reponame}": repo releases
- m.Group("/{username}/{reponame}", func() { // to maintain compatibility with old attachments
+ repoAttachmentsFn := func() { // to maintain compatibility with old attachments
m.Get("/attachments/{uuid}", webAuth.AllowBasic, webAuth.AllowOAuth2, repo.GetAttachment)
- }, optSignIn, context.RepoAssignment)
- // end "/{username}/{reponame}": compatibility with old attachments
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment)
+ m.Group("/{username}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment)
+ // end "/{username}/{group_id}/{reponame}": compatibility with old attachments
- m.Group("/{username}/{reponame}", func() {
+ repoTopicFn := func() {
m.Post("/topics", repo.TopicsPost)
- }, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived())
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoTopicFn, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived())
+ m.Group("/{username}/{reponame}", repoTopicFn, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived())
- m.Group("/{username}/{reponame}", func() {
+ repoPackageFn := func() {
if setting.Packages.Enabled {
m.Get("/packages", repo.Packages)
}
- }, optSignIn, context.RepoAssignment)
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment)
+ m.Group("/{username}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment)
- m.Group("/{username}/{reponame}/projects", func() {
+ repoProjectsFn := func() {
m.Get("", repo.Projects)
m.Get("/{id}", repo.ViewProject)
m.Group("", func() { //nolint:dupl // duplicates lines 1034-1054
@@ -1526,10 +1558,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
})
})
}, reqRepoProjectsWriter, context.RepoMustNotBeArchived())
- }, optSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects)
- // end "/{username}/{reponame}/projects"
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}/projects", repoProjectsFn, optSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects)
+ m.Group("/{username}/{reponame}/projects", repoProjectsFn, optSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects)
+ // end "/{username}/{group_id}/{reponame}/projects"
- m.Group("/{username}/{reponame}/actions", func() {
+ repoActionsFn := func() {
m.Get("", actions.List)
m.Post("/disable", reqRepoAdmin, actions.DisableWorkflowFile)
m.Post("/enable", reqRepoAdmin, actions.EnableWorkflowFile)
@@ -1565,10 +1599,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Group("/workflows/{workflow_name}", func() {
m.Get("/badge.svg", webAuth.AllowBasic, webAuth.AllowOAuth2, actions.GetWorkflowBadge)
})
- }, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoActionsReader, actions.MustEnableActions)
- // end "/{username}/{reponame}/actions"
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}/actions", repoActionsFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoActionsReader, actions.MustEnableActions)
+ m.Group("/{username}/{reponame}/actions", repoActionsFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoActionsReader, actions.MustEnableActions)
+ // end "/{username}/{group_id}/{reponame}/actions"
- m.Group("/{username}/{reponame}/wiki", func() {
+ repoWikiFn := func() {
m.Combo("").
Get(repo.Wiki).
Post(context.RepoMustNotBeArchived(), reqSignIn, reqUnitWikiWriter, web.Bind(forms.NewWikiForm{}), repo.WikiPost)
@@ -1579,13 +1615,18 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Get("/commit/{sha:[a-f0-9]{7,64}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff)
m.Get("/commit/{sha:[a-f0-9]{7,64}}.{ext:patch|diff}", repo.RawDiff)
m.Get("/raw/*", repo.WikiRaw)
- }, optSignIn, context.RepoAssignment, repo.MustEnableWiki, reqUnitWikiReader, func(ctx *context.Context) {
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}/wiki", repoWikiFn, optSignIn, context.RepoAssignment, repo.MustEnableWiki, reqUnitWikiReader, func(ctx *context.Context) {
ctx.Data["PageIsWiki"] = true
ctx.Data["CloneButtonOriginLink"] = ctx.Repo.Repository.WikiCloneLink(ctx, ctx.Doer)
})
- // end "/{username}/{reponame}/wiki"
+ m.Group("/{username}/{reponame}/wiki", repoWikiFn, optSignIn, context.RepoAssignment, repo.MustEnableWiki, reqUnitWikiReader, func(ctx *context.Context) {
+ ctx.Data["PageIsWiki"] = true
+ ctx.Data["CloneButtonOriginLink"] = ctx.Repo.Repository.WikiCloneLink(ctx, ctx.Doer)
+ })
+ // end "/{username}/{group_id}/{reponame}/wiki"
- m.Group("/{username}/{reponame}/activity", func() {
+ activityFn := func() {
// activity has its own permission checks
m.Get("", repo.Activity)
m.Get("/{period}", repo.Activity)
@@ -1604,13 +1645,18 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Get("/data", repo.CodeFrequencyData) // "recent-commits" also uses the same data as "code-frequency"
})
}, reqUnitCodeReader)
- },
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}/activity", activityFn,
optSignIn, context.RepoAssignment, repo.MustBeNotEmpty,
context.RequireUnitReader(unit.TypeCode, unit.TypeIssues, unit.TypePullRequests, unit.TypeReleases),
)
- // end "/{username}/{reponame}/activity"
+ m.Group("/{username}/{reponame}/activity", activityFn,
+ optSignIn, context.RepoAssignment, repo.MustBeNotEmpty,
+ context.RequireUnitReader(unit.TypeCode, unit.TypeIssues, unit.TypePullRequests, unit.TypeReleases),
+ )
+ // end "/{username}/{group_id}/{reponame}/activity"
- m.Group("/{username}/{reponame}", func() {
+ repoPullFn := func() {
m.Get("/{type:pulls}", repo.Issues)
m.Group("/{type:pulls}/{index}", func() {
m.Get("", repo.SetEditorconfigIfExists, repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewIssue)
@@ -1637,10 +1683,12 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
}, context.RepoMustNotBeArchived())
})
})
- }, optSignIn, context.RepoAssignment, repo.MustAllowPulls, reqUnitPullsReader)
- // end "/{username}/{reponame}/pulls/{index}": repo pull request
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoPullFn, optSignIn, context.RepoAssignment, repo.MustAllowPulls, reqUnitPullsReader)
+ m.Group("/{username}/{reponame}", repoPullFn, optSignIn, context.RepoAssignment, repo.MustAllowPulls, reqUnitPullsReader)
+ // end "/{username}/{group_id}/{reponame}/pulls/{index}": repo pull request
- m.Group("/{username}/{reponame}", func() {
+ repoCodeFn := func() {
m.Group("/activity_author_data", func() {
m.Get("", repo.ActivityAuthors)
m.Get("/{period}", repo.ActivityAuthors)
@@ -1719,17 +1767,21 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Get("/forks", repo.Forks)
m.Get("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}", repo.MustBeNotEmpty, repo.RawDiff)
m.Get("/lastcommit/*", context.RepoRefByType(git.RefTypeCommit), repo.LastCommit)
- }, optSignIn, context.RepoAssignment, reqUnitCodeReader)
- // end "/{username}/{reponame}": repo code
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader)
+ m.Group("/{username}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader)
+ // end "/{username}/{group_id}/{reponame}": repo code
- m.Group("/{username}/{reponame}", func() {
+ fn := func() {
m.Get("/stars", starsEnabled, repo.Stars)
m.Get("/watchers", repo.Watchers)
m.Get("/search", reqUnitCodeReader, repo.Search)
m.Post("/action/{action:star|unstar}", reqSignIn, starsEnabled, repo.ActionStar)
m.Post("/action/{action:watch|unwatch}", reqSignIn, repo.ActionWatch)
m.Post("/action/{action:accept_transfer|reject_transfer}", reqSignIn, repo.ActionTransfer)
- }, optSignIn, context.RepoAssignment)
+ }
+ m.Group("/{username}/group/{group_id}/{reponame}", fn, optSignIn, context.RepoAssignment)
+ m.Group("/{username}/{reponame}", fn, optSignIn, context.RepoAssignment)
// git lfs uses its own jwt key, and it handles the token & auth by itself, it conflicts with the general "OAuth2" auth method
// pattern: "/{username}/{reponame}/{lfs-paths}": git-lfs support, see also addOwnerRepoGitHTTPRouters
diff --git a/services/context/api.go b/services/context/api.go
index 3f9f3e1cdd..9bb0cc2d09 100644
--- a/services/context/api.go
+++ b/services/context/api.go
@@ -43,6 +43,7 @@ type APIContext struct {
Repo *Repository
Org *APIOrganization
+ RepoGroup *RepoGroup
Package *Package
PublicOnly bool // Whether the request is for a public endpoint
}
@@ -347,3 +348,9 @@ func (ctx *APIContext) IsUserRepoAdmin() bool {
func (ctx *APIContext) IsUserRepoWriter(unitTypes []unit.Type) bool {
return slices.ContainsFunc(unitTypes, ctx.Repo.Permission.CanWrite)
}
+
+func (ctx *APIContext) IsUserGroupWriter(unitTypes []unit.Type) bool {
+ return slices.ContainsFunc(unitTypes, func(u unit.Type) bool {
+ return ctx.RepoGroup.CanWriteUnit(ctx, ctx.Doer, u)
+ })
+}
diff --git a/services/context/context.go b/services/context/context.go
index b4e9904cd4..222cc1290e 100644
--- a/services/context/context.go
+++ b/services/context/context.go
@@ -58,9 +58,10 @@ type Context struct {
ContextUser *user_model.User // the user which is being visited, in most cases it differs from Doer
- Repo *Repository
- Org *Organization
- Package *Package
+ RepoGroup *RepoGroup
+ Repo *Repository
+ Org *Organization
+ Package *Package
}
func init() {
diff --git a/services/context/group.go b/services/context/group.go
new file mode 100644
index 0000000000..80117e2ca9
--- /dev/null
+++ b/services/context/group.go
@@ -0,0 +1,392 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package context
+
+import (
+ "context"
+ "strings"
+
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/models/organization"
+ "code.gitea.io/gitea/models/perm"
+ shared_group "code.gitea.io/gitea/models/shared/group"
+ "code.gitea.io/gitea/models/unit"
+ user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/markup"
+ "code.gitea.io/gitea/modules/markup/markdown"
+ "code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/structs"
+)
+
+// commonCtx contains some common functions between APIContext and Context
+type commonCtx interface {
+ context.Context
+ PathParamInt64(p string) int64
+ PathParam(p string) string
+ Written() bool
+}
+
+type RepoGroup struct {
+ IsOwner bool
+ IsMember bool
+ IsGroupAdmin bool
+ Group *group_model.Group
+ GroupLink string
+ OrgGroupLink string
+ CanCreateRepoOrGroup bool
+ Team *organization.Team
+ Teams []*organization.Team
+ GroupTeam *group_model.RepoGroupTeam
+}
+
+func (g *RepoGroup) CanWriteUnit(ctx context.Context, doer *user_model.User, unitType unit.Type) bool {
+ return g.UnitPermission(ctx, doer, unitType) >= perm.AccessModeWrite
+}
+
+func (g *RepoGroup) CanReadUnit(ctx context.Context, doer *user_model.User, unitType unit.Type) bool {
+ return g.UnitPermission(ctx, doer, unitType) >= perm.AccessModeRead
+}
+
+func (g *RepoGroup) UnitPermission(ctx context.Context, doer *user_model.User, unitType unit.Type) perm.AccessMode {
+ if doer != nil {
+ teams, err := organization.GetUserGroupTeams(ctx, g.Group.ID, doer.ID)
+ if err != nil {
+ log.Error("GetUserOrgTeams: %v", err)
+ return perm.AccessModeNone
+ }
+
+ if err := teams.LoadUnits(ctx); err != nil {
+ log.Error("LoadUnits: %v", err)
+ return perm.AccessModeNone
+ }
+
+ if len(teams) > 0 {
+ return teams.UnitMaxAccess(unitType)
+ }
+ }
+
+ if g.Group.Visibility.IsPublic() {
+ return perm.AccessModeRead
+ }
+
+ return perm.AccessModeNone
+}
+
+func getGroupByParams(ctx commonCtx, repoGroup *RepoGroup, handleNotFound func(error), handleOtherError func(string, error)) (err error) {
+ groupID := ctx.PathParamInt64("group_id")
+
+ repoGroup.Group, err = group_model.GetGroupByID(ctx, groupID)
+ if err != nil {
+ if group_model.IsErrGroupNotExist(err) {
+ handleNotFound(err)
+ } else {
+ handleOtherError("GetGroupByID", err)
+ }
+ return err
+ }
+ if err = repoGroup.Group.LoadAttributes(ctx); err != nil {
+ handleOtherError("LoadAttributes", err)
+ }
+ return err
+}
+
+func GetGroupByParams(ctx *Context) (err error) {
+ if ctx.RepoGroup == nil {
+ ctx.RepoGroup = &RepoGroup{}
+ }
+ return getGroupByParams(ctx, ctx.RepoGroup, ctx.NotFound, ctx.ServerError)
+}
+
+type GroupAssignmentOptions struct {
+ RequireMember bool
+ RequireOwner bool
+ RequireGroupAdmin bool
+}
+
+func groupAssignment(ctx commonCtx, doer *user_model.User, isSigned bool, handleNotFound func(error), handleOtherError func(string, error), assign func(repoGroup *RepoGroup, canAccess bool)) {
+ var err error
+ repoGroup := new(RepoGroup)
+ if repoGroup.Group == nil {
+ err = getGroupByParams(ctx, repoGroup, handleNotFound, handleOtherError)
+ }
+ if err != nil {
+ handleOtherError("GetGroupByParams", err)
+ return
+ }
+ if ctx.Written() {
+ return
+ }
+ group := repoGroup.Group
+ canAccess, err := group.CanAccess(ctx, doer)
+ if err != nil {
+ handleOtherError("error checking group access", err)
+ return
+ }
+ privateBecauseOfParent, err := group.IsPrivateBecauseOfParentPermissions(ctx, doer)
+ if err != nil {
+ handleOtherError("error checking group access", err)
+ return
+ }
+ if group.Owner == nil {
+ err = group.LoadOwner(ctx)
+ if err != nil {
+ handleOtherError("LoadOwner", err)
+ return
+ }
+ }
+ ownerAsOrg := (*organization.Organization)(group.Owner)
+ var orgWideAdmin, orgWideOwner, isOwnedBy bool
+
+ if isSigned {
+ if orgWideAdmin, err = ownerAsOrg.IsOrgAdmin(ctx, doer.ID); err != nil {
+ handleOtherError("IsOrgAdmin", err)
+ return
+ }
+ if orgWideOwner, err = ownerAsOrg.IsOwnedBy(ctx, doer.ID); err != nil {
+ handleOtherError("IsOwnedBy", err)
+ return
+ }
+ }
+ if orgWideOwner {
+ repoGroup.IsOwner = true
+ }
+ if orgWideAdmin {
+ repoGroup.IsGroupAdmin = true
+ }
+
+ if isSigned && doer.IsAdmin {
+ repoGroup.IsOwner = true
+ repoGroup.IsMember = true
+ repoGroup.IsGroupAdmin = true
+ repoGroup.CanCreateRepoOrGroup = true
+ } else if isSigned {
+ isOwnedBy, err = group.IsOwnedBy(ctx, doer.ID)
+ if err != nil {
+ handleOtherError("IsOwnedBy", err)
+ return
+ }
+ repoGroup.IsOwner = repoGroup.IsOwner || isOwnedBy
+
+ if repoGroup.IsOwner {
+ repoGroup.IsMember = true
+ repoGroup.IsGroupAdmin = true
+ repoGroup.CanCreateRepoOrGroup = true
+ } else {
+ repoGroup.IsMember, err = shared_group.IsGroupMember(ctx, group.ID, doer)
+ if err != nil {
+ handleOtherError("IsOrgMember", err)
+ return
+ }
+ repoGroup.CanCreateRepoOrGroup, err = group.CanCreateIn(ctx, doer.ID)
+ if err != nil {
+ handleOtherError("CanCreateIn", err)
+ return
+ }
+ }
+ } else {
+ //ctx.Data["SignedUser"] = &user_model.User{}
+ }
+ repoGroup.GroupLink = group.GroupLink()
+ repoGroup.OrgGroupLink = group.OrgGroupLink()
+
+ if repoGroup.IsMember {
+ shouldSeeAllTeams := false
+ if repoGroup.IsOwner {
+ shouldSeeAllTeams = true
+ } else {
+ teams, err := organization.GetUserGroupTeams(ctx, group.ID, doer.ID)
+ if err != nil {
+ handleOtherError("GetUserTeams", err)
+ return
+ }
+ for _, team := range teams {
+ if team.IncludesAllRepositories && team.AccessMode >= perm.AccessModeAdmin {
+ shouldSeeAllTeams = true
+ break
+ }
+ }
+ }
+ if shouldSeeAllTeams {
+ repoGroup.Teams, err = shared_group.GetGroupTeams(ctx, group.ID)
+ if err != nil {
+ handleOtherError("LoadTeams", err)
+ return
+ }
+ } else {
+ repoGroup.Teams, err = organization.GetUserGroupTeams(ctx, group.ID, doer.ID)
+ if err != nil {
+ handleOtherError("GetUserTeams", err)
+ return
+ }
+ }
+ //ctx.Data["NumTeams"] = len(repoGroup.Teams)
+ }
+
+ teamName := ctx.PathParam("team")
+ if len(teamName) > 0 {
+ teamExists := false
+ for _, team := range repoGroup.Teams {
+ if strings.EqualFold(team.LowerName, strings.ToLower(teamName)) {
+ teamExists = true
+ var groupTeam *group_model.RepoGroupTeam
+ groupTeam, err = group_model.FindGroupTeamByTeamID(ctx, group.ID, team.ID)
+ if err != nil {
+ handleOtherError("FindGroupTeamByTeamID", err)
+ return
+ }
+ repoGroup.GroupTeam = groupTeam
+ repoGroup.Team = team
+ repoGroup.IsMember = true
+ break
+ }
+ }
+
+ if !teamExists {
+ handleNotFound(err)
+ return
+ }
+ repoGroup.IsGroupAdmin = repoGroup.Team.IsOwnerTeam() || repoGroup.Team.AccessMode >= perm.AccessModeAdmin
+ } else {
+ for _, team := range repoGroup.Teams {
+ if team.AccessMode >= perm.AccessModeAdmin {
+ repoGroup.IsGroupAdmin = true
+ break
+ }
+ }
+ }
+ if isSigned {
+ isAdmin, err := group.IsAdminOf(ctx, doer.ID)
+ if err != nil {
+ handleOtherError("IsAdminOf", err)
+ return
+ }
+ repoGroup.IsGroupAdmin = repoGroup.IsGroupAdmin || isAdmin
+ }
+ if !repoGroup.IsOwner && !repoGroup.IsGroupAdmin {
+ canAccess = canAccess && !privateBecauseOfParent
+ }
+ assign(repoGroup, canAccess)
+}
+
+func GroupAssignmentWeb(args GroupAssignmentOptions) func(ctx *Context) {
+ return func(ctx *Context) {
+ opts := args
+ var err error
+ groupAssignment(ctx, ctx.Doer, ctx.IsSigned, ctx.NotFound, ctx.ServerError, func(repoGroup *RepoGroup, canAccess bool) {
+ if ctx.Written() {
+ return
+ }
+
+ group := repoGroup.Group
+ if group.Visibility != structs.VisibleTypePublic && !ctx.IsSigned {
+ ctx.NotFound(nil)
+ return
+ }
+
+ if group.Visibility == structs.VisibleTypePrivate {
+ opts.RequireMember = true
+ } else if !canAccess && group.Visibility != structs.VisibleTypePublic {
+ ctx.NotFound(nil)
+ return
+ }
+
+ if (opts.RequireMember && !repoGroup.IsMember) ||
+ (opts.RequireOwner && !repoGroup.IsOwner) {
+ ctx.NotFound(nil)
+ return
+ }
+
+ ctx.Data["EnableFeed"] = setting.Other.EnableFeed
+ ctx.Data["FeedURL"] = group.GroupLink()
+ ctx.Data["IsGroupOwner"] = repoGroup.IsOwner
+ ctx.Data["IsGroupMember"] = repoGroup.IsMember
+ ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
+ ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
+ ctx.Data["IsPublicMember"] = func(uid int64) bool {
+ is, _ := organization.IsPublicMembership(ctx, ctx.Org.Organization.ID, uid)
+ return is
+ }
+ ctx.Data["CanReadProjects"] = repoGroup.CanReadUnit(ctx, ctx.Doer, unit.TypeProjects)
+ ctx.Data["CanCreateOrgRepo"] = repoGroup.CanCreateRepoOrGroup
+
+ ctx.Data["IsGroupAdmin"] = repoGroup.IsGroupAdmin
+ if opts.RequireGroupAdmin && !repoGroup.IsGroupAdmin {
+ ctx.NotFound(nil)
+ return
+ }
+
+ if len(group.Description) != 0 {
+ ctx.Data["RenderedDescription"], err = markdown.RenderString(markup.NewRenderContext(ctx), group.Description)
+ if err != nil {
+ ctx.ServerError("RenderString", err)
+ return
+ }
+ }
+ ctx.Data["Group"] = group
+ ctx.Data["ContextGroup"] = repoGroup
+ ctx.Data["Doer"] = ctx.Doer
+ ctx.Data["GroupLink"] = group.GroupLink()
+ ctx.Data["OrgGroupLink"] = repoGroup.OrgGroupLink
+ ctx.Data["Breadcrumbs"], err = group_model.GetParentGroupChain(ctx, group.ID)
+ if err != nil {
+ ctx.ServerError("GetParentGroupChain", err)
+ return
+ }
+ if repoGroup == nil {
+ repoGroup = &RepoGroup{}
+ }
+ if !ctx.IsSigned {
+ ctx.Data["SignedUser"] = &user_model.User{}
+ }
+ if repoGroup.IsMember {
+ ctx.Data["NumTeams"] = len(repoGroup.Teams)
+ }
+ if repoGroup.Team != nil {
+ ctx.Data["Team"] = repoGroup.Team
+ ctx.Data["IsTeamMember"] = repoGroup.IsMember
+ }
+ ctx.RepoGroup = repoGroup
+ })
+ }
+}
+
+func GroupAssignmentAPI() func(ctx *APIContext) {
+ return func(ctx *APIContext) {
+ groupAssignment(ctx, ctx.Doer, ctx.IsSigned, func(err error) {
+ ctx.APIErrorNotFound(err)
+ }, func(_ string, err error) {
+ ctx.APIErrorInternal(err)
+ }, func(repoGroup *RepoGroup, canAccess bool) {
+ if ctx.Written() {
+ return
+ }
+
+ group := repoGroup.Group
+ if group.Visibility != structs.VisibleTypePublic && !ctx.IsSigned {
+ ctx.APIErrorNotFound(nil)
+ return
+ }
+ if ctx.IsSigned {
+ if !canAccess && group.Visibility != structs.VisibleTypePublic {
+ ctx.APIErrorNotFound(nil)
+ return
+ }
+ }
+ if !canAccess {
+ ctx.APIErrorNotFound(nil)
+ }
+ ctx.RepoGroup = repoGroup
+ })
+ }
+}
+
+func groupIsCurrent(ctx *Context) func(groupID int64) bool {
+ return func(groupID int64) bool {
+ if ctx.RepoGroup.Group == nil {
+ return false
+ }
+ return ctx.RepoGroup.Group.ID == groupID
+ }
+}
diff --git a/services/context/repo.go b/services/context/repo.go
index 4c31b07b34..0eef8999f0 100644
--- a/services/context/repo.go
+++ b/services/context/repo.go
@@ -12,6 +12,8 @@ import (
"net/http"
"net/url"
"path"
+ "regexp"
+ "strconv"
"strings"
asymkey_model "code.gitea.io/gitea/models/asymkey"
@@ -369,6 +371,7 @@ func ComposeGoGetImport(ctx context.Context, owner, repo string) string {
func EarlyResponseForGoGetMeta(ctx *Context) {
username := ctx.PathParam("username")
reponame := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")
+ groupID := ctx.PathParamInt64("group_id")
if username == "" || reponame == "" {
ctx.PlainText(http.StatusBadRequest, "invalid repository path")
return
@@ -376,15 +379,17 @@ func EarlyResponseForGoGetMeta(ctx *Context) {
var cloneURL string
if setting.Repository.GoGetCloneURLProtocol == "ssh" {
- cloneURL = repo_model.ComposeSSHCloneURL(ctx.Doer, username, reponame)
+ cloneURL = repo_model.ComposeSSHCloneURL(ctx.Doer, username, reponame, groupID)
} else {
- cloneURL = repo_model.ComposeHTTPSCloneURL(ctx, username, reponame)
+ cloneURL = repo_model.ComposeHTTPSCloneURL(ctx, username, reponame, groupID)
}
goImportContent := fmt.Sprintf("%s git %s", ComposeGoGetImport(ctx, username, reponame), cloneURL)
htmlMeta := fmt.Sprintf(``, html.EscapeString(goImportContent))
ctx.PlainText(http.StatusOK, htmlMeta)
}
+var pathRegex = regexp.MustCompile(`(?i).*/[a-z\-0-9_]+/(\d+/)?[a-z\-0-9_]`)
+
// RedirectToRepo redirect to a differently-named repository
func RedirectToRepo(ctx *Base, redirectRepoID int64) {
ownerName := ctx.PathParam("username")
@@ -396,6 +401,8 @@ func RedirectToRepo(ctx *Base, redirectRepoID int64) {
ctx.HTTPError(http.StatusInternalServerError, "GetRepositoryByID")
return
}
+ pathRegex.ReplaceAllString(ctx.Req.URL.EscapedPath(),
+ url.PathEscape(repo.OwnerName)+"/$1"+url.PathEscape(repo.Name))
redirectPath := strings.Replace(
ctx.Req.URL.EscapedPath(),
@@ -461,9 +468,10 @@ func InitRepoPullRequestCtx(ctx *Context, base, head *repo_model.Repository) {
}
type repoAssignmentPrepareDataStruct struct {
- ownerName string
- repoName string
- repo *repo_model.Repository
+ ownerName string
+ repoName string
+ rawGroupID string
+ repo *repo_model.Repository
}
func repoAssignmentPreCheck(ctx *Context) {
@@ -481,13 +489,15 @@ func repoAssignmentPrepareData(ctx *Context) *repoAssignmentPrepareDataStruct {
// HINT: here it doesn't handle ".wiki" extension, it is handled in repoAssignmentAutoRedirectWiki, need to be refactored in the future
userName := ctx.PathParam("username")
repoName := ctx.PathParam("reponame")
+ group := ctx.PathParam("group_id")
+
repoName = strings.TrimSuffix(repoName, ".git")
if setting.Other.EnableFeed {
ctx.Data["EnableFeed"] = true
repoName = strings.TrimSuffix(repoName, ".rss")
repoName = strings.TrimSuffix(repoName, ".atom")
}
- return &repoAssignmentPrepareDataStruct{ownerName: userName, repoName: repoName}
+ return &repoAssignmentPrepareDataStruct{ownerName: userName, repoName: repoName, rawGroupID: group}
}
func repoAssignmentPrepareOwner(ctx *Context, data *repoAssignmentPrepareDataStruct) {
@@ -525,7 +535,21 @@ func repoAssignmentPrepareOwner(ctx *Context, data *repoAssignmentPrepareDataStr
}
func repoAssignmentAutoRedirectWiki(ctx *Context, data *repoAssignmentPrepareDataStruct) {
- userName, repoName := data.ownerName, data.repoName
+ userName, repoName, rawGroupID := data.ownerName, data.repoName, data.rawGroupID
+ var group string
+ if rawGroupID != "" {
+ gid, _ := strconv.ParseInt(rawGroupID, 10, 64)
+ if gid == 0 {
+ q := ctx.Req.URL.RawQuery
+ if q != "" {
+ q = "?" + q
+ }
+ ctx.Redirect(strings.Replace(ctx.Link, "/0/", "/", 1)+q, 307)
+ return
+ }
+ group += "/"
+ }
+
// redirect link to wiki
if strings.HasSuffix(repoName, ".wiki") {
// ctx.Req.URL.Path does not have the preceding appSubURL - any redirect must have this added
@@ -535,7 +559,7 @@ func repoAssignmentAutoRedirectWiki(ctx *Context, data *repoAssignmentPrepareDat
redirectRepoName += originalRepoName[len(redirectRepoName)+5:]
redirectPath := strings.Replace(
ctx.Req.URL.EscapedPath(),
- url.PathEscape(userName)+"/"+url.PathEscape(originalRepoName),
+ url.PathEscape(userName)+"/"+group+url.PathEscape(originalRepoName),
url.PathEscape(userName)+"/"+url.PathEscape(redirectRepoName)+"/wiki",
1,
)
@@ -550,7 +574,8 @@ func repoAssignmentAutoRedirectWiki(ctx *Context, data *repoAssignmentPrepareDat
func repoAssignmentPrepareRepo(ctx *Context, data *repoAssignmentPrepareDataStruct) {
repoName := data.repoName
// Get repository.
- repo, err := repo_model.GetRepositoryByName(ctx, ctx.Repo.Owner.ID, repoName)
+ gid, _ := strconv.ParseInt(data.rawGroupID, 10, 64)
+ repo, err := repo_model.GetRepositoryByName(ctx, ctx.Repo.Owner.ID, gid, repoName)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
redirectRepoID, err := repo_model.LookupRedirect(ctx, ctx.Repo.Owner.ID, repoName)
@@ -570,6 +595,18 @@ func repoAssignmentPrepareRepo(ctx *Context, data *repoAssignmentPrepareDataStru
}
return
}
+ if repo.GroupID != gid {
+ ctx.NotFound(nil)
+ }
+
+ if gid > 0 {
+ GroupAssignmentWeb(GroupAssignmentOptions{
+ RequireMember: true,
+ })(ctx)
+ }
+ if ctx.Written() {
+ return
+ }
repo.Owner = ctx.Repo.Owner
data.repo = repo
}
diff --git a/services/convert/repo_group.go b/services/convert/repo_group.go
new file mode 100644
index 0000000000..25d39ffbec
--- /dev/null
+++ b/services/convert/repo_group.go
@@ -0,0 +1,44 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package convert
+
+import (
+ "context"
+
+ group_model "code.gitea.io/gitea/models/group"
+ repo_model "code.gitea.io/gitea/models/repo"
+ "code.gitea.io/gitea/models/unit"
+ user_model "code.gitea.io/gitea/models/user"
+ api "code.gitea.io/gitea/modules/structs"
+)
+
+func ToAPIGroup(ctx context.Context, g *group_model.Group, actor *user_model.User) (*api.Group, error) {
+ err := g.LoadAttributes(ctx)
+ if err != nil {
+ return nil, err
+ }
+ apiGroup := &api.Group{
+ ID: g.ID,
+ Owner: ToUser(ctx, g.Owner, actor),
+ Name: g.Name,
+ Description: g.Description,
+ ParentGroupID: g.ParentGroupID,
+ Link: g.GroupLink(),
+ SortOrder: g.SortOrder,
+ AvatarURL: g.AvatarLink(ctx),
+ }
+ if apiGroup.NumSubgroups, err = group_model.CountGroups(ctx, &group_model.FindGroupsOptions{
+ ParentGroupID: g.ID,
+ }); err != nil {
+ return nil, err
+ }
+ if _, apiGroup.NumRepos, err = repo_model.SearchRepositoryByCondition(ctx, repo_model.SearchRepoOptions{
+ GroupID: g.ID,
+ Actor: actor,
+ OwnerID: g.OwnerID,
+ }, repo_model.AccessibleRepositoryCondition(actor, unit.TypeInvalid), true); err != nil {
+ return nil, err
+ }
+ return apiGroup, nil
+}
diff --git a/services/convert/repository.go b/services/convert/repository.go
index 503f6bb2a3..0ff60eef9f 100644
--- a/services/convert/repository.go
+++ b/services/convert/repository.go
@@ -253,6 +253,8 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
Topics: util.SliceNilAsEmpty(repo.Topics),
ObjectFormatName: api.ObjectFormatName(repo.ObjectFormatName),
Licenses: util.SliceNilAsEmpty(repoLicenses.StringList()),
+ GroupID: repo.GroupID,
+ GroupSortOrder: repo.GroupSortOrder,
}
}
diff --git a/services/forms/user_form.go b/services/forms/user_form.go
index 3f65e8c551..887cad354e 100644
--- a/services/forms/user_form.go
+++ b/services/forms/user_form.go
@@ -432,8 +432,9 @@ func (f *WebauthnDeleteForm) Validate(req *http.Request, errs binding.Errors) bi
// PackageSettingForm form for package settings
type PackageSettingForm struct {
- Action string
- RepoName string `form:"repo_name"`
+ Action string
+ RepoName string `form:"repo_name"`
+ RepoGroup int64 `form:"repo_group"`
}
// Validate validates the fields
diff --git a/services/group/avatar.go b/services/group/avatar.go
new file mode 100644
index 0000000000..0d5eaf3595
--- /dev/null
+++ b/services/group/avatar.go
@@ -0,0 +1,71 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/modules/avatar"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/storage"
+)
+
+// UploadAvatar saves custom icon for group.
+func UploadAvatar(ctx context.Context, g *group_model.Group, data []byte) error {
+ avatarData, err := avatar.ProcessAvatarImage(data)
+ if err != nil {
+ return err
+ }
+
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+
+ g.Avatar = avatar.HashAvatar(g.ID, data)
+ if err = UpdateGroup(ctx, g, &UpdateOptions{}); err != nil {
+ return fmt.Errorf("updateGroup: %w", err)
+ }
+
+ if err = storage.SaveFrom(storage.Avatars, g.CustomAvatarRelativePath(), func(w io.Writer) error {
+ _, err = w.Write(avatarData)
+ return err
+ }); err != nil {
+ return fmt.Errorf("Failed to create dir %s: %w", g.CustomAvatarRelativePath(), err)
+ }
+
+ return committer.Commit()
+}
+
+// DeleteAvatar deletes the user's custom avatar.
+func DeleteAvatar(ctx context.Context, g *group_model.Group) error {
+ aPath := g.CustomAvatarRelativePath()
+ log.Trace("DeleteAvatar[%d]: %s", g.ID, aPath)
+
+ return db.WithTx(ctx, func(ctx context.Context) error {
+ hasAvatar := len(g.Avatar) > 0
+ g.Avatar = ""
+ if _, err := db.GetEngine(ctx).ID(g.ID).Cols("avatar, use_custom_avatar").Update(g); err != nil {
+ return fmt.Errorf("DeleteAvatar: %w", err)
+ }
+
+ if hasAvatar {
+ if err := storage.Avatars.Delete(aPath); err != nil {
+ if !errors.Is(err, os.ErrNotExist) {
+ return fmt.Errorf("failed to remove %s: %w", aPath, err)
+ }
+ log.Warn("Deleting avatar %s but it doesn't exist", aPath)
+ }
+ }
+
+ return nil
+ })
+}
diff --git a/services/group/delete.go b/services/group/delete.go
new file mode 100644
index 0000000000..1a8b133bcb
--- /dev/null
+++ b/services/group/delete.go
@@ -0,0 +1,87 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ repo_model "code.gitea.io/gitea/models/repo"
+)
+
+func DeleteGroup(ctx context.Context, gid int64) error {
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+
+ sess := db.GetEngine(ctx)
+
+ toDelete, err := group_model.GetGroupByID(ctx, gid)
+ if err != nil {
+ return err
+ }
+
+ // remove team permissions and units for deleted group
+ if _, err = sess.Where("group_id = ?", gid).Delete(new(group_model.RepoGroupTeam)); err != nil {
+ return err
+ }
+ if _, err = sess.Where("group_id = ?", gid).Delete(new(group_model.RepoGroupUnit)); err != nil {
+ return err
+ }
+
+ // move all repos in the deleted group to its immediate parent
+ repos, cnt, err := repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{
+ GroupID: gid,
+ })
+ if err != nil {
+ return err
+ }
+ _, inParent, err := repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{
+ GroupID: toDelete.ParentGroupID,
+ })
+ if err != nil {
+ return err
+ }
+ if cnt > 0 {
+ for i, repo := range repos {
+ repo.GroupID = toDelete.ParentGroupID
+ repo.GroupSortOrder = int(inParent + int64(i) + 1)
+ }
+ if _, err = sess.Where("group_id = ?", gid).Update(&repos); err != nil {
+ return err
+ }
+ }
+
+ // move all child groups to the deleted group's immediate parent
+ childGroups, err := group_model.FindGroups(ctx, &group_model.FindGroupsOptions{
+ ParentGroupID: gid,
+ })
+ if err != nil {
+ return err
+ }
+ if len(childGroups) > 0 {
+ inParent, err = group_model.CountGroups(ctx, &group_model.FindGroupsOptions{
+ ParentGroupID: toDelete.ParentGroupID,
+ })
+ if err != nil {
+ return err
+ }
+ for i, group := range childGroups {
+ group.ParentGroupID = toDelete.ParentGroupID
+ group.SortOrder = int(inParent) + i + 1
+ }
+ if _, err = sess.Where("parent_group_id = ?", gid).Update(&childGroups); err != nil {
+ return err
+ }
+ }
+
+ // finally, delete the group itself
+ if _, err = sess.ID(gid).Delete(new(group_model.Group)); err != nil {
+ return err
+ }
+ return committer.Commit()
+}
diff --git a/services/group/group.go b/services/group/group.go
new file mode 100644
index 0000000000..7852bcfd9c
--- /dev/null
+++ b/services/group/group.go
@@ -0,0 +1,194 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/models/organization"
+ repo_model "code.gitea.io/gitea/models/repo"
+ user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/gitrepo"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
+)
+
+func NewGroup(ctx context.Context, g *group_model.Group) error {
+ var err error
+ if len(g.Name) == 0 {
+ return util.NewInvalidArgumentErrorf("empty group name")
+ }
+ owner, has, err := db.GetByID[user_model.User](ctx, g.OwnerID)
+ if err != nil {
+ return err
+ }
+ if !has {
+ return organization.ErrOrgNotExist{ID: g.OwnerID}
+ }
+ g.OwnerName = owner.Name
+ g.LowerName = strings.ToLower(g.Name)
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+
+ if g.ParentGroupID > 0 {
+ ngrp, err := group_model.GetGroupByID(ctx, g.ParentGroupID)
+ if err != nil {
+ return err
+ }
+ if err = ngrp.LoadSubgroups(ctx, false); err != nil {
+ return err
+ }
+ g.SortOrder = len(ngrp.Subgroups)
+ gidChain, err := group_model.GetParentGroupIDChain(ctx, g.ParentGroupID)
+ if err != nil {
+ return err
+ }
+ if len(gidChain) >= 20 {
+ return group_model.ErrGroupTooDeep{
+ ID: g.ParentGroupID,
+ }
+ }
+ } else {
+ siblings, err := group_model.FindGroups(ctx, &group_model.FindGroupsOptions{
+ ParentGroupID: 0,
+ OwnerID: g.OwnerID,
+ })
+ if err != nil {
+ return err
+ }
+ g.SortOrder = len(siblings)
+ }
+
+ if err = db.Insert(ctx, g); err != nil {
+ return err
+ }
+
+ if err = RecalculateGroupAccess(ctx, g, true); err != nil {
+ return err
+ }
+
+ return committer.Commit()
+}
+
+func MoveRepositoryToGroup(ctx context.Context, repo *repo_model.Repository, newGroupID int64, groupSortOrder int) error {
+ sess := db.GetEngine(ctx)
+ if newGroupID > 0 {
+ newGroup, err := group_model.GetGroupByID(ctx, newGroupID)
+ if err != nil {
+ return err
+ }
+ if newGroup.OwnerID != repo.OwnerID {
+ return fmt.Errorf("repo[%d]'s ownerID is not equal to new parent group[%d]'s owner ID", repo.ID, newGroup.ID)
+ }
+ }
+ repo.GroupID = newGroupID
+ repo.GroupSortOrder = groupSortOrder
+ cnt, err := sess.
+ Table("repository").
+ ID(repo.ID).
+ MustCols("group_id").
+ Update(repo)
+ log.Info("updated %d rows?", cnt)
+ return err
+}
+
+type MoveGroupOptions struct {
+ NewParent, ItemID int64
+ IsGroup bool
+ NewPos int
+}
+
+func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model.User) (err error) {
+ var committer db.Committer
+ ctx, committer, err = db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+ var parentGroup *group_model.Group
+ if opts.NewParent > 0 {
+ parentGroup, err = group_model.GetGroupByID(ctx, opts.NewParent)
+ if err != nil {
+ return err
+ }
+ canAccessNewParent, err := parentGroup.CanAccess(ctx, doer)
+ if err != nil {
+ return err
+ }
+ if !canAccessNewParent {
+ return group_model.ErrUserDoesNotHaveAccessToGroup{
+ GroupID: opts.NewParent,
+ UserID: doer.ID,
+ }
+ }
+
+ err = parentGroup.LoadSubgroups(ctx, false)
+ if err != nil {
+ return err
+ }
+ }
+ if opts.IsGroup {
+ var group *group_model.Group
+ group, err = group_model.GetGroupByID(ctx, opts.ItemID)
+ if err != nil {
+ return err
+ }
+ if opts.NewPos < 0 && parentGroup != nil {
+ opts.NewPos = len(parentGroup.Subgroups)
+ }
+ if group.ParentGroupID != opts.NewParent || group.SortOrder != opts.NewPos {
+ if err = group_model.MoveGroup(ctx, group, opts.NewParent, opts.NewPos); err != nil {
+ return err
+ }
+ if err = RecalculateGroupAccess(ctx, group, false); err != nil {
+ return err
+ }
+ }
+ } else {
+ var repo *repo_model.Repository
+ repo, err = repo_model.GetRepositoryByID(ctx, opts.ItemID)
+ if err != nil {
+ return err
+ }
+ if opts.NewPos < 0 {
+ var repoCount int64
+ repoCount, err = repo_model.CountRepository(ctx, repo_model.SearchRepoOptions{
+ GroupID: opts.NewParent,
+ })
+ if err != nil {
+ return err
+ }
+ opts.NewPos = int(repoCount)
+ }
+ if repo.GroupID != opts.NewParent || repo.GroupSortOrder != opts.NewPos {
+ ndir := filepath.Dir(filepath.Join(setting.RepoRootPath, filepath.FromSlash(repo_model.RelativePath(repo.OwnerName, repo.Name, opts.NewParent))))
+ _, err = os.Stat(ndir)
+ if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ _ = os.MkdirAll(ndir, 0o755)
+ } else {
+ return err
+ }
+ }
+ if err = gitrepo.RenameRepository(ctx, repo, repo_model.StorageRepo(repo_model.RelativePath(repo.OwnerName, repo.Name, opts.NewParent))); err != nil {
+ return err
+ }
+ if err = MoveRepositoryToGroup(ctx, repo, opts.NewParent, opts.NewPos); err != nil {
+ return err
+ }
+ }
+ }
+ return committer.Commit()
+}
diff --git a/services/group/group_test.go b/services/group/group_test.go
new file mode 100644
index 0000000000..3296645a5b
--- /dev/null
+++ b/services/group/group_test.go
@@ -0,0 +1,115 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "testing"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ organization_model "code.gitea.io/gitea/models/organization"
+ repo_model "code.gitea.io/gitea/models/repo"
+ "code.gitea.io/gitea/models/unittest"
+ user_model "code.gitea.io/gitea/models/user"
+ repo_service "code.gitea.io/gitea/services/repository"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestMain(m *testing.M) {
+ unittest.MainTest(m)
+}
+
+func getOrCreateOrgWithGroups(t *testing.T) *user_model.User {
+ e := db.GetEngine(t.Context())
+ norg := &user_model.User{
+ LowerName: "org-with-groups",
+ FullName: "Org With Groups",
+ Name: "Org-With-Groups",
+ Type: user_model.UserTypeOrganization,
+ }
+
+ hasOrgWithGroups, err := e.Exist(&user_model.User{
+ LowerName: norg.LowerName,
+ Type: norg.Type,
+ })
+ assert.NoError(t, err)
+ if !hasOrgWithGroups {
+ ownerBean := unittest.AssertExistsAndLoadBean(t, &user_model.User{
+ ID: 2,
+ })
+ assert.NoError(t, organization_model.CreateOrganization(t.Context(), organization_model.OrgFromUser(norg), ownerBean))
+ _, err = e.Table(&group_model.Group{}).Update(&group_model.Group{
+ OwnerName: norg.Name,
+ OwnerID: norg.ID,
+ })
+ assert.NoError(t, err)
+ }
+ norg = unittest.AssertExistsAndLoadBean(t, norg)
+ return norg
+}
+
+func TestNewGroup(t *testing.T) {
+ assert.NoError(t, unittest.PrepareTestDatabase())
+ orgWithGroups := getOrCreateOrgWithGroups(t)
+
+ const groupName = "group x"
+ group := &group_model.Group{
+ Name: groupName,
+ OwnerID: orgWithGroups.ID,
+ }
+ assert.NoError(t, NewGroup(t.Context(), group))
+ unittest.AssertExistsAndLoadBean(t, &group_model.Group{Name: groupName})
+}
+
+func TestMoveGroup(t *testing.T) {
+ assert.NoError(t, unittest.PrepareTestDatabase())
+ orgWithGroups := getOrCreateOrgWithGroups(t)
+ doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{
+ ID: 2,
+ })
+ testfn := func(gid int64) {
+ cond := &group_model.FindGroupsOptions{
+ ParentGroupID: 9,
+ OwnerID: orgWithGroups.ID,
+ }
+ origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds())
+
+ assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{
+ NewParent: 9,
+ ItemID: gid,
+ IsGroup: true,
+ NewPos: -1,
+ }, doer))
+ unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1)
+ }
+ testfn(23)
+ testfn(22)
+ testfn(4)
+}
+
+func TestMoveRepo(t *testing.T) {
+ assert.NoError(t, unittest.PrepareTestDatabase())
+ doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{
+ ID: 2,
+ })
+ orgWithGroups := getOrCreateOrgWithGroups(t)
+ repoToMove, err := repo_service.CreateRepository(t.Context(), doer, orgWithGroups, repo_service.CreateRepoOptions{
+ GroupID: 2,
+ Name: "Repo-to-move",
+ })
+ assert.NoError(t, err)
+ cond := repo_model.SearchRepositoryCondition(repo_model.SearchRepoOptions{
+ GroupID: 1,
+ })
+ origCount := unittest.GetCount(t, new(repo_model.Repository), cond)
+
+ assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{
+ NewParent: 1,
+ ItemID: repoToMove.ID,
+ IsGroup: false,
+ NewPos: -1,
+ }, doer))
+ unittest.AssertCountByCond(t, "repository", cond, origCount+1)
+}
diff --git a/services/group/search.go b/services/group/search.go
new file mode 100644
index 0000000000..b57f176cca
--- /dev/null
+++ b/services/group/search.go
@@ -0,0 +1,174 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "slices"
+
+ "code.gitea.io/gitea/models/git"
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/models/perm"
+ repo_model "code.gitea.io/gitea/models/repo"
+ "code.gitea.io/gitea/models/unit"
+ user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/modules/translation"
+ "code.gitea.io/gitea/services/convert"
+ repo_service "code.gitea.io/gitea/services/repository"
+ commitstatus_service "code.gitea.io/gitea/services/repository/commitstatus"
+)
+
+type WebSearchGroup struct {
+ Group *structs.Group `json:"group,omitempty"`
+ LatestCommitStatus *git.CommitStatus `json:"latest_commit_status"`
+ LocaleLatestCommitStatus string `json:"locale_latest_commit_status"`
+ Subgroups []*WebSearchGroup `json:"subgroups"`
+ Repos []*repo_service.WebSearchRepository `json:"repos"`
+}
+
+type WebSearchResult struct {
+ OK bool `json:"ok"`
+ Data *WebSearchGroup `json:"data"`
+}
+
+type WebSearchOptions struct {
+ Ctx context.Context
+ Locale translation.Locale
+ Recurse bool
+ Actor *user_model.User
+ RepoOpts repo_model.SearchRepoOptions
+ GroupOpts *group_model.FindGroupsOptions
+ OrgID int64
+}
+
+// results for root-level queries //
+
+type WebSearchGroupRoot struct {
+ Groups []*WebSearchGroup
+ Repos []*repo_service.WebSearchRepository
+}
+
+type WebSearchGroupRootResult struct {
+ OK bool `json:"ok"`
+ Data *WebSearchGroupRoot `json:"data"`
+}
+
+func ToWebSearchRepo(ctx context.Context, repo *repo_model.Repository) *repo_service.WebSearchRepository {
+ return &repo_service.WebSearchRepository{
+ Repository: &structs.Repository{
+ ID: repo.ID,
+ FullName: repo.FullName(),
+ Fork: repo.IsFork,
+ Private: repo.IsPrivate,
+ Template: repo.IsTemplate,
+ Mirror: repo.IsMirror,
+ Stars: repo.NumStars,
+ HTMLURL: repo.HTMLURL(ctx),
+ Link: repo.Link(),
+ Internal: !repo.IsPrivate && repo.Owner.Visibility == structs.VisibleTypePrivate,
+ GroupSortOrder: repo.GroupSortOrder,
+ GroupID: repo.GroupID,
+ },
+ }
+}
+
+func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error {
+ opts.RepoOpts.OwnerID = opts.OrgID
+ opts.RepoOpts.GroupID = 0
+ opts.GroupOpts.OwnerID = opts.OrgID
+ opts.GroupOpts.ParentGroupID = 0
+
+ if w.Group != nil {
+ opts.RepoOpts.GroupID = w.Group.ID
+ opts.RepoOpts.ListAll = true
+ opts.GroupOpts.ParentGroupID = w.Group.ID
+ opts.GroupOpts.ListAll = true
+ }
+ repos, _, err := repo_model.SearchRepository(opts.Ctx, opts.RepoOpts)
+ if err != nil {
+ return err
+ }
+ slices.SortStableFunc(repos, func(a, b *repo_model.Repository) int {
+ return a.GroupSortOrder - b.GroupSortOrder
+ })
+ latestCommitStatuses, err := commitstatus_service.FindReposLatestCommitStatuses(opts.Ctx, repos)
+ if err != nil {
+ log.Error("FindReposLastestCommitStatuses: %v", err)
+ return err
+ }
+ latestIdx := -1
+ for i, r := range repos {
+ wsr := ToWebSearchRepo(opts.Ctx, r)
+ if latestCommitStatuses[i] != nil {
+ wsr.LatestCommitStatus = latestCommitStatuses[i]
+ wsr.LocaleLatestCommitStatus = latestCommitStatuses[i].LocaleString(opts.Locale)
+ if latestIdx > -1 {
+ if latestCommitStatuses[i].UpdatedUnix.AsLocalTime().Unix() > latestCommitStatuses[latestIdx].UpdatedUnix.AsLocalTime().Unix() {
+ latestIdx = i
+ }
+ } else {
+ latestIdx = i
+ }
+ }
+ w.Repos = append(w.Repos, wsr)
+ }
+ if w.Group != nil && latestIdx > -1 {
+ w.LatestCommitStatus = latestCommitStatuses[latestIdx]
+ }
+ w.Subgroups = make([]*WebSearchGroup, 0)
+ groups, err := group_model.FindGroupsByCond(opts.Ctx, opts.GroupOpts, group_model.AccessibleGroupCondition(opts.Actor, opts.OrgID, unit.TypeInvalid, perm.AccessModeRead))
+ if err != nil {
+ return err
+ }
+ for _, g := range groups {
+ toAppend, err := ToWebSearchGroup(g, opts)
+ if err != nil {
+ return err
+ }
+ w.Subgroups = append(w.Subgroups, toAppend)
+ }
+
+ if opts.Recurse {
+ for _, sg := range w.Subgroups {
+ err = sg.doLoadChildren(opts)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func ToWebSearchGroup(group *group_model.Group, opts *WebSearchOptions) (*WebSearchGroup, error) {
+ res := new(WebSearchGroup)
+
+ res.Repos = make([]*repo_service.WebSearchRepository, 0)
+ res.Subgroups = make([]*WebSearchGroup, 0)
+ var err error
+ if group != nil {
+ if res.Group, err = convert.ToAPIGroup(opts.Ctx, group, opts.Actor); err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func SearchRepoGroupWeb(group *group_model.Group, opts *WebSearchOptions) (*WebSearchResult, error) {
+ var res *WebSearchGroup
+ var err error
+ res, err = ToWebSearchGroup(group, opts)
+ if err != nil {
+ return nil, err
+ }
+ err = res.doLoadChildren(opts)
+ if err != nil {
+ return nil, err
+ }
+ return &WebSearchResult{
+ Data: res,
+ OK: true,
+ }, nil
+}
diff --git a/services/group/team.go b/services/group/team.go
new file mode 100644
index 0000000000..96d6341d4c
--- /dev/null
+++ b/services/group/team.go
@@ -0,0 +1,197 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "fmt"
+
+ "code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
+ org_model "code.gitea.io/gitea/models/organization"
+ "code.gitea.io/gitea/models/perm"
+ "code.gitea.io/gitea/models/unit"
+
+ "xorm.io/builder"
+)
+
+func AddTeamToGroup(ctx context.Context, group *group_model.Group, tname string, unitMap map[string]string, canCreateIn *bool, accessMode *perm.AccessMode) error {
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+ t, err := org_model.GetTeam(ctx, group.OwnerID, tname)
+ if err != nil {
+ return err
+ }
+ has := group_model.HasTeamGroup(ctx, group.OwnerID, t.ID, group.ID)
+ if has {
+ return fmt.Errorf("team '%s' already exists in group[%d]", tname, group.ID)
+ }
+ parentGroup, err := group_model.FindGroupTeamByTeamID(ctx, group.ID, t.ID)
+ if err != nil {
+ return err
+ }
+ mode := t.AccessMode
+ canCreateInRepo := t.CanCreateOrgRepo
+ if parentGroup != nil {
+ mode = max(t.AccessMode, parentGroup.AccessMode)
+ canCreateInRepo = parentGroup.CanCreateIn || t.CanCreateOrgRepo
+ }
+ if accessMode != nil {
+ mode = max(mode, *accessMode)
+ }
+ if canCreateIn != nil {
+ canCreateInRepo = *canCreateIn
+ }
+ if err = group.LoadParentGroup(ctx); err != nil {
+ return err
+ }
+ err = group_model.AddTeamGroup(ctx, group.ID, t.ID, group.ID, mode, canCreateInRepo)
+ if err != nil {
+ return err
+ }
+ for unitName, unitPerm := range unitMap {
+ err = UpdateOrCreateGroupUnit(ctx, true, group, t, unit.Units[unit.TypeFromKey(unitName)], perm.ParseAccessMode(unitPerm))
+ if err != nil {
+ return err
+ }
+ }
+ return committer.Commit()
+}
+
+func DeleteTeamFromGroup(ctx context.Context, group *group_model.Group, org int64, teamName string) error {
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+ team, err := org_model.GetTeam(ctx, org, teamName)
+ if err != nil {
+ return err
+ }
+ err = group_model.RemoveTeamGroup(ctx, org, team.ID, group.ID)
+ if err != nil {
+ return err
+ }
+ if _, err = db.GetEngine(ctx).Where("group_id = ?", group.ID).Delete(new(group_model.RepoGroupUnit)); err != nil {
+ return err
+ }
+ return committer.Commit()
+}
+
+func UpdateGroupTeam(ctx context.Context, gt *group_model.RepoGroupTeam, unitMap map[string]string) (err error) {
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+ sess := db.GetEngine(ctx)
+
+ if _, err = sess.ID(gt.ID).AllCols().Update(gt); err != nil {
+ return fmt.Errorf("update: %w", err)
+ }
+ for _, groupUnit := range gt.Units {
+ groupUnit.TeamID = gt.TeamID
+ if v, ok := unitMap[groupUnit.Unit().NameKey]; ok {
+ actualPerm := perm.ParseAccessMode(v)
+ groupUnit.AccessMode = actualPerm
+ }
+ if _, err = sess.
+ Where("team_id=?", gt.TeamID).
+ And("group_id=?", gt.GroupID).
+ And("type = ?", groupUnit.Type).
+ Update(groupUnit); err != nil {
+ return err
+ }
+ }
+ return committer.Commit()
+}
+
+// RecalculateGroupAccess recalculates team access to a group.
+// should only be called if and only if a group was moved from another group.
+func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew bool) error {
+ ctx, committer, err := db.TxContext(ctx)
+ if err != nil {
+ return err
+ }
+ defer committer.Close()
+ if err = g.LoadParentGroup(ctx); err != nil {
+ return err
+ }
+ var teams []*org_model.Team
+ if g.ParentGroup == nil {
+ teams, err = org_model.FindOrgTeams(ctx, g.OwnerID)
+ if err != nil {
+ return err
+ }
+ } else {
+ teams, err = org_model.GetTeamsWithAccessToGroup(ctx, g.OwnerID, g.ParentGroupID, perm.AccessModeRead)
+ if err != nil {
+ return err
+ }
+ }
+ for _, t := range teams {
+ var gt *group_model.RepoGroupTeam
+ if gt, err = group_model.FindGroupTeamByTeamID(ctx, g.ParentGroupID, t.ID); err != nil {
+ return err
+ }
+ if gt != nil {
+ if err = group_model.UpdateTeamGroup(ctx, g.OwnerID, t.ID, g.ID, gt.AccessMode, gt.CanCreateIn, isNew); err != nil {
+ return err
+ }
+ } else {
+ if err = group_model.UpdateTeamGroup(ctx, g.OwnerID, t.ID, g.ID, t.AccessMode, t.IsOwnerTeam() || t.AccessMode >= perm.AccessModeAdmin || t.CanCreateOrgRepo, isNew); err != nil {
+ return err
+ }
+ }
+
+ if err = t.LoadUnits(ctx); err != nil {
+ return err
+ }
+ for _, u := range t.Units {
+ newAccessMode := u.AccessMode
+ if g.ParentGroup == nil {
+ gu, err := group_model.GetGroupUnit(ctx, g.ID, t.ID, u.Type)
+ if err != nil {
+ return err
+ }
+ if gu != nil {
+ newAccessMode = min(newAccessMode, gu.AccessMode)
+ }
+ }
+ err = UpdateOrCreateGroupUnit(ctx, isNew, g, t, u.Unit(), newAccessMode)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return committer.Commit()
+}
+
+func UpdateOrCreateGroupUnit(ctx context.Context, isNew bool, group *group_model.Group, team *org_model.Team, unit unit.Unit, mode perm.AccessMode) error {
+ sess := db.GetEngine(ctx)
+ if isNew {
+ if _, err := sess.Table("repo_group_unit").Insert(&group_model.RepoGroupUnit{
+ Type: unit.Type,
+ TeamID: team.ID,
+ GroupID: group.ID,
+ AccessMode: mode,
+ }); err != nil {
+ return err
+ }
+ } else {
+ if _, err := sess.Table("repo_group_unit").Where(builder.Eq{
+ "type": unit.Type,
+ "team_id": team.ID,
+ "group_id": group.ID,
+ }).Cols("access_mode").Update(&group_model.RepoGroupUnit{
+ AccessMode: mode,
+ }); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/services/group/update.go b/services/group/update.go
new file mode 100644
index 0000000000..47730ce407
--- /dev/null
+++ b/services/group/update.go
@@ -0,0 +1,33 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package group
+
+import (
+ "context"
+ "strings"
+
+ group_model "code.gitea.io/gitea/models/group"
+ "code.gitea.io/gitea/modules/optional"
+ "code.gitea.io/gitea/modules/structs"
+)
+
+type UpdateOptions struct {
+ Name optional.Option[string]
+ Description optional.Option[string]
+ Visibility optional.Option[structs.VisibleType]
+}
+
+func UpdateGroup(ctx context.Context, g *group_model.Group, opts *UpdateOptions) error {
+ if opts.Name.Has() {
+ g.Name = opts.Name.Value()
+ g.LowerName = strings.ToLower(g.Name)
+ }
+ if opts.Description.Has() {
+ g.Description = opts.Description.Value()
+ }
+ if opts.Visibility.Has() {
+ g.Visibility = opts.Visibility.Value()
+ }
+ return group_model.UpdateGroup(ctx, g)
+}
diff --git a/services/issue/commit.go b/services/issue/commit.go
index 93bfa78ae6..402ffd83fd 100644
--- a/services/issue/commit.go
+++ b/services/issue/commit.go
@@ -137,7 +137,7 @@ func UpdateIssuesCommit(ctx context.Context, doer *user_model.User, repo *repo_m
for _, ref := range references.FindAllIssueReferences(c.Message) {
// issue is from another repo
if len(ref.Owner) > 0 && len(ref.Name) > 0 {
- refRepo, err = repo_model.GetRepositoryByOwnerAndName(ctx, ref.Owner, ref.Name)
+ refRepo, err = repo_model.GetRepositoryByOwnerAndName(ctx, ref.Owner, ref.Name, ref.GroupID)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
log.Warn("Repository referenced in commit but does not exist: %v", err)
diff --git a/services/lfs/locks.go b/services/lfs/locks.go
index c2279edaf0..a7285be4d1 100644
--- a/services/lfs/locks.go
+++ b/services/lfs/locks.go
@@ -48,7 +48,7 @@ func handleLockListOut(ctx *context.Context, repo *repo_model.Repository, lock *
func GetListLockHandler(ctx *context.Context) {
rv := getRequestContext(ctx)
- repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, rv.User, rv.Repo)
+ repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, rv.User, rv.Repo, rv.GroupID)
if err != nil {
log.Debug("Could not find repository: %s/%s - %s", rv.User, rv.Repo, err)
ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="gitea-lfs"`)
@@ -135,9 +135,10 @@ func GetListLockHandler(ctx *context.Context) {
func PostLockHandler(ctx *context.Context) {
userName := ctx.PathParam("username")
repoName := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")
+ groupID := ctx.PathParamInt64("group_id")
authorization := ctx.Req.Header.Get("Authorization")
- repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, userName, repoName)
+ repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, userName, repoName, groupID)
if err != nil {
log.Error("Unable to get repository: %s/%s Error: %v", userName, repoName, err)
ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="gitea-lfs"`)
@@ -200,9 +201,10 @@ func PostLockHandler(ctx *context.Context) {
func VerifyLockHandler(ctx *context.Context) {
userName := ctx.PathParam("username")
repoName := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")
+ groupID := ctx.PathParamInt64("group_id")
authorization := ctx.Req.Header.Get("Authorization")
- repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, userName, repoName)
+ repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, userName, repoName, groupID)
if err != nil {
log.Error("Unable to get repository: %s/%s Error: %v", userName, repoName, err)
ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="gitea-lfs"`)
@@ -268,9 +270,10 @@ func VerifyLockHandler(ctx *context.Context) {
func UnLockHandler(ctx *context.Context) {
userName := ctx.PathParam("username")
repoName := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")
+ groupID := ctx.PathParamInt64("group_id")
authorization := ctx.Req.Header.Get("Authorization")
- repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, userName, repoName)
+ repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, userName, repoName, groupID)
if err != nil {
log.Error("Unable to get repository: %s/%s Error: %v", userName, repoName, err)
ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="gitea-lfs"`)
diff --git a/services/lfs/server.go b/services/lfs/server.go
index 0d4243a47e..6ca24f4ced 100644
--- a/services/lfs/server.go
+++ b/services/lfs/server.go
@@ -32,6 +32,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
+ "code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/services/context"
"github.com/golang-jwt/jwt/v5"
@@ -41,6 +42,7 @@ import (
type requestContext struct {
User string
Repo string
+ GroupID int64
Authorization string
RepoGitURL string
}
@@ -422,11 +424,14 @@ func decodeJSON(req *http.Request, v any) error {
func getRequestContext(ctx *context.Context) *requestContext {
ownerName := ctx.PathParam("username")
repoName := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")
+ gid := ctx.PathParamInt64("group_id")
+ groupSegment := util.Iif(gid != 0, fmt.Sprintf("group/%d/", gid), "")
return &requestContext{
User: ownerName,
Repo: repoName,
+ GroupID: gid,
Authorization: ctx.Req.Header.Get("Authorization"),
- RepoGitURL: httplib.GuessCurrentAppURL(ctx) + url.PathEscape(ownerName) + "/" + url.PathEscape(repoName+".git"),
+ RepoGitURL: httplib.GuessCurrentAppURL(ctx) + url.PathEscape(ownerName) + "/" + groupSegment + url.PathEscape(repoName+".git"),
}
}
@@ -453,7 +458,7 @@ func getAuthenticatedMeta(ctx *context.Context, rc *requestContext, p lfs_module
}
func getAuthenticatedRepository(ctx *context.Context, rc *requestContext, requireWrite bool) *repo_model.Repository {
- repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, rc.User, rc.Repo)
+ repository, err := repo_model.GetRepositoryByOwnerAndName(ctx, rc.User, rc.Repo, rc.GroupID)
if err != nil {
log.Error("Unable to get repository: %s/%s Error: %v", rc.User, rc.Repo, err)
writeStatus(ctx, http.StatusNotFound)
diff --git a/services/markup/renderhelper_codepreview.go b/services/markup/renderhelper_codepreview.go
index fd2db0d10f..6f47e9cd55 100644
--- a/services/markup/renderhelper_codepreview.go
+++ b/services/markup/renderhelper_codepreview.go
@@ -31,7 +31,7 @@ func renderRepoFileCodePreview(ctx context.Context, opts markup.RenderCodePrevie
opts.LineStop = opts.LineStart + lineCount
}
- dbRepo, err := repo.GetRepositoryByOwnerAndName(ctx, opts.OwnerName, opts.RepoName)
+ dbRepo, err := repo.GetRepositoryByOwnerAndName(ctx, opts.OwnerName, opts.RepoName, opts.GroupID)
if err != nil {
return "", err
}
diff --git a/services/markup/renderhelper_issueicontitle.go b/services/markup/renderhelper_issueicontitle.go
index 651e2997e0..66a7dcadbe 100644
--- a/services/markup/renderhelper_issueicontitle.go
+++ b/services/markup/renderhelper_issueicontitle.go
@@ -27,7 +27,7 @@ func renderRepoIssueIconTitle(ctx context.Context, opts markup.RenderIssueIconTi
textIssueIndex := fmt.Sprintf("(#%d)", opts.IssueIndex)
dbRepo := webCtx.Repo.Repository
if opts.OwnerName != "" {
- dbRepo, err = repo.GetRepositoryByOwnerAndName(ctx, opts.OwnerName, opts.RepoName)
+ dbRepo, err = repo.GetRepositoryByOwnerAndName(ctx, opts.OwnerName, opts.RepoName, opts.GroupID)
if err != nil {
return "", err
}
diff --git a/services/packages/cargo/index.go b/services/packages/cargo/index.go
index 580d84ebc2..eb4332b84d 100644
--- a/services/packages/cargo/index.go
+++ b/services/packages/cargo/index.go
@@ -109,7 +109,7 @@ func UpdatePackageIndexIfExists(ctx context.Context, doer, owner *user_model.Use
// We do not want to force the creation of the repo here
// cargo http index does not rely on the repo itself,
// so if the repo does not exist, we just do nothing.
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner.Name, IndexRepositoryName)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner.Name, IndexRepositoryName, 0)
if err != nil {
if errors.Is(err, util.ErrNotExist) {
return nil
@@ -208,7 +208,7 @@ func addOrUpdatePackageIndex(ctx context.Context, t *files_service.TemporaryUplo
}
func getOrCreateIndexRepository(ctx context.Context, doer, owner *user_model.User) (*repo_model.Repository, error) {
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner.Name, IndexRepositoryName)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner.Name, IndexRepositoryName, 0)
if err != nil {
if errors.Is(err, util.ErrNotExist) {
repo, err = repo_service.CreateRepositoryDirectly(ctx, doer, owner, repo_service.CreateRepoOptions{
diff --git a/services/repository/adopt.go b/services/repository/adopt.go
index 1255967e59..887d33e3ec 100644
--- a/services/repository/adopt.go
+++ b/services/repository/adopt.go
@@ -208,12 +208,12 @@ func adoptRepository(ctx context.Context, repo *repo_model.Repository, defaultBr
}
// DeleteUnadoptedRepository deletes unadopted repository files from the filesystem
-func DeleteUnadoptedRepository(ctx context.Context, doer, u *user_model.User, repoName string) error {
+func DeleteUnadoptedRepository(ctx context.Context, doer, u *user_model.User, repoName string, groupID int64) error {
if err := repo_model.IsUsableRepoName(repoName); err != nil {
return err
}
- relativePath := repo_model.RelativePath(u.Name, repoName)
+ relativePath := repo_model.RelativePath(u.Name, repoName, groupID)
exist, err := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(relativePath))
if err != nil {
log.Error("Unable to check if %s exists. Error: %v", relativePath, err)
@@ -226,7 +226,7 @@ func DeleteUnadoptedRepository(ctx context.Context, doer, u *user_model.User, re
}
}
- if exist, err := repo_model.IsRepositoryModelExist(ctx, u, repoName); err != nil {
+ if exist, err := repo_model.IsRepositoryModelExist(ctx, u, repoName, groupID); err != nil {
return err
} else if exist {
return repo_model.ErrRepoAlreadyExist{
diff --git a/services/repository/adopt_test.go b/services/repository/adopt_test.go
index a7de918085..b17ad59176 100644
--- a/services/repository/adopt_test.go
+++ b/services/repository/adopt_test.go
@@ -119,7 +119,7 @@ func TestAdoptRepository(t *testing.T) {
unittest.AssertNotExistsBean(t, &repo_model.Repository{OwnerName: user2.Name, Name: "test-adopt"})
- exist, err := util.IsExist(repo_model.RepoPath(user2.Name, "test-adopt"))
+ exist, err := util.IsExist(repo_model.RepoPath(user2.Name, "test-adopt", 0))
assert.NoError(t, err)
assert.True(t, exist) // the repository should be still in the disk
}
diff --git a/services/repository/branch.go b/services/repository/branch.go
index a0572f59c5..ea725eaa32 100644
--- a/services/repository/branch.go
+++ b/services/repository/branch.go
@@ -648,6 +648,7 @@ func deleteBranchSuccessPostProcess(doer *user_model.User, repo *repo_model.Repo
PusherID: doer.ID,
PusherName: doer.Name,
RepoUserName: repo.OwnerName,
+ RepoGroupID: repo.GroupID,
RepoName: repo.Name,
}); err != nil {
log.Error("PushUpdateOptions: %v", err)
diff --git a/services/repository/create.go b/services/repository/create.go
index 25ea827476..70b76e5448 100644
--- a/services/repository/create.go
+++ b/services/repository/create.go
@@ -13,6 +13,7 @@ import (
"time"
"code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/perm"
access_model "code.gitea.io/gitea/models/perm/access"
@@ -54,6 +55,7 @@ type CreateRepoOptions struct {
TrustModel repo_model.TrustModelType
MirrorInterval string
ObjectFormatName string
+ GroupID int64
}
func prepareRepoCommit(ctx context.Context, repo *repo_model.Repository, tmpDir string, opts CreateRepoOptions) error {
@@ -235,6 +237,24 @@ func CreateRepositoryDirectly(ctx context.Context, doer, owner *user_model.User,
if opts.ObjectFormatName != git.Sha1ObjectFormat.Name() && opts.ObjectFormatName != git.Sha256ObjectFormat.Name() {
return nil, fmt.Errorf("unsupported object format: %s", opts.ObjectFormatName)
}
+ if opts.GroupID < 0 {
+ opts.GroupID = 0
+ }
+
+ // ensure that the parent group is owned by same user
+ if opts.GroupID > 0 {
+ newGroup, err := group_model.GetGroupByID(ctx, opts.GroupID)
+ if err != nil {
+ if group_model.IsErrGroupNotExist(err) {
+ opts.GroupID = 0
+ } else {
+ return nil, err
+ }
+ }
+ if newGroup.OwnerID != owner.ID {
+ return nil, fmt.Errorf("group[%d] is not owned by user[%d]", newGroup.ID, owner.ID)
+ }
+ }
repo := &repo_model.Repository{
OwnerID: owner.ID,
@@ -257,6 +277,7 @@ func CreateRepositoryDirectly(ctx context.Context, doer, owner *user_model.User,
DefaultBranch: opts.DefaultBranch,
DefaultWikiBranch: setting.Repository.DefaultBranch,
ObjectFormatName: opts.ObjectFormatName,
+ GroupID: opts.GroupID,
}
// 1 - create the repository database operations first
@@ -348,7 +369,7 @@ func createRepositoryInDB(ctx context.Context, doer, u *user_model.User, repo *r
return err
}
- has, err := repo_model.IsRepositoryModelExist(ctx, u, repo.Name)
+ has, err := repo_model.IsRepositoryModelExist(ctx, u, repo.Name, repo.GroupID)
if err != nil {
return fmt.Errorf("IsRepositoryExist: %w", err)
} else if has {
diff --git a/services/repository/create_test.go b/services/repository/create_test.go
index b8c2ea59dd..9786b87763 100644
--- a/services/repository/create_test.go
+++ b/services/repository/create_test.go
@@ -27,7 +27,7 @@ func TestCreateRepositoryDirectly(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, createdRepo)
- exist, err := util.IsExist(repo_model.RepoPath(user2.Name, createdRepo.Name))
+ exist, err := util.IsExist(repo_model.RepoPath(user2.Name, createdRepo.Name, createdRepo.GroupID))
assert.NoError(t, err)
assert.True(t, exist)
@@ -38,7 +38,7 @@ func TestCreateRepositoryDirectly(t *testing.T) {
// a failed creating because some mock data
// create the repository directory so that the creation will fail after database record created.
- assert.NoError(t, os.MkdirAll(repo_model.RepoPath(user2.Name, createdRepo.Name), os.ModePerm))
+ assert.NoError(t, os.MkdirAll(repo_model.RepoPath(user2.Name, createdRepo.Name, createdRepo.GroupID), os.ModePerm))
createdRepo2, err := CreateRepositoryDirectly(t.Context(), user2, user2, CreateRepoOptions{
Name: "created-repo",
@@ -49,7 +49,7 @@ func TestCreateRepositoryDirectly(t *testing.T) {
// assert the cleanup is successful
unittest.AssertNotExistsBean(t, &repo_model.Repository{OwnerName: user2.Name, Name: createdRepo.Name})
- exist, err = util.IsExist(repo_model.RepoPath(user2.Name, createdRepo.Name))
+ exist, err = util.IsExist(repo_model.RepoPath(user2.Name, createdRepo.Name, createdRepo.GroupID))
assert.NoError(t, err)
assert.False(t, exist)
}
diff --git a/services/repository/fork_test.go b/services/repository/fork_test.go
index 680a7f3207..faf14b0c5a 100644
--- a/services/repository/fork_test.go
+++ b/services/repository/fork_test.go
@@ -63,7 +63,7 @@ func TestForkRepositoryCleanup(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, fork)
- exist, err := util.IsExist(repo_model.RepoPath(user2.Name, "test"))
+ exist, err := util.IsExist(repo_model.RepoPath(user2.Name, "test", 0))
assert.NoError(t, err)
assert.True(t, exist)
@@ -72,7 +72,7 @@ func TestForkRepositoryCleanup(t *testing.T) {
// a failed creating because some mock data
// create the repository directory so that the creation will fail after database record created.
- assert.NoError(t, os.MkdirAll(repo_model.RepoPath(user2.Name, "test"), os.ModePerm))
+ assert.NoError(t, os.MkdirAll(repo_model.RepoPath(user2.Name, "test", 0), os.ModePerm))
fork2, err := ForkRepository(t.Context(), user2, user2, ForkRepoOptions{
BaseRepo: repo10,
@@ -84,7 +84,7 @@ func TestForkRepositoryCleanup(t *testing.T) {
// assert the cleanup is successful
unittest.AssertNotExistsBean(t, &repo_model.Repository{OwnerName: user2.Name, Name: "test"})
- exist, err = util.IsExist(repo_model.RepoPath(user2.Name, "test"))
+ exist, err = util.IsExist(repo_model.RepoPath(user2.Name, "test", 0))
assert.NoError(t, err)
assert.False(t, exist)
}
diff --git a/services/repository/lfs_test.go b/services/repository/lfs_test.go
index 1335d48cb1..fc9e8386ba 100644
--- a/services/repository/lfs_test.go
+++ b/services/repository/lfs_test.go
@@ -28,7 +28,7 @@ func TestGarbageCollectLFSMetaObjects(t *testing.T) {
err := storage.Init()
assert.NoError(t, err)
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1")
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1", 0)
assert.NoError(t, err)
// add lfs object
diff --git a/services/repository/push.go b/services/repository/push.go
index 3c9a070746..12ad0cc5cd 100644
--- a/services/repository/push.go
+++ b/services/repository/push.go
@@ -82,7 +82,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
ctx, _, finished := process.GetManager().AddContext(graceful.GetManager().HammerContext(), fmt.Sprintf("PushUpdates: %s/%s", optsList[0].RepoUserName, optsList[0].RepoName))
defer finished()
- repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, optsList[0].RepoUserName, optsList[0].RepoName)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, optsList[0].RepoUserName, optsList[0].RepoName, optsList[0].RepoGroupID)
if err != nil {
return fmt.Errorf("GetRepositoryByOwnerAndName failed: %w", err)
}
diff --git a/services/repository/repository.go b/services/repository/repository.go
index 2ac95ffe3a..ed59a3aa84 100644
--- a/services/repository/repository.go
+++ b/services/repository/repository.go
@@ -308,7 +308,7 @@ func HasWiki(ctx context.Context, repo *repo_model.Repository) bool {
}
// CheckCreateRepository check if doer could create a repository in new owner
-func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, name string, overwriteOrAdopt bool) error {
+func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, name string, gid int64, overwriteOrAdopt bool) error {
if !doer.CanCreateRepoIn(owner) {
return repo_model.ErrReachLimitOfRepo{Limit: owner.MaxRepoCreation}
}
@@ -317,13 +317,13 @@ func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, na
return err
}
- has, err := repo_model.IsRepositoryModelExist(ctx, owner, name)
+ has, err := repo_model.IsRepositoryModelExist(ctx, owner, name, gid)
if err != nil {
return err
} else if has {
return repo_model.ErrRepoAlreadyExist{Uname: owner.Name, Name: name}
}
- repo := repo_model.StorageRepo(repo_model.RelativePath(owner.Name, name))
+ repo := repo_model.StorageRepo(repo_model.RelativePath(owner.Name, name, gid))
isExist, err := gitrepo.IsRepositoryExist(ctx, repo)
if err != nil {
log.Error("Unable to check if %s exists. Error: %v", repo.RelativePath(), err)
diff --git a/services/repository/transfer.go b/services/repository/transfer.go
index 0e2c885b1d..cc65260c3e 100644
--- a/services/repository/transfer.go
+++ b/services/repository/transfer.go
@@ -91,12 +91,12 @@ func AcceptTransferOwnership(ctx context.Context, repo *repo_model.Repository, d
}
// isRepositoryModelOrDirExist returns true if the repository with given name under user has already existed.
-func isRepositoryModelOrDirExist(ctx context.Context, u *user_model.User, repoName string) (bool, error) {
- has, err := repo_model.IsRepositoryModelExist(ctx, u, repoName)
+func isRepositoryModelOrDirExist(ctx context.Context, u *user_model.User, repoName string, groupID int64) (bool, error) {
+ has, err := repo_model.IsRepositoryModelExist(ctx, u, repoName, groupID)
if err != nil {
return false, err
}
- repo := repo_model.StorageRepo(repo_model.RelativePath(u.Name, repoName))
+ repo := repo_model.StorageRepo(repo_model.RelativePath(u.Name, repoName, groupID))
isExist, err := gitrepo.IsRepositoryExist(ctx, repo)
return has || isExist, err
}
@@ -118,7 +118,7 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName
}
if repoRenamed {
- oldRelativePath, newRelativePath := repo_model.RelativePath(newOwnerName, repo.Name), repo_model.RelativePath(oldOwnerName, repo.Name)
+ oldRelativePath, newRelativePath := repo_model.RelativePath(newOwnerName, repo.Name, 0), repo_model.RelativePath(oldOwnerName, repo.Name, repo.GroupID)
if err := gitrepo.RenameRepository(ctx, repo_model.StorageRepo(oldRelativePath), repo_model.StorageRepo(newRelativePath)); err != nil {
log.Error("Unable to move repository %s/%s directory from %s back to correct place %s: %v", oldOwnerName, repo.Name,
oldRelativePath, newRelativePath, err)
@@ -126,7 +126,7 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName
}
if wikiRenamed {
- oldRelativePath, newRelativePath := repo_model.RelativeWikiPath(newOwnerName, repo.Name), repo_model.RelativeWikiPath(oldOwnerName, repo.Name)
+ oldRelativePath, newRelativePath := repo_model.RelativeWikiPath(newOwnerName, repo.Name, 0), repo_model.RelativeWikiPath(oldOwnerName, repo.Name, repo.GroupID)
if err := gitrepo.RenameRepository(ctx, repo_model.StorageRepo(oldRelativePath), repo_model.StorageRepo(newRelativePath)); err != nil {
log.Error("Unable to move wiki for repository %s/%s directory from %s back to correct place %s: %v", oldOwnerName, repo.Name,
oldRelativePath, newRelativePath, err)
@@ -154,7 +154,7 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName
newOwnerName = newOwner.Name // ensure capitalisation matches
// Check if new owner has repository with same name.
- if has, err := isRepositoryModelOrDirExist(ctx, newOwner, repo.Name); err != nil {
+ if has, err := isRepositoryModelOrDirExist(ctx, newOwner, repo.Name, 0); err != nil {
return fmt.Errorf("IsRepositoryExist: %w", err)
} else if has {
return repo_model.ErrRepoAlreadyExist{
@@ -304,19 +304,19 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName
}
// Rename remote repository to new path and delete local copy.
- oldRelativePath, newRelativePath := repo_model.RelativePath(oldOwner.Name, repo.Name), repo_model.RelativePath(newOwner.Name, repo.Name)
+ oldRelativePath, newRelativePath := repo_model.RelativePath(oldOwner.Name, repo.Name, repo.GroupID), repo_model.RelativePath(newOwner.Name, repo.Name, 0)
if err := gitrepo.RenameRepository(ctx, repo_model.StorageRepo(oldRelativePath), repo_model.StorageRepo(newRelativePath)); err != nil {
return fmt.Errorf("rename repository directory: %w", err)
}
repoRenamed = true
// Rename remote wiki repository to new path and delete local copy.
- wikiStorageRepo := repo_model.StorageRepo(repo_model.RelativeWikiPath(oldOwner.Name, repo.Name))
+ wikiStorageRepo := repo_model.StorageRepo(repo_model.RelativeWikiPath(oldOwner.Name, repo.Name, repo.GroupID))
if isExist, err := gitrepo.IsRepositoryExist(ctx, wikiStorageRepo); err != nil {
log.Error("Unable to check if %s exists. Error: %v", wikiStorageRepo.RelativePath(), err)
return err
} else if isExist {
- if err := gitrepo.RenameRepository(ctx, wikiStorageRepo, repo_model.StorageRepo(repo_model.RelativeWikiPath(newOwner.Name, repo.Name))); err != nil {
+ if err := gitrepo.RenameRepository(ctx, wikiStorageRepo, repo_model.StorageRepo(repo_model.RelativeWikiPath(newOwner.Name, repo.Name, 0))); err != nil {
return fmt.Errorf("rename repository wiki: %w", err)
}
wikiRenamed = true
@@ -365,7 +365,7 @@ func changeRepositoryName(ctx context.Context, repo *repo_model.Repository, newR
return err
}
- has, err := isRepositoryModelOrDirExist(ctx, repo.Owner, newRepoName)
+ has, err := isRepositoryModelOrDirExist(ctx, repo.Owner, newRepoName, repo.GroupID)
if err != nil {
return fmt.Errorf("IsRepositoryExist: %w", err)
} else if has {
@@ -376,13 +376,13 @@ func changeRepositoryName(ctx context.Context, repo *repo_model.Repository, newR
}
if err = gitrepo.RenameRepository(ctx, repo,
- repo_model.StorageRepo(repo_model.RelativePath(repo.OwnerName, newRepoName))); err != nil {
+ repo_model.StorageRepo(repo_model.RelativePath(repo.OwnerName, newRepoName, repo.GroupID))); err != nil {
return fmt.Errorf("rename repository directory: %w", err)
}
if HasWiki(ctx, repo) {
if err = gitrepo.RenameRepository(ctx, repo.WikiStorageRepo(), repo_model.StorageRepo(
- repo_model.RelativeWikiPath(repo.OwnerName, newRepoName))); err != nil {
+ repo_model.RelativeWikiPath(repo.OwnerName, newRepoName, repo.GroupID))); err != nil {
return fmt.Errorf("rename repository wiki: %w", err)
}
}
diff --git a/services/repository/transfer_test.go b/services/repository/transfer_test.go
index 8d73fef7f4..772b48515f 100644
--- a/services/repository/transfer_test.go
+++ b/services/repository/transfer_test.go
@@ -47,10 +47,10 @@ func TestTransferOwnership(t *testing.T) {
assert.EqualValues(t, 1, transferredRepo.OwnerID) // repo_transfer.yml id=1
unittest.AssertNotExistsBean(t, &repo_model.RepoTransfer{ID: 1})
- exist, err := util.IsExist(repo_model.RepoPath("org3", "repo3"))
+ exist, err := util.IsExist(repo_model.RepoPath("org3", "repo3", 0))
assert.NoError(t, err)
assert.False(t, exist)
- exist, err = util.IsExist(repo_model.RepoPath("user1", "repo3"))
+ exist, err = util.IsExist(repo_model.RepoPath("user1", "repo3", 0))
assert.NoError(t, err)
assert.True(t, exist)
unittest.AssertExistsAndLoadBean(t, &activities_model.Action{
diff --git a/services/user/user.go b/services/user/user.go
index 360fc67670..1d79abdcad 100644
--- a/services/user/user.go
+++ b/services/user/user.go
@@ -11,6 +11,7 @@ import (
"time"
"code.gitea.io/gitea/models/db"
+ group_model "code.gitea.io/gitea/models/group"
"code.gitea.io/gitea/models/organization"
packages_model "code.gitea.io/gitea/models/packages"
repo_model "code.gitea.io/gitea/models/repo"
@@ -78,6 +79,10 @@ func RenameUser(ctx context.Context, u *user_model.User, newUserName string, doe
return err
}
+ if err = group_model.UpdateGroupOwnerName(ctx, oldUserName, newUserName); err != nil {
+ return err
+ }
+
if err = user_model.NewUserRedirect(ctx, u.ID, oldUserName, newUserName); err != nil {
return err
}
diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json
new file mode 100644
index 0000000000..ffcfd2c43c
--- /dev/null
+++ b/templates/swagger/v1_groups.json
@@ -0,0 +1,15701 @@
+{
+ "paths": {
+ "/repos/{owner}/group/{group_id}/{repo}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repository",
+ "operationId": "repoGet",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Repository"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repository",
+ "operationId": "repoDelete",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to delete",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to delete",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a repository's properties. Only fields that are set will be changed.",
+ "operationId": "repoEdit",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to edit",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to edit",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Properties of a repo that you can edit",
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditRepoOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all artifacts for a repository",
+ "operationId": "getArtifacts",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the artifact",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ArtifactsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific artifact for a workflow run",
+ "operationId": "getArtifact",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the artifact",
+ "name": "artifact_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Artifact"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Deletes a specific artifact for a workflow run",
+ "operationId": "deleteArtifact",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the artifact",
+ "name": "artifact_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Downloads a specific artifact for a workflow run redirects to blob url",
+ "operationId": "downloadArtifact",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the artifact",
+ "name": "artifact_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "302": {
+ "description": "redirect to the blob download"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all jobs for a repository",
+ "operationId": "listWorkflowJobs",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific workflow job for a workflow run",
+ "operationId": "getWorkflowJob",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the job",
+ "name": "job_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJob"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Downloads the job logs for a workflow run",
+ "operationId": "downloadActionsRunJobLogs",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the job",
+ "name": "job_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "output blob content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repo-level runners",
+ "operationId": "getRepoRunners",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "filter by disabled status (true or false)",
+ "name": "disabled",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RunnerList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repository's actions runner registration token",
+ "operationId": "repoCreateRunnerRegistrationToken",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RegistrationToken"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repo-level runner",
+ "operationId": "getRepoRunner",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the runner",
+ "name": "runner_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Runner"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repo-level runner",
+ "operationId": "deleteRepoRunner",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the runner",
+ "name": "runner_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "runner has been deleted"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a repo-level runner",
+ "operationId": "updateRepoRunner",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the runner",
+ "name": "runner_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditActionRunnerOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Runner"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all runs for a repository run",
+ "operationId": "getWorkflowRuns",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow event name",
+ "name": "event",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "workflow branch",
+ "name": "branch",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "triggered by user",
+ "name": "actor",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "triggering sha of the workflow run",
+ "name": "head_sha",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowRunsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific workflow run",
+ "operationId": "GetWorkflowRun",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a workflow run",
+ "operationId": "deleteActionRun",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "runid of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all artifacts for a repository run",
+ "operationId": "getArtifactsOfRun",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "runid of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the artifact",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ArtifactsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/attempts/{attempt}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific workflow run attempt",
+ "operationId": "getWorkflowRunAttempt",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "logical attempt number of the run",
+ "name": "attempt",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/attempts/{attempt}/jobs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all jobs for a workflow run attempt",
+ "operationId": "listWorkflowRunAttemptJobs",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "logical attempt number of the run",
+ "name": "attempt",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all jobs for a workflow run",
+ "operationId": "listWorkflowRunJobs",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "runid of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs/{job_id}/rerun": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reruns a specific workflow job in a run",
+ "operationId": "rerunWorkflowJob",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the job",
+ "name": "job_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/WorkflowJob"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/rerun": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reruns an entire workflow run",
+ "operationId": "rerunWorkflowRun",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/rerun-failed-jobs": {
+ "post": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reruns all failed jobs in a workflow run",
+ "operationId": "rerunFailedWorkflowRun",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List an repo's actions secrets",
+ "operationId": "repoListActionsSecrets",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/SecretList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create or Update a secret value in a repository",
+ "operationId": "updateRepoSecret",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repository",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the secret",
+ "name": "secretname",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateOrUpdateSecretOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "response when creating a secret"
+ },
+ "204": {
+ "description": "response when updating a secret"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a secret in a repository",
+ "operationId": "deleteRepoSecret",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repository",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the secret",
+ "name": "secretname",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "delete one secret of the repository"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's action tasks",
+ "operationId": "ListActionTasks",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results, default maximum page size is 50",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TasksList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/variables": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repo-level variables list",
+ "operationId": "getRepoVariablesList",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/VariableList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repo-level variable",
+ "operationId": "getRepoVariable",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionVariable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a repo-level variable",
+ "operationId": "updateRepoVariable",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateVariableOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "response when updating a repo-level variable"
+ },
+ "204": {
+ "description": "response when updating a repo-level variable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a repo-level variable",
+ "operationId": "createRepoVariable",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateVariableOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "response when creating a repo-level variable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "409": {
+ "description": "variable name already exists."
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repo-level variable",
+ "operationId": "deleteRepoVariable",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionVariable"
+ },
+ "201": {
+ "description": "response when deleting a variable"
+ },
+ "204": {
+ "description": "response when deleting a variable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List repository workflows",
+ "operationId": "ActionsListRepositoryWorkflows",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionWorkflowList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a workflow",
+ "operationId": "ActionsGetWorkflow",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionWorkflow"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Disable a workflow",
+ "operationId": "ActionsDisableWorkflow",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a workflow dispatch event",
+ "operationId": "ActionsDispatchWorkflow",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateActionWorkflowDispatch"
+ }
+ },
+ {
+ "type": "boolean",
+ "description": "Whether the response should include the workflow run ID and URLs.",
+ "name": "return_run_details",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RunDetails"
+ },
+ "204": {
+ "description": "No Content, if return_run_details is missing or false"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Enable a workflow",
+ "operationId": "ActionsEnableWorkflow",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's activity feeds",
+ "operationId": "repoListActivityFeeds",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date",
+ "description": "the date of the activities to be found",
+ "name": "date",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActivityFeedsList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get an archive of a repository",
+ "operationId": "repoGetArchive",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the git reference for download with attached archive format (e.g. master.zip)",
+ "name": "archive",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "subpath of the repository to download",
+ "name": "path",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/assignees": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Return all users that have write access and can be assigned to issues",
+ "operationId": "repoGetAssignees",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/avatar": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update avatar",
+ "operationId": "repoUpdateAvatar",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateRepoAvatarOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete avatar",
+ "operationId": "repoDeleteAvatar",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List branch protections for a repository",
+ "operationId": "repoListBranchProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchProtectionList"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a branch protections for a repository",
+ "operationId": "repoCreateBranchProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateBranchProtectionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/BranchProtection"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update the priorities of branch protections for a repository.",
+ "operationId": "repoUpdateBranchProtectionPriories",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateBranchProtectionPriories"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific branch protection for the repository",
+ "operationId": "repoGetBranchProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of protected branch",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific branch protection for the repository",
+ "operationId": "repoDeleteBranchProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of protected branch",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
+ "operationId": "repoEditBranchProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of protected branch",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditBranchProtectionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branches": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's branches",
+ "operationId": "repoListBranches",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchList"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a branch",
+ "operationId": "repoCreateBranch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateBranchRepoOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Branch"
+ },
+ "403": {
+ "description": "The branch is archived or a mirror."
+ },
+ "404": {
+ "description": "The old branch does not exist."
+ },
+ "409": {
+ "description": "The branch with the same name already exists."
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
+ "operationId": "repoGetBranch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "branch to get",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Branch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a branch reference to a new commit",
+ "operationId": "repoUpdateBranch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the branch",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateBranchRepoOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific branch from a repository",
+ "operationId": "repoDeleteBranch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "branch to delete",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Rename a branch",
+ "operationId": "repoRenameBranch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the branch",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/RenameBranchRepoOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's collaborators",
+ "operationId": "repoListCollaborators",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a user is a collaborator of a repository",
+ "operationId": "repoCheckCollaborator",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to check for being a collaborator",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add or Update a collaborator to a repository",
+ "operationId": "repoAddCollaborator",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to add or update as a collaborator",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/AddCollaboratorOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a collaborator from a repository",
+ "operationId": "repoDeleteCollaborator",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the collaborator to delete",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repository permissions for a user",
+ "operationId": "repoGetRepoPermissions",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the collaborator whose permissions are to be obtained",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoCollaboratorPermission"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a list of all commits from a repository",
+ "operationId": "repoGetAllCommits",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "SHA or branch to start listing commits from (usually 'master')",
+ "name": "sha",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "filepath of a file/dir",
+ "name": "path",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only commits after this date will be returned (ISO 8601 format)",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only commits before this date will be returned (ISO 8601 format)",
+ "name": "until",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include diff stats for every commit (disable for speedup, default 'true')",
+ "name": "stat",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results (ignored if used with 'path')",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "commits that match the given specifier will not be listed.",
+ "name": "not",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/EmptyRepository"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's combined status, by branch/tag/commit reference",
+ "operationId": "repoGetCombinedStatusByRef",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of branch/tag/commit",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CombinedStatus"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's statuses, by branch/tag/commit reference",
+ "operationId": "repoListStatusesByRef",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of branch/tag/commit",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "leastindex",
+ "highestindex"
+ ],
+ "type": "string",
+ "description": "type of sort",
+ "name": "sort",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "pending",
+ "success",
+ "error",
+ "failure",
+ "warning"
+ ],
+ "type": "string",
+ "description": "type of state",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitStatusList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the merged pull request of the commit",
+ "operationId": "repoGetCommitPullRequest",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "SHA of the commit to get",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get commit comparison information",
+ "operationId": "repoCompareDiff",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "compare two branches or commits",
+ "name": "basehead",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Compare"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents": {
+ "get": {
+ "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the metadata of all the entries of the root dir.",
+ "operationId": "repoGetContentsList",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Modify multiple files in a repository",
+ "operationId": "repoChangeFiles",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ChangeFilesOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/FilesResponse"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": {
+ "get": {
+ "description": "It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.",
+ "operationId": "repoGetContentsExt",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory.",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the name of the commit/branch/tag, default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message.",
+ "name": "includes",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsExtResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": {
+ "get": {
+ "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.",
+ "operationId": "repoGetContents",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the dir, file, symlink or submodule in the repo",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set",
+ "operationId": "repoUpdateFile",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to update",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/UpdateFileOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "201": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a file in a repository",
+ "operationId": "repoCreateFile",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to create",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateFileOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a file in a repository",
+ "operationId": "repoDeleteFile",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to delete",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DeleteFileOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/FileDeleteResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/diffpatch": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Apply diff patch to repository",
+ "operationId": "repoApplyDiffPatch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ApplyDiffPatchFileOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the EditorConfig definitions of a file in a repository",
+ "operationId": "repoGetEditorConfig",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "filepath of file to get",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/file-contents": {
+ "get": {
+ "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the metadata and contents of requested files",
+ "operationId": "repoGetFileContents",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}",
+ "name": "body",
+ "in": "query",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "description": "Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size > 0`, they can be requested separately by using the `download_url`.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the metadata and contents of requested files",
+ "operationId": "repoGetFileContentsPost",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GetFilesOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/forks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's forks",
+ "operationId": "listForks",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepositoryList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Fork a repository",
+ "operationId": "createFork",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to fork",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to fork",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateForkOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "The repository with the same name already exists."
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the blob of a repository.",
+ "operationId": "GetBlob",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitBlobResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a single commit from a repository",
+ "operationId": "repoGetSingleCommit",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "a git ref or commit sha",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "include diff stats for every commit (disable for speedup, default 'true')",
+ "name": "stat",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Commit"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's diff or patch",
+ "operationId": "repoDownloadCommitDiffOrPatch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "SHA of the commit to get",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "diff",
+ "patch"
+ ],
+ "type": "string",
+ "description": "whether the output is diff or patch",
+ "name": "diffType",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/string"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a note corresponding to a single commit from a repository",
+ "operationId": "repoGetNote",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "a git ref or commit sha",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Note"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/refs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get specified ref or filtered repository's refs",
+ "operationId": "repoListAllGitRefs",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReferenceList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get specified ref or filtered repository's refs",
+ "operationId": "repoListGitRefs",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "part or full name of the ref",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReferenceList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
+ "operationId": "GetAnnotatedTag",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AnnotatedTag"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the tree of a repository.",
+ "operationId": "GetTree",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "show all directories and files",
+ "name": "recursive",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "number of items per page",
+ "name": "per_page",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitTreeResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List the hooks in a repository",
+ "operationId": "repoListHooks",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/HookList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a hook",
+ "operationId": "repoCreateHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateHookOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/git": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List the Git hooks in a repository",
+ "operationId": "repoListGitHooks",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitHookList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a Git hook",
+ "operationId": "repoGetGitHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitHook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a Git hook in a repository",
+ "operationId": "repoDeleteGitHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a Git hook in a repository",
+ "operationId": "repoEditGitHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditGitHookOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitHook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a hook",
+ "operationId": "repoGetHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a hook in a repository",
+ "operationId": "repoDeleteHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the hook to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a hook in a repository",
+ "operationId": "repoEditHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the hook",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditHookOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Test a push webhook",
+ "operationId": "repoTestHook",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the hook to test",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_config": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Returns the issue config for a repo",
+ "operationId": "repoGetIssueConfig",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoIssueConfig"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Returns the validation information for a issue config",
+ "operationId": "repoValidateIssueConfig",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoIssueConfigValidation"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_templates": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get available issue templates for a repository",
+ "operationId": "repoGetIssueTemplates",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueTemplates"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List a repository's issues",
+ "operationId": "issueListIssues",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "closed",
+ "open",
+ "all"
+ ],
+ "type": "string",
+ "description": "whether issue is open or closed",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "comma separated list of label names. Fetch only issues that have any of this label names. Non existent labels are discarded.",
+ "name": "labels",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "search string",
+ "name": "q",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "issues",
+ "pulls"
+ ],
+ "type": "string",
+ "description": "filter by type (issues / pulls) if set",
+ "name": "type",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded",
+ "name": "milestones",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Only show items which were created by the given user",
+ "name": "created_by",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Only show items for which the given user is assigned",
+ "name": "assigned_by",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Only show items in which the given user was mentioned",
+ "name": "mentioned_by",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "issueCreateIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateIssueOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "412": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List all comments in a repository",
+ "operationId": "issueGetRepoComments",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated since the provided time are returned.",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a comment",
+ "operationId": "issueGetComment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a comment",
+ "operationId": "issueDeleteComment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of comment to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit a comment",
+ "operationId": "issueEditComment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditIssueCommentOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List comment's attachments",
+ "operationId": "issueListIssueCommentAttachments",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "multipart/form-data"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create a comment attachment",
+ "operationId": "issueCreateIssueCommentAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the attachment",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "file",
+ "description": "attachment to upload",
+ "name": "attachment",
+ "in": "formData",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "413": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a comment attachment",
+ "operationId": "issueGetIssueCommentAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to get",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a comment attachment",
+ "operationId": "issueDeleteIssueCommentAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to delete",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit a comment attachment",
+ "operationId": "issueEditIssueCommentAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to edit",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditAttachmentOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a list of reactions from a comment of an issue",
+ "operationId": "issueGetCommentReactions",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReactionList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a reaction to a comment of an issue",
+ "operationId": "issuePostCommentReaction",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Reaction"
+ },
+ "201": {
+ "$ref": "#/responses/Reaction"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove a reaction from a comment of an issue",
+ "operationId": "issueDeleteCommentReaction",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's pinned issues",
+ "operationId": "repoListPinnedIssues",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get an issue",
+ "operationId": "issueGetIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete an issue",
+ "operationId": "issueDelete",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue to delete",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "description": "Pass `content_version` to enable optimistic locking on body edits.\nIf the version doesn't match the current value, the request fails with 409 Conflict.\n",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "issueEditIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to edit",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditIssueOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "412": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List issue's attachments",
+ "operationId": "issueListIssueAttachments",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "multipart/form-data"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create an issue attachment",
+ "operationId": "issueCreateIssueAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the attachment",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "file",
+ "description": "attachment to upload",
+ "name": "attachment",
+ "in": "formData",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "413": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get an issue attachment",
+ "operationId": "issueGetIssueAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to get",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete an issue attachment",
+ "operationId": "issueDeleteIssueAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to delete",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit an issue attachment",
+ "operationId": "issueEditIssueAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to edit",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditAttachmentOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List issues that are blocked by this issue",
+ "operationId": "issueListBlocks",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Block the issue given in the body by the issue in path",
+ "operationId": "issueCreateIssueBlocking",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "description": "the issue does not exist"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unblock the issue given in the body by the issue in path",
+ "operationId": "issueRemoveIssueBlocking",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List all comments on an issue",
+ "operationId": "issueGetComments",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated since the specified time are returned.",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a comment to an issue",
+ "operationId": "issueCreateComment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateIssueCommentOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Comment"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": {
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a comment",
+ "operationId": "issueDeleteCommentDeprecated",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "this parameter is ignored",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of comment to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit a comment",
+ "operationId": "issueEditCommentDeprecated",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "this parameter is ignored",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditIssueCommentOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "issueEditIssueDeadline",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to create or update a deadline on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditDeadlineOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/IssueDeadline"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List an issue's dependencies, i.e all issues that block this issue.",
+ "operationId": "issueListIssueDependencies",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Make the issue in the url depend on the issue in the form.",
+ "operationId": "issueCreateIssueDependencies",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "description": "the issue does not exist"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove an issue dependency",
+ "operationId": "issueRemoveIssueDependencies",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get an issue's labels",
+ "operationId": "issueGetLabels",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Replace an issue's labels",
+ "operationId": "issueReplaceLabels",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueLabelsOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a label to an issue",
+ "operationId": "issueAddLabel",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueLabelsOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove all labels from an issue",
+ "operationId": "issueClearLabels",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": {
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove a label from an issue",
+ "operationId": "issueRemoveLabel",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to remove",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Lock an issue",
+ "operationId": "issueLockIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/LockIssueOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unlock an issue",
+ "operationId": "issueUnlockIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": {
+ "post": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Pin an Issue",
+ "operationId": "pinIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue to pin",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unpin an Issue",
+ "operationId": "unpinIssue",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue to unpin",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": {
+ "patch": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Moves the Pin to the given Position",
+ "operationId": "moveIssuePin",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "the new position",
+ "name": "position",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a list reactions of an issue",
+ "operationId": "issueGetIssueReactions",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReactionList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a reaction to an issue",
+ "operationId": "issuePostIssueReaction",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Reaction"
+ },
+ "201": {
+ "$ref": "#/responses/Reaction"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove a reaction from an issue",
+ "operationId": "issueDeleteIssueReaction",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": {
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete an issue's existing stopwatch.",
+ "operationId": "issueDeleteStopWatch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to stop the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot cancel a non-existent stopwatch"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Start stopwatch on an issue.",
+ "operationId": "issueStartStopWatch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to create the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot start a stopwatch again if it already exists"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Stop an issue's existing stopwatch.",
+ "operationId": "issueStopStopWatch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to stop the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot stop a non-existent stopwatch"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get users who subscribed on an issue.",
+ "operationId": "issueSubscriptions",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Check if user is subscribed to an issue",
+ "operationId": "issueCheckSubscription",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WatchInfo"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Subscribe user to issue",
+ "operationId": "issueAddSubscription",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to subscribe the issue to",
+ "name": "user",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Already subscribed"
+ },
+ "201": {
+ "description": "Successfully Subscribed"
+ },
+ "304": {
+ "description": "User can only subscribe itself if he is no admin"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unsubscribe user from issue",
+ "operationId": "issueDeleteSubscription",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to unsubscribe from an issue",
+ "name": "user",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Already unsubscribed"
+ },
+ "201": {
+ "description": "Successfully Unsubscribed"
+ },
+ "304": {
+ "description": "User can only subscribe itself if he is no admin"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List all comments and events on an issue",
+ "operationId": "issueGetCommentsAndTimeline",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated since the specified time are returned.",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TimelineList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List an issue's tracked times",
+ "operationId": "issueTrackedTimes",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "optional filter by user (available for issue managers)",
+ "name": "user",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTimeList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add tracked time to a issue",
+ "operationId": "issueAddTime",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/AddTimeOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTime"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Reset a tracked time of an issue",
+ "operationId": "issueResetTime",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to add tracked time to",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": {
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete specific tracked time",
+ "operationId": "issueDeleteTime",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of time to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/keys": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's keys",
+ "operationId": "repoListKeys",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "the key_id to search for",
+ "name": "key_id",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "fingerprint of the key",
+ "name": "fingerprint",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/DeployKeyList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a key to a repository",
+ "operationId": "repoCreateKey",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateKeyOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/DeployKey"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repository's key by id",
+ "operationId": "repoGetKey",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the key to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/DeployKey"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a key from a repository",
+ "operationId": "repoDeleteKey",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the key to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/labels": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get all of a repository's labels",
+ "operationId": "issueListLabels",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create a label",
+ "operationId": "issueCreateLabel",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateLabelOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Label"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a single label",
+ "operationId": "issueGetLabel",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Label"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a label",
+ "operationId": "issueDeleteLabel",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Update a label",
+ "operationId": "issueEditLabel",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditLabelOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Label"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/languages": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get languages and number of bytes of code written",
+ "operationId": "repoGetLanguages",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LanguageStatistics"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/licenses": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repo licenses",
+ "operationId": "repoGetLicenses",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LicensesList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": {
+ "get": {
+ "produces": [
+ "application/octet-stream"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a file or it's LFS object from a repository",
+ "operationId": "repoGetRawFileOrLFS",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns raw file content.",
+ "schema": {
+ "type": "file"
+ }
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Merge a branch from upstream",
+ "operationId": "repoMergeUpstream",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/MergeUpstreamRequest"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/MergeUpstreamResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/milestones": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get all of a repository's opened milestones",
+ "operationId": "issueGetMilestonesList",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "filter by milestone name",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/MilestoneList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create a milestone",
+ "operationId": "issueCreateMilestone",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateMilestoneOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a milestone",
+ "operationId": "issueGetMilestone",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the milestone to get, identified by ID and if not available by name",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a milestone",
+ "operationId": "issueDeleteMilestone",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the milestone to delete, identified by ID and if not available by name",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Update a milestone",
+ "operationId": "issueEditMilestone",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the milestone to edit, identified by ID and if not available by name",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditMilestoneOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Sync a mirrored repository",
+ "operationId": "repoMirrorSync",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to sync",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to sync",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Returns if new Issue Pins are allowed",
+ "operationId": "repoNewPinAllowed",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoNewIssuePinsAllowed"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/notifications": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "notification"
+ ],
+ "summary": "List users's notification threads on a specific repo",
+ "operationId": "notifyGetRepoList",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "If true, show notifications marked as read. Default value is false",
+ "name": "all",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned",
+ "name": "status-types",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "enum": [
+ "issue",
+ "pull",
+ "commit",
+ "repository"
+ ],
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "filter notifications by subject type",
+ "name": "subject-type",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/NotificationThreadList"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "notification"
+ ],
+ "summary": "Mark notification threads as read, pinned or unread on a specific repo",
+ "operationId": "notifyReadRepoList",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "If true, mark all notifications on this repo. Default value is false",
+ "name": "all",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
+ "name": "status-types",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Status to mark notifications as. Defaults to read.",
+ "name": "to-status",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
+ "name": "last_read_at",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "205": {
+ "$ref": "#/responses/NotificationThreadList"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's pull requests",
+ "operationId": "repoListPullRequests",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Filter by target base branch of the pull request",
+ "name": "base_branch",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "open",
+ "closed",
+ "all"
+ ],
+ "type": "string",
+ "default": "open",
+ "description": "State of pull request",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "recentclose",
+ "leastupdate",
+ "mostcomment",
+ "leastcomment",
+ "priority"
+ ],
+ "type": "string",
+ "description": "Type of sort",
+ "name": "sort",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "ID of the milestone",
+ "name": "milestone",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "collectionFormat": "multi",
+ "description": "Label IDs",
+ "name": "labels",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Filter by pull request author",
+ "name": "poster",
+ "in": "query"
+ },
+ {
+ "minimum": 1,
+ "type": "integer",
+ "default": 1,
+ "description": "Page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "minimum": 0,
+ "type": "integer",
+ "description": "Page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequestList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a pull request",
+ "operationId": "repoCreatePullRequest",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreatePullRequestOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/comments/{id}/resolve": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Resolve a pull request review comment",
+ "operationId": "repoResolvePullReviewComment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/validationError"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/comments/{id}/unresolve": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Unresolve a pull request review comment",
+ "operationId": "repoUnresolvePullReviewComment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/validationError"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's pinned pull requests",
+ "operationId": "repoListPinnedPullRequests",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequestList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a pull request by base and head",
+ "operationId": "repoGetPullRequestByBaseHead",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "base of the pull request to get",
+ "name": "base",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "head of the pull request to get",
+ "name": "head",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a pull request",
+ "operationId": "repoGetPullRequest",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "repoEditPullRequest",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to edit",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditPullRequestOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "412": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a pull request diff or patch",
+ "operationId": "repoDownloadPullDiffOrPatch",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "diff",
+ "patch"
+ ],
+ "type": "string",
+ "description": "whether the output is diff or patch",
+ "name": "diffType",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`",
+ "name": "binary",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/string"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/comments/{id}/replies": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reply to a pull request review comment",
+ "operationId": "repoCreatePullReviewCommentReply",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review comment to reply to",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreatePullReviewCommentReplyOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullReviewComment"
+ },
+ "400": {
+ "$ref": "#/responses/validationError"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get commits for a pull request",
+ "operationId": "repoGetPullRequestCommits",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get changed files for a pull request",
+ "operationId": "repoGetPullRequestFiles",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "skip to given file",
+ "name": "skip-to",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "ignore-all",
+ "ignore-change",
+ "ignore-eol",
+ "show-all"
+ ],
+ "type": "string",
+ "description": "whitespace behavior",
+ "name": "whitespace",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ChangedFileList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a pull request has been merged",
+ "operationId": "repoPullRequestIsMerged",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pull request has been merged"
+ },
+ "404": {
+ "description": "pull request has not been merged"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Merge a pull request",
+ "operationId": "repoMergePullRequest",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to merge",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/MergePullRequestOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/empty"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Cancel the scheduled auto merge for the given pull request",
+ "operationId": "repoCancelScheduledAutoMerge",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to merge",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "create review requests for a pull request",
+ "operationId": "repoCreatePullReviewRequests",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/PullReviewRequestOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullReviewList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "cancel review requests for a pull request",
+ "operationId": "repoDeletePullReviewRequests",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/PullReviewRequestOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List all reviews for a pull request",
+ "operationId": "repoListPullReviews",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReviewList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a review to a pull request",
+ "operationId": "repoCreatePullReview",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreatePullReviewOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific review for a pull request",
+ "operationId": "repoGetPullReview",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Submit a pending review to a pull request",
+ "operationId": "repoSubmitPullReview",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/SubmitPullReviewOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific review from a pull request",
+ "operationId": "repoDeletePullReview",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific review for a pull request",
+ "operationId": "repoGetPullReviewComments",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReviewCommentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Dismiss a review for a pull request",
+ "operationId": "repoDismissPullReview",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DismissPullReviewOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Cancel to dismiss a review for a pull request",
+ "operationId": "repoUnDismissPullReview",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Merge PR's baseBranch into headBranch",
+ "operationId": "repoUpdatePullRequest",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "merge",
+ "rebase"
+ ],
+ "type": "string",
+ "description": "how to update pull request",
+ "name": "style",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get all push mirrors of the repository",
+ "operationId": "repoListPushMirrors",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PushMirrorList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "add a push mirror to the repository",
+ "operationId": "repoAddPushMirror",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreatePushMirrorOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PushMirror"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Sync all push mirrored repository",
+ "operationId": "repoPushMirrorSync",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to sync",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to sync",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get push mirror of the repository by remoteName",
+ "operationId": "repoGetPushMirrorByRemoteName",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "remote name of push mirror",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PushMirror"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "deletes a push mirror from a repository by remoteName",
+ "operationId": "repoDeletePushMirror",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "remote name of the pushMirror",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": {
+ "get": {
+ "produces": [
+ "application/octet-stream"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a file from a repository",
+ "operationId": "repoGetRawFile",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns raw file content.",
+ "schema": {
+ "type": "file"
+ }
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's releases",
+ "operationId": "repoListReleases",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "filter (exclude / include) drafts, if you don't have repo write access none will show",
+ "name": "draft",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "filter (exclude / include) pre-releases",
+ "name": "pre-release",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReleaseList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a release",
+ "operationId": "repoCreateRelease",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateReleaseOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/latest": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at",
+ "operationId": "repoGetLatestRelease",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a release by tag name",
+ "operationId": "repoGetReleaseByTag",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "tag name of the release to get",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a release by tag name",
+ "operationId": "repoDeleteReleaseByTag",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "tag name of the release to delete",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a release",
+ "operationId": "repoGetRelease",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a release",
+ "operationId": "repoDeleteRelease",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a release",
+ "operationId": "repoEditRelease",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReleaseOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List release's attachments",
+ "operationId": "repoListReleaseAttachments",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "multipart/form-data",
+ "application/octet-stream"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a release attachment",
+ "operationId": "repoCreateReleaseAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the attachment",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "file",
+ "description": "attachment to upload",
+ "name": "attachment",
+ "in": "formData"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "413": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a release attachment",
+ "operationId": "repoGetReleaseAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to get",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a release attachment",
+ "operationId": "repoDeleteReleaseAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to delete",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a release attachment",
+ "operationId": "repoEditReleaseAttachment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to edit",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditAttachmentOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/reviewers": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Return all users that can be requested to review in this repo",
+ "operationId": "repoGetReviewers",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get signing-key.gpg for given repository",
+ "operationId": "repoSigningKey",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "GPG armored public key",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get signing-key.pub for given repository",
+ "operationId": "repoSigningKeySSH",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "ssh public key",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/stargazers": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's stargazers",
+ "operationId": "repoListStargazers",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's statuses",
+ "operationId": "repoListStatuses",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "leastindex",
+ "highestindex"
+ ],
+ "type": "string",
+ "description": "type of sort",
+ "name": "sort",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "pending",
+ "success",
+ "error",
+ "failure",
+ "warning"
+ ],
+ "type": "string",
+ "description": "type of state",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitStatusList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a commit status",
+ "operationId": "repoCreateStatus",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateStatusOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/CommitStatus"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/subscribers": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's watchers",
+ "operationId": "repoListSubscribers",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/subscription": {
+ "get": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if the current user is watching a repo",
+ "operationId": "userCurrentCheckSubscription",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WatchInfo"
+ },
+ "404": {
+ "description": "User is not watching this repo or repo do not exist"
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Watch a repo",
+ "operationId": "userCurrentPutSubscription",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WatchInfo"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Unwatch a repo",
+ "operationId": "userCurrentDeleteSubscription",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tag_protections": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List tag protections for a repository",
+ "operationId": "repoListTagProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagProtectionList"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a tag protections for a repository",
+ "operationId": "repoCreateTagProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateTagProtectionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/TagProtection"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific tag protection for the repository",
+ "operationId": "repoGetTagProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the tag protect to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific tag protection for the repository",
+ "operationId": "repoDeleteTagProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of protected tag",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a tag protections for a repository. Only fields that are set will be changed",
+ "operationId": "repoEditTagProtection",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of protected tag",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditTagProtectionOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tags": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's tags",
+ "operationId": "repoListTags",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results, default maximum page size is 50",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a new git tag in a repository",
+ "operationId": "repoCreateTag",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateTagOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/empty"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the tag of a repository by tag name",
+ "operationId": "repoGetTag",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of tag",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repository's tag by name",
+ "operationId": "repoDeleteTag",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of tag to delete",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/empty"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/teams": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's teams",
+ "operationId": "repoListTeams",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TeamList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a team is assigned to a repository",
+ "operationId": "repoCheckTeam",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Team"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a team to a repository",
+ "operationId": "repoAddTeam",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a team from a repository",
+ "operationId": "repoDeleteTeam",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/times": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's tracked times",
+ "operationId": "repoTrackedTimes",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "optional filter by user (available for issue managers)",
+ "name": "user",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTimeList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/times/{user}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a user's tracked times in a repo",
+ "operationId": "userTrackedTimes",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user whose tracked times are to be listed",
+ "name": "user",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTimeList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/topics": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get list of topics that a repository has",
+ "operationId": "repoListTopics",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TopicNames"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Replace list of topics for a repository",
+ "operationId": "repoUpdateTopics",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/RepoTopicOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/invalidTopicsError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a topic to a repository",
+ "operationId": "repoAddTopic",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the topic to add",
+ "name": "topic",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/invalidTopicsError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a topic from a repository",
+ "operationId": "repoDeleteTopic",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the topic to delete",
+ "name": "topic",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/invalidTopicsError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Transfer a repo ownership",
+ "operationId": "repoTransfer",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to transfer",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to transfer",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Transfer Options",
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/TransferRepoOption"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Accept a repo transfer",
+ "operationId": "acceptRepoTransfer",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to transfer",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to transfer",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reject a repo transfer",
+ "operationId": "rejectRepoTransfer",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to transfer",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to transfer",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/new": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a wiki page",
+ "operationId": "repoCreateWikiPage",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateWikiPageOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/WikiPage"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a wiki page",
+ "operationId": "repoGetWikiPage",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiPage"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a wiki page",
+ "operationId": "repoDeleteWikiPage",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a wiki page",
+ "operationId": "repoEditWikiPage",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateWikiPageOptions"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiPage"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get all wiki pages",
+ "operationId": "repoGetWikiPages",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiPageList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get revisions of a wiki page",
+ "operationId": "repoGetWikiPageRevisions",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "type": "integer",
+ "format": "int64",
+ "required": true,
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiCommitList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 26d45940f2..7d614cbfa5 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -653,6 +653,95 @@
}
}
},
+ "/admin/unadopted/{owner}/group/{group_id}/{repo}": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "admin"
+ ],
+ "summary": "Adopt unadopted files as a repository",
+ "operationId": "adminAdoptRepositoryInGroup",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "admin"
+ ],
+ "summary": "Delete unadopted files",
+ "operationId": "adminDeleteUnadoptedRepositoryInGroup",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ }
+ }
+ }
+ },
"/admin/unadopted/{owner}/{repo}": {
"post": {
"produces": [
@@ -1316,6 +1405,451 @@
}
}
},
+ "/groups/{group_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "gets a group in an organization",
+ "operationId": "groupGet",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group to retrieve",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Group"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "Delete a repository group",
+ "operationId": "groupDelete",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "id of the group to delete",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "edits a group in an organization. only fields that are set will be changed.",
+ "operationId": "groupEdit",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group to edit",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/EditGroupOption"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Group"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/groups/{group_id}/move": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "move a group to a different parent group",
+ "operationId": "groupMove",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group to move",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/MoveGroupOption"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Group"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/groups/{group_id}/new": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "create a subgroup inside a group",
+ "operationId": "groupNewSubGroup",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group to create a subgroup in",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/NewGroupOption"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Group"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/groups/{group_id}/repos": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "gets the repos contained within a group",
+ "operationId": "groupGetRepos",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group containing the repositories",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepositoryList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/groups/{group_id}/subgroups": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "gets the subgroups contained within a group",
+ "operationId": "groupGetSubGroups",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the parent group",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GroupList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/groups/{group_id}/teams": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "List a repository group's teams",
+ "operationId": "repoGroupListTeams",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TeamList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/groups/{group_id}/teams/{team}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "Check if a team is assigned to a repository group",
+ "operationId": "repoGroupCheckTeam",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Team"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "Add a team to a repository group",
+ "operationId": "repoGroupAddTeam",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "Add a team to a repository group",
+ "operationId": "repoGroupDeleteTeam",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "Update a team assigned to a repository group",
+ "operationId": "repoGroupEditTeam",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the group",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
"/label/templates": {
"get": {
"produces": [
@@ -2858,6 +3392,90 @@
}
}
},
+ "/orgs/{org}/groups": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "organization"
+ ],
+ "summary": "List an organization's root-level groups",
+ "operationId": "orgListGroups",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "name of the organization",
+ "name": "org",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GroupList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/orgs/{org}/groups/new": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository-group"
+ ],
+ "summary": "create a root-level repository group for an organization",
+ "operationId": "groupNew",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "name of the organization",
+ "name": "org",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/NewGroupOption"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Group"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
"/orgs/{org}/hooks": {
"get": {
"produces": [
@@ -4574,6 +5192,15703 @@
}
}
},
+ "/repos/{owner}/group/{group_id}/{repo}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repository",
+ "operationId": "repoGetMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Repository"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repository",
+ "operationId": "repoDeleteMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to delete",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to delete",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a repository's properties. Only fields that are set will be changed.",
+ "operationId": "repoEditMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to edit",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to edit",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Properties of a repo that you can edit",
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditRepoOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all artifacts for a repository",
+ "operationId": "getArtifactsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the artifact",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ArtifactsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific artifact for a workflow run",
+ "operationId": "getArtifactMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the artifact",
+ "name": "artifact_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Artifact"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Deletes a specific artifact for a workflow run",
+ "operationId": "deleteArtifactMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the artifact",
+ "name": "artifact_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Downloads a specific artifact for a workflow run redirects to blob url",
+ "operationId": "downloadArtifactMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the artifact",
+ "name": "artifact_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "302": {
+ "description": "redirect to the blob download"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all jobs for a repository",
+ "operationId": "listWorkflowJobsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific workflow job for a workflow run",
+ "operationId": "getWorkflowJobMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the job",
+ "name": "job_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJob"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Downloads the job logs for a workflow run",
+ "operationId": "downloadActionsRunJobLogsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the job",
+ "name": "job_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "output blob content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repo-level runners",
+ "operationId": "getRepoRunnersMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "filter by disabled status (true or false)",
+ "name": "disabled",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RunnerList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repository's actions runner registration token",
+ "operationId": "repoCreateRunnerRegistrationTokenMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RegistrationToken"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repo-level runner",
+ "operationId": "getRepoRunnerMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the runner",
+ "name": "runner_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Runner"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repo-level runner",
+ "operationId": "deleteRepoRunnerMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the runner",
+ "name": "runner_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "runner has been deleted"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a repo-level runner",
+ "operationId": "updateRepoRunnerMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the runner",
+ "name": "runner_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditActionRunnerOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Runner"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all runs for a repository run",
+ "operationId": "getWorkflowRunsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow event name",
+ "name": "event",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "workflow branch",
+ "name": "branch",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "triggered by user",
+ "name": "actor",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "triggering sha of the workflow run",
+ "name": "head_sha",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowRunsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific workflow run",
+ "operationId": "GetWorkflowRunMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a workflow run",
+ "operationId": "deleteActionRunMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "runid of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all artifacts for a repository run",
+ "operationId": "getArtifactsOfRunMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "runid of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the artifact",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ArtifactsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/attempts/{attempt}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets a specific workflow run attempt",
+ "operationId": "getWorkflowRunAttemptMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "logical attempt number of the run",
+ "name": "attempt",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/attempts/{attempt}/jobs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all jobs for a workflow run attempt",
+ "operationId": "listWorkflowRunAttemptJobsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "logical attempt number of the run",
+ "name": "attempt",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Lists all jobs for a workflow run",
+ "operationId": "listWorkflowRunJobsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "runid of the workflow run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs/{job_id}/rerun": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reruns a specific workflow job in a run",
+ "operationId": "rerunWorkflowJobMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the job",
+ "name": "job_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/WorkflowJob"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/rerun": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reruns an entire workflow run",
+ "operationId": "rerunWorkflowRunMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/rerun-failed-jobs": {
+ "post": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reruns all failed jobs in a workflow run",
+ "operationId": "rerunFailedWorkflowRunMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the run",
+ "name": "run",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List an repo's actions secrets",
+ "operationId": "repoListActionsSecretsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/SecretList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create or Update a secret value in a repository",
+ "operationId": "updateRepoSecretMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repository",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the secret",
+ "name": "secretname",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateOrUpdateSecretOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "response when creating a secret"
+ },
+ "204": {
+ "description": "response when updating a secret"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a secret in a repository",
+ "operationId": "deleteRepoSecretMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repository",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the secret",
+ "name": "secretname",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "delete one secret of the repository"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's action tasks",
+ "operationId": "ListActionTasksMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results, default maximum page size is 50",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TasksList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/variables": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repo-level variables list",
+ "operationId": "getRepoVariablesListMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/VariableList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repo-level variable",
+ "operationId": "getRepoVariableMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionVariable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a repo-level variable",
+ "operationId": "updateRepoVariableMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateVariableOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "response when updating a repo-level variable"
+ },
+ "204": {
+ "description": "response when updating a repo-level variable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a repo-level variable",
+ "operationId": "createRepoVariableMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateVariableOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "response when creating a repo-level variable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "409": {
+ "description": "variable name already exists."
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repo-level variable",
+ "operationId": "deleteRepoVariableMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the variable",
+ "name": "variablename",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionVariable"
+ },
+ "201": {
+ "description": "response when deleting a variable"
+ },
+ "204": {
+ "description": "response when deleting a variable"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List repository workflows",
+ "operationId": "ActionsListRepositoryWorkflowsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionWorkflowList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a workflow",
+ "operationId": "ActionsGetWorkflowMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActionWorkflow"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Disable a workflow",
+ "operationId": "ActionsDisableWorkflowMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a workflow dispatch event",
+ "operationId": "ActionsDispatchWorkflowMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateActionWorkflowDispatch"
+ }
+ },
+ {
+ "type": "boolean",
+ "description": "Whether the response should include the workflow run ID and URLs.",
+ "name": "return_run_details",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RunDetails"
+ },
+ "204": {
+ "description": "No Content, if return_run_details is missing or false"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Enable a workflow",
+ "operationId": "ActionsEnableWorkflowMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the workflow",
+ "name": "workflow_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's activity feeds",
+ "operationId": "repoListActivityFeedsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date",
+ "description": "the date of the activities to be found",
+ "name": "date",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ActivityFeedsList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get an archive of a repository",
+ "operationId": "repoGetArchiveMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the git reference for download with attached archive format (e.g. master.zip)",
+ "name": "archive",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "subpath of the repository to download",
+ "name": "path",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/assignees": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Return all users that have write access and can be assigned to issues",
+ "operationId": "repoGetAssigneesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/avatar": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update avatar",
+ "operationId": "repoUpdateAvatarMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateRepoAvatarOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete avatar",
+ "operationId": "repoDeleteAvatarMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List branch protections for a repository",
+ "operationId": "repoListBranchProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchProtectionList"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a branch protections for a repository",
+ "operationId": "repoCreateBranchProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateBranchProtectionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/BranchProtection"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update the priorities of branch protections for a repository.",
+ "operationId": "repoUpdateBranchProtectionPrioriesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateBranchProtectionPriories"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific branch protection for the repository",
+ "operationId": "repoGetBranchProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of protected branch",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific branch protection for the repository",
+ "operationId": "repoDeleteBranchProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of protected branch",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
+ "operationId": "repoEditBranchProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of protected branch",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditBranchProtectionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branches": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's branches",
+ "operationId": "repoListBranchesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/BranchList"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a branch",
+ "operationId": "repoCreateBranchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateBranchRepoOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Branch"
+ },
+ "403": {
+ "description": "The branch is archived or a mirror."
+ },
+ "404": {
+ "description": "The old branch does not exist."
+ },
+ "409": {
+ "description": "The branch with the same name already exists."
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
+ "operationId": "repoGetBranchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "branch to get",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Branch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a branch reference to a new commit",
+ "operationId": "repoUpdateBranchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the branch",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/UpdateBranchRepoOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific branch from a repository",
+ "operationId": "repoDeleteBranchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "branch to delete",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Rename a branch",
+ "operationId": "repoRenameBranchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the branch",
+ "name": "branch",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/RenameBranchRepoOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's collaborators",
+ "operationId": "repoListCollaboratorsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a user is a collaborator of a repository",
+ "operationId": "repoCheckCollaboratorMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to check for being a collaborator",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add or Update a collaborator to a repository",
+ "operationId": "repoAddCollaboratorMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to add or update as a collaborator",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/AddCollaboratorOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a collaborator from a repository",
+ "operationId": "repoDeleteCollaboratorMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the collaborator to delete",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repository permissions for a user",
+ "operationId": "repoGetRepoPermissionsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the collaborator whose permissions are to be obtained",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoCollaboratorPermission"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a list of all commits from a repository",
+ "operationId": "repoGetAllCommitsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "SHA or branch to start listing commits from (usually 'master')",
+ "name": "sha",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "filepath of a file/dir",
+ "name": "path",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only commits after this date will be returned (ISO 8601 format)",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only commits before this date will be returned (ISO 8601 format)",
+ "name": "until",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include diff stats for every commit (disable for speedup, default 'true')",
+ "name": "stat",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results (ignored if used with 'path')",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "commits that match the given specifier will not be listed.",
+ "name": "not",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/EmptyRepository"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's combined status, by branch/tag/commit reference",
+ "operationId": "repoGetCombinedStatusByRefMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of branch/tag/commit",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CombinedStatus"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's statuses, by branch/tag/commit reference",
+ "operationId": "repoListStatusesByRefMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of branch/tag/commit",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "leastindex",
+ "highestindex"
+ ],
+ "type": "string",
+ "description": "type of sort",
+ "name": "sort",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "pending",
+ "success",
+ "error",
+ "failure",
+ "warning"
+ ],
+ "type": "string",
+ "description": "type of state",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitStatusList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the merged pull request of the commit",
+ "operationId": "repoGetCommitPullRequestMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "SHA of the commit to get",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get commit comparison information",
+ "operationId": "repoCompareDiffMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "compare two branches or commits",
+ "name": "basehead",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Compare"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents": {
+ "get": {
+ "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the metadata of all the entries of the root dir.",
+ "operationId": "repoGetContentsListMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Modify multiple files in a repository",
+ "operationId": "repoChangeFilesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ChangeFilesOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/FilesResponse"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": {
+ "get": {
+ "description": "It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.",
+ "operationId": "repoGetContentsExtMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory.",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the name of the commit/branch/tag, default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message.",
+ "name": "includes",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsExtResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": {
+ "get": {
+ "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.",
+ "operationId": "repoGetContentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the dir, file, symlink or submodule in the repo",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set",
+ "operationId": "repoUpdateFileMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to update",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/UpdateFileOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "201": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a file in a repository",
+ "operationId": "repoCreateFileMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to create",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateFileOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a file in a repository",
+ "operationId": "repoDeleteFileMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to delete",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DeleteFileOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/FileDeleteResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/diffpatch": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Apply diff patch to repository",
+ "operationId": "repoApplyDiffPatchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ApplyDiffPatchFileOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/FileResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the EditorConfig definitions of a file in a repository",
+ "operationId": "repoGetEditorConfigMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "filepath of file to get",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/file-contents": {
+ "get": {
+ "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the metadata and contents of requested files",
+ "operationId": "repoGetFileContentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}",
+ "name": "body",
+ "in": "query",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "description": "Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size \u003e 0`, they can be requested separately by using the `download_url`.",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the metadata and contents of requested files",
+ "operationId": "repoGetFileContentsPostMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GetFilesOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/forks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's forks",
+ "operationId": "listForksMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepositoryList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Fork a repository",
+ "operationId": "createForkMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to fork",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to fork",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateForkOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "The repository with the same name already exists."
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the blob of a repository.",
+ "operationId": "GetBlobMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitBlobResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a single commit from a repository",
+ "operationId": "repoGetSingleCommitMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "a git ref or commit sha",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "include diff stats for every commit (disable for speedup, default 'true')",
+ "name": "stat",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Commit"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's diff or patch",
+ "operationId": "repoDownloadCommitDiffOrPatchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "SHA of the commit to get",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "diff",
+ "patch"
+ ],
+ "type": "string",
+ "description": "whether the output is diff or patch",
+ "name": "diffType",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/string"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a note corresponding to a single commit from a repository",
+ "operationId": "repoGetNoteMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "a git ref or commit sha",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Note"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/refs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get specified ref or filtered repository's refs",
+ "operationId": "repoListAllGitRefsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReferenceList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get specified ref or filtered repository's refs",
+ "operationId": "repoListGitRefsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "part or full name of the ref",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReferenceList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
+ "operationId": "GetAnnotatedTagMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AnnotatedTag"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the tree of a repository.",
+ "operationId": "GetTreeMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "show all directories and files",
+ "name": "recursive",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "number of items per page",
+ "name": "per_page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitTreeResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List the hooks in a repository",
+ "operationId": "repoListHooksMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/HookList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a hook",
+ "operationId": "repoCreateHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateHookOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/git": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List the Git hooks in a repository",
+ "operationId": "repoListGitHooksMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitHookList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a Git hook",
+ "operationId": "repoGetGitHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitHook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a Git hook in a repository",
+ "operationId": "repoDeleteGitHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a Git hook in a repository",
+ "operationId": "repoEditGitHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditGitHookOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GitHook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a hook",
+ "operationId": "repoGetHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the hook to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a hook in a repository",
+ "operationId": "repoDeleteHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the hook to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a hook in a repository",
+ "operationId": "repoEditHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the hook",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditHookOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Test a push webhook",
+ "operationId": "repoTestHookMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the hook to test",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_config": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Returns the issue config for a repo",
+ "operationId": "repoGetIssueConfigMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoIssueConfig"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Returns the validation information for a issue config",
+ "operationId": "repoValidateIssueConfigMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoIssueConfigValidation"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_templates": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get available issue templates for a repository",
+ "operationId": "repoGetIssueTemplatesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueTemplates"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List a repository's issues",
+ "operationId": "issueListIssuesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "closed",
+ "open",
+ "all"
+ ],
+ "type": "string",
+ "description": "whether issue is open or closed",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "comma separated list of label names. Fetch only issues that have any of this label names. Non existent labels are discarded.",
+ "name": "labels",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "search string",
+ "name": "q",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "issues",
+ "pulls"
+ ],
+ "type": "string",
+ "description": "filter by type (issues / pulls) if set",
+ "name": "type",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded",
+ "name": "milestones",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Only show items which were created by the given user",
+ "name": "created_by",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Only show items for which the given user is assigned",
+ "name": "assigned_by",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Only show items in which the given user was mentioned",
+ "name": "mentioned_by",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "issueCreateIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateIssueOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "412": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List all comments in a repository",
+ "operationId": "issueGetRepoCommentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated since the provided time are returned.",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a comment",
+ "operationId": "issueGetCommentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a comment",
+ "operationId": "issueDeleteCommentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of comment to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit a comment",
+ "operationId": "issueEditCommentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditIssueCommentOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List comment's attachments",
+ "operationId": "issueListIssueCommentAttachmentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "multipart/form-data"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create a comment attachment",
+ "operationId": "issueCreateIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the attachment",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "file",
+ "description": "attachment to upload",
+ "name": "attachment",
+ "in": "formData",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "413": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a comment attachment",
+ "operationId": "issueGetIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to get",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a comment attachment",
+ "operationId": "issueDeleteIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to delete",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit a comment attachment",
+ "operationId": "issueEditIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to edit",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditAttachmentOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a list of reactions from a comment of an issue",
+ "operationId": "issueGetCommentReactionsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReactionList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a reaction to a comment of an issue",
+ "operationId": "issuePostCommentReactionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Reaction"
+ },
+ "201": {
+ "$ref": "#/responses/Reaction"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove a reaction from a comment of an issue",
+ "operationId": "issueDeleteCommentReactionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's pinned issues",
+ "operationId": "repoListPinnedIssuesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get an issue",
+ "operationId": "issueGetIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete an issue",
+ "operationId": "issueDeleteMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue to delete",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "description": "Pass `content_version` to enable optimistic locking on body edits.\nIf the version doesn't match the current value, the request fails with 409 Conflict.\n",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "issueEditIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to edit",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditIssueOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "412": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List issue's attachments",
+ "operationId": "issueListIssueAttachmentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "multipart/form-data"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create an issue attachment",
+ "operationId": "issueCreateIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the attachment",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "file",
+ "description": "attachment to upload",
+ "name": "attachment",
+ "in": "formData",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "413": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get an issue attachment",
+ "operationId": "issueGetIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to get",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete an issue attachment",
+ "operationId": "issueDeleteIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to delete",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit an issue attachment",
+ "operationId": "issueEditIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to edit",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditAttachmentOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List issues that are blocked by this issue",
+ "operationId": "issueListBlocksMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Block the issue given in the body by the issue in path",
+ "operationId": "issueCreateIssueBlockingMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "description": "the issue does not exist"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unblock the issue given in the body by the issue in path",
+ "operationId": "issueRemoveIssueBlockingMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List all comments on an issue",
+ "operationId": "issueGetCommentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated since the specified time are returned.",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a comment to an issue",
+ "operationId": "issueCreateCommentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateIssueCommentOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Comment"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": {
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a comment",
+ "operationId": "issueDeleteCommentDeprecatedMixin0",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "this parameter is ignored",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of comment to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Edit a comment",
+ "operationId": "issueEditCommentDeprecatedMixin0",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "this parameter is ignored",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the comment to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditIssueCommentOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "issueEditIssueDeadlineMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to create or update a deadline on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditDeadlineOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/IssueDeadline"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List an issue's dependencies, i.e all issues that block this issue.",
+ "operationId": "issueListIssueDependenciesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Make the issue in the url depend on the issue in the form.",
+ "operationId": "issueCreateIssueDependenciesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "description": "the issue does not exist"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove an issue dependency",
+ "operationId": "issueRemoveIssueDependenciesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueMeta"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get an issue's labels",
+ "operationId": "issueGetLabelsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Replace an issue's labels",
+ "operationId": "issueReplaceLabelsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueLabelsOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a label to an issue",
+ "operationId": "issueAddLabelMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/IssueLabelsOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove all labels from an issue",
+ "operationId": "issueClearLabelsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": {
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove a label from an issue",
+ "operationId": "issueRemoveLabelMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to remove",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Lock an issue",
+ "operationId": "issueLockIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/LockIssueOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unlock an issue",
+ "operationId": "issueUnlockIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": {
+ "post": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Pin an Issue",
+ "operationId": "pinIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue to pin",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unpin an Issue",
+ "operationId": "unpinIssueMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue to unpin",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": {
+ "patch": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Moves the Pin to the given Position",
+ "operationId": "moveIssuePinMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "the new position",
+ "name": "position",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a list reactions of an issue",
+ "operationId": "issueGetIssueReactionsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReactionList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add a reaction to an issue",
+ "operationId": "issuePostIssueReactionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Reaction"
+ },
+ "201": {
+ "$ref": "#/responses/Reaction"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Remove a reaction from an issue",
+ "operationId": "issueDeleteIssueReactionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "content",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReactionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": {
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete an issue's existing stopwatch.",
+ "operationId": "issueDeleteStopWatchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to stop the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot cancel a non-existent stopwatch"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Start stopwatch on an issue.",
+ "operationId": "issueStartStopWatchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to create the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot start a stopwatch again if it already exists"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Stop an issue's existing stopwatch.",
+ "operationId": "issueStopStopWatchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to stop the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot stop a non-existent stopwatch"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get users who subscribed on an issue.",
+ "operationId": "issueSubscriptionsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Check if user is subscribed to an issue",
+ "operationId": "issueCheckSubscriptionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WatchInfo"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Subscribe user to issue",
+ "operationId": "issueAddSubscriptionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to subscribe the issue to",
+ "name": "user",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Already subscribed"
+ },
+ "201": {
+ "description": "Successfully Subscribed"
+ },
+ "304": {
+ "description": "User can only subscribe itself if he is no admin"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Unsubscribe user from issue",
+ "operationId": "issueDeleteSubscriptionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user to unsubscribe from an issue",
+ "name": "user",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Already unsubscribed"
+ },
+ "201": {
+ "description": "Successfully Unsubscribed"
+ },
+ "304": {
+ "description": "User can only subscribe itself if he is no admin"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List all comments and events on an issue",
+ "operationId": "issueGetCommentsAndTimelineMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated since the specified time are returned.",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TimelineList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "List an issue's tracked times",
+ "operationId": "issueTrackedTimesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "optional filter by user (available for issue managers)",
+ "name": "user",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTimeList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Add tracked time to a issue",
+ "operationId": "issueAddTimeMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/AddTimeOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTime"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Reset a tracked time of an issue",
+ "operationId": "issueResetTimeMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue to add tracked time to",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": {
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete specific tracked time",
+ "operationId": "issueDeleteTimeMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the issue",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of time to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/keys": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's keys",
+ "operationId": "repoListKeysMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "the key_id to search for",
+ "name": "key_id",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "fingerprint of the key",
+ "name": "fingerprint",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/DeployKeyList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a key to a repository",
+ "operationId": "repoCreateKeyMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateKeyOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/DeployKey"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a repository's key by id",
+ "operationId": "repoGetKeyMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the key to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/DeployKey"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a key from a repository",
+ "operationId": "repoDeleteKeyMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the key to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/labels": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get all of a repository's labels",
+ "operationId": "issueListLabelsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create a label",
+ "operationId": "issueCreateLabelMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateLabelOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Label"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a single label",
+ "operationId": "issueGetLabelMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Label"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a label",
+ "operationId": "issueDeleteLabelMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Update a label",
+ "operationId": "issueEditLabelMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the label to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditLabelOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Label"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/languages": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get languages and number of bytes of code written",
+ "operationId": "repoGetLanguagesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LanguageStatistics"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/licenses": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repo licenses",
+ "operationId": "repoGetLicensesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LicensesList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": {
+ "get": {
+ "produces": [
+ "application/octet-stream"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a file or it's LFS object from a repository",
+ "operationId": "repoGetRawFileOrLFSMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns raw file content.",
+ "schema": {
+ "type": "file"
+ }
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Merge a branch from upstream",
+ "operationId": "repoMergeUpstreamMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/MergeUpstreamRequest"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/MergeUpstreamResponse"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/milestones": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get all of a repository's opened milestones",
+ "operationId": "issueGetMilestonesListMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "filter by milestone name",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/MilestoneList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Create a milestone",
+ "operationId": "issueCreateMilestoneMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateMilestoneOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Get a milestone",
+ "operationId": "issueGetMilestoneMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the milestone to get, identified by ID and if not available by name",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "issue"
+ ],
+ "summary": "Delete a milestone",
+ "operationId": "issueDeleteMilestoneMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the milestone to delete, identified by ID and if not available by name",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Update a milestone",
+ "operationId": "issueEditMilestoneMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "the milestone to edit, identified by ID and if not available by name",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditMilestoneOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Sync a mirrored repository",
+ "operationId": "repoMirrorSyncMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to sync",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to sync",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Returns if new Issue Pins are allowed",
+ "operationId": "repoNewPinAllowedMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoNewIssuePinsAllowed"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/notifications": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "notification"
+ ],
+ "summary": "List users's notification threads on a specific repo",
+ "operationId": "notifyGetRepoListMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "If true, show notifications marked as read. Default value is false",
+ "name": "all",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned",
+ "name": "status-types",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "enum": [
+ "issue",
+ "pull",
+ "commit",
+ "repository"
+ ],
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "filter notifications by subject type",
+ "name": "subject-type",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/NotificationThreadList"
+ }
+ }
+ },
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "notification"
+ ],
+ "summary": "Mark notification threads as read, pinned or unread on a specific repo",
+ "operationId": "notifyReadRepoListMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "If true, mark all notifications on this repo. Default value is false",
+ "name": "all",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi",
+ "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
+ "name": "status-types",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Status to mark notifications as. Defaults to read.",
+ "name": "to-status",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
+ "name": "last_read_at",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "205": {
+ "$ref": "#/responses/NotificationThreadList"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's pull requests",
+ "operationId": "repoListPullRequestsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Filter by target base branch of the pull request",
+ "name": "base_branch",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "open",
+ "closed",
+ "all"
+ ],
+ "type": "string",
+ "default": "open",
+ "description": "State of pull request",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "recentclose",
+ "leastupdate",
+ "mostcomment",
+ "leastcomment",
+ "priority"
+ ],
+ "type": "string",
+ "description": "Type of sort",
+ "name": "sort",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "ID of the milestone",
+ "name": "milestone",
+ "in": "query"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "collectionFormat": "multi",
+ "description": "Label IDs",
+ "name": "labels",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Filter by pull request author",
+ "name": "poster",
+ "in": "query"
+ },
+ {
+ "minimum": 1,
+ "type": "integer",
+ "default": 1,
+ "description": "Page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "minimum": 0,
+ "type": "integer",
+ "description": "Page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequestList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "500": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a pull request",
+ "operationId": "repoCreatePullRequestMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreatePullRequestOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/comments/{id}/resolve": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Resolve a pull request review comment",
+ "operationId": "repoResolvePullReviewCommentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/validationError"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/comments/{id}/unresolve": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Unresolve a pull request review comment",
+ "operationId": "repoUnresolvePullReviewCommentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review comment",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/validationError"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's pinned pull requests",
+ "operationId": "repoListPinnedPullRequestsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequestList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a pull request by base and head",
+ "operationId": "repoGetPullRequestByBaseHeadMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "base of the pull request to get",
+ "name": "base",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "head of the pull request to get",
+ "name": "head",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a pull request",
+ "operationId": "repoGetPullRequestMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
+ "operationId": "repoEditPullRequestMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to edit",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditPullRequestOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullRequest"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "412": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a pull request diff or patch",
+ "operationId": "repoDownloadPullDiffOrPatchMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "diff",
+ "patch"
+ ],
+ "type": "string",
+ "description": "whether the output is diff or patch",
+ "name": "diffType",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`",
+ "name": "binary",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/string"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/comments/{id}/replies": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reply to a pull request review comment",
+ "operationId": "repoCreatePullReviewCommentReplyMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review comment to reply to",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreatePullReviewCommentReplyOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullReviewComment"
+ },
+ "400": {
+ "$ref": "#/responses/validationError"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get commits for a pull request",
+ "operationId": "repoGetPullRequestCommitsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "name": "verification",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "name": "files",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get changed files for a pull request",
+ "operationId": "repoGetPullRequestFilesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "skip to given file",
+ "name": "skip-to",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "ignore-all",
+ "ignore-change",
+ "ignore-eol",
+ "show-all"
+ ],
+ "type": "string",
+ "description": "whitespace behavior",
+ "name": "whitespace",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ChangedFileList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a pull request has been merged",
+ "operationId": "repoPullRequestIsMergedMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pull request has been merged"
+ },
+ "404": {
+ "description": "pull request has not been merged"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Merge a pull request",
+ "operationId": "repoMergePullRequestMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to merge",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/MergePullRequestOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/empty"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Cancel the scheduled auto merge for the given pull request",
+ "operationId": "repoCancelScheduledAutoMergeMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to merge",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "create review requests for a pull request",
+ "operationId": "repoCreatePullReviewRequestsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/PullReviewRequestOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/PullReviewList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "cancel review requests for a pull request",
+ "operationId": "repoDeletePullReviewRequestsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/PullReviewRequestOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List all reviews for a pull request",
+ "operationId": "repoListPullReviewsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReviewList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a review to a pull request",
+ "operationId": "repoCreatePullReviewMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreatePullReviewOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific review for a pull request",
+ "operationId": "repoGetPullReviewMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Submit a pending review to a pull request",
+ "operationId": "repoSubmitPullReviewMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/SubmitPullReviewOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific review from a pull request",
+ "operationId": "repoDeletePullReviewMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific review for a pull request",
+ "operationId": "repoGetPullReviewCommentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReviewCommentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Dismiss a review for a pull request",
+ "operationId": "repoDismissPullReviewMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DismissPullReviewOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Cancel to dismiss a review for a pull request",
+ "operationId": "repoUnDismissPullReviewMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the review",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PullReview"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Merge PR's baseBranch into headBranch",
+ "operationId": "repoUpdatePullRequestMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "index of the pull request to get",
+ "name": "index",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "merge",
+ "rebase"
+ ],
+ "type": "string",
+ "description": "how to update pull request",
+ "name": "style",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get all push mirrors of the repository",
+ "operationId": "repoListPushMirrorsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PushMirrorList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "add a push mirror to the repository",
+ "operationId": "repoAddPushMirrorMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreatePushMirrorOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PushMirror"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Sync all push mirrored repository",
+ "operationId": "repoPushMirrorSyncMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to sync",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to sync",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get push mirror of the repository by remoteName",
+ "operationId": "repoGetPushMirrorByRemoteNameMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "remote name of push mirror",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PushMirror"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "deletes a push mirror from a repository by remoteName",
+ "operationId": "repoDeletePushMirrorMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "remote name of the pushMirror",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": {
+ "get": {
+ "produces": [
+ "application/octet-stream"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a file from a repository",
+ "operationId": "repoGetRawFileMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+ "name": "filepath",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch",
+ "name": "ref",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns raw file content.",
+ "schema": {
+ "type": "file"
+ }
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's releases",
+ "operationId": "repoListReleasesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "boolean",
+ "description": "filter (exclude / include) drafts, if you don't have repo write access none will show",
+ "name": "draft",
+ "in": "query"
+ },
+ {
+ "type": "boolean",
+ "description": "filter (exclude / include) pre-releases",
+ "name": "pre-release",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/ReleaseList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a release",
+ "operationId": "repoCreateReleaseMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateReleaseOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/latest": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at",
+ "operationId": "repoGetLatestReleaseMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a release by tag name",
+ "operationId": "repoGetReleaseByTagMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "tag name of the release to get",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a release by tag name",
+ "operationId": "repoDeleteReleaseByTagMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "tag name of the release to delete",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a release",
+ "operationId": "repoGetReleaseMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a release",
+ "operationId": "repoDeleteReleaseMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release to delete",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Update a release",
+ "operationId": "repoEditReleaseMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release to edit",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditReleaseOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Release"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List release's attachments",
+ "operationId": "repoListReleaseAttachmentsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "multipart/form-data",
+ "application/octet-stream"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a release attachment",
+ "operationId": "repoCreateReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the attachment",
+ "name": "name",
+ "in": "query"
+ },
+ {
+ "type": "file",
+ "description": "attachment to upload",
+ "name": "attachment",
+ "in": "formData"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "413": {
+ "$ref": "#/responses/error"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a release attachment",
+ "operationId": "repoGetReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to get",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a release attachment",
+ "operationId": "repoDeleteReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to delete",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a release attachment",
+ "operationId": "repoEditReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the release",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "id of the attachment to edit",
+ "name": "attachment_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditAttachmentOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/reviewers": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Return all users that can be requested to review in this repo",
+ "operationId": "repoGetReviewersMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get signing-key.gpg for given repository",
+ "operationId": "repoSigningKeyMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "GPG armored public key",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": {
+ "get": {
+ "produces": [
+ "text/plain"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get signing-key.pub for given repository",
+ "operationId": "repoSigningKeySSHMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "ssh public key",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/stargazers": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's stargazers",
+ "operationId": "repoListStargazersMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a commit's statuses",
+ "operationId": "repoListStatusesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "leastindex",
+ "highestindex"
+ ],
+ "type": "string",
+ "description": "type of sort",
+ "name": "sort",
+ "in": "query"
+ },
+ {
+ "enum": [
+ "pending",
+ "success",
+ "error",
+ "failure",
+ "warning"
+ ],
+ "type": "string",
+ "description": "type of state",
+ "name": "state",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/CommitStatusList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a commit status",
+ "operationId": "repoCreateStatusMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "sha of the commit",
+ "name": "sha",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateStatusOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/CommitStatus"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/subscribers": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's watchers",
+ "operationId": "repoListSubscribersMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/subscription": {
+ "get": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if the current user is watching a repo",
+ "operationId": "userCurrentCheckSubscriptionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WatchInfo"
+ },
+ "404": {
+ "description": "User is not watching this repo or repo do not exist"
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Watch a repo",
+ "operationId": "userCurrentPutSubscriptionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WatchInfo"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Unwatch a repo",
+ "operationId": "userCurrentDeleteSubscriptionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tag_protections": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List tag protections for a repository",
+ "operationId": "repoListTagProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagProtectionList"
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a tag protections for a repository",
+ "operationId": "repoCreateTagProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateTagProtectionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/TagProtection"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a specific tag protection for the repository",
+ "operationId": "repoGetTagProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of the tag protect to get",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a specific tag protection for the repository",
+ "operationId": "repoDeleteTagProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of protected tag",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a tag protections for a repository. Only fields that are set will be changed",
+ "operationId": "repoEditTagProtectionMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "id of protected tag",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/EditTagProtectionOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagProtection"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tags": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's tags",
+ "operationId": "repoListTagsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results, default maximum page size is 50",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TagList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a new git tag in a repository",
+ "operationId": "repoCreateTagMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateTagOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/empty"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the tag of a repository by tag name",
+ "operationId": "repoGetTagMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of tag",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a repository's tag by name",
+ "operationId": "repoDeleteTagMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of tag to delete",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/empty"
+ },
+ "409": {
+ "$ref": "#/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/teams": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's teams",
+ "operationId": "repoListTeamsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TeamList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a team is assigned to a repository",
+ "operationId": "repoCheckTeamMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Team"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a team to a repository",
+ "operationId": "repoAddTeamMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a team from a repository",
+ "operationId": "repoDeleteTeamMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/times": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repo's tracked times",
+ "operationId": "repoTrackedTimesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "optional filter by user (available for issue managers)",
+ "name": "user",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+ "name": "since",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "format": "date-time",
+ "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+ "name": "before",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTimeList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/times/{user}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a user's tracked times in a repo",
+ "operationId": "userTrackedTimesMixin0",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "username of the user whose tracked times are to be listed",
+ "name": "user",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TrackedTimeList"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/topics": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get list of topics that a repository has",
+ "operationId": "repoListTopicsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/TopicNames"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Replace list of topics for a repository",
+ "operationId": "repoUpdateTopicsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/RepoTopicOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/invalidTopicsError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a topic to a repository",
+ "operationId": "repoAddTopicMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the topic to add",
+ "name": "topic",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/invalidTopicsError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a topic from a repository",
+ "operationId": "repoDeleteTopicMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the topic to delete",
+ "name": "topic",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/invalidTopicsError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Transfer a repo ownership",
+ "operationId": "repoTransferMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to transfer",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to transfer",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Transfer Options",
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/TransferRepoOption"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Accept a repo transfer",
+ "operationId": "acceptRepoTransferMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to transfer",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to transfer",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Reject a repo transfer",
+ "operationId": "rejectRepoTransferMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo to transfer",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo to transfer",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/new": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Create a wiki page",
+ "operationId": "repoCreateWikiPageMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateWikiPageOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/WikiPage"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a wiki page",
+ "operationId": "repoGetWikiPageMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiPage"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a wiki page",
+ "operationId": "repoDeleteWikiPageMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ },
+ "patch": {
+ "consumes": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Edit a wiki page",
+ "operationId": "repoEditWikiPageMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateWikiPageOptions"
+ }
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiPage"
+ },
+ "400": {
+ "$ref": "#/responses/error"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/responses/repoArchivedError"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get all wiki pages",
+ "operationId": "repoGetWikiPagesMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiPageList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get revisions of a wiki page",
+ "operationId": "repoGetWikiPageRevisionsMixin0",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the page",
+ "name": "pageName",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "group ID of the repo",
+ "name": "group_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/WikiCommitList"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
"/repos/{owner}/{repo}": {
"get": {
"produces": [
@@ -23984,6 +40299,45 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "CreateOrUpdateRepoGroupTeamOption": {
+ "description": "CreateOrUpdateRepoGroupTeamOption options for adding a team to a repo group",
+ "type": "object",
+ "properties": {
+ "can_create_in": {
+ "description": "Whether the team can create repositories and subgroups in the group",
+ "type": "boolean",
+ "x-go-name": "CanCreateIn"
+ },
+ "permission": {
+ "type": "string",
+ "enum": [
+ "read",
+ "write",
+ "admin"
+ ],
+ "x-go-enum-desc": "read RepoWritePermissionRead\nwrite RepoWritePermissionWrite\nadmin RepoWritePermissionAdmin",
+ "x-go-name": "Permission"
+ },
+ "units_map": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-go-name": "UnitsMap",
+ "example": {
+ "repo.code": "read",
+ "repo.ext_issues": "none",
+ "repo.ext_wiki": "none",
+ "repo.issues": "write",
+ "repo.projects": "none",
+ "repo.pulls": "owner",
+ "repo.releases": "none",
+ "repo.wiki": "admin"
+ }
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"CreateOrUpdateSecretOption": {
"description": "CreateOrUpdateSecretOption options when creating or updating secret",
"type": "object",
@@ -24317,6 +40671,12 @@
"type": "string",
"x-go-name": "Gitignores"
},
+ "group_id": {
+ "description": "GroupID of the group which will contain this repository. ignored if the repo owner is not an organization.",
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "GroupID"
+ },
"issue_labels": {
"description": "Label-Set to use",
"type": "string",
@@ -25014,6 +41374,26 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "EditGroupOption": {
+ "description": "EditGroupOption represents options for editing a repository group",
+ "type": "object",
+ "properties": {
+ "description": {
+ "description": "the new description of the group",
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "name": {
+ "description": "the new name of the group",
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "visibility": {
+ "$ref": "#/definitions/VisibleType"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"EditHookOption": {
"description": "EditHookOption options when modify one hook",
"type": "object",
@@ -26459,6 +42839,57 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "Group": {
+ "description": "Group represents a group of repositories and subgroups in an organization",
+ "type": "object",
+ "properties": {
+ "avatar_url": {
+ "type": "string",
+ "x-go-name": "AvatarURL"
+ },
+ "description": {
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "id": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "ID"
+ },
+ "link": {
+ "type": "string",
+ "x-go-name": "Link"
+ },
+ "name": {
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "num_repos": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "NumRepos"
+ },
+ "num_subgroups": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "NumSubgroups"
+ },
+ "owner": {
+ "$ref": "#/definitions/User"
+ },
+ "parentGroupID": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "ParentGroupID"
+ },
+ "sort_order": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "SortOrder"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"Hook": {
"description": "Hook a hook is a web hook when one repository changed",
"type": "object",
@@ -26828,6 +43259,11 @@
"description": "IssueMeta basic issue information",
"type": "object",
"properties": {
+ "group_id": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "GroupID"
+ },
"index": {
"type": "integer",
"format": "int64",
@@ -27334,6 +43770,51 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "MoveGroupOption": {
+ "description": "MoveGroupOption represents options for changing a group or repo's parent and sort order",
+ "type": "object",
+ "required": [
+ "newParent"
+ ],
+ "properties": {
+ "newParent": {
+ "description": "the new parent group. can be 0 to specify no parent",
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "NewParent"
+ },
+ "newPos": {
+ "description": "the position of this group in its new parent",
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "NewPos"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
+ "NewGroupOption": {
+ "description": "NewGroupOption represents options for creating a new group in an organization",
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "description": {
+ "description": "the description of the newly created group",
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "name": {
+ "description": "the name for the newly created group",
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "visibility": {
+ "$ref": "#/definitions/VisibleType"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"NewIssuePinsAllowed": {
"description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed",
"type": "object",
@@ -28960,6 +45441,16 @@
"type": "string",
"x-go-name": "FullName"
},
+ "group_id": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "GroupID"
+ },
+ "group_sort_order": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "GroupSortOrder"
+ },
"has_actions": {
"type": "boolean",
"x-go-name": "HasActions"
@@ -30115,6 +46606,12 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "VisibleType": {
+ "description": "VisibleType defines the visibility of user and org",
+ "type": "integer",
+ "format": "int64",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"WatchInfo": {
"description": "WatchInfo represents an API watch status of one repository",
"type": "object",
@@ -30496,13 +46993,13 @@
}
},
"Compare": {
- "description": "",
+ "description": "(empty)",
"schema": {
"$ref": "#/definitions/Compare"
}
},
"ContentsExtResponse": {
- "description": "",
+ "description": "(empty)",
"schema": {
"$ref": "#/definitions/ContentsExtResponse"
}
@@ -30660,6 +47157,21 @@
}
}
},
+ "Group": {
+ "description": "Group",
+ "schema": {
+ "$ref": "#/definitions/Group"
+ }
+ },
+ "GroupList": {
+ "description": "GroupList",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Group"
+ }
+ }
+ },
"Hook": {
"description": "Hook",
"schema": {
@@ -30785,13 +47297,13 @@
}
},
"MergeUpstreamRequest": {
- "description": "",
+ "description": "(empty)",
"schema": {
"$ref": "#/definitions/MergeUpstreamRequest"
}
},
"MergeUpstreamResponse": {
- "description": "",
+ "description": "(empty)",
"schema": {
"$ref": "#/definitions/MergeUpstreamResponse"
}
@@ -31371,7 +47883,7 @@
"parameterBodies": {
"description": "parameterBodies",
"schema": {
- "$ref": "#/definitions/LockIssueOption"
+ "$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
}
},
"redirect": {
diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl
index 33adff75e0..57dfd540c2 100644
--- a/templates/swagger/v1_openapi3_json.tmpl
+++ b/templates/swagger/v1_openapi3_json.tmpl
@@ -351,7 +351,7 @@
}
}
},
- "description": ""
+ "description": "(empty)"
},
"ContentsExtResponse": {
"content": {
@@ -361,7 +361,7 @@
}
}
},
- "description": ""
+ "description": "(empty)"
},
"ContentsListResponse": {
"content": {
@@ -604,6 +604,29 @@
},
"description": "GitignoreTemplateList"
},
+ "Group": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Group"
+ }
+ }
+ },
+ "description": "Group"
+ },
+ "GroupList": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "$ref": "#/components/schemas/Group"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "GroupList"
+ },
"Hook": {
"content": {
"application/json": {
@@ -800,7 +823,7 @@
}
}
},
- "description": ""
+ "description": "(empty)"
},
"MergeUpstreamResponse": {
"content": {
@@ -810,7 +833,7 @@
}
}
},
- "description": ""
+ "description": "(empty)"
},
"Milestone": {
"content": {
@@ -1690,7 +1713,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/LockIssueOption"
+ "$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption"
}
}
},
@@ -4244,6 +4267,38 @@
"type": "object",
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "CreateOrUpdateRepoGroupTeamOption": {
+ "description": "CreateOrUpdateRepoGroupTeamOption options for adding a team to a repo group",
+ "properties": {
+ "can_create_in": {
+ "description": "Whether the team can create repositories and subgroups in the group",
+ "type": "boolean",
+ "x-go-name": "CanCreateIn"
+ },
+ "permission": {
+ "$ref": "#/components/schemas/RepoWritePermission"
+ },
+ "units_map": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "example": {
+ "repo.code": "read",
+ "repo.ext_issues": "none",
+ "repo.ext_wiki": "none",
+ "repo.issues": "write",
+ "repo.projects": "none",
+ "repo.pulls": "owner",
+ "repo.releases": "none",
+ "repo.wiki": "admin"
+ },
+ "type": "object",
+ "x-go-name": "UnitsMap"
+ }
+ },
+ "type": "object",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"CreateOrUpdateSecretOption": {
"description": "CreateOrUpdateSecretOption options when creating or updating secret",
"properties": {
@@ -4561,6 +4616,12 @@
"type": "string",
"x-go-name": "Gitignores"
},
+ "group_id": {
+ "description": "GroupID of the group which will contain this repository. ignored if the repo owner is not an organization.",
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "GroupID"
+ },
"issue_labels": {
"description": "Label-Set to use",
"type": "string",
@@ -5246,6 +5307,26 @@
"type": "object",
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "EditGroupOption": {
+ "description": "EditGroupOption represents options for editing a repository group",
+ "properties": {
+ "description": {
+ "description": "the new description of the group",
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "name": {
+ "description": "the new name of the group",
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "visibility": {
+ "$ref": "#/components/schemas/VisibleType"
+ }
+ },
+ "type": "object",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"EditHookOption": {
"description": "EditHookOption options when modify one hook",
"properties": {
@@ -6686,6 +6767,58 @@
"type": "object",
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "Group": {
+ "description": "Group represents a group of repositories and subgroups in an organization",
+ "properties": {
+ "avatar_url": {
+ "format": "uri",
+ "type": "string",
+ "x-go-name": "AvatarURL"
+ },
+ "description": {
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "id": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "ID"
+ },
+ "link": {
+ "type": "string",
+ "x-go-name": "Link"
+ },
+ "name": {
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "num_repos": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "NumRepos"
+ },
+ "num_subgroups": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "NumSubgroups"
+ },
+ "owner": {
+ "$ref": "#/components/schemas/User"
+ },
+ "parentGroupID": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "ParentGroupID"
+ },
+ "sort_order": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "SortOrder"
+ }
+ },
+ "type": "object",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"Hook": {
"description": "Hook a hook is a web hook when one repository changed",
"properties": {
@@ -7051,6 +7184,11 @@
"IssueMeta": {
"description": "IssueMeta basic issue information",
"properties": {
+ "group_id": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "GroupID"
+ },
"index": {
"format": "int64",
"type": "integer",
@@ -7562,6 +7700,51 @@
"type": "object",
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "MoveGroupOption": {
+ "description": "MoveGroupOption represents options for changing a group or repo's parent and sort order",
+ "properties": {
+ "newParent": {
+ "description": "the new parent group. can be 0 to specify no parent",
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "NewParent"
+ },
+ "newPos": {
+ "description": "the position of this group in its new parent",
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "NewPos"
+ }
+ },
+ "required": [
+ "newParent"
+ ],
+ "type": "object",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
+ "NewGroupOption": {
+ "description": "NewGroupOption represents options for creating a new group in an organization",
+ "properties": {
+ "description": {
+ "description": "the description of the newly created group",
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "name": {
+ "description": "the name for the newly created group",
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "visibility": {
+ "$ref": "#/components/schemas/VisibleType"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"NewIssuePinsAllowed": {
"description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed",
"properties": {
@@ -9211,6 +9394,16 @@
"type": "string",
"x-go-name": "FullName"
},
+ "group_id": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "GroupID"
+ },
+ "group_sort_order": {
+ "format": "int64",
+ "type": "integer",
+ "x-go-name": "GroupSortOrder"
+ },
"has_actions": {
"type": "boolean",
"x-go-name": "HasActions"
@@ -10385,6 +10578,12 @@
],
"type": "string"
},
+ "VisibleType": {
+ "description": "VisibleType defines the visibility of user and org",
+ "format": "int64",
+ "type": "integer",
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"WatchInfo": {
"description": "WatchInfo represents an API watch status of one repository",
"properties": {
@@ -11240,6 +11439,101 @@
]
}
},
+ "/admin/unadopted/{owner}/group/{group_id}/{repo}": {
+ "delete": {
+ "operationId": "adminDeleteUnadoptedRepositoryInGroup",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ }
+ },
+ "summary": "Delete unadopted files",
+ "tags": [
+ "admin"
+ ]
+ },
+ "post": {
+ "operationId": "adminAdoptRepositoryInGroup",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Adopt unadopted files as a repository",
+ "tags": [
+ "admin"
+ ]
+ }
+ },
"/admin/unadopted/{owner}/{repo}": {
"delete": {
"operationId": "adminDeleteUnadoptedRepository",
@@ -11919,6 +12213,453 @@
]
}
},
+ "/groups/{group_id}": {
+ "delete": {
+ "operationId": "groupDelete",
+ "parameters": [
+ {
+ "description": "id of the group to delete",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a repository group",
+ "tags": [
+ "repository-group"
+ ]
+ },
+ "get": {
+ "operationId": "groupGet",
+ "parameters": [
+ {
+ "description": "id of the group to retrieve",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Group"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "gets a group in an organization",
+ "tags": [
+ "repository-group"
+ ]
+ },
+ "patch": {
+ "operationId": "groupEdit",
+ "parameters": [
+ {
+ "description": "id of the group to edit",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditGroupOption"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Group"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "edits a group in an organization. only fields that are set will be changed.",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
+ "/groups/{group_id}/move": {
+ "post": {
+ "operationId": "groupMove",
+ "parameters": [
+ {
+ "description": "id of the group to move",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MoveGroupOption"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Group"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "move a group to a different parent group",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
+ "/groups/{group_id}/new": {
+ "post": {
+ "operationId": "groupNewSubGroup",
+ "parameters": [
+ {
+ "description": "id of the group to create a subgroup in",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewGroupOption"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Group"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "create a subgroup inside a group",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
+ "/groups/{group_id}/repos": {
+ "get": {
+ "operationId": "groupGetRepos",
+ "parameters": [
+ {
+ "description": "id of the group containing the repositories",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RepositoryList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "gets the repos contained within a group",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
+ "/groups/{group_id}/subgroups": {
+ "get": {
+ "operationId": "groupGetSubGroups",
+ "parameters": [
+ {
+ "description": "id of the parent group",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GroupList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "gets the subgroups contained within a group",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
+ "/groups/{group_id}/teams": {
+ "get": {
+ "operationId": "repoGroupListTeams",
+ "parameters": [
+ {
+ "description": "id of the group",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TeamList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository group's teams",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
+ "/groups/{group_id}/teams/{team}": {
+ "delete": {
+ "operationId": "repoGroupDeleteTeam",
+ "parameters": [
+ {
+ "description": "id of the group",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Add a team to a repository group",
+ "tags": [
+ "repository-group"
+ ]
+ },
+ "get": {
+ "operationId": "repoGroupCheckTeam",
+ "parameters": [
+ {
+ "description": "id of the group",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Team"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Check if a team is assigned to a repository group",
+ "tags": [
+ "repository-group"
+ ]
+ },
+ "patch": {
+ "operationId": "repoGroupEditTeam",
+ "parameters": [
+ {
+ "description": "id of the group",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Update a team assigned to a repository group",
+ "tags": [
+ "repository-group"
+ ]
+ },
+ "put": {
+ "operationId": "repoGroupAddTeam",
+ "parameters": [
+ {
+ "description": "id of the group",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Add a team to a repository group",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
"/label/templates": {
"get": {
"operationId": "listLabelTemplates",
@@ -13484,6 +14225,92 @@
]
}
},
+ "/orgs/{org}/groups": {
+ "get": {
+ "operationId": "orgListGroups",
+ "parameters": [
+ {
+ "description": "name of the organization",
+ "in": "path",
+ "name": "org",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GroupList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List an organization's root-level groups",
+ "tags": [
+ "organization"
+ ]
+ }
+ },
+ "/orgs/{org}/groups/new": {
+ "post": {
+ "operationId": "groupNew",
+ "parameters": [
+ {
+ "description": "name of the organization",
+ "in": "path",
+ "name": "org",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewGroupOption"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Group"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "create a root-level repository group for an organization",
+ "tags": [
+ "repository-group"
+ ]
+ }
+ },
"/orgs/{org}/hooks": {
"get": {
"operationId": "orgListHooks",
@@ -15358,6 +16185,17403 @@
]
}
},
+ "/repos/{owner}/group/{group_id}/{repo}": {
+ "delete": {
+ "operationId": "repoDeleteMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to delete",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to delete",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Repository"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to edit",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to edit",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditRepoOption"
+ }
+ }
+ },
+ "description": "Properties of a repo that you can edit",
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Edit a repository's properties. Only fields that are set will be changed.",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": {
+ "get": {
+ "operationId": "getArtifactsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the artifact",
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ArtifactsList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lists all artifacts for a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": {
+ "delete": {
+ "operationId": "deleteArtifactMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the artifact",
+ "in": "path",
+ "name": "artifact_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Deletes a specific artifact for a workflow run",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "getArtifactMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the artifact",
+ "in": "path",
+ "name": "artifact_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Artifact"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets a specific artifact for a workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": {
+ "get": {
+ "operationId": "downloadArtifactMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the artifact",
+ "in": "path",
+ "name": "artifact_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "302": {
+ "description": "redirect to the blob download"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Downloads a specific artifact for a workflow run redirects to blob url",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": {
+ "get": {
+ "operationId": "listWorkflowJobsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "in": "query",
+ "name": "status",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lists all jobs for a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": {
+ "get": {
+ "operationId": "getWorkflowJobMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the job",
+ "in": "path",
+ "name": "job_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowJob"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets a specific workflow job for a workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": {
+ "get": {
+ "operationId": "downloadActionsRunJobLogsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the job",
+ "in": "path",
+ "name": "job_id",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "output blob content"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Downloads the job logs for a workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners": {
+ "get": {
+ "operationId": "getRepoRunnersMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "filter by disabled status (true or false)",
+ "in": "query",
+ "name": "disabled",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RunnerList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get repo-level runners",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": {
+ "post": {
+ "operationId": "repoCreateRunnerRegistrationTokenMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RegistrationToken"
+ }
+ },
+ "summary": "Get a repository's actions runner registration token",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": {
+ "delete": {
+ "operationId": "deleteRepoRunnerMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the runner",
+ "in": "path",
+ "name": "runner_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "runner has been deleted"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a repo-level runner",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "getRepoRunnerMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the runner",
+ "in": "path",
+ "name": "runner_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Runner"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a repo-level runner",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "updateRepoRunnerMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the runner",
+ "in": "path",
+ "name": "runner_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditActionRunnerOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Runner"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Update a repo-level runner",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs": {
+ "get": {
+ "operationId": "getWorkflowRunsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "workflow event name",
+ "in": "query",
+ "name": "event",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "workflow branch",
+ "in": "query",
+ "name": "branch",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "in": "query",
+ "name": "status",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "triggered by user",
+ "in": "query",
+ "name": "actor",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "triggering sha of the workflow run",
+ "in": "query",
+ "name": "head_sha",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowRunsList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lists all runs for a repository run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": {
+ "delete": {
+ "operationId": "deleteActionRunMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "runid of the workflow run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a workflow run",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "GetWorkflowRunMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets a specific workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": {
+ "get": {
+ "operationId": "getArtifactsOfRunMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "runid of the workflow run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "name of the artifact",
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ArtifactsList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lists all artifacts for a repository run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/attempts/{attempt}": {
+ "get": {
+ "operationId": "getWorkflowRunAttemptMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "logical attempt number of the run",
+ "in": "path",
+ "name": "attempt",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets a specific workflow run attempt",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/attempts/{attempt}/jobs": {
+ "get": {
+ "operationId": "listWorkflowRunAttemptJobsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the workflow run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "logical attempt number of the run",
+ "in": "path",
+ "name": "attempt",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "in": "query",
+ "name": "status",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lists all jobs for a workflow run attempt",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": {
+ "get": {
+ "operationId": "listWorkflowRunJobsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "runid of the workflow run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
+ "in": "query",
+ "name": "status",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WorkflowJobsList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lists all jobs for a workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs/{job_id}/rerun": {
+ "post": {
+ "operationId": "rerunWorkflowJobMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the job",
+ "in": "path",
+ "name": "job_id",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/WorkflowJob"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Reruns a specific workflow job in a run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/rerun": {
+ "post": {
+ "operationId": "rerunWorkflowRunMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/WorkflowRun"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Reruns an entire workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/rerun-failed-jobs": {
+ "post": {
+ "operationId": "rerunFailedWorkflowRunMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the run",
+ "in": "path",
+ "name": "run",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Reruns all failed jobs in a workflow run",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": {
+ "get": {
+ "operationId": "repoListActionsSecretsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/SecretList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List an repo's actions secrets",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": {
+ "delete": {
+ "operationId": "deleteRepoSecretMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repository",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the secret",
+ "in": "path",
+ "name": "secretname",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "delete one secret of the repository"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a secret in a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "updateRepoSecretMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repository",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the secret",
+ "in": "path",
+ "name": "secretname",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrUpdateSecretOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "description": "response when creating a secret"
+ },
+ "204": {
+ "description": "response when updating a secret"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Create or Update a secret value in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": {
+ "get": {
+ "operationId": "ListActionTasksMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results, default maximum page size is 50",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TasksList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "List a repository's action tasks",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/variables": {
+ "get": {
+ "operationId": "getRepoVariablesListMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/VariableList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get repo-level variables list",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": {
+ "delete": {
+ "operationId": "deleteRepoVariableMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the variable",
+ "in": "path",
+ "name": "variablename",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ActionVariable"
+ },
+ "201": {
+ "description": "response when deleting a variable"
+ },
+ "204": {
+ "description": "response when deleting a variable"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a repo-level variable",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "getRepoVariableMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the variable",
+ "in": "path",
+ "name": "variablename",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ActionVariable"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a repo-level variable",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "createRepoVariableMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the variable",
+ "in": "path",
+ "name": "variablename",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateVariableOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "description": "response when creating a repo-level variable"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "409": {
+ "description": "variable name already exists."
+ },
+ "500": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Create a repo-level variable",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "updateRepoVariableMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repository",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the variable",
+ "in": "path",
+ "name": "variablename",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateVariableOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "description": "response when updating a repo-level variable"
+ },
+ "204": {
+ "description": "response when updating a repo-level variable"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Update a repo-level variable",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": {
+ "get": {
+ "operationId": "ActionsListRepositoryWorkflowsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ActionWorkflowList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "500": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "List repository workflows",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": {
+ "get": {
+ "operationId": "ActionsGetWorkflowMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the workflow",
+ "in": "path",
+ "name": "workflow_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ActionWorkflow"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "500": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Get a workflow",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": {
+ "put": {
+ "operationId": "ActionsDisableWorkflowMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the workflow",
+ "in": "path",
+ "name": "workflow_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Disable a workflow",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": {
+ "post": {
+ "operationId": "ActionsDispatchWorkflowMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the workflow",
+ "in": "path",
+ "name": "workflow_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether the response should include the workflow run ID and URLs.",
+ "in": "query",
+ "name": "return_run_details",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateActionWorkflowDispatch"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RunDetails"
+ },
+ "204": {
+ "description": "No Content, if return_run_details is missing or false"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Create a workflow dispatch event",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": {
+ "put": {
+ "operationId": "ActionsEnableWorkflowMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the workflow",
+ "in": "path",
+ "name": "workflow_id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Enable a workflow",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": {
+ "get": {
+ "operationId": "repoListActivityFeedsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the date of the activities to be found",
+ "in": "query",
+ "name": "date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ActivityFeedsList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's activity feeds",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": {
+ "get": {
+ "operationId": "repoGetArchiveMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the git reference for download with attached archive format (e.g. master.zip)",
+ "in": "path",
+ "name": "archive",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "subpath of the repository to download",
+ "in": "query",
+ "name": "path",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get an archive of a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/assignees": {
+ "get": {
+ "operationId": "repoGetAssigneesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Return all users that have write access and can be assigned to issues",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/avatar": {
+ "delete": {
+ "operationId": "repoDeleteAvatarMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete avatar",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoUpdateAvatarMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateRepoAvatarOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Update avatar",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections": {
+ "get": {
+ "operationId": "repoListBranchProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/BranchProtectionList"
+ }
+ },
+ "summary": "List branch protections for a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateBranchProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateBranchProtectionOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/BranchProtection"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a branch protections for a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": {
+ "post": {
+ "operationId": "repoUpdateBranchProtectionPrioriesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBranchProtectionPriories"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Update the priorities of branch protections for a repository.",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": {
+ "delete": {
+ "operationId": "repoDeleteBranchProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of protected branch",
+ "in": "path",
+ "name": "name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a specific branch protection for the repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetBranchProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of protected branch",
+ "in": "path",
+ "name": "name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/BranchProtection"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a specific branch protection for the repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditBranchProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of protected branch",
+ "in": "path",
+ "name": "name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditBranchProtectionOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/BranchProtection"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branches": {
+ "get": {
+ "operationId": "repoListBranchesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/BranchList"
+ }
+ },
+ "summary": "List a repository's branches",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateBranchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateBranchRepoOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Branch"
+ },
+ "403": {
+ "description": "The branch is archived or a mirror."
+ },
+ "404": {
+ "description": "The old branch does not exist."
+ },
+ "409": {
+ "description": "The branch with the same name already exists."
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a branch",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": {
+ "delete": {
+ "operationId": "repoDeleteBranchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "branch to delete",
+ "in": "path",
+ "name": "branch",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Delete a specific branch from a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetBranchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "branch to get",
+ "in": "path",
+ "name": "branch",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Branch"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoRenameBranchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the branch",
+ "in": "path",
+ "name": "branch",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RenameBranchRepoOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Rename a branch",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "repoUpdateBranchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the branch",
+ "in": "path",
+ "name": "branch",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBranchRepoOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Update a branch reference to a new commit",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators": {
+ "get": {
+ "operationId": "repoListCollaboratorsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's collaborators",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": {
+ "delete": {
+ "operationId": "repoDeleteCollaboratorMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "username of the collaborator to delete",
+ "in": "path",
+ "name": "collaborator",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Delete a collaborator from a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoCheckCollaboratorMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "username of the user to check for being a collaborator",
+ "in": "path",
+ "name": "collaborator",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Check if a user is a collaborator of a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "repoAddCollaboratorMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "username of the user to add or update as a collaborator",
+ "in": "path",
+ "name": "collaborator",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddCollaboratorOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Add or Update a collaborator to a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": {
+ "get": {
+ "operationId": "repoGetRepoPermissionsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "username of the collaborator whose permissions are to be obtained",
+ "in": "path",
+ "name": "collaborator",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RepoCollaboratorPermission"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get repository permissions for a user",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits": {
+ "get": {
+ "operationId": "repoGetAllCommitsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "SHA or branch to start listing commits from (usually 'master')",
+ "in": "query",
+ "name": "sha",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "filepath of a file/dir",
+ "in": "query",
+ "name": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only commits after this date will be returned (ISO 8601 format)",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only commits before this date will be returned (ISO 8601 format)",
+ "in": "query",
+ "name": "until",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "include diff stats for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "stat",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "verification",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "files",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results (ignored if used with 'path')",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "commits that match the given specifier will not be listed.",
+ "in": "query",
+ "name": "not",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CommitList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/EmptyRepository"
+ }
+ },
+ "summary": "Get a list of all commits from a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": {
+ "get": {
+ "operationId": "repoGetCombinedStatusByRefMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of branch/tag/commit",
+ "in": "path",
+ "name": "ref",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CombinedStatus"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a commit's combined status, by branch/tag/commit reference",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": {
+ "get": {
+ "operationId": "repoListStatusesByRefMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of branch/tag/commit",
+ "in": "path",
+ "name": "ref",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "type of sort",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "leastindex",
+ "highestindex"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "type of state",
+ "in": "query",
+ "name": "state",
+ "schema": {
+ "enum": [
+ "pending",
+ "success",
+ "error",
+ "failure",
+ "warning"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CommitStatusList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a commit's statuses, by branch/tag/commit reference",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": {
+ "get": {
+ "operationId": "repoGetCommitPullRequestMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "SHA of the commit to get",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get the merged pull request of the commit",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": {
+ "get": {
+ "operationId": "repoCompareDiffMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "compare two branches or commits",
+ "in": "path",
+ "name": "basehead",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Compare"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get commit comparison information",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents": {
+ "get": {
+ "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead.",
+ "operationId": "repoGetContentsListMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets the metadata of all the entries of the root dir.",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoChangeFilesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ChangeFilesOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/FilesResponse"
+ },
+ "403": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Modify multiple files in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": {
+ "get": {
+ "description": "It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory.",
+ "operationId": "repoGetContentsExtMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory.",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the name of the commit/branch/tag, default to the repository’s default branch.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message.",
+ "in": "query",
+ "name": "includes",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ContentsExtResponse"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": {
+ "delete": {
+ "operationId": "repoDeleteFileMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the file to delete",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeleteFileOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/FileDeleteResponse"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Delete a file in a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead.",
+ "operationId": "repoGetContentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the dir, file, symlink or submodule in the repo",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ContentsResponse"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateFileMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the file to create",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateFileOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/FileResponse"
+ },
+ "403": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a file in a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "repoUpdateFileMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the file to update",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateFileOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/FileResponse"
+ },
+ "201": {
+ "$ref": "#/components/responses/FileResponse"
+ },
+ "403": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/diffpatch": {
+ "post": {
+ "operationId": "repoApplyDiffPatchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApplyDiffPatchFileOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/FileResponse"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Apply diff patch to repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": {
+ "get": {
+ "operationId": "repoGetEditorConfigMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "filepath of file to get",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get the EditorConfig definitions of a file in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/file-contents": {
+ "get": {
+ "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.",
+ "operationId": "repoGetFileContentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}",
+ "in": "query",
+ "name": "body",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get the metadata and contents of requested files",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "description": "Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size \u003e 0`, they can be requested separately by using the `download_url`.",
+ "operationId": "repoGetFileContentsPostMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetFilesOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ContentsListResponse"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get the metadata and contents of requested files",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/forks": {
+ "get": {
+ "operationId": "listForksMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RepositoryList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's forks",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "createForkMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to fork",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to fork",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateForkOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "202": {
+ "$ref": "#/components/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "description": "The repository with the same name already exists."
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Fork a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": {
+ "get": {
+ "operationId": "GetBlobMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "sha of the commit",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GitBlobResponse"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets the blob of a repository.",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": {
+ "get": {
+ "operationId": "repoGetSingleCommitMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "a git ref or commit sha",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "include diff stats for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "stat",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "verification",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "files",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Commit"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Get a single commit from a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": {
+ "get": {
+ "operationId": "repoDownloadCommitDiffOrPatchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "SHA of the commit to get",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "whether the output is diff or patch",
+ "in": "path",
+ "name": "diffType",
+ "required": true,
+ "schema": {
+ "enum": [
+ "diff",
+ "patch"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/string"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a commit's diff or patch",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": {
+ "get": {
+ "operationId": "repoGetNoteMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "a git ref or commit sha",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "verification",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "files",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Note"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Get a note corresponding to a single commit from a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/refs": {
+ "get": {
+ "operationId": "repoListAllGitRefsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ReferenceList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get specified ref or filtered repository's refs",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": {
+ "get": {
+ "operationId": "repoListGitRefsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "part or full name of the ref",
+ "in": "path",
+ "name": "ref",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ReferenceList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get specified ref or filtered repository's refs",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": {
+ "get": {
+ "operationId": "GetAnnotatedTagMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/AnnotatedTag"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": {
+ "get": {
+ "operationId": "GetTreeMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "sha of the commit",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "show all directories and files",
+ "in": "query",
+ "name": "recursive",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "number of items per page",
+ "in": "query",
+ "name": "per_page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GitTreeResponse"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets the tree of a repository.",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks": {
+ "get": {
+ "operationId": "repoListHooksMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/HookList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List the hooks in a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateHookOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Create a hook",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/git": {
+ "get": {
+ "operationId": "repoListGitHooksMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GitHookList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List the Git hooks in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": {
+ "delete": {
+ "operationId": "repoDeleteGitHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the hook to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a Git hook in a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetGitHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the hook to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GitHook"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a Git hook",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditGitHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the hook to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditGitHookOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/GitHook"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Edit a Git hook in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": {
+ "delete": {
+ "operationId": "repoDeleteHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the hook to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a hook in a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the hook to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a hook",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the hook",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditHookOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Hook"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Edit a hook in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": {
+ "post": {
+ "operationId": "repoTestHookMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the hook to test",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Test a push webhook",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_config": {
+ "get": {
+ "operationId": "repoGetIssueConfigMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RepoIssueConfig"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Returns the issue config for a repo",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": {
+ "get": {
+ "operationId": "repoValidateIssueConfigMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RepoIssueConfigValidation"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Returns the validation information for a issue config",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issue_templates": {
+ "get": {
+ "operationId": "repoGetIssueTemplatesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/IssueTemplates"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get available issue templates for a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues": {
+ "get": {
+ "operationId": "issueListIssuesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "whether issue is open or closed",
+ "in": "query",
+ "name": "state",
+ "schema": {
+ "enum": [
+ "closed",
+ "open",
+ "all"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "comma separated list of label names. Fetch only issues that have any of this label names. Non existent labels are discarded.",
+ "in": "query",
+ "name": "labels",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "search string",
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "filter by type (issues / pulls) if set",
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "enum": [
+ "issues",
+ "pulls"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded",
+ "in": "query",
+ "name": "milestones",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show items which were created by the given user",
+ "in": "query",
+ "name": "created_by",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show items for which the given user is assigned",
+ "in": "query",
+ "name": "assigned_by",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show items in which the given user was mentioned",
+ "in": "query",
+ "name": "mentioned_by",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's issues",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateIssueOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "412": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments": {
+ "get": {
+ "operationId": "issueGetRepoCommentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "if provided, only comments updated since the provided time are returned.",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CommentList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List all comments in a repository",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": {
+ "delete": {
+ "operationId": "issueDeleteCommentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of comment to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a comment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetCommentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a comment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "operationId": "issueEditCommentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditIssueCommentOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Edit a comment",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": {
+ "get": {
+ "operationId": "issueListIssueCommentAttachmentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "List comment's attachments",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "name of the attachment",
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "properties": {
+ "attachment": {
+ "description": "attachment to upload",
+ "format": "binary",
+ "type": "string",
+ "x-formData-name": "attachment"
+ }
+ },
+ "required": [
+ "attachment"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "413": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a comment attachment",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": {
+ "delete": {
+ "operationId": "issueDeleteIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to delete",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Delete a comment attachment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to get",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Get a comment attachment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "operationId": "issueEditIssueCommentAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to edit",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditAttachmentOptions"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Edit a comment attachment",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": {
+ "delete": {
+ "operationId": "issueDeleteCommentReactionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditReactionOption"
+ }
+ }
+ },
+ "x-originalParamName": "content"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Remove a reaction from a comment of an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetCommentReactionsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ReactionList"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a list of reactions from a comment of an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issuePostCommentReactionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the comment to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditReactionOption"
+ }
+ }
+ },
+ "x-originalParamName": "content"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Reaction"
+ },
+ "201": {
+ "$ref": "#/components/responses/Reaction"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Add a reaction to a comment of an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": {
+ "get": {
+ "operationId": "repoListPinnedIssuesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repo's pinned issues",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": {
+ "delete": {
+ "operationId": "issueDeleteMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of issue to delete",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to get",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "description": "Pass `content_version` to enable optimistic locking on body edits.\nIf the version doesn't match the current value, the request fails with 409 Conflict.\n",
+ "operationId": "issueEditIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to edit",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditIssueOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "412": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": {
+ "get": {
+ "operationId": "issueListIssueAttachmentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "List issue's attachments",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "name of the attachment",
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "properties": {
+ "attachment": {
+ "description": "attachment to upload",
+ "format": "binary",
+ "type": "string",
+ "x-formData-name": "attachment"
+ }
+ },
+ "required": [
+ "attachment"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "413": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create an issue attachment",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": {
+ "delete": {
+ "operationId": "issueDeleteIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to delete",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Delete an issue attachment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to get",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Get an issue attachment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "operationId": "issueEditIssueAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to edit",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditAttachmentOptions"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Edit an issue attachment",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": {
+ "delete": {
+ "operationId": "issueRemoveIssueBlockingMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IssueMeta"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Unblock the issue given in the body by the issue in path",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueListBlocksMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List issues that are blocked by this issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateIssueBlockingMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IssueMeta"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "404": {
+ "description": "the issue does not exist"
+ }
+ },
+ "summary": "Block the issue given in the body by the issue in path",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": {
+ "get": {
+ "operationId": "issueGetCommentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "if provided, only comments updated since the specified time are returned.",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CommentList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List all comments on an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateCommentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateIssueCommentOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Comment"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Add a comment to an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": {
+ "delete": {
+ "deprecated": true,
+ "operationId": "issueDeleteCommentDeprecatedMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "this parameter is ignored",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of comment to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a comment",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "deprecated": true,
+ "operationId": "issueEditCommentDeprecatedMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "this parameter is ignored",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the comment to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditIssueCommentOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Comment"
+ },
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Edit a comment",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": {
+ "post": {
+ "operationId": "issueEditIssueDeadlineMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to create or update a deadline on",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditDeadlineOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/IssueDeadline"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": {
+ "delete": {
+ "operationId": "issueRemoveIssueDependenciesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IssueMeta"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Remove an issue dependency",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueListIssueDependenciesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/IssueList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List an issue's dependencies, i.e all issues that block this issue.",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateIssueDependenciesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IssueMeta"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Issue"
+ },
+ "404": {
+ "description": "the issue does not exist"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Make the issue in the url depend on the issue in the form.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": {
+ "delete": {
+ "operationId": "issueClearLabelsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Remove all labels from an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetLabelsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/LabelList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get an issue's labels",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueAddLabelMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IssueLabelsOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/LabelList"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Add a label to an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "put": {
+ "operationId": "issueReplaceLabelsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IssueLabelsOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/LabelList"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Replace an issue's labels",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": {
+ "delete": {
+ "operationId": "issueRemoveLabelMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the label to remove",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Remove a label from an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": {
+ "delete": {
+ "operationId": "issueUnlockIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Unlock an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "put": {
+ "operationId": "issueLockIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LockIssueOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Lock an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": {
+ "delete": {
+ "operationId": "unpinIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of issue to unpin",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Unpin an Issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "pinIssueMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of issue to pin",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Pin an Issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": {
+ "patch": {
+ "operationId": "moveIssuePinMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "the new position",
+ "in": "path",
+ "name": "position",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Moves the Pin to the given Position",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": {
+ "delete": {
+ "operationId": "issueDeleteIssueReactionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditReactionOption"
+ }
+ }
+ },
+ "x-originalParamName": "content"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Remove a reaction from an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetIssueReactionsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ReactionList"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a list reactions of an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issuePostIssueReactionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditReactionOption"
+ }
+ }
+ },
+ "x-originalParamName": "content"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Reaction"
+ },
+ "201": {
+ "$ref": "#/components/responses/Reaction"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Add a reaction to an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": {
+ "delete": {
+ "operationId": "issueDeleteStopWatchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to stop the stopwatch on",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot cancel a non-existent stopwatch"
+ }
+ },
+ "summary": "Delete an issue's existing stopwatch.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": {
+ "post": {
+ "operationId": "issueStartStopWatchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to create the stopwatch on",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot start a stopwatch again if it already exists"
+ }
+ },
+ "summary": "Start stopwatch on an issue.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": {
+ "post": {
+ "operationId": "issueStopStopWatchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to stop the stopwatch on",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "description": "Cannot stop a non-existent stopwatch"
+ }
+ },
+ "summary": "Stop an issue's existing stopwatch.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": {
+ "get": {
+ "operationId": "issueSubscriptionsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get users who subscribed on an issue.",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": {
+ "get": {
+ "operationId": "issueCheckSubscriptionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WatchInfo"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Check if user is subscribed to an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": {
+ "delete": {
+ "operationId": "issueDeleteSubscriptionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "username of the user to unsubscribe from an issue",
+ "in": "path",
+ "name": "user",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Already unsubscribed"
+ },
+ "201": {
+ "description": "Successfully Unsubscribed"
+ },
+ "304": {
+ "description": "User can only subscribe itself if he is no admin"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Unsubscribe user from issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "put": {
+ "operationId": "issueAddSubscriptionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "username of the user to subscribe the issue to",
+ "in": "path",
+ "name": "user",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Already subscribed"
+ },
+ "201": {
+ "description": "Successfully Subscribed"
+ },
+ "304": {
+ "description": "User can only subscribe itself if he is no admin"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Subscribe user to issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": {
+ "get": {
+ "operationId": "issueGetCommentsAndTimelineMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "if provided, only comments updated since the specified time are returned.",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "if provided, only comments updated before the provided time are returned.",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TimelineList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List all comments and events on an issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": {
+ "delete": {
+ "operationId": "issueResetTimeMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue to add tracked time to",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Reset a tracked time of an issue",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueTrackedTimesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "optional filter by user (available for issue managers)",
+ "in": "query",
+ "name": "user",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TrackedTimeList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List an issue's tracked times",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueAddTimeMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddTimeOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TrackedTime"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Add tracked time to a issue",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": {
+ "delete": {
+ "operationId": "issueDeleteTimeMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the issue",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of time to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete specific tracked time",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/keys": {
+ "get": {
+ "operationId": "repoListKeysMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the key_id to search for",
+ "in": "query",
+ "name": "key_id",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "fingerprint of the key",
+ "in": "query",
+ "name": "fingerprint",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/DeployKeyList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's keys",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateKeyMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateKeyOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/DeployKey"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Add a key to a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": {
+ "delete": {
+ "operationId": "repoDeleteKeyMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the key to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a key from a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetKeyMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the key to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/DeployKey"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a repository's key by id",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/labels": {
+ "get": {
+ "operationId": "issueListLabelsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/LabelList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get all of a repository's labels",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateLabelMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateLabelOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Label"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Create a label",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": {
+ "delete": {
+ "operationId": "issueDeleteLabelMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the label to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a label",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetLabelMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the label to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Label"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a single label",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "operationId": "issueEditLabelMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the label to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditLabelOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Label"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Update a label",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/languages": {
+ "get": {
+ "operationId": "repoGetLanguagesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/LanguageStatistics"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get languages and number of bytes of code written",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/licenses": {
+ "get": {
+ "operationId": "repoGetLicensesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/LicensesList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get repo licenses",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": {
+ "get": {
+ "operationId": "repoGetRawFileOrLFSMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "format": "binary",
+ "type": "string"
+ }
+ }
+ },
+ "description": "Returns raw file content."
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a file or it's LFS object from a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": {
+ "post": {
+ "operationId": "repoMergeUpstreamMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MergeUpstreamRequest"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/MergeUpstreamResponse"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Merge a branch from upstream",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/milestones": {
+ "get": {
+ "operationId": "issueGetMilestonesListMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"",
+ "in": "query",
+ "name": "state",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "filter by milestone name",
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/MilestoneList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get all of a repository's opened milestones",
+ "tags": [
+ "issue"
+ ]
+ },
+ "post": {
+ "operationId": "issueCreateMilestoneMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateMilestoneOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Create a milestone",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": {
+ "delete": {
+ "operationId": "issueDeleteMilestoneMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the milestone to delete, identified by ID and if not available by name",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a milestone",
+ "tags": [
+ "issue"
+ ]
+ },
+ "get": {
+ "operationId": "issueGetMilestoneMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the milestone to get, identified by ID and if not available by name",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a milestone",
+ "tags": [
+ "issue"
+ ]
+ },
+ "patch": {
+ "operationId": "issueEditMilestoneMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "the milestone to edit, identified by ID and if not available by name",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditMilestoneOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Milestone"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Update a milestone",
+ "tags": [
+ "issue"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": {
+ "post": {
+ "operationId": "repoMirrorSyncMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to sync",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to sync",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Sync a mirrored repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": {
+ "get": {
+ "operationId": "repoNewPinAllowedMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/RepoNewIssuePinsAllowed"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Returns if new Issue Pins are allowed",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/notifications": {
+ "get": {
+ "operationId": "notifyGetRepoListMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "If true, show notifications marked as read. Default value is false",
+ "in": "query",
+ "name": "all",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned",
+ "in": "query",
+ "name": "status-types",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "filter notifications by subject type",
+ "in": "query",
+ "name": "subject-type",
+ "schema": {
+ "items": {
+ "enum": [
+ "issue",
+ "pull",
+ "commit",
+ "repository"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/NotificationThreadList"
+ }
+ },
+ "summary": "List users's notification threads on a specific repo",
+ "tags": [
+ "notification"
+ ]
+ },
+ "put": {
+ "operationId": "notifyReadRepoListMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "If true, mark all notifications on this repo. Default value is false",
+ "in": "query",
+ "name": "all",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
+ "in": "query",
+ "name": "status-types",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "Status to mark notifications as. Defaults to read.",
+ "in": "query",
+ "name": "to-status",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
+ "in": "query",
+ "name": "last_read_at",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "205": {
+ "$ref": "#/components/responses/NotificationThreadList"
+ }
+ },
+ "summary": "Mark notification threads as read, pinned or unread on a specific repo",
+ "tags": [
+ "notification"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls": {
+ "get": {
+ "operationId": "repoListPullRequestsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter by target base branch of the pull request",
+ "in": "query",
+ "name": "base_branch",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "State of pull request",
+ "in": "query",
+ "name": "state",
+ "schema": {
+ "default": "open",
+ "enum": [
+ "open",
+ "closed",
+ "all"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Type of sort",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "recentclose",
+ "leastupdate",
+ "mostcomment",
+ "leastcomment",
+ "priority"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "ID of the milestone",
+ "in": "query",
+ "name": "milestone",
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Label IDs",
+ "in": "query",
+ "name": "labels",
+ "schema": {
+ "items": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "Filter by pull request author",
+ "in": "query",
+ "name": "poster",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "default": 1,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullRequestList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "500": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "List a repo's pull requests",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreatePullRequestMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreatePullRequestOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/PullRequest"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/comments/{id}/resolve": {
+ "post": {
+ "operationId": "repoResolvePullReviewCommentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the review comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Resolve a pull request review comment",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/comments/{id}/unresolve": {
+ "post": {
+ "operationId": "repoUnresolvePullReviewCommentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the review comment",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Unresolve a pull request review comment",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": {
+ "get": {
+ "operationId": "repoListPinnedPullRequestsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullRequestList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repo's pinned pull requests",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": {
+ "get": {
+ "operationId": "repoGetPullRequestByBaseHeadMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "base of the pull request to get",
+ "in": "path",
+ "name": "base",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "head of the pull request to get",
+ "in": "path",
+ "name": "head",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a pull request by base and head",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": {
+ "get": {
+ "operationId": "repoGetPullRequestMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to get",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullRequest"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a pull request",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditPullRequestMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to edit",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditPullRequestOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/PullRequest"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "412": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": {
+ "get": {
+ "operationId": "repoDownloadPullDiffOrPatchMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to get",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "whether the output is diff or patch",
+ "in": "path",
+ "name": "diffType",
+ "required": true,
+ "schema": {
+ "enum": [
+ "diff",
+ "patch"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`",
+ "in": "query",
+ "name": "binary",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/string"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a pull request diff or patch",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/comments/{id}/replies": {
+ "post": {
+ "operationId": "repoCreatePullReviewCommentReplyMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review comment to reply to",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreatePullReviewCommentReplyOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/PullReviewComment"
+ },
+ "400": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Reply to a pull request review comment",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": {
+ "get": {
+ "operationId": "repoGetPullRequestCommitsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to get",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "include verification for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "verification",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "include a list of affected files for every commit (disable for speedup, default 'true')",
+ "in": "query",
+ "name": "files",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CommitList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get commits for a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": {
+ "get": {
+ "operationId": "repoGetPullRequestFilesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to get",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "skip to given file",
+ "in": "query",
+ "name": "skip-to",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "whitespace behavior",
+ "in": "query",
+ "name": "whitespace",
+ "schema": {
+ "enum": [
+ "ignore-all",
+ "ignore-change",
+ "ignore-eol",
+ "show-all"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ChangedFileList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get changed files for a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": {
+ "delete": {
+ "operationId": "repoCancelScheduledAutoMergeMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to merge",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Cancel the scheduled auto merge for the given pull request",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoPullRequestIsMergedMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pull request has been merged"
+ },
+ "404": {
+ "description": "pull request has not been merged"
+ }
+ },
+ "summary": "Check if a pull request has been merged",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoMergePullRequestMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to merge",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MergePullRequestOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/components/responses/empty"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Merge a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": {
+ "delete": {
+ "operationId": "repoDeletePullReviewRequestsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PullReviewRequestOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "cancel review requests for a pull request",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreatePullReviewRequestsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PullReviewRequestOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/PullReviewList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "create review requests for a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": {
+ "get": {
+ "operationId": "repoListPullReviewsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReviewList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List all reviews for a pull request",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreatePullReviewMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreatePullReviewOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Create a review to a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": {
+ "delete": {
+ "operationId": "repoDeletePullReviewMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a specific review from a pull request",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetPullReviewMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a specific review for a pull request",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoSubmitPullReviewMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SubmitPullReviewOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReview"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Submit a pending review to a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": {
+ "get": {
+ "operationId": "repoGetPullReviewCommentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReviewCommentList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a specific review for a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": {
+ "post": {
+ "operationId": "repoDismissPullReviewMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DismissPullReviewOptions"
+ }
+ }
+ },
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReview"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Dismiss a review for a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": {
+ "post": {
+ "operationId": "repoUnDismissPullReviewMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the review",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PullReview"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Cancel to dismiss a review for a pull request",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": {
+ "post": {
+ "operationId": "repoUpdatePullRequestMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "index of the pull request to get",
+ "in": "path",
+ "name": "index",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "how to update pull request",
+ "in": "query",
+ "name": "style",
+ "schema": {
+ "enum": [
+ "merge",
+ "rebase"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Merge PR's baseBranch into headBranch",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": {
+ "get": {
+ "operationId": "repoListPushMirrorsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PushMirrorList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get all push mirrors of the repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoAddPushMirrorMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreatePushMirrorOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PushMirror"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "add a push mirror to the repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": {
+ "post": {
+ "operationId": "repoPushMirrorSyncMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to sync",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to sync",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Sync all push mirrored repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": {
+ "delete": {
+ "operationId": "repoDeletePushMirrorMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "remote name of the pushMirror",
+ "in": "path",
+ "name": "name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "deletes a push mirror from a repository by remoteName",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetPushMirrorByRemoteNameMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "remote name of push mirror",
+ "in": "path",
+ "name": "name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/PushMirror"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get push mirror of the repository by remoteName",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": {
+ "get": {
+ "operationId": "repoGetRawFileMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch",
+ "in": "path",
+ "name": "filepath",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The name of the commit/branch/tag. Default to the repository’s default branch",
+ "in": "query",
+ "name": "ref",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "format": "binary",
+ "type": "string"
+ }
+ }
+ },
+ "description": "Returns raw file content."
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a file from a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases": {
+ "get": {
+ "operationId": "repoListReleasesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "filter (exclude / include) drafts, if you don't have repo write access none will show",
+ "in": "query",
+ "name": "draft",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "filter (exclude / include) pre-releases",
+ "in": "query",
+ "name": "pre-release",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/ReleaseList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repo's releases",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateReleaseMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateReleaseOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Release"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "409": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Create a release",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/latest": {
+ "get": {
+ "operationId": "repoGetLatestReleaseMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Release"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": {
+ "delete": {
+ "operationId": "repoDeleteReleaseByTagMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "tag name of the release to delete",
+ "in": "path",
+ "name": "tag",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Delete a release by tag name",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetReleaseByTagMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "tag name of the release to get",
+ "in": "path",
+ "name": "tag",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Release"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a release by tag name",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": {
+ "delete": {
+ "operationId": "repoDeleteReleaseMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release to delete",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Delete a release",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetReleaseMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Release"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a release",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditReleaseMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release to edit",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditReleaseOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Release"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Update a release",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": {
+ "get": {
+ "operationId": "repoListReleaseAttachmentsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/AttachmentList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List release's attachments",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "name of the attachment",
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "properties": {
+ "attachment": {
+ "description": "attachment to upload",
+ "format": "binary",
+ "type": "string",
+ "x-formData-name": "attachment"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "multipart/form-data": {
+ "schema": {
+ "properties": {
+ "attachment": {
+ "description": "attachment to upload",
+ "format": "binary",
+ "type": "string",
+ "x-formData-name": "attachment"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "413": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Create a release attachment",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": {
+ "delete": {
+ "operationId": "repoDeleteReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to delete",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a release attachment",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to get",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a release attachment",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditReleaseAttachmentMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the release",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "id of the attachment to edit",
+ "in": "path",
+ "name": "attachment_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditAttachmentOptions"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/Attachment"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Edit a release attachment",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/reviewers": {
+ "get": {
+ "operationId": "repoGetReviewersMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Return all users that can be requested to review in this repo",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": {
+ "get": {
+ "operationId": "repoSigningKeyMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "GPG armored public key"
+ }
+ },
+ "summary": "Get signing-key.gpg for given repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": {
+ "get": {
+ "operationId": "repoSigningKeySSHMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "ssh public key"
+ }
+ },
+ "summary": "Get signing-key.pub for given repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/stargazers": {
+ "get": {
+ "operationId": "repoListStargazersMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/UserList"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repo's stargazers",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": {
+ "get": {
+ "operationId": "repoListStatusesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "sha of the commit",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "type of sort",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "leastindex",
+ "highestindex"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "type of state",
+ "in": "query",
+ "name": "state",
+ "schema": {
+ "enum": [
+ "pending",
+ "success",
+ "error",
+ "failure",
+ "warning"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/CommitStatusList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a commit's statuses",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateStatusMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "sha of the commit",
+ "in": "path",
+ "name": "sha",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateStatusOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/CommitStatus"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Create a commit status",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/subscribers": {
+ "get": {
+ "operationId": "repoListSubscribersMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/UserList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repo's watchers",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/subscription": {
+ "delete": {
+ "operationId": "userCurrentDeleteSubscriptionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Unwatch a repo",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "userCurrentCheckSubscriptionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WatchInfo"
+ },
+ "404": {
+ "description": "User is not watching this repo or repo do not exist"
+ }
+ },
+ "summary": "Check if the current user is watching a repo",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "userCurrentPutSubscriptionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WatchInfo"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Watch a repo",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tag_protections": {
+ "get": {
+ "operationId": "repoListTagProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TagProtectionList"
+ }
+ },
+ "summary": "List tag protections for a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateTagProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateTagProtectionOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/TagProtection"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a tag protections for a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": {
+ "delete": {
+ "operationId": "repoDeleteTagProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of protected tag",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Delete a specific tag protection for the repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetTagProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of the tag protect to get",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TagProtection"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a specific tag protection for the repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditTagProtectionMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "id of protected tag",
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditTagProtectionOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TagProtection"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Edit a tag protections for a repository. Only fields that are set will be changed",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tags": {
+ "get": {
+ "operationId": "repoListTagsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results, default maximum page size is 50",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TagList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's tags",
+ "tags": [
+ "repository"
+ ]
+ },
+ "post": {
+ "operationId": "repoCreateTagMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateTagOption"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/components/responses/empty"
+ },
+ "409": {
+ "$ref": "#/components/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a new git tag in a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": {
+ "delete": {
+ "operationId": "repoDeleteTagMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of tag to delete",
+ "in": "path",
+ "name": "tag",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/components/responses/empty"
+ },
+ "409": {
+ "$ref": "#/components/responses/conflict"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Delete a repository's tag by name",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetTagMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of tag",
+ "in": "path",
+ "name": "tag",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get the tag of a repository by tag name",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/teams": {
+ "get": {
+ "operationId": "repoListTeamsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TeamList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repository's teams",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": {
+ "delete": {
+ "operationId": "repoDeleteTeamMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Delete a team from a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoCheckTeamMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Team"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/components/responses/error"
+ }
+ },
+ "summary": "Check if a team is assigned to a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "repoAddTeamMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "team name",
+ "in": "path",
+ "name": "team",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/components/responses/error"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Add a team to a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/times": {
+ "get": {
+ "operationId": "repoTrackedTimesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "optional filter by user (available for issue managers)",
+ "in": "query",
+ "name": "user",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "since",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
+ "in": "query",
+ "name": "before",
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TrackedTimeList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a repo's tracked times",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/times/{user}": {
+ "get": {
+ "deprecated": true,
+ "operationId": "userTrackedTimesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "username of the user whose tracked times are to be listed",
+ "in": "path",
+ "name": "user",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TrackedTimeList"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "List a user's tracked times in a repo",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/topics": {
+ "get": {
+ "operationId": "repoListTopicsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/TopicNames"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get list of topics that a repository has",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "repoUpdateTopicsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RepoTopicOptions"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/invalidTopicsError"
+ }
+ },
+ "summary": "Replace list of topics for a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": {
+ "delete": {
+ "operationId": "repoDeleteTopicMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the topic to delete",
+ "in": "path",
+ "name": "topic",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/invalidTopicsError"
+ }
+ },
+ "summary": "Delete a topic from a repository",
+ "tags": [
+ "repository"
+ ]
+ },
+ "put": {
+ "operationId": "repoAddTopicMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the topic to add",
+ "in": "path",
+ "name": "topic",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/invalidTopicsError"
+ }
+ },
+ "summary": "Add a topic to a repository",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer": {
+ "post": {
+ "operationId": "repoTransferMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to transfer",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to transfer",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/TransferRepoOption"
+ }
+ }
+ },
+ "description": "Transfer Options",
+ "required": true,
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "202": {
+ "$ref": "#/components/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/components/responses/validationError"
+ }
+ },
+ "summary": "Transfer a repo ownership",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": {
+ "post": {
+ "operationId": "acceptRepoTransferMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to transfer",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to transfer",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/components/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Accept a repo transfer",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": {
+ "post": {
+ "operationId": "rejectRepoTransferMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo to transfer",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo to transfer",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Reject a repo transfer",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/new": {
+ "post": {
+ "operationId": "repoCreateWikiPageMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateWikiPageOptions"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "201": {
+ "$ref": "#/components/responses/WikiPage"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Create a wiki page",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": {
+ "delete": {
+ "operationId": "repoDeleteWikiPageMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the page",
+ "in": "path",
+ "name": "pageName",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/components/responses/empty"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Delete a wiki page",
+ "tags": [
+ "repository"
+ ]
+ },
+ "get": {
+ "operationId": "repoGetWikiPageMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the page",
+ "in": "path",
+ "name": "pageName",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WikiPage"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get a wiki page",
+ "tags": [
+ "repository"
+ ]
+ },
+ "patch": {
+ "operationId": "repoEditWikiPageMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the page",
+ "in": "path",
+ "name": "pageName",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateWikiPageOptions"
+ }
+ }
+ },
+ "x-originalParamName": "body"
+ },
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WikiPage"
+ },
+ "400": {
+ "$ref": "#/components/responses/error"
+ },
+ "403": {
+ "$ref": "#/components/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ },
+ "423": {
+ "$ref": "#/components/responses/repoArchivedError"
+ }
+ },
+ "summary": "Edit a wiki page",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": {
+ "get": {
+ "operationId": "repoGetWikiPagesMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "page size of results",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WikiPageList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get all wiki pages",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
+ "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": {
+ "get": {
+ "operationId": "repoGetWikiPageRevisionsMixin0",
+ "parameters": [
+ {
+ "description": "owner of the repo",
+ "in": "path",
+ "name": "owner",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the repo",
+ "in": "path",
+ "name": "repo",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "name of the page",
+ "in": "path",
+ "name": "pageName",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "page number of results to return (1-based)",
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "group ID of the repo",
+ "in": "path",
+ "name": "group_id",
+ "required": true,
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/WikiCommitList"
+ },
+ "404": {
+ "$ref": "#/components/responses/notFound"
+ }
+ },
+ "summary": "Get revisions of a wiki page",
+ "tags": [
+ "repository"
+ ]
+ }
+ },
"/repos/{owner}/{repo}": {
"delete": {
"operationId": "repoDelete",
diff --git a/tests/integration/actions_concurrency_test.go b/tests/integration/actions_concurrency_test.go
index 6460af0fd2..a1ccccc1c2 100644
--- a/tests/integration/actions_concurrency_test.go
+++ b/tests/integration/actions_concurrency_test.go
@@ -53,7 +53,7 @@ func TestWorkflowConcurrency(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -67,7 +67,7 @@ jobs:
`
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -81,7 +81,7 @@ jobs:
`
wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml"
wf3FileContent := `name: concurrent-workflow-3
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-3.yml'
@@ -161,7 +161,7 @@ func TestWorkflowConcurrencyShort(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -174,7 +174,7 @@ jobs:
`
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -187,7 +187,7 @@ jobs:
`
wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml"
wf3FileContent := `name: concurrent-workflow-3
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-3.yml'
@@ -266,7 +266,7 @@ func TestWorkflowConcurrencyShortJson(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -283,7 +283,7 @@ jobs:
`
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -300,7 +300,7 @@ jobs:
`
wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml"
wf3FileContent := `name: concurrent-workflow-3
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-3.yml'
@@ -529,7 +529,7 @@ func TestJobConcurrency(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -543,7 +543,7 @@ jobs:
`
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -551,7 +551,7 @@ jobs:
wf2-job1:
runs-on: runner2
outputs:
- version: ${{ steps.version_step.outputs.app_version }}
+ version: ${{ steps.version_step.outputs.app_version }}
steps:
- id: version_step
run: echo "app_version=v1.23.0" >> "$GITHUB_OUTPUT"
@@ -565,7 +565,7 @@ jobs:
`
wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml"
wf3FileContent := `name: concurrent-workflow-3
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-3.yml'
@@ -678,7 +678,7 @@ func TestMatrixConcurrency(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -696,7 +696,7 @@ jobs:
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -1238,7 +1238,7 @@ func TestWorkflowAndJobConcurrency(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -1260,7 +1260,7 @@ jobs:
`
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -1282,7 +1282,7 @@ jobs:
`
wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml"
wf3FileContent := `name: concurrent-workflow-3
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-3.yml'
@@ -1299,7 +1299,7 @@ jobs:
wf4TreePath := ".gitea/workflows/concurrent-workflow-4.yml"
wf4FileContent := `name: concurrent-workflow-4
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-4.yml'
@@ -1502,7 +1502,7 @@ func TestAbandonConcurrentRun(t *testing.T) {
wf1TreePath := ".gitea/workflows/workflow-1.yml"
wf1FileContent := `name: Workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/workflow-1.yml'
@@ -1521,7 +1521,7 @@ jobs:
wf2TreePath := ".gitea/workflows/workflow-2.yml"
wf2FileContent := `name: Workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/workflow-2.yml'
@@ -1601,7 +1601,7 @@ func TestRunAndJobWithSameConcurrencyGroup(t *testing.T) {
wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml"
wf1FileContent := `name: concurrent-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-1.yml'
@@ -1615,7 +1615,7 @@ jobs:
`
wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml"
wf2FileContent := `name: concurrent-workflow-2
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-2.yml'
@@ -1629,7 +1629,7 @@ jobs:
`
wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml"
wf3FileContent := `name: concurrent-workflow-3
-on:
+on:
push:
paths:
- '.gitea/workflows/concurrent-workflow-3.yml'
diff --git a/tests/integration/actions_rerun_test.go b/tests/integration/actions_rerun_test.go
index 24c2d726eb..eb3786fd23 100644
--- a/tests/integration/actions_rerun_test.go
+++ b/tests/integration/actions_rerun_test.go
@@ -48,7 +48,7 @@ func TestActionsRerun(t *testing.T) {
wfTreePath := ".gitea/workflows/actions-rerun-workflow-1.yml"
wfFileContent := `name: actions-rerun-workflow-1
-on:
+on:
push:
paths:
- '.gitea/workflows/actions-rerun-workflow-1.yml'
diff --git a/tests/integration/api_packages_cargo_test.go b/tests/integration/api_packages_cargo_test.go
index 055d56fe79..6f7f1930e2 100644
--- a/tests/integration/api_packages_cargo_test.go
+++ b/tests/integration/api_packages_cargo_test.go
@@ -71,7 +71,7 @@ func testPackageCargo(t *testing.T, _ *neturl.URL) {
err := cargo_service.InitializeIndexRepository(t.Context(), user, user)
assert.NoError(t, err)
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), user.Name, cargo_service.IndexRepositoryName)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), user.Name, cargo_service.IndexRepositoryName, 0)
assert.NotNil(t, repo)
assert.NoError(t, err)
diff --git a/tests/integration/api_private_serv_test.go b/tests/integration/api_private_serv_test.go
index 43bf9c02ad..446aac99ea 100644
--- a/tests/integration/api_private_serv_test.go
+++ b/tests/integration/api_private_serv_test.go
@@ -43,7 +43,7 @@ func TestAPIPrivateServ(t *testing.T) {
defer cancel()
// Can push to a repo we own
- results, extra := private.ServCommand(ctx, 1, "user2", "repo1", perm.AccessModeWrite, "git-upload-pack", "")
+ results, extra := private.ServCommand(ctx, 1, "user2", "repo1", 0, perm.AccessModeWrite, "git-upload-pack", "")
assert.NoError(t, extra.Error)
assert.False(t, results.IsWiki)
assert.Zero(t, results.DeployKeyID)
@@ -56,17 +56,17 @@ func TestAPIPrivateServ(t *testing.T) {
assert.Equal(t, int64(1), results.RepoID)
// Cannot push to a private repo we're not associated with
- results, extra = private.ServCommand(ctx, 1, "user15", "big_test_private_1", perm.AccessModeWrite, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, 1, "user15", "big_test_private_1", 0, perm.AccessModeWrite, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
// Cannot pull from a private repo we're not associated with
- results, extra = private.ServCommand(ctx, 1, "user15", "big_test_private_1", perm.AccessModeRead, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, 1, "user15", "big_test_private_1", 0, perm.AccessModeRead, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
// Can pull from a public repo we're not associated with
- results, extra = private.ServCommand(ctx, 1, "user15", "big_test_public_1", perm.AccessModeRead, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, 1, "user15", "big_test_public_1", 0, perm.AccessModeRead, "git-upload-pack", "")
assert.NoError(t, extra.Error)
assert.False(t, results.IsWiki)
assert.Zero(t, results.DeployKeyID)
@@ -79,7 +79,7 @@ func TestAPIPrivateServ(t *testing.T) {
assert.Equal(t, int64(17), results.RepoID)
// Cannot push to a public repo we're not associated with
- results, extra = private.ServCommand(ctx, 1, "user15", "big_test_public_1", perm.AccessModeWrite, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, 1, "user15", "big_test_public_1", 0, perm.AccessModeWrite, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
@@ -88,7 +88,7 @@ func TestAPIPrivateServ(t *testing.T) {
assert.NoError(t, err)
// Can pull from repo we're a deploy key for
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", perm.AccessModeRead, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", 0, perm.AccessModeRead, "git-upload-pack", "")
assert.NoError(t, extra.Error)
assert.False(t, results.IsWiki)
assert.NotZero(t, results.DeployKeyID)
@@ -101,17 +101,17 @@ func TestAPIPrivateServ(t *testing.T) {
assert.Equal(t, int64(19), results.RepoID)
// Cannot push to a private repo with reading key
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", perm.AccessModeWrite, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", 0, perm.AccessModeWrite, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
// Cannot pull from a private repo we're not associated with
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", perm.AccessModeRead, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", 0, perm.AccessModeRead, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
// Cannot pull from a public repo we're not associated with
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_public_1", perm.AccessModeRead, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_public_1", 0, perm.AccessModeRead, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
@@ -120,12 +120,12 @@ func TestAPIPrivateServ(t *testing.T) {
assert.NoError(t, err)
// Cannot push to a private repo with reading key
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", perm.AccessModeWrite, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", 0, perm.AccessModeWrite, "git-upload-pack", "")
assert.Error(t, extra.Error)
assert.Empty(t, results)
// Can pull from repo we're a writing deploy key for
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", perm.AccessModeRead, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", 0, perm.AccessModeRead, "git-upload-pack", "")
assert.NoError(t, extra.Error)
assert.False(t, results.IsWiki)
assert.NotZero(t, results.DeployKeyID)
@@ -138,7 +138,7 @@ func TestAPIPrivateServ(t *testing.T) {
assert.Equal(t, int64(20), results.RepoID)
// Can push to repo we're a writing deploy key for
- results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", perm.AccessModeWrite, "git-upload-pack", "")
+ results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", 0, perm.AccessModeWrite, "git-upload-pack", "")
assert.NoError(t, extra.Error)
assert.False(t, results.IsWiki)
assert.NotZero(t, results.DeployKeyID)
diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go
new file mode 100644
index 0000000000..b90270931b
--- /dev/null
+++ b/tests/integration/api_repo_group_test.go
@@ -0,0 +1,311 @@
+// Copyright 2026 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package integration
+
+import (
+ "math/rand/v2"
+ "net/http"
+ "strconv"
+ "testing"
+
+ auth_model "code.gitea.io/gitea/models/auth"
+ group_model "code.gitea.io/gitea/models/group"
+ perm_model "code.gitea.io/gitea/models/perm"
+ unit_model "code.gitea.io/gitea/models/unit"
+ "code.gitea.io/gitea/models/unittest"
+ user_model "code.gitea.io/gitea/models/user"
+ api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/tests"
+
+ "github.com/stretchr/testify/assert"
+)
+
+const groupOrgAdminTeam = "group-admins"
+const groupOrgWriterTeam = "group-writers"
+const groupOrgReaderTeam = "group-readers"
+const groupOrgUnitTeam = "unit-specialists"
+
+type commonGroupRepoTestData struct {
+ fullFeatured *api.Repository
+ codeOnly *api.Repository
+ repoLevelTeamOverride *api.Repository
+}
+type commonGroupTestData struct {
+ org *api.Organization
+ rootPublic *api.Group
+ childPublic *api.Group
+ rootPrivate *api.Group
+ childPrivate *api.Group
+ privateGrandchildPublic *api.Group
+ repos commonGroupRepoTestData
+}
+
+func createOrgWithGroups(t *testing.T) *commonGroupTestData {
+ const actor = "user2"
+ token := getUserToken(t, actor, auth_model.AccessTokenScopeWriteOrganization)
+ const orgName = "org-with-groups"
+ suffix := strconv.FormatInt(rand.Int64N(9999), 10)
+ org := api.CreateOrgOption{
+ UserName: orgName + "-" + suffix,
+ FullName: "Org with groups #" + suffix,
+ Description: "This organization has subgroups",
+ Website: "https://try.gitea.io",
+ Location: "Brian Tatler's walls",
+ Visibility: "public",
+ }
+ req := NewRequestWithJSON(t, "POST", "/api/v1/orgs", &org).AddTokenAuth(token)
+ resp := MakeRequest(t, req, http.StatusCreated)
+ apiOrg := DecodeJSON(t, resp, &api.Organization{})
+
+ teamPrivs := map[string]perm_model.AccessMode{
+ groupOrgAdminTeam: perm_model.AccessModeAdmin,
+ groupOrgWriterTeam: perm_model.AccessModeWrite,
+ groupOrgReaderTeam: perm_model.AccessModeRead,
+ groupOrgUnitTeam: perm_model.AccessModeRead,
+ }
+ userIDs := []int64{4, 5, 8, 13}
+
+ userIDIdx := 0
+ baseOrgURL := "/api/v1/orgs/" + apiOrg.Name
+
+ for k, v := range teamPrivs {
+ reqBody := &api.CreateTeamOption{
+ Name: k,
+ CanCreateOrgRepo: v >= perm_model.AccessModeWrite,
+ UnitsMap: map[string]string{},
+ IncludesAllRepositories: v >= perm_model.AccessModeWrite,
+ }
+ for _, nunit := range unit_model.AllUnitKeyNames() {
+ reqBody.UnitsMap[nunit] = v.ToString()
+ }
+ treq := NewRequestWithJSON(t, "POST", baseOrgURL+"/teams", reqBody).AddTokenAuth(token)
+ tres := MakeRequest(t, treq, http.StatusCreated)
+ team := DecodeJSON(t, tres, &api.Team{})
+
+ teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIDs[userIDIdx]})
+
+ mreq := NewRequestf(t, "PUT", "/api/v1/teams/%d/members/%s", team.ID, teamUser.Name).AddTokenAuth(token)
+ MakeRequest(t, mreq, http.StatusNoContent)
+ userIDIdx++
+ }
+ rootPublic := createGroup(t, actor, apiOrg.Name, 0, &api.NewGroupOption{
+ Visibility: api.VisibleTypePublic,
+ Name: "root public",
+ }, http.StatusCreated)
+ childPublic := createGroup(t, actor, apiOrg.Name, rootPublic.ID, &api.NewGroupOption{
+ Name: "child public",
+ Visibility: api.VisibleTypePublic,
+ }, http.StatusCreated)
+ rootPrivate := createGroup(t, actor, apiOrg.Name, 0, &api.NewGroupOption{
+ Name: "root private",
+ Visibility: api.VisibleTypePrivate,
+ }, http.StatusCreated)
+ childPrivate := createGroup(t, actor, apiOrg.Name, rootPrivate.ID, &api.NewGroupOption{
+ Name: "child private",
+ Visibility: api.VisibleTypePublic,
+ }, http.StatusCreated)
+
+ privateGrandchildPublic := createGroup(t, actor, apiOrg.Name, childPrivate.ID, &api.NewGroupOption{
+ Name: "public grandchild with private ancestors",
+ Visibility: api.VisibleTypePublic,
+ }, http.StatusCreated)
+
+ val := &commonGroupTestData{
+ org: apiOrg,
+ rootPublic: rootPublic,
+ childPublic: childPublic,
+ rootPrivate: rootPrivate,
+ childPrivate: childPrivate,
+ privateGrandchildPublic: privateGrandchildPublic,
+ repos: commonGroupRepoTestData{
+ fullFeatured: createRepoInGroup(t, apiOrg.Name, actor, childPrivate.ID, "full-featured-repo", http.StatusCreated),
+ codeOnly: createRepoInGroup(t, apiOrg.Name, actor, privateGrandchildPublic.ID, "code-only-repo", http.StatusCreated),
+ repoLevelTeamOverride: createRepoInGroup(t, apiOrg.Name, actor, childPrivate.ID, "unit-repo", http.StatusCreated),
+ },
+ }
+
+ return val
+}
+
+func getGroupSubgroups(t *testing.T, orgName, actor string, parentGroupID int64) []api.Group {
+ token := getUserToken(t, actor, auth_model.AccessTokenScopeWriteOrganization)
+ var endpoint string
+ if parentGroupID <= 0 {
+ endpoint = "/api/v1/orgs/" + orgName + "/groups"
+ } else {
+ endpoint = "/api/v1/groups/" + strconv.FormatInt(parentGroupID, 10) + "/subgroups"
+ }
+ req := NewRequest(t, "GET", endpoint).AddTokenAuth(token)
+ resp := MakeRequest(t, req, http.StatusOK)
+ return DecodeJSON(t, resp, []api.Group{})
+}
+
+func createRepoInGroup(t *testing.T, orgName, actor string, parentGroupID int64, name string, expectedStatus int) *api.Repository {
+ token := getUserToken(t, actor, auth_model.AccessTokenScopeWriteOrganization)
+ req := NewRequestWithJSON(t, "POST", "/api/v1/orgs/"+orgName+"/repos", &api.CreateRepoOption{
+ GroupID: parentGroupID,
+ Name: name,
+ }).AddTokenAuth(token)
+ resp := MakeRequest(t, req, expectedStatus)
+ return DecodeJSON(t, resp, &api.Repository{})
+}
+
+func createGroup(t *testing.T, actor, orgName string, parentGroupID int64, options *api.NewGroupOption, expectedStatus int) *api.Group {
+ token := getUserToken(t, actor, auth_model.AccessTokenScopeWriteOrganization)
+ var endpoint string
+ if parentGroupID <= 0 {
+ endpoint = "/api/v1/orgs/" + orgName + "/groups/new"
+ } else {
+ endpoint = "/api/v1/groups/" + strconv.FormatInt(parentGroupID, 10) + "/new"
+ }
+
+ req := NewRequestWithJSON(t, "POST", endpoint, options).AddTokenAuth(token)
+ resp := MakeRequest(t, req, expectedStatus)
+ return DecodeJSON(t, resp, &api.Group{})
+}
+
+func moveGroup(t *testing.T, actor string, groupID, newGroupID int64, pos *int, expectedStatus int) *api.Group {
+ token := getUserToken(t, actor, auth_model.AccessTokenScopeWriteOrganization)
+ req := NewRequestWithJSON(t, "POST", "/api/v1/groups/"+strconv.FormatInt(groupID, 10)+"/move", &api.MoveGroupOption{
+ NewPos: pos,
+ NewParent: newGroupID,
+ }).AddTokenAuth(token)
+ resp := MakeRequest(t, req, expectedStatus)
+ return DecodeJSON(t, resp, &api.Group{})
+}
+
+func editGroupTeam(t *testing.T, actor string, groupID int64, team string, options *api.CreateOrUpdateRepoGroupTeamOption) {
+ token := getUserToken(t, actor, auth_model.AccessTokenScopeWriteOrganization)
+ req := NewRequestWithJSON(t, "PATCH", "/api/v1/groups/"+strconv.FormatInt(groupID, 10)+"/teams/"+team, options).AddTokenAuth(token)
+ MakeRequest(t, req, http.StatusNoContent)
+}
+
+func assertGroupOrderSanity(t *testing.T, actor, orgName string, groupID int64, extraAssertion ...func(g *api.Group, idx int)) {
+ subgroups := getGroupSubgroups(t, orgName, actor, groupID)
+ for i, subgroup := range subgroups {
+ assert.Equal(t, i, subgroup.SortOrder)
+ if len(extraAssertion) > 0 {
+ extraAssertion[0](&subgroup, i)
+ }
+ }
+}
+
+func TestAPIGroup(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+ t.Run("Creation", testCreateGroup)
+ t.Run("Moving", testMoveGroup)
+ t.Run("Visibility", testGroupVisibility)
+}
+
+func testCreateGroup(t *testing.T) {
+ data := createOrgWithGroups(t)
+ const actor = "user2"
+ t.Run("RootLevelGroup", func(t *testing.T) {
+ ng := createGroup(t, actor, data.org.Name, 0, &api.NewGroupOption{
+ Name: "root level group x",
+ }, http.StatusCreated)
+ assert.Equal(t, int64(0), ng.ParentGroupID)
+ assertGroupOrderSanity(t, actor, data.org.Name, 0)
+ })
+ t.Run("DepthOver20Fails", func(t *testing.T) {
+ var gid int64
+ for i := range int64(20) {
+ ng := createGroup(t, actor, data.org.Name, gid, &api.NewGroupOption{
+ Name: "nested-group-" + strconv.FormatInt(i+1, 10),
+ Description: "Group nested " + strconv.FormatInt(i+1, 10) + " levels deep",
+ }, http.StatusCreated)
+ gid = ng.ID
+ }
+ createGroup(t, actor, data.org.Name, gid, &api.NewGroupOption{
+ Name: "too deep",
+ Description: "this should fail",
+ }, http.StatusUnprocessableEntity)
+ })
+ t.Run("DenyCreateSubgroup", func(t *testing.T) {
+ createGroup(t, "user13", data.org.Name, data.rootPublic.ID, &api.NewGroupOption{
+ Name: "-",
+ Description: "should fail",
+ }, http.StatusForbidden)
+ })
+}
+
+func testMoveGroup(t *testing.T) {
+ data := createOrgWithGroups(t)
+ const actor = "user2"
+ t.Run("MoveGroupToOtherGroup", func(t *testing.T) {
+ groupToMove := createGroup(t, actor, data.org.Name, 0, &api.NewGroupOption{
+ Name: "movable group 1",
+ }, http.StatusCreated)
+ ng := moveGroup(t, actor, groupToMove.ID, data.rootPublic.ID, nil, http.StatusOK)
+ assert.Equal(t, data.rootPublic.ID, ng.ParentGroupID)
+ assert.Equal(t, 1, ng.SortOrder)
+ })
+ t.Run("MoveGroupToRoot", func(t *testing.T) {
+ groupToMove := createGroup(t, actor, data.org.Name, data.rootPublic.ID, &api.NewGroupOption{
+ Name: "movable group 2",
+ }, http.StatusCreated)
+ ng := moveGroup(t, actor, groupToMove.ID, 0, new(0), http.StatusOK)
+ assert.Equal(t, int64(0), ng.ParentGroupID)
+ assertGroupOrderSanity(t, actor, data.org.Name, 0, func(g *api.Group, idx int) {
+ if idx == 0 {
+ assert.Equal(t, ng.ID, g.ID)
+ }
+ })
+ })
+}
+
+func testGroupVisibility(t *testing.T) {
+ data := createOrgWithGroups(t)
+ t.Run("OwnersAndSiteAdminsCanSeeAllTopLevelGroups", func(t *testing.T) {
+ req := NewRequestf(t, "GET", "/api/v1/orgs/%s/groups", data.org.Name).AddBasicAuth("user2")
+ resp := MakeRequest(t, req, http.StatusOK)
+ groups := DecodeJSON(t, resp, []api.Group{})
+ expectedLen := unittest.GetCount(t, new(group_model.Group),
+ group_model.FindGroupsOptions{
+ ParentGroupID: 0,
+ OwnerID: data.org.ID,
+ }.ToConds())
+ assert.Len(t, groups, expectedLen)
+
+ // now test if site-wide admin can see all groups
+ req = NewRequestf(t, "GET", "/api/v1/orgs/%s/groups", data.org.Name).AddBasicAuth("user1")
+ resp = MakeRequest(t, req, http.StatusOK)
+ groups = DecodeJSON(t, resp, []api.Group{})
+ assert.Len(t, groups, expectedLen)
+ })
+ t.Run("NonOrgMemberWontSeeHiddenTopLevelGroups", func(t *testing.T) {
+ req := NewRequestf(t, "GET", "/api/v1/orgs/%s/groups", data.org.Name).AddBasicAuth("user12")
+ resp := MakeRequest(t, req, http.StatusOK)
+ groups := DecodeJSON(t, resp, []api.Group{})
+ expectedLen := unittest.GetCount(t, new(group_model.Group),
+ group_model.FindGroupsOptions{
+ ParentGroupID: 0,
+ OwnerID: data.org.ID,
+ }.ToConds())
+ assert.NotEqual(t, expectedLen, len(groups))
+ })
+ t.Run("GroupsAndReposNotAccessibleWhenParentIsPrivate", func(t *testing.T) {
+ req := NewRequestf(t, "GET", "/api/v1/groups/%d", data.privateGrandchildPublic.ID)
+ MakeRequest(t, req, http.StatusNotFound)
+ req = NewRequestf(t, "GET", "/api/v1/repos/%s", data.repos.fullFeatured.FullName)
+ MakeRequest(t, req, http.StatusNotFound)
+ })
+ t.Run("ReposAndGroupsAccessibleToAdminsWhenParentIsPrivate", func(t *testing.T) {
+ users := []string{"user1", "user2"}
+ for _, u := range users {
+ token := getUserToken(t, u, auth_model.AccessTokenScopeWriteOrganization, auth_model.AccessTokenScopeReadRepository)
+ req := NewRequestf(t, "GET", "/api/v1/groups/%d", data.privateGrandchildPublic.ID).AddTokenAuth(token)
+ MakeRequest(t, req, http.StatusOK)
+ req = NewRequestf(t, "GET", "/api/v1/repos/%s", data.repos.fullFeatured.FullName).AddTokenAuth(token)
+ MakeRequest(t, req, http.StatusOK)
+ }
+ })
+ t.Run("PublicGroupIsAccessible", func(t *testing.T) {
+ req := NewRequestf(t, "GET", "/api/v1/groups/%d", data.rootPublic.ID)
+ MakeRequest(t, req, http.StatusOK)
+ })
+}
+
+/*func testGroupNotAccessibleWhenParentIsPrivate(t *testing.T) {
+}*/
diff --git a/tests/integration/api_repo_lfs_test.go b/tests/integration/api_repo_lfs_test.go
index 47bf244ee6..c0af1e77ca 100644
--- a/tests/integration/api_repo_lfs_test.go
+++ b/tests/integration/api_repo_lfs_test.go
@@ -64,7 +64,7 @@ func createLFSTestRepository(t *testing.T, repoName string) *repo_model.Reposito
ctx := NewAPITestContext(t, "user2", repoName, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser)
t.Run("CreateRepo", doAPICreateRepository(ctx, false))
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", repoName)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", repoName, 0)
require.NoError(t, err)
return repo
diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go
index 5e50fcf043..b0068192ac 100644
--- a/tests/integration/compare_test.go
+++ b/tests/integration/compare_test.go
@@ -133,7 +133,7 @@ func TestCompareBranchesNoCommonMergeBase(t *testing.T) {
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user2"})
repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerID: user2.ID, Name: "repo1"})
- repoPath := repo_model.RepoPath(user2.Name, repo1.Name)
+ repoPath := repo_model.RepoPath(user2.Name, repo1.Name, repo1.GroupID)
_, _, runErr := gitcmd.NewCommand("fast-import").WithDir(repoPath).WithStdinBytes([]byte(strings.TrimSpace(`
commit refs/heads/unrelated-history
committer User 1714310400 +0000
diff --git a/tests/integration/git_general_test.go b/tests/integration/git_general_test.go
index b82dd60021..25aa1ce38b 100644
--- a/tests/integration/git_general_test.go
+++ b/tests/integration/git_general_test.go
@@ -673,7 +673,7 @@ func doPushCreate(ctx APITestContext, u *url.URL) func(t *testing.T) {
t.Run("SuccessfullyPushAndCreateTestRepository", doGitPushTestRepository(tmpDir, "origin", "master"))
// Finally, fetch repo from database and ensure the correct repository has been created
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), ctx.Username, ctx.Reponame)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), ctx.Username, ctx.Reponame, 0)
assert.NoError(t, err)
assert.False(t, repo.IsEmpty)
assert.True(t, repo.IsPrivate)
@@ -826,7 +826,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
pr1, pr2 *issues_model.PullRequest
commit string
)
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), ctx.Username, ctx.Reponame)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), ctx.Username, ctx.Reponame, 0)
require.NoError(t, err)
pullNum := unittest.GetCount(t, &issues_model.PullRequest{})
diff --git a/tests/integration/lfs_getobject_test.go b/tests/integration/lfs_getobject_test.go
index 72bad4cc91..ae20116bf7 100644
--- a/tests/integration/lfs_getobject_test.go
+++ b/tests/integration/lfs_getobject_test.go
@@ -42,7 +42,7 @@ func storeObjectInRepo(t *testing.T, repositoryID int64, content string) string
}
func storeAndGetLfsToken(t *testing.T, content string, extraHeader *http.Header, expectedStatus int, ts ...auth.AccessTokenScope) *httptest.ResponseRecorder {
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1")
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1", 0)
assert.NoError(t, err)
oid := storeObjectInRepo(t, repo.ID, content)
defer git_model.RemoveLFSMetaObjectByOid(t.Context(), repo.ID, oid)
@@ -67,7 +67,7 @@ func storeAndGetLfsToken(t *testing.T, content string, extraHeader *http.Header,
}
func storeAndGetLfs(t *testing.T, content string, extraHeader *http.Header, expectedStatus int) *httptest.ResponseRecorder {
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1")
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1", 0)
assert.NoError(t, err)
oid := storeObjectInRepo(t, repo.ID, content)
defer git_model.RemoveLFSMetaObjectByOid(t.Context(), repo.ID, oid)
diff --git a/tests/integration/mirror_pull_test.go b/tests/integration/mirror_pull_test.go
index 7902dc10cb..108eee9830 100644
--- a/tests/integration/mirror_pull_test.go
+++ b/tests/integration/mirror_pull_test.go
@@ -29,7 +29,7 @@ func TestMirrorPull(t *testing.T) {
ctx := t.Context()
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
- repoPath := repo_model.RepoPath(user.Name, repo.Name)
+ repoPath := repo_model.RepoPath(user.Name, repo.Name, repo.GroupID)
opts := migration.MigrateOptions{
RepoName: "test_mirror",
diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go
index 83cf1d7605..1d0fcc6c8b 100644
--- a/tests/integration/pull_merge_test.go
+++ b/tests/integration/pull_merge_test.go
@@ -70,7 +70,7 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo, pullNum strin
pullNumInt, err := strconv.ParseInt(pullNum, 10, 64)
assert.NoError(t, err)
- repository, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), user, repo)
+ repository, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), user, repo, 0)
assert.NoError(t, err)
pull, err := issues_model.GetPullRequestByIndex(t.Context(), repository.ID, pullNumInt)
assert.NoError(t, err)
@@ -384,7 +384,7 @@ func TestCantMergeUnrelated(t *testing.T) {
OwnerID: user1.ID,
Name: "repo1",
})
- path := repo_model.RepoPath(user1.Name, repo1.Name)
+ path := repo_model.RepoPath(user1.Name, repo1.Name, repo1.GroupID)
err := gitcmd.NewCommand("read-tree", "--empty").WithDir(path).Run(t.Context())
assert.NoError(t, err)
diff --git a/tests/integration/repo_search_test.go b/tests/integration/repo_search_test.go
index eafb600990..2c80aea337 100644
--- a/tests/integration/repo_search_test.go
+++ b/tests/integration/repo_search_test.go
@@ -28,7 +28,7 @@ func resultFilenames(doc *HTMLDoc) []string {
func TestSearchRepo(t *testing.T) {
defer tests.PrepareTestEnv(t)()
- repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1")
+ repo, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "repo1", 0)
assert.NoError(t, err)
code_indexer.UpdateRepoIndexer(repo)
@@ -38,7 +38,7 @@ func TestSearchRepo(t *testing.T) {
setting.Indexer.IncludePatterns = setting.IndexerGlobFromString("**.txt")
setting.Indexer.ExcludePatterns = setting.IndexerGlobFromString("**/y/**")
- repo, err = repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "glob")
+ repo, err = repo_model.GetRepositoryByOwnerAndName(t.Context(), "user2", "glob", 0)
assert.NoError(t, err)
code_indexer.UpdateRepoIndexer(repo)
diff --git a/tests/integration/repo_test.go b/tests/integration/repo_test.go
index b036ffff35..cc560cb8cc 100644
--- a/tests/integration/repo_test.go
+++ b/tests/integration/repo_test.go
@@ -542,7 +542,7 @@ func TestGenerateRepository(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, generatedRepo)
- exist, err := util.IsExist(repo_model.RepoPath(user2.Name, generatedRepo.Name))
+ exist, err := util.IsExist(repo_model.RepoPath(user2.Name, generatedRepo.Name, generatedRepo.GroupID))
require.NoError(t, err)
require.True(t, exist)
@@ -565,7 +565,7 @@ func TestGenerateRepository(t *testing.T) {
// a failed creating because some mock data
// create the repository directory so that the creation will fail after database record created.
- assert.NoError(t, os.MkdirAll(repo_model.RepoPath(user2.Name, "generated-from-template-44"), os.ModePerm))
+ assert.NoError(t, os.MkdirAll(repo_model.RepoPath(user2.Name, "generated-from-template-44", 0), os.ModePerm))
generatedRepo2, err := repo_service.GenerateRepository(t.Context(), user2, user2, repo44, repo_service.GenerateRepoOptions{
Name: "generated-from-template-44",
@@ -577,7 +577,7 @@ func TestGenerateRepository(t *testing.T) {
// assert the cleanup is successful
unittest.AssertNotExistsBean(t, &repo_model.Repository{OwnerName: user2.Name, Name: generatedRepo.Name})
- exist, err = util.IsExist(repo_model.RepoPath(user2.Name, generatedRepo.Name))
+ exist, err = util.IsExist(repo_model.RepoPath(user2.Name, generatedRepo.Name, generatedRepo.GroupID))
assert.NoError(t, err)
assert.False(t, exist)
}