From 6ea74b1a08a76dd8214e0a363841bf446daae4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 24 Dec 2024 22:11:03 -0500 Subject: [PATCH 002/218] add group model --- models/group/group.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 models/group/group.go diff --git a/models/group/group.go b/models/group/group.go new file mode 100644 index 0000000000..54d17346dc --- /dev/null +++ b/models/group/group.go @@ -0,0 +1,26 @@ +package group + +import ( + "code.gitea.io/gitea/models/db" + user_model "code.gitea.io/gitea/models/user" +) + +// Group represents a group of repositories for a user or organization +type Group struct { + ID int64 `xorm:"pk autoincr"` + OwnerID int64 `xorm:"UNIQUE(s) index"` + OwnerName string + Owner *user_model.User `xorm:"-"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + Name string `xorm:"INDEX NOT NULL"` + Description string `xorm:"TEXT"` + + ParentGroupID int64 `xorm:"DEFAULT NULL"` + SubGroups []*Group `xorm:"-"` +} + +func (Group) TableName() string { return "repo_group" } + +func init() { + db.RegisterModel(new(Group)) +} From 300170c6f011db3ee5803a96ace9fba7f265feeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 25 Dec 2024 15:40:50 -0500 Subject: [PATCH 003/218] create GroupList type and methods --- models/group/group_list.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 models/group/group_list.go diff --git a/models/group/group_list.go b/models/group/group_list.go new file mode 100644 index 0000000000..c7710d950b --- /dev/null +++ b/models/group/group_list.go @@ -0,0 +1,17 @@ +package group + +import ( + "context" +) + +type GroupList []*Group + +func (groups GroupList) LoadOwners(ctx context.Context) error { + for _, g := range groups { + err := g.LoadOwner(ctx) + if err != nil { + return err + } + } + return nil +} From 8d4717c5dfa28abc536ed123c058d38bd0953c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 25 Dec 2024 15:57:09 -0500 Subject: [PATCH 004/218] add `Group` methods and helper functions --- models/group/group.go | 139 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 5 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index 54d17346dc..0f0209b4d9 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -3,20 +3,25 @@ package group import ( "code.gitea.io/gitea/models/db" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/util" + "context" + "errors" + "fmt" + "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:"UNIQUE(s) index"` - OwnerName string + ID int64 `xorm:"pk autoincr"` + OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` Owner *user_model.User `xorm:"-"` LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` Name string `xorm:"INDEX NOT NULL"` + DisplayName string `xorm:"TEXT"` Description string `xorm:"TEXT"` - ParentGroupID int64 `xorm:"DEFAULT NULL"` - SubGroups []*Group `xorm:"-"` + ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"` + Subgroups GroupList `xorm:"-"` } func (Group) TableName() string { return "repo_group" } @@ -24,3 +29,127 @@ func (Group) TableName() string { return "repo_group" } func init() { db.RegisterModel(new(Group)) } + +func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, currentLevel int) error { + if currentLevel >= 20 { + return ErrGroupTooDeep{ + g.ID, + } + } + if g.Subgroups != nil { + return nil + } + var err error + g.Subgroups, err = FindGroups(ctx, &FindGroupsOptions{ + ParentGroupID: g.ID, + }) + if err != nil { + return err + } + if recursive { + for _, group := range g.Subgroups { + err = group.doLoadSubgroups(ctx, recursive, currentLevel+1) + if err != nil { + return err + } + } + } + return nil +} + +func (g *Group) LoadSubgroups(ctx context.Context, recursive bool) error { + err := g.doLoadSubgroups(ctx, recursive, 0) + return err +} + +func (g *Group) LoadAttributes(ctx context.Context) error { + err := g.LoadOwner(ctx) + if err != nil { + return err + } + 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) GetGroupByID(ctx context.Context, id int64) (*Group, error) { + group := new(Group) + + has, err := db.GetEngine(ctx).ID(id).Get(g) + if err != nil { + return nil, err + } else if !has { + return nil, ErrGroupNotExist{id} + } + return group, nil +} + +type FindGroupsOptions struct { + db.ListOptions + OwnerID int64 + ParentGroupID int64 +} + +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 { + cond = cond.And(builder.IsNull{"parent_group_id"}) + } + return cond +} + +func FindGroups(ctx context.Context, opts *FindGroupsOptions) (GroupList, 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.id"). + Find(&groups) +} + +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) +} From ade1c082eb6ea95055b9ebb2daa4fbf72397a6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:22:02 -0500 Subject: [PATCH 005/218] add avatar to group --- models/group/avatar.go | 80 ++++++++++++++++++++++++++++++++++++++++++ models/group/group.go | 1 + 2 files changed, 81 insertions(+) create mode 100644 models/group/avatar.go diff --git a/models/group/avatar.go b/models/group/avatar.go new file mode 100644 index 0000000000..3b6bf66bf7 --- /dev/null +++ b/models/group/avatar.go @@ -0,0 +1,80 @@ +package group + +import ( + "code.gitea.io/gitea/models/avatars" + "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/modules/avatar" + "code.gitea.io/gitea/modules/httplib" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "context" + "fmt" + "image/png" + "io" + "net/url" +) + +func (g *Group) CustomAvatarRelativePath() string { + return g.Avatar +} +func generateRandomAvatar(ctx context.Context, group *Group) error { + idToString := fmt.Sprintf("%d", group.ID) + + seed := idToString + img, err := avatar.RandomImage([]byte(seed)) + if err != nil { + return fmt.Errorf("RandomImage: %w", err) + } + + group.Avatar = idToString + + if err = storage.SaveFrom(storage.RepoAvatars, group.CustomAvatarRelativePath(), func(w io.Writer) error { + if err = png.Encode(w, img); err != nil { + log.Error("Encode: %v", err) + } + return err + }); err != nil { + return fmt.Errorf("Failed to create dir %s: %w", group.CustomAvatarRelativePath(), err) + } + + log.Info("New random avatar created for repository: %d", group.ID) + + if _, err = db.GetEngine(ctx).ID(group.ID).Cols("avatar").NoAutoTime().Update(group); err != nil { + return err + } + + return nil +} +func (g *Group) relAvatarLink(ctx context.Context) string { + // If no avatar - path is empty + avatarPath := g.CustomAvatarRelativePath() + if len(avatarPath) == 0 { + switch mode := setting.RepoAvatar.Fallback; mode { + case "image": + return setting.RepoAvatar.FallbackImage + case "random": + if err := generateRandomAvatar(ctx, g); err != nil { + log.Error("generateRandomAvatar: %v", err) + } + default: + // default behaviour: do not display avatar + return "" + } + } + return setting.AppSubURL + "/group-avatars/" + url.PathEscape(g.Avatar) +} + +func (g *Group) AvatarLink(ctx context.Context) string { + relLink := g.relAvatarLink(ctx) + 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/group.go b/models/group/group.go index 0f0209b4d9..aee073999a 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -19,6 +19,7 @@ type Group struct { Name string `xorm:"INDEX NOT NULL"` DisplayName string `xorm:"TEXT"` Description string `xorm:"TEXT"` + Avatar string `xorm:"VARCHAR(64)"` ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"` Subgroups GroupList `xorm:"-"` From 9fb94a8be1464dd2527bf1e447c35adc3cba6b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:26:19 -0500 Subject: [PATCH 006/218] add `ParentGroup` field and related `LoadParentGroup` method to `Group` struct --- models/group/group.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index aee073999a..e3482700c9 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -22,6 +22,7 @@ type Group struct { Avatar string `xorm:"VARCHAR(64)"` ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"` + ParentGroup *Group `xorm:"-"` Subgroups GroupList `xorm:"-"` } @@ -68,6 +69,18 @@ func (g *Group) LoadAttributes(ctx context.Context) error { if err != nil { return err } + return g.LoadParentGroup(ctx) +} + +func (g *Group) LoadParentGroup(ctx context.Context) error { + if g.ParentGroup != nil { + return nil + } + parentGroup, err := GetGroupByID(ctx, g.ParentGroupID) + if err != nil { + return err + } + g.ParentGroup = parentGroup return nil } From 707f58b31d49002596c5b2b9566a67dc47ab0936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:30:59 -0500 Subject: [PATCH 007/218] add `GroupTeam` and `GroupUnit` structs and helpers --- models/group/group_team.go | 42 ++++++++++++++++++++++++++++++++++++++ models/group/group_unit.go | 25 +++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 models/group/group_team.go create mode 100644 models/group/group_unit.go diff --git a/models/group/group_team.go b/models/group/group_team.go new file mode 100644 index 0000000000..7080832146 --- /dev/null +++ b/models/group/group_team.go @@ -0,0 +1,42 @@ +package group + +import ( + "code.gitea.io/gitea/models/db" + "context" +) + +// GroupTeam represents a relation for a team's access to a group +type GroupTeam struct { + ID int64 `xorm:"pk autoincr"` + OrgID int64 `xorm:"INDEX"` + TeamID int64 `xorm:"UNIQUE(s)"` + GroupID int64 `xorm:"UNIQUE(s)"` +} + +// HasTeamGroup returns true if the given group belongs to 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). + Get(new(GroupTeam)) + return has +} + +func AddTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error { + _, err := db.GetEngine(ctx).Insert(&GroupTeam{ + OrgID: orgID, + GroupID: groupID, + TeamID: teamID, + }) + return err +} + +func RemoveTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error { + _, err := db.DeleteByBean(ctx, &GroupTeam{ + TeamID: teamID, + GroupID: groupID, + OrgID: orgID, + }) + return err +} diff --git a/models/group/group_unit.go b/models/group/group_unit.go new file mode 100644 index 0000000000..89b3c131cf --- /dev/null +++ b/models/group/group_unit.go @@ -0,0 +1,25 @@ +package group + +import ( + "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/perm" + "code.gitea.io/gitea/models/unit" + "context" +) + +// GroupUnit describes all units of a repository group +type GroupUnit struct { + ID int64 `xorm:"pk autoincr"` + GroupID int64 `xorm:"INDEX"` + TeamID int64 `xorm:"UNIQUE(s)"` + Type unit.Type `xorm:"UNIQUE(s)"` + AccessMode perm.AccessMode +} + +func (g *GroupUnit) Unit() unit.Unit { + return unit.Units[g.Type] +} + +func getUnitsByGroupID(ctx context.Context, groupID int64) (units []*GroupUnit, err error) { + return units, db.GetEngine(ctx).Where("group_id = ?", groupID).Find(&units) +} From 8cf783b0b89523a6c3a2b37641b3f383f1dbfc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:36:42 -0500 Subject: [PATCH 008/218] add condition and builder functions to be used when searching for groups --- models/group/group_list.go | 76 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index c7710d950b..5715accb5c 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -1,17 +1,87 @@ package group import ( + "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" "context" + "xorm.io/builder" ) type GroupList []*Group func (groups GroupList) LoadOwners(ctx context.Context) error { for _, g := range groups { - err := g.LoadOwner(ctx) - if err != nil { - return err + if g.Owner == nil { + err := g.LoadOwner(ctx) + if err != nil { + return err + } } } return nil } + +// userOrgTeamGroupBuilder returns group ids where user's teams can access. +func userOrgTeamGroupBuilder(userID int64) *builder.Builder { + return builder.Select("`group_team`.group_id"). + From("group_team"). + Join("INNER", "team_user", "`team_user`.team_id = `group_team`.team_id"). + Where(builder.Eq{"`team_user`.uid": userID}) +} + +// UserOrgTeamGroupCond returns a condition to select ids of groups that a user's team can access +func UserOrgTeamGroupCond(idStr string, userID int64) builder.Cond { + return builder.In(idStr, userOrgTeamGroupBuilder(userID)) +} + +// userOrgTeamUnitGroupCond returns a condition to select group ids where user's teams can access the special unit. +func userOrgTeamUnitGroupCond(idStr string, userID int64, unitType unit.Type) builder.Cond { + return builder.Or(builder.In( + idStr, userOrgTeamUnitGroupBuilder(userID, unitType))) +} + +// userOrgTeamUnitGroupBuilder returns group ids where user's teams can access the special unit. +func userOrgTeamUnitGroupBuilder(userID int64, unitType unit.Type) *builder.Builder { + return userOrgTeamGroupBuilder(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)}) +} + +// AccessibleGroupCondition returns a condition that matches groups which a user can access via the specified unit +func AccessibleGroupCondition(user *user_model.User, unitType unit.Type) builder.Cond { + cond := builder.NewCond() + if user == nil || !user.IsRestricted || user.ID <= 0 { + orgVisibilityLimit := []structs.VisibleType{structs.VisibleTypePrivate} + if user == nil || user.ID <= 0 { + orgVisibilityLimit = append(orgVisibilityLimit, structs.VisibleTypeLimited) + } + // 1. Be able to see all non-private groups that either: + cond = cond.Or(builder.And( + builder.Eq{"`repo_group`.is_private": false}, + // 2. Aren't in an private organisation or limited organisation if we're not logged in + builder.NotIn("`repo_group`.owner_id", builder.Select("id").From("`user`").Where( + builder.And( + builder.Eq{"type": user_model.UserTypeOrganization}, + builder.In("visibility", orgVisibilityLimit)), + )))) + } + if user != nil { + // 2. Be able to see all repositories that we have unit independent access to + // 3. Be able to see all repositories through team membership(s) + if unitType == unit.TypeInvalid { + // Regardless of UnitType + cond = cond.Or( + UserOrgTeamGroupCond("`repo_group`.id", user.ID), + ) + } else { + // For a specific UnitType + cond = cond.Or( + userOrgTeamUnitGroupCond("`repo_group`.id", user.ID, unitType), + ) + } + } + return cond +} From 0ee3576353b9b1f20d8c4c3b5bb29ff084e5fa08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:41:45 -0500 Subject: [PATCH 009/218] add `OwnerName` field to `Group` struct --- models/group/group.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index e3482700c9..dd546656f5 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -12,8 +12,9 @@ import ( // Group represents a group of repositories for a user or organization type Group struct { - ID int64 `xorm:"pk autoincr"` - OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` + ID int64 `xorm:"pk autoincr"` + OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` + OwnerName string Owner *user_model.User `xorm:"-"` LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` Name string `xorm:"INDEX NOT NULL"` From 7e2bc0d14398a7707c35de1ee101f73259b06aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:44:47 -0500 Subject: [PATCH 010/218] rename `DisplayName` -> `FullName` for consistency --- models/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index dd546656f5..2c7873716c 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -18,7 +18,7 @@ type Group struct { Owner *user_model.User `xorm:"-"` LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` Name string `xorm:"INDEX NOT NULL"` - DisplayName string `xorm:"TEXT"` + FullName string `xorm:"TEXT"` // displayed in places like navigation menus Description string `xorm:"TEXT"` Avatar string `xorm:"VARCHAR(64)"` From 7a8c2bf93a37cea71469ecd4e6112fbcf0921d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:47:12 -0500 Subject: [PATCH 011/218] add `IsPrivate` and `Visibility` fields to `Group` struct --- models/group/group.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index 2c7873716c..37db7cbc78 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -3,6 +3,7 @@ package group import ( "code.gitea.io/gitea/models/db" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "context" "errors" @@ -20,6 +21,8 @@ type Group struct { Name string `xorm:"INDEX NOT NULL"` FullName string `xorm:"TEXT"` // displayed in places like navigation menus Description string `xorm:"TEXT"` + IsPrivate bool + Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"` Avatar string `xorm:"VARCHAR(64)"` ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"` From 4480c4d2215ac041dbf21a18a778d688113fad76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:49:55 -0500 Subject: [PATCH 012/218] add `FindGroupsByCond` helper function --- models/group/group.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index 37db7cbc78..0482c5c11b 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -3,6 +3,8 @@ package group import ( "code.gitea.io/gitea/models/db" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "context" @@ -139,6 +141,19 @@ func FindGroups(ctx context.Context, opts *FindGroupsOptions) (GroupList, error) Find(&groups) } +func FindGroupsByCond(ctx context.Context, cond builder.Cond, parentGroupID int64) (GroupList, error) { + if parentGroupID > 0 { + cond = cond.And(builder.Eq{"repo_group.id": parentGroupID}) + } else { + cond = cond.And(builder.IsNull{"repo_group.id"}) + } + sess := db.GetEngine(ctx).Where(cond) + groups := make([]*Group, 0) + return groups, sess. + Asc("repo_group.id"). + Find(&groups) +} + type ErrGroupNotExist struct { ID int64 } From 9aeb53c84ceb49b1b992b324f97db90a1de372e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:53:41 -0500 Subject: [PATCH 013/218] fix nonexistent variable reference in `GetGroupByID` function --- models/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index 0482c5c11b..12629dc0b0 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -102,7 +102,7 @@ func (g *Group) LoadOwner(ctx context.Context) error { func (g *Group) GetGroupByID(ctx context.Context, id int64) (*Group, error) { group := new(Group) - has, err := db.GetEngine(ctx).ID(id).Get(g) + has, err := db.GetEngine(ctx).ID(id).Get(group) if err != nil { return nil, err } else if !has { From 27084f4cc179980ef78fb489c7e3164563fcf29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 21:56:51 -0500 Subject: [PATCH 014/218] add `GroupLink` method to `Group` struct --- models/group/group.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index 12629dc0b0..c4df33231d 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -10,6 +10,8 @@ import ( "context" "errors" "fmt" + "net/url" + "strconv" "xorm.io/builder" ) @@ -32,6 +34,11 @@ type Group struct { Subgroups GroupList `xorm:"-"` } +// 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 (Group) TableName() string { return "repo_group" } func init() { From af769893ce92b2b037a9ac5ab69a983f09fe05ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 22:03:44 -0500 Subject: [PATCH 015/218] add helper functions for dealing with group hierarchies --- models/group/group.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index c4df33231d..668914dfd7 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -161,6 +161,42 @@ func FindGroupsByCond(ctx context.Context, cond builder.Cond, parentGroupID int6 Find(&groups) } +// GetParentGroupChain returns a slice containing a group and its ancestors +func GetParentGroupChain(ctx context.Context, groupID int64) (GroupList, 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 + } + return groupList, nil +} + +// ParentGroupCond returns a condition matching a group and its ancestors +func ParentGroupCond(idStr string, groupID int64) builder.Cond { + groupList, err := GetParentGroupChain(db.DefaultContext, groupID) + if err != nil { + log.Info("Error building group cond: %w", err) + return builder.NotIn(idStr) + } + return builder.In( + idStr, + util.SliceMap[*Group, int64](groupList, func(it *Group) int64 { + return it.ID + }), + ) +} + type ErrGroupNotExist struct { ID int64 } From e8fe57571a9421bfb6be8a6b5d12f98e1b7dcfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 22:10:38 -0500 Subject: [PATCH 016/218] refactor subgroup loading, add method to load only groups accessible by a user --- models/group/group.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index 668914dfd7..9c39568bf8 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -2,6 +2,7 @@ package group import ( "code.gitea.io/gitea/models/db" + "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/setting" @@ -45,7 +46,7 @@ func init() { db.RegisterModel(new(Group)) } -func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, currentLevel int) error { +func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, cond builder.Cond, currentLevel int) error { if currentLevel >= 20 { return ErrGroupTooDeep{ g.ID, @@ -55,15 +56,13 @@ func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, currentLeve return nil } var err error - g.Subgroups, err = FindGroups(ctx, &FindGroupsOptions{ - ParentGroupID: g.ID, - }) + g.Subgroups, err = FindGroupsByCond(ctx, cond, g.ID) if err != nil { return err } if recursive { for _, group := range g.Subgroups { - err = group.doLoadSubgroups(ctx, recursive, currentLevel+1) + err = group.doLoadSubgroups(ctx, recursive, cond, currentLevel+1) if err != nil { return err } @@ -73,8 +72,14 @@ func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, currentLeve } func (g *Group) LoadSubgroups(ctx context.Context, recursive bool) error { - err := g.doLoadSubgroups(ctx, recursive, 0) - return err + 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, unit.TypeInvalid), 0) } func (g *Group) LoadAttributes(ctx context.Context) error { From 501bf33cbd6be1ad069249ad34d5d8463cd31861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 22:13:28 -0500 Subject: [PATCH 017/218] register `GroupTeam` and `GroupUnit` models --- models/group/group.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index 9c39568bf8..323f963348 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -44,6 +44,8 @@ func (Group) TableName() string { return "repo_group" } func init() { db.RegisterModel(new(Group)) + db.RegisterModel(new(GroupTeam)) + db.RegisterModel(new(GroupUnit)) } func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, cond builder.Cond, currentLevel int) error { From 306f0833271206042c8b6c6739128b6477c46156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 27 Dec 2024 23:39:02 -0500 Subject: [PATCH 018/218] add condition and builder functions to be used when searching for groups --- models/group/group_list.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index 5715accb5c..d855f0143e 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -58,10 +58,8 @@ func AccessibleGroupCondition(user *user_model.User, unitType unit.Type) builder if user == nil || user.ID <= 0 { orgVisibilityLimit = append(orgVisibilityLimit, structs.VisibleTypeLimited) } - // 1. Be able to see all non-private groups that either: cond = cond.Or(builder.And( builder.Eq{"`repo_group`.is_private": false}, - // 2. Aren't in an private organisation or limited organisation if we're not logged in builder.NotIn("`repo_group`.owner_id", builder.Select("id").From("`user`").Where( builder.And( builder.Eq{"type": user_model.UserTypeOrganization}, @@ -69,15 +67,11 @@ func AccessibleGroupCondition(user *user_model.User, unitType unit.Type) builder )))) } if user != nil { - // 2. Be able to see all repositories that we have unit independent access to - // 3. Be able to see all repositories through team membership(s) if unitType == unit.TypeInvalid { - // Regardless of UnitType cond = cond.Or( UserOrgTeamGroupCond("`repo_group`.id", user.ID), ) } else { - // For a specific UnitType cond = cond.Or( userOrgTeamUnitGroupCond("`repo_group`.id", user.ID, unitType), ) From bc4e4840b26631672022f7f1b8765a7d67383031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 16:12:55 -0500 Subject: [PATCH 019/218] changes * move error-related code for groups to its own file * update group avatar logic remove unused/duplicate logic * update `FindGroupsOptions.ToConds()` allow passing `-1` as the `ParentGroupID`, meaning "find matching groups regardless of the parent group id" * add `DedupeBy` function to container module this removes duplicate items from a slice using a custom function * add `SliceMap` util works like javascripts's `Array.prototoype.map`, taking in a slice and transforming each element with the provided function * add group service functions included so far: - avatar uploading/deletion - group deletion - group creation - group moving (including moving item inside a group) - group update - team management - add team - remove team - update team permissions - recalculating team access (in event of group move) - group searching (only used in frontend/web components for now) --- models/group/avatar.go | 54 +--------- models/group/errors.go | 41 ++++++++ models/group/group.go | 95 +++++++++-------- modules/container/filter.go | 13 +++ modules/util/slice.go | 8 ++ services/group/avatar.go | 67 ++++++++++++ services/group/delete.go | 84 +++++++++++++++ services/group/group.go | 90 ++++++++++++++++ services/group/search.go | 199 ++++++++++++++++++++++++++++++++++++ services/group/team.go | 147 ++++++++++++++++++++++++++ services/group/update.go | 31 ++++++ 11 files changed, 739 insertions(+), 90 deletions(-) create mode 100644 models/group/errors.go create mode 100644 services/group/avatar.go create mode 100644 services/group/delete.go create mode 100644 services/group/group.go create mode 100644 services/group/search.go create mode 100644 services/group/team.go create mode 100644 services/group/update.go diff --git a/models/group/avatar.go b/models/group/avatar.go index 3b6bf66bf7..d07e8341da 100644 --- a/models/group/avatar.go +++ b/models/group/avatar.go @@ -1,66 +1,22 @@ package group import ( - "code.gitea.io/gitea/models/avatars" - "code.gitea.io/gitea/models/db" - "code.gitea.io/gitea/modules/avatar" - "code.gitea.io/gitea/modules/httplib" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" "context" - "fmt" - "image/png" - "io" "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 generateRandomAvatar(ctx context.Context, group *Group) error { - idToString := fmt.Sprintf("%d", group.ID) - - seed := idToString - img, err := avatar.RandomImage([]byte(seed)) - if err != nil { - return fmt.Errorf("RandomImage: %w", err) - } - - group.Avatar = idToString - - if err = storage.SaveFrom(storage.RepoAvatars, group.CustomAvatarRelativePath(), func(w io.Writer) error { - if err = png.Encode(w, img); err != nil { - log.Error("Encode: %v", err) - } - return err - }); err != nil { - return fmt.Errorf("Failed to create dir %s: %w", group.CustomAvatarRelativePath(), err) - } - - log.Info("New random avatar created for repository: %d", group.ID) - - if _, err = db.GetEngine(ctx).ID(group.ID).Cols("avatar").NoAutoTime().Update(group); err != nil { - return err - } - - return nil -} func (g *Group) relAvatarLink(ctx context.Context) string { // If no avatar - path is empty avatarPath := g.CustomAvatarRelativePath() if len(avatarPath) == 0 { - switch mode := setting.RepoAvatar.Fallback; mode { - case "image": - return setting.RepoAvatar.FallbackImage - case "random": - if err := generateRandomAvatar(ctx, g); err != nil { - log.Error("generateRandomAvatar: %v", err) - } - default: - // default behaviour: do not display avatar - return "" - } + return "" } return setting.AppSubURL + "/group-avatars/" + url.PathEscape(g.Avatar) } diff --git a/models/group/errors.go b/models/group/errors.go new file mode 100644 index 0000000000..a578c92933 --- /dev/null +++ b/models/group/errors.go @@ -0,0 +1,41 @@ +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) +} diff --git a/models/group/group.go b/models/group/group.go index 323f963348..c8525af0f5 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -136,10 +136,21 @@ func (opts FindGroupsOptions) ToConds() builder.Cond { if opts.OwnerID != 0 { cond = cond.And(builder.Eq{"owner_id": opts.OwnerID}) } - if opts.ParentGroupID != 0 { + if opts.ParentGroupID > 0 { cond = cond.And(builder.Eq{"parent_group_id": opts.ParentGroupID}) - } else { - cond = cond.And(builder.IsNull{"parent_group_id"}) + } 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("group_team.group_id"). + From("group_team"). + Where(builder.Eq{"team_user.uid": opts.ActorID}). + Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). + And(builder.Eq{"group_team.can_create_in": true}))) + } + if opts.Name != "" { + cond = cond.And(builder.Eq{"lower_name": opts.Name}) } return cond } @@ -186,53 +197,55 @@ func GetParentGroupChain(ctx context.Context, groupID int64) (GroupList, error) groupList = append(groupList, currentGroup) currentGroupID = currentGroup.ParentGroupID } + slices.Reverse(groupList) return groupList, nil } +func GetParentGroupIDChain(ctx context.Context, groupID int64) (ids []int64, err error) { + groupList, err := GetParentGroupChain(ctx, groupID) + if err != nil { + return nil, err + } + ids = util.SliceMap(groupList, func(g *Group) int64 { + return g.ID + }) + return +} + // ParentGroupCond returns a condition matching a group and its ancestors func ParentGroupCond(idStr string, groupID int64) builder.Cond { - groupList, err := GetParentGroupChain(db.DefaultContext, groupID) + groupList, err := GetParentGroupIDChain(db.DefaultContext, groupID) if err != nil { log.Info("Error building group cond: %w", err) return builder.NotIn(idStr) } - return builder.In( - idStr, - util.SliceMap[*Group, int64](groupList, func(it *Group) int64 { - return it.ID - }), - ) + return builder.In(idStr, groupList) } -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) +func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error { + sess := db.GetEngine(ctx) + ng, err := GetGroupByID(ctx, newParent) + if err != nil { + return err + } + if ng.OwnerID != group.OwnerID { + return fmt.Errorf("group[%d]'s ownerID is not equal to new paretn group[%d]'s owner ID", group.ID, ng.ID) + } + group.ParentGroupID = newParent + group.SortOrder = newSortOrder + if _, err = sess.Table(group.TableName()). + Where("id = ?", group.ID). + MustCols("parent_group_id"). + Update(group, &Group{ + ID: group.ID, + }); err != nil { + return err + } + if group.ParentGroup != nil && newParent != 0 { + group.ParentGroup = nil + if err = group.LoadParentGroup(ctx); err != nil { + return err + } + } + return nil } diff --git a/modules/container/filter.go b/modules/container/filter.go index 37ec7c3d56..9f1237e626 100644 --- a/modules/container/filter.go +++ b/modules/container/filter.go @@ -19,3 +19,16 @@ func FilterSlice[E any, T comparable](s []E, include func(E) (T, bool)) []T { } 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/util/slice.go b/modules/util/slice.go index aaa729c1c9..97857e0f47 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 any, 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/services/group/avatar.go b/services/group/avatar.go new file mode 100644 index 0000000000..f38096c6c6 --- /dev/null +++ b/services/group/avatar.go @@ -0,0 +1,67 @@ +package group + +import ( + "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" + "context" + "errors" + "fmt" + "io" + "os" +) + +// 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..0dc19c2560 --- /dev/null +++ b/services/group/delete.go @@ -0,0 +1,84 @@ +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.GroupTeam)); err != nil { + return err + } + if _, err = sess.Where("group_id = ?", gid).Delete(new(group_model.GroupUnit)); 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..fb2414bb00 --- /dev/null +++ b/services/group/group.go @@ -0,0 +1,90 @@ +package group + +import ( + "context" + "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/log" + "code.gitea.io/gitea/modules/util" +) + +func NewGroup(ctx context.Context, g *group_model.Group) (err error) { + if len(g.Name) == 0 { + return util.NewInvalidArgumentErrorf("empty group name") + } + has, err := db.ExistByID[user_model.User](ctx, g.OwnerID) + if err != nil { + return err + } + if !has { + return organization.ErrOrgNotExist{ID: g.OwnerID} + } + g.LowerName = strings.ToLower(g.Name) + ctx, committer, err := db.TxContext(ctx) + if err != nil { + return err + } + defer committer.Close() + + if err = db.Insert(ctx, g); err != nil { + return + } + + if err = RecalculateGroupAccess(ctx, g, true); err != nil { + return + } + + return committer.Commit() +} + +func MoveRepositoryToGroup(ctx context.Context, repo *repo_model.Repository, newGroupID int64, groupSortOrder int) error { + sess := db.GetEngine(ctx) + 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 +} + +func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, newPos int) (err error) { + ctx, committer, err := db.TxContext(ctx) + if err != nil { + return err + } + defer committer.Close() + + if isGroup { + group, err := group_model.GetGroupByID(ctx, itemID) + if err != nil { + return err + } + if group.ParentGroupID != newParent || group.SortOrder != newPos { + if err = group_model.MoveGroup(ctx, group, newParent, newPos); err != nil { + return err + } + if err = RecalculateGroupAccess(ctx, group, false); err != nil { + return err + } + } + } else { + repo, err := repo_model.GetRepositoryByID(ctx, itemID) + if err != nil { + return err + } + if repo.GroupID != newParent || repo.GroupSortOrder != newPos { + if err = MoveRepositoryToGroup(ctx, repo, newParent, newPos); err != nil { + return err + } + } + } + return committer.Commit() +} diff --git a/services/group/search.go b/services/group/search.go new file mode 100644 index 0000000000..afe30576be --- /dev/null +++ b/services/group/search.go @@ -0,0 +1,199 @@ +package group + +import ( + "context" + "slices" + + "code.gitea.io/gitea/models/git" + 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" + "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 GroupWebSearchResult struct { + OK bool `json:"ok"` + Data *WebSearchGroup `json:"data"` +} + +type GroupWebSearchOptions 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 GroupWebSearchRootResult 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 *GroupWebSearchOptions) 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.FindReposLastestCommitStatuses(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() > int64(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, unit.TypeInvalid)) + 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 *GroupWebSearchOptions) (*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 *GroupWebSearchOptions) (*GroupWebSearchResult, error) { + res := new(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 &GroupWebSearchResult{ + Data: res, + OK: true, + }, nil +} + +/* func SearchRootItems(ctx context.Context, oid int64, groupSearchOptions *group_model.FindGroupsOptions, repoSearchOptions *repo_model.SearchRepoOptions, actor *user_model.User, recursive bool) (*WebSearchGroupRoot, error) { + root := &WebSearchGroupRoot{ + Repos: make([]*repo_service.WebSearchRepository, 0), + Groups: make([]*WebSearchGroup, 0), + } + groupSearchOptions.ParentGroupID = 0 + groups, err := group_model.FindGroupsByCond(ctx, groupSearchOptions, group_model.AccessibleGroupCondition(actor, unit.TypeInvalid)) + if err != nil { + return nil, err + } + for _, g := range groups { + toAppend, err := ToWebSearchGroup(ctx, g, actor, oid) + if err != nil { + return nil, err + } + root.Groups = append(root.Groups, toAppend) + } + repos, _, err := repo_model.SearchRepositoryByCondition(ctx, repoSearchOptions, repo_model.AccessibleRepositoryCondition(actor, unit.TypeInvalid), true) + if err != nil { + return nil, err + } + for _, r := range repos { + root.Repos = append(root.Repos, ToWebSearchRepo(ctx, r)) + } + + return root, nil +} +*/ diff --git a/services/group/team.go b/services/group/team.go new file mode 100644 index 0000000000..3cf690e25e --- /dev/null +++ b/services/group/team.go @@ -0,0 +1,147 @@ +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" + "xorm.io/builder" +) + +func AddTeamToGroup(ctx context.Context, group *group_model.Group, tname string) error { + 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) + } else { + parentGroup, err := group_model.FindGroupTeamByTeamID(ctx, group.ID, t.ID) + if err != nil { + return err + } + mode := t.AccessMode + canCreateIn := t.CanCreateOrgRepo + if parentGroup != nil { + mode = max(t.AccessMode, parentGroup.AccessMode) + canCreateIn = parentGroup.CanCreateIn || t.CanCreateOrgRepo + } + if err = group.LoadParentGroup(ctx); err != nil { + return err + } + err = group_model.AddTeamGroup(ctx, group.ID, t.ID, group.ID, mode, canCreateIn) + if err != nil { + return err + } + } + return nil +} + +func DeleteTeamFromGroup(ctx context.Context, group *group_model.Group, org int64, teamName string) error { + team, err := org_model.GetTeam(ctx, org, teamName) + if err != nil { + return err + } + if err = group_model.RemoveTeamGroup(ctx, org, team.ID, group.ID); err != nil { + return err + } + return nil +} + +func UpdateGroupTeam(ctx context.Context, gt *group_model.GroupTeam) (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 _, unit := range gt.Units { + unit.TeamID = gt.TeamID + if _, err = sess. + Where("team_id=?", gt.TeamID). + And("group_id=?", gt.GroupID). + And("type = ?", unit.Type). + Update(unit); err != nil { + return + } + } + 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) (err error) { + sess := db.GetEngine(ctx) + if err = g.LoadParentGroup(ctx); err != nil { + return + } + var teams []*org_model.Team + if g.ParentGroup == nil { + teams, err = org_model.FindOrgTeams(ctx, g.OwnerID) + if err != nil { + return + } + } else { + teams, err = org_model.GetTeamsWithAccessToGroup(ctx, g.OwnerID, g.ParentGroupID, perm.AccessModeRead) + } + for _, t := range teams { + + var gt *group_model.GroupTeam = nil + if gt, err = group_model.FindGroupTeamByTeamID(ctx, g.ParentGroupID, t.ID); err != nil { + return + } + if gt != nil { + if err = group_model.UpdateTeamGroup(ctx, g.OwnerID, t.ID, g.ID, gt.AccessMode, gt.CanCreateIn, isNew); err != nil { + return + } + } 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 + } + } + + if err = t.LoadUnits(ctx); err != nil { + return + } + 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 + } + newAccessMode = min(newAccessMode, gu.AccessMode) + } + if isNew { + if _, err = sess.Table("group_unit").Insert(&group_model.GroupUnit{ + Type: u.Type, + TeamID: t.ID, + GroupID: g.ID, + AccessMode: newAccessMode, + }); err != nil { + return + } + } else { + if _, err = sess.Table("group_unit").Where(builder.Eq{ + "type": u.Type, + "team_id": t.ID, + "group_id": g.ID, + }).Update(&group_model.GroupUnit{ + AccessMode: newAccessMode, + }); err != nil { + return err + } + } + } + } + return +} diff --git a/services/group/update.go b/services/group/update.go new file mode 100644 index 0000000000..63e131243f --- /dev/null +++ b/services/group/update.go @@ -0,0 +1,31 @@ +package group + +import ( + "code.gitea.io/gitea/models/db" + group_model "code.gitea.io/gitea/models/group" + "code.gitea.io/gitea/modules/optional" + "code.gitea.io/gitea/modules/structs" + "context" + "strings" +) + +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() + } + _, err := db.GetEngine(ctx).ID(g.ID).Update(g) + return err +} From d8cedf18d857413bb105f960704b4d4d28b796a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 16:45:30 -0500 Subject: [PATCH 020/218] update group model - add `SortOrder` field to `Group` struct (to allow drag-and-drop reordering to persist across refreshes) - add method to return `/org/` prefixed url to group - refactor `FindGroupsByCond` to take `FindGroupOptions` as an argument to be chained to the provided condition - ensure that found groups are sorted by their `SortOrder` field - modify `LoadParentGroup` method to immediately return nil if `ParentGroupID` is 0 - add permission-checking utility methods `CanAccess`, `IsOwnedBy`,`CanCreateIn` and `IsAdminOf` - add `ShortName` method that returns an abbreviated group name - add `GetGroupByRepoID` - create `CountGroups` function - create `UpdateGroupOwnerName` helper function to be called when a user changes their username - refactor `MoveGroup` to allow moving a group to the "root" level (`ParentGroupID` = 0) --- models/group/group.go | 160 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 131 insertions(+), 29 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index c8525af0f5..824cf318d5 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -1,18 +1,21 @@ 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/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" - "context" - "errors" - "fmt" - "net/url" - "strconv" "xorm.io/builder" ) @@ -23,16 +26,17 @@ type Group struct { OwnerName string Owner *user_model.User `xorm:"-"` LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` - Name string `xorm:"INDEX NOT NULL"` - FullName string `xorm:"TEXT"` // displayed in places like navigation menus + Name string `xorm:"TEXT INDEX NOT NULL"` Description string `xorm:"TEXT"` IsPrivate bool Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"` Avatar string `xorm:"VARCHAR(64)"` - ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"` + ParentGroupID int64 `xorm:"DEFAULT NULL"` ParentGroup *Group `xorm:"-"` Subgroups GroupList `xorm:"-"` + + SortOrder int `xorm:"INDEX"` } // GroupLink returns the link to this group @@ -40,6 +44,10 @@ 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() { @@ -58,10 +66,15 @@ func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, cond builde return nil } var err error - g.Subgroups, err = FindGroupsByCond(ctx, cond, g.ID) + 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) @@ -96,6 +109,9 @@ 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 @@ -113,7 +129,46 @@ func (g *Group) LoadOwner(ctx context.Context) error { return err } -func (g *Group) GetGroupByID(ctx context.Context, id int64) (*Group, error) { +func (g *Group) CanAccess(ctx context.Context, userID int64) (bool, error) { + return db.GetEngine(ctx). + Where(UserOrgTeamPermCond("id", userID, perm.AccessModeRead)).Table("repo_group").Exist() +} + +func (g *Group) IsOwnedBy(ctx context.Context, userID int64) (bool, error) { + return db.GetEngine(ctx). + Where("team_user.uid = ?", userID). + Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). + And("group_team.access_mode = ?", perm.AccessModeOwner). + And("group_team.group_id = ?", g.ID). + Table("group_team"). + Exist() +} + +func (g *Group) CanCreateIn(ctx context.Context, userID int64) (bool, error) { + return db.GetEngine(ctx). + Where("team_user.uid = ?", userID). + Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). + And("group_team.group_id = ?", g.ID). + And("group_team.can_create_in = ?", true). + Table("group_team"). + Exist() +} + +func (g *Group) IsAdminOf(ctx context.Context, userID int64) (bool, error) { + return db.GetEngine(ctx). + Where("team_user.uid = ?", userID). + Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). + And("group_team.group_id = ?", g.ID). + And("group_team.access_mode >= ?", perm.AccessModeAdmin). + Table("group_team"). + Exist() +} + +func (g *Group) ShortName(length int) string { + return util.EllipsisDisplayString(g.Name, length) +} + +func GetGroupByID(ctx context.Context, id int64) (*Group, error) { group := new(Group) has, err := db.GetEngine(ctx).ID(id).Get(group) @@ -125,10 +180,32 @@ func (g *Group) GetGroupByID(ctx context.Context, id int64) (*Group, error) { return group, nil } +func GetGroupByRepoID(ctx context.Context, repoID int64) (*Group, error) { + group := new(Group) + _, err := db.GetEngine(ctx). + In("id", builder. + Select("group_id"). + From("repo"). + Where(builder.Eq{"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(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 { @@ -160,23 +237,47 @@ func FindGroups(ctx context.Context, opts *FindGroupsOptions) (GroupList, error) if opts.Page > 0 { sess = db.SetSessionPagination(sess, opts) } + groups := make([]*Group, 0, 10) return groups, sess. - Asc("repo_group.id"). + Asc("repo_group.sort_order"). Find(&groups) } -func FindGroupsByCond(ctx context.Context, cond builder.Cond, parentGroupID int64) (GroupList, error) { - if parentGroupID > 0 { - cond = cond.And(builder.Eq{"repo_group.id": parentGroupID}) - } else { - cond = cond.And(builder.IsNull{"repo_group.id"}) +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) - groups := make([]*Group, 0) - return groups, sess. - Asc("repo_group.id"). - Find(&groups) + + 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) (GroupList, 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 @@ -225,20 +326,21 @@ func ParentGroupCond(idStr string, groupID int64) builder.Cond { func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error { sess := db.GetEngine(ctx) ng, err := GetGroupByID(ctx, newParent) - if err != nil { + if !IsErrGroupNotExist(err) { return err } - if ng.OwnerID != group.OwnerID { - return fmt.Errorf("group[%d]'s ownerID is not equal to new paretn group[%d]'s owner ID", group.ID, ng.ID) + 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) + } } + group.ParentGroupID = newParent group.SortOrder = newSortOrder if _, err = sess.Table(group.TableName()). - Where("id = ?", group.ID). - MustCols("parent_group_id"). - Update(group, &Group{ - ID: group.ID, - }); err != nil { + ID(group.ID). + AllCols(). + Update(group); err != nil { return err } if group.ParentGroup != nil && newParent != 0 { From 1387922420cd64c89bef4ef1aa9794df4997a773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 16:50:19 -0500 Subject: [PATCH 021/218] add `UserOrgTeamPermCond` function this returns group ids where a user has permissions greater than or equal to `level` --- models/group/group_list.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index d855f0143e..bb20b04af9 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -1,11 +1,12 @@ 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" - "context" "xorm.io/builder" ) @@ -31,6 +32,13 @@ func userOrgTeamGroupBuilder(userID int64) *builder.Builder { Where(builder.Eq{"`team_user`.uid": userID}) } +func UserOrgTeamPermCond(idStr string, userID int64, level perm.AccessMode) builder.Cond { + selCond := userOrgTeamGroupBuilder(userID) + selCond = selCond.InnerJoin("team", "`team`.id = `group_team`.team_id"). + And(builder.Or(builder.Gte{"`team`.authorize": level}, builder.Gte{"`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 int64) builder.Cond { return builder.In(idStr, userOrgTeamGroupBuilder(userID)) From 652c1deac5a4de687d2d012237a976fa49769ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 16:57:57 -0500 Subject: [PATCH 022/218] add new fields and methods to `GroupTeam` model - add `CanCreateIn` field, which determines whether a team can create new subgroups or repositories within a group - add `AccessMode` field that determines a team's general access level to a group (as opposed to a specific unit) - add `UpdateTeamGroup` function that either updates or adds a `GroupTeam` to the database - update `HasTeamGroup` to also check that a team's access level is >= `AccessModeRead` --- models/group/group_team.go | 119 ++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 9 deletions(-) diff --git a/models/group/group_team.go b/models/group/group_team.go index 7080832146..392123cbdd 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -2,36 +2,95 @@ package group import ( "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" "context" ) // GroupTeam represents a relation for a team's access to a group type GroupTeam struct { - ID int64 `xorm:"pk autoincr"` - OrgID int64 `xorm:"INDEX"` - TeamID int64 `xorm:"UNIQUE(s)"` - GroupID int64 `xorm:"UNIQUE(s)"` + 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 []*GroupUnit `xorm:"-"` } -// HasTeamGroup returns true if the given group belongs to team. +func (g *GroupTeam) LoadGroupUnits(ctx context.Context) (err error) { + g.Units, err = GetUnitsByGroupID(ctx, g.GroupID) + return +} + +func (g *GroupTeam) 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()) + } + for _, u := range g.Units { + if u.Type == tp { + accessMode = u.AccessMode + exist = true + break + } + } + return +} + +// 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(GroupTeam)) return has } -func AddTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error { +// 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(&GroupTeam{ - OrgID: orgID, - GroupID: groupID, - TeamID: teamID, + 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("group_team"). + Where("org_id=?", orgID). + And("team_id=?", teamID). + And("group_id =?", groupID). + Update(&GroupTeam{ + 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, &GroupTeam{ TeamID: teamID, @@ -40,3 +99,45 @@ func RemoveTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error { }) return err } + +func FindGroupTeams(ctx context.Context, groupID int64) (gteams []*GroupTeam, err error) { + return gteams, db.GetEngine(ctx). + Where("group_id=?", groupID). + Table("group_team"). + Find(>eams) +} + +func FindGroupTeamByTeamID(ctx context.Context, groupID, teamID int64) (gteam *GroupTeam, err error) { + gteam = new(GroupTeam) + has, err := db.GetEngine(ctx). + Where("group_id=?", groupID). + And("team_id = ?", teamID). + Table("group_team"). + Get(gteam) + if !has { + gteam = nil + } + return +} + +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([]*GroupTeam, 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 *GroupTeam) perm.AccessMode { + return g.AccessMode + }) + maxMode := max(mapped[0]) + + for _, m := range mapped[1:] { + maxMode = max(maxMode, m) + } + return maxMode, nil +} From 2148a9f48d2a69e32f1ccc9645045d85b3e3b57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 17:01:44 -0500 Subject: [PATCH 023/218] update group_unit.go - export `GetUnitsByGroupID` - add `GetGroupUnit` function to retrieve a specific unit in a group - add `GetMaxGroupUnit` function that returns a specific type of group unit with the highest permissions granted --- models/group/group_unit.go | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/models/group/group_unit.go b/models/group/group_unit.go index 89b3c131cf..30c968b978 100644 --- a/models/group/group_unit.go +++ b/models/group/group_unit.go @@ -10,7 +10,7 @@ import ( // GroupUnit describes all units of a repository group type GroupUnit struct { ID int64 `xorm:"pk autoincr"` - GroupID int64 `xorm:"INDEX"` + GroupID int64 `xorm:"UNIQUE(s)"` TeamID int64 `xorm:"UNIQUE(s)"` Type unit.Type `xorm:"UNIQUE(s)"` AccessMode perm.AccessMode @@ -20,6 +20,33 @@ func (g *GroupUnit) Unit() unit.Unit { return unit.Units[g.Type] } -func getUnitsByGroupID(ctx context.Context, groupID int64) (units []*GroupUnit, err error) { +func GetUnitsByGroupID(ctx context.Context, groupID int64) (units []*GroupUnit, err error) { return units, db.GetEngine(ctx).Where("group_id = ?", groupID).Find(&units) } + +func GetGroupUnit(ctx context.Context, groupID, teamID int64, unitType unit.Type) (unit *GroupUnit, err error) { + unit = new(GroupUnit) + _, err = db.GetEngine(ctx). + Where("group_id = ?", groupID). + And("team_id = ?", teamID). + And("type = ?", unitType). + Get(unit) + return +} + +func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (unit *GroupUnit, err error) { + units := make([]*GroupUnit, 0) + err = db.GetEngine(ctx). + Where("group_id = ?", groupID). + And("type = ?", unitType). + Find(&units) + if err != nil { + return + } + for _, u := range units { + if unit == nil || u.AccessMode > unit.AccessMode { + unit = u + } + } + return +} From ea8e52b9eebaf8325c2d825a7f17154ec9e1bc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 17:04:31 -0500 Subject: [PATCH 024/218] remove unused parameter from `Group.relAvatarLink` method --- models/group/avatar.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/group/avatar.go b/models/group/avatar.go index d07e8341da..1af58a9fca 100644 --- a/models/group/avatar.go +++ b/models/group/avatar.go @@ -12,7 +12,7 @@ import ( func (g *Group) CustomAvatarRelativePath() string { return g.Avatar } -func (g *Group) relAvatarLink(ctx context.Context) string { +func (g *Group) relAvatarLink() string { // If no avatar - path is empty avatarPath := g.CustomAvatarRelativePath() if len(avatarPath) == 0 { @@ -22,7 +22,7 @@ func (g *Group) relAvatarLink(ctx context.Context) string { } func (g *Group) AvatarLink(ctx context.Context) string { - relLink := g.relAvatarLink(ctx) + relLink := g.relAvatarLink() if relLink != "" { return httplib.MakeAbsoluteURL(ctx, relLink) } From 31c66733c3cd8ea1fc8a730f22d085ba03f1f252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:54:03 -0500 Subject: [PATCH 025/218] [models] update repo model add `GroupID` and `GroupSortOrder` fields --- models/repo/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/repo/repo.go b/models/repo/repo.go index 7814bb4876..52fc116134 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -219,6 +219,9 @@ type Repository struct { CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"` + + GroupID int64 `xorm:"DEFAULT NULL"` + GroupSortOrder int } func init() { From ba37aa851498d6bca32cf5afb96cffc9478b6ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:15:12 -0500 Subject: [PATCH 026/218] update repo_permission.go change `GetUserRepoPermission` to check for permissions granted/denied by groups --- models/perm/access/repo_permission.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index 21821f1746..ecb2472b6b 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -4,6 +4,7 @@ package access import ( + group_model "code.gitea.io/gitea/models/group" "context" "errors" "fmt" @@ -482,6 +483,14 @@ func GetIndividualUserRepoPermission(ctx context.Context, repo *repo_model.Repos return perm, nil } } + groupTeams, err := group_model.FindGroupTeams(ctx, repo.GroupID) + 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 { @@ -529,6 +538,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 From 423ef4c09c8979343d293be95af7a809f3d18c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:33:33 -0500 Subject: [PATCH 027/218] add conversion functions for repository groups --- services/convert/repo_group.go | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 services/convert/repo_group.go diff --git a/services/convert/repo_group.go b/services/convert/repo_group.go new file mode 100644 index 0000000000..31f1158411 --- /dev/null +++ b/services/convert/repo_group.go @@ -0,0 +1,40 @@ +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, + } + 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 +} From 58126232fcedfe5b989ed3cb40cd77bf71ad556e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:39:47 -0500 Subject: [PATCH 028/218] add file with functions relating to organization teams and repo groups --- models/organization/team_group.go | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 models/organization/team_group.go diff --git a/models/organization/team_group.go b/models/organization/team_group.go new file mode 100644 index 0000000000..95b1d6d983 --- /dev/null +++ b/models/organization/team_group.go @@ -0,0 +1,33 @@ +package organization + +import ( + "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" + "context" +) + +func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode perm.AccessMode) ([]*Team, error) { + teams := make([]*Team, 0) + inCond := group_model.ParentGroupCond("group_team.group_id", groupID) + return teams, db.GetEngine(ctx).Where("group_team.access_mode >= ?", mode). + Join("INNER", "group_team", "group_team.team_id = team.id"). + And("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("group_team.group_id", groupID) + return teams, db.GetEngine(ctx).Where("group_team.access_mode >= ?", mode). + Join("INNER", "group_team", "group_team.team_id = team.id"). + Join("INNER", "group_unit", "group_unit.team_id = team.id"). + And("group_team.org_id = ?", orgID). + And(inCond). + And("group_unit.type = ?", unitType). + OrderBy("name"). + Find(&teams) +} From 0521a0e06df84706218fb2bf54853e975cb90d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:41:38 -0500 Subject: [PATCH 029/218] update `team_list.go` add `GetUserGroupTeams` function --- models/organization/team_list.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/models/organization/team_list.go b/models/organization/team_list.go index 5629cec366..cc471f0e67 100644 --- a/models/organization/team_list.go +++ b/models/organization/team_list.go @@ -126,6 +126,18 @@ 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) { + err = db.GetEngine(ctx). + Where("`group_team`.group_id = ?", groupID). + Join("INNER", "group_team", "`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) + return +} + 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) From 2f7ecb1f60ef8dc2e033be2c233206980cea03a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:49:55 -0500 Subject: [PATCH 030/218] add group-related url segments to list of reserved usernames --- models/user/user.go | 3 +++ 1 file changed, 3 insertions(+) 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", From 09b5fa6e87dd757201ca63137a7291e7a40c8764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 18:58:16 -0500 Subject: [PATCH 031/218] [models/search-options] add `GroupID` to `SearchRepoOptions` --- models/repo/repo_list.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index e927174a55..e7923c9b1a 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 @@ -445,6 +446,9 @@ 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}) + } if opts.Keyword != "" { // separate keyword From c0898cc0e3c0a009353a14f38768af28865e5e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 19:02:28 -0500 Subject: [PATCH 032/218] [models/conds] add functions returning builders to help find repos matching various group-related conditions --- models/repo/repo_list.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index e7923c9b1a..eef4578096 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -303,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", "group_team", "`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). @@ -311,6 +317,13 @@ 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)) @@ -324,6 +337,17 @@ func UserOrgUnitRepoCond(idStr string, userID, orgID int64, unitType unit.Type) ) } +// 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("group_team", "`group_team`.group_id = `repo_group`.id"). + Where(builder.Eq{"`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 func userOrgPublicRepoCond(userID int64) builder.Cond { return builder.And( From 1fc3e005fbed7e713472a6b57d302f569256b4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 19:06:48 -0500 Subject: [PATCH 033/218] [models/conds] update some repo conditions to check for access provided via groups --- models/repo/repo_list.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index eef4578096..6405af31ff 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -290,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. @@ -326,7 +326,9 @@ func userOrgTeamUnitRepoGroupBuilder(userID int64, unitType unit.Type) *builder. // 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 @@ -334,7 +336,7 @@ 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 From 24e7df8df49035846803fbf3945c989093861d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 19:10:51 -0500 Subject: [PATCH 034/218] [models] update `GetTeamRepositories` to also return repositories accessible via group permissions --- models/repo/org_repo.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/models/repo/org_repo.go b/models/repo/org_repo.go index d8c2c91fec..46ae097c7c 100644 --- a/models/repo/org_repo.go +++ b/models/repo/org_repo.go @@ -37,10 +37,13 @@ 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 { From 60c63bd5c8ae51008bdccc90f9bc32ee2b3363dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 19:36:20 -0500 Subject: [PATCH 035/218] [services] ensure `OwnerName` field is updated in groups owned by an org when its name is updated --- services/user/user.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/user/user.go b/services/user/user.go index 9b8bcf83c0..539c848ced 100644 --- a/services/user/user.go +++ b/services/user/user.go @@ -4,6 +4,7 @@ package user import ( + group_model "code.gitea.io/gitea/models/group" "context" "fmt" "os" @@ -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 } From c3c61fca112bfc27c389225016b65b2c6263ebdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 9 Jan 2025 19:40:08 -0500 Subject: [PATCH 036/218] [misc] update avatar utils to handle group avatars --- modules/templates/util_avatar.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/templates/util_avatar.go b/modules/templates/util_avatar.go index 524c64d0b6..f2c3e8502b 100644 --- a/modules/templates/util_avatar.go +++ b/modules/templates/util_avatar.go @@ -4,6 +4,7 @@ package templates import ( + group_model "code.gitea.io/gitea/models/group" "context" "html" "html/template" @@ -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, "") From cafc218e903e6c082bcfd12707965c61757dd373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 19 Jul 2025 23:09:44 -0400 Subject: [PATCH 037/218] fix duplicate teams being returned by `GetTeamsWithAccessToGroup` --- models/organization/team_group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/organization/team_group.go b/models/organization/team_group.go index 95b1d6d983..0cdaa742e6 100644 --- a/models/organization/team_group.go +++ b/models/organization/team_group.go @@ -11,8 +11,8 @@ import ( func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode perm.AccessMode) ([]*Team, error) { teams := make([]*Team, 0) inCond := group_model.ParentGroupCond("group_team.group_id", groupID) - return teams, db.GetEngine(ctx).Where("group_team.access_mode >= ?", mode). - Join("INNER", "group_team", "group_team.team_id = team.id"). + return teams, db.GetEngine(ctx).Distinct("team.*").Where("group_team.access_mode >= ?", mode). + Join("INNER", "group_team", "group_team.team_id = team.id and group_team.org_id = ?", orgID). And("group_team.org_id = ?", orgID). And(inCond). OrderBy("name"). From ed0d5b0cba21b300391829c0c1c462d38b3f1118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 20 Jul 2025 14:05:02 -0400 Subject: [PATCH 038/218] fix bug where all repos are returned even when `opts.GroupID` == 0 --- models/repo/repo_list.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index 6405af31ff..6a54cd19c8 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -474,6 +474,8 @@ func SearchRepositoryCondition(opts SearchRepoOptions) builder.Cond { } 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 != "" { From c0b35ae8b44bcede4b7bb20b5743376117a72dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 10 Aug 2025 21:40:51 -0400 Subject: [PATCH 039/218] remove unused/redundant `IsPrivate` field from Group struct --- models/group/group.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index 824cf318d5..630617e840 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -24,11 +24,10 @@ type Group struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` OwnerName string - Owner *user_model.User `xorm:"-"` - LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` - Name string `xorm:"TEXT INDEX NOT NULL"` - Description string `xorm:"TEXT"` - IsPrivate bool + Owner *user_model.User `xorm:"-"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + Name string `xorm:"TEXT INDEX NOT NULL"` + Description string `xorm:"TEXT"` Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"` Avatar string `xorm:"VARCHAR(64)"` From 78d76049bbe8d93cee16b1f7040c88813416959a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 10 Aug 2025 21:43:13 -0400 Subject: [PATCH 040/218] add `UpdateGroup` function --- models/group/group.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/group/group.go b/models/group/group.go index 630617e840..ca5e415c6e 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -322,6 +322,12 @@ func ParentGroupCond(idStr string, groupID int64) builder.Cond { 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) From 21eac079bcced57133adfbef7069a9565000e5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 10 Aug 2025 21:53:30 -0400 Subject: [PATCH 041/218] [services] update `MoveGroupItem` function to set `newPos` to the length of the new parent's subgroups/repositories --- services/group/group.go | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/services/group/group.go b/services/group/group.go index fb2414bb00..463c349a78 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -56,17 +56,30 @@ func MoveRepositoryToGroup(ctx context.Context, repo *repo_model.Repository, new } func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, newPos int) (err error) { - ctx, committer, err := db.TxContext(ctx) + var committer db.Committer + ctx, committer, err = db.TxContext(ctx) if err != nil { return err } defer committer.Close() - + var parentGroup *group_model.Group + parentGroup, err = group_model.GetGroupByID(ctx, newParent) + if err != nil { + return err + } + err = parentGroup.LoadSubgroups(ctx, false) + if err != nil { + return err + } if isGroup { - group, err := group_model.GetGroupByID(ctx, itemID) + var group *group_model.Group + group, err = group_model.GetGroupByID(ctx, itemID) if err != nil { return err } + if newPos < 0 { + newPos = len(parentGroup.Subgroups) + } if group.ParentGroupID != newParent || group.SortOrder != newPos { if err = group_model.MoveGroup(ctx, group, newParent, newPos); err != nil { return err @@ -76,10 +89,21 @@ func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, n } } } else { - repo, err := repo_model.GetRepositoryByID(ctx, itemID) + var repo *repo_model.Repository + repo, err = repo_model.GetRepositoryByID(ctx, itemID) if err != nil { return err } + if newPos < 0 { + var repoCount int64 + repoCount, err = repo_model.CountRepository(ctx, &repo_model.SearchRepoOptions{ + GroupID: newParent, + }) + if err != nil { + return err + } + newPos = int(repoCount) + } if repo.GroupID != newParent || repo.GroupSortOrder != newPos { if err = MoveRepositoryToGroup(ctx, repo, newParent, newPos); err != nil { return err From b2c3acc8c0e2045d14eddec127322c1af51c1fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 12 Aug 2025 20:59:30 -0400 Subject: [PATCH 042/218] add missing nil check before `IsErrGroupNotExist` call --- models/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index ca5e415c6e..95219c6e77 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -331,7 +331,7 @@ func UpdateGroup(ctx context.Context, group *Group) error { func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error { sess := db.GetEngine(ctx) ng, err := GetGroupByID(ctx, newParent) - if !IsErrGroupNotExist(err) { + if err != nil && !IsErrGroupNotExist(err) { return err } if ng != nil { From bda02523b910c4d3a4dc95599e594ae32eade468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 12 Aug 2025 22:15:36 -0400 Subject: [PATCH 043/218] add test fixtures --- models/fixtures/group_team.yml | 144 + models/fixtures/group_unit.yml | 1200 +++ models/fixtures/repo_group.yml | 12090 +++++++++++++++++++++++++++++++ models/fixtures/repository.yml | 760 +- 4 files changed, 13943 insertions(+), 251 deletions(-) create mode 100644 models/fixtures/group_team.yml create mode 100644 models/fixtures/group_unit.yml create mode 100644 models/fixtures/repo_group.yml diff --git a/models/fixtures/group_team.yml b/models/fixtures/group_team.yml new file mode 100644 index 0000000000..df408d5592 --- /dev/null +++ b/models/fixtures/group_team.yml @@ -0,0 +1,144 @@ +- id: 1 + org_id: 25 + team_id: 10 + group_id: 12 + access_mode: 1 + can_create_in: true +- id: 2 + org_id: 25 + team_id: 23 + group_id: 12 + access_mode: 4 + can_create_in: true +- id: 3 + org_id: 26 + team_id: 11 + group_id: 41 + access_mode: 1 + can_create_in: false +- id: 4 + org_id: 41 + team_id: 21 + group_id: 88 + access_mode: 3 + can_create_in: true +- id: 5 + org_id: 41 + team_id: 22 + group_id: 88 + access_mode: 1 + can_create_in: true +- id: 6 + org_id: 3 + team_id: 1 + group_id: 148 + access_mode: 4 + can_create_in: true +- id: 7 + org_id: 3 + team_id: 2 + group_id: 148 + access_mode: 1 + can_create_in: false +- id: 8 + org_id: 3 + team_id: 7 + group_id: 148 + access_mode: 1 + can_create_in: false +- id: 9 + org_id: 3 + team_id: 12 + group_id: 148 + access_mode: 1 + can_create_in: false +- id: 10 + org_id: 3 + team_id: 14 + group_id: 148 + access_mode: 1 + can_create_in: true +- id: 11 + org_id: 6 + team_id: 3 + group_id: 179 + access_mode: 4 + can_create_in: true +- id: 12 + org_id: 6 + team_id: 13 + group_id: 179 + access_mode: 3 + can_create_in: false +- id: 13 + org_id: 19 + team_id: 6 + group_id: 203 + access_mode: 3 + can_create_in: false +- id: 14 + org_id: 22 + team_id: 15 + group_id: 239 + access_mode: 2 + can_create_in: false +- id: 15 + org_id: 36 + team_id: 19 + group_id: 241 + access_mode: 4 + can_create_in: false +- id: 16 + org_id: 36 + team_id: 20 + group_id: 241 + access_mode: 1 + can_create_in: true +- id: 17 + org_id: 7 + team_id: 4 + group_id: 280 + access_mode: 1 + can_create_in: false +- id: 18 + org_id: 17 + team_id: 5 + group_id: 312 + access_mode: 3 + can_create_in: true +- id: 19 + org_id: 17 + team_id: 8 + group_id: 312 + access_mode: 1 + can_create_in: false +- id: 20 + org_id: 17 + team_id: 9 + group_id: 312 + access_mode: 1 + can_create_in: true +- id: 21 + org_id: 23 + team_id: 16 + group_id: 360 + access_mode: 3 + can_create_in: false +- id: 22 + org_id: 23 + team_id: 17 + group_id: 360 + access_mode: 1 + can_create_in: false +- id: 23 + org_id: 35 + team_id: 18 + group_id: 376 + access_mode: 2 + can_create_in: false +- id: 24 + org_id: 35 + team_id: 24 + group_id: 376 + access_mode: 1 + can_create_in: false diff --git a/models/fixtures/group_unit.yml b/models/fixtures/group_unit.yml new file mode 100644 index 0000000000..2fce9b5286 --- /dev/null +++ b/models/fixtures/group_unit.yml @@ -0,0 +1,1200 @@ +- id: 1 + group_id: 12 + team_id: 10 + type: 2 + access_mode: 0 +- id: 2 + group_id: 12 + team_id: 10 + type: 7 + access_mode: 2 +- id: 3 + group_id: 12 + team_id: 10 + type: 3 + access_mode: 0 +- id: 4 + group_id: 12 + team_id: 10 + type: 4 + access_mode: 0 +- id: 5 + group_id: 12 + team_id: 10 + type: 5 + access_mode: 0 +- id: 6 + group_id: 12 + team_id: 10 + type: 1 + access_mode: 1 +- id: 7 + group_id: 12 + team_id: 10 + type: 6 + access_mode: 0 +- id: 8 + group_id: 12 + team_id: 10 + type: 8 + access_mode: 1 +- id: 9 + group_id: 12 + team_id: 10 + type: 9 + access_mode: 1 +- id: 10 + group_id: 12 + team_id: 10 + type: 10 + access_mode: 0 +- id: 11 + group_id: 12 + team_id: 23 + type: 9 + access_mode: 0 +- id: 12 + group_id: 12 + team_id: 23 + type: 10 + access_mode: 0 +- id: 13 + group_id: 12 + team_id: 23 + type: 1 + access_mode: 2 +- id: 14 + group_id: 12 + team_id: 23 + type: 6 + access_mode: 0 +- id: 15 + group_id: 12 + team_id: 23 + type: 8 + access_mode: 1 +- id: 16 + group_id: 12 + team_id: 23 + type: 4 + access_mode: 0 +- id: 17 + group_id: 12 + team_id: 23 + type: 5 + access_mode: 0 +- id: 18 + group_id: 12 + team_id: 23 + type: 2 + access_mode: 0 +- id: 19 + group_id: 12 + team_id: 23 + type: 7 + access_mode: 0 +- id: 20 + group_id: 12 + team_id: 23 + type: 3 + access_mode: 1 +- id: 21 + group_id: 41 + team_id: 11 + type: 7 + access_mode: 0 +- id: 22 + group_id: 41 + team_id: 11 + type: 3 + access_mode: 1 +- id: 23 + group_id: 41 + team_id: 11 + type: 4 + access_mode: 0 +- id: 24 + group_id: 41 + team_id: 11 + type: 5 + access_mode: 0 +- id: 25 + group_id: 41 + team_id: 11 + type: 2 + access_mode: 2 +- id: 26 + group_id: 41 + team_id: 11 + type: 6 + access_mode: 1 +- id: 27 + group_id: 41 + team_id: 11 + type: 8 + access_mode: 2 +- id: 28 + group_id: 41 + team_id: 11 + type: 9 + access_mode: 0 +- id: 29 + group_id: 41 + team_id: 11 + type: 10 + access_mode: 0 +- id: 30 + group_id: 41 + team_id: 11 + type: 1 + access_mode: 0 +- id: 31 + group_id: 88 + team_id: 21 + type: 8 + access_mode: 0 +- id: 32 + group_id: 88 + team_id: 21 + type: 9 + access_mode: 2 +- id: 33 + group_id: 88 + team_id: 21 + type: 10 + access_mode: 0 +- id: 34 + group_id: 88 + team_id: 21 + type: 1 + access_mode: 1 +- id: 35 + group_id: 88 + team_id: 21 + type: 6 + access_mode: 1 +- id: 36 + group_id: 88 + team_id: 21 + type: 3 + access_mode: 0 +- id: 37 + group_id: 88 + team_id: 21 + type: 4 + access_mode: 2 +- id: 38 + group_id: 88 + team_id: 21 + type: 5 + access_mode: 2 +- id: 39 + group_id: 88 + team_id: 21 + type: 2 + access_mode: 1 +- id: 40 + group_id: 88 + team_id: 21 + type: 7 + access_mode: 1 +- id: 41 + group_id: 88 + team_id: 22 + type: 4 + access_mode: 0 +- id: 42 + group_id: 88 + team_id: 22 + type: 5 + access_mode: 0 +- id: 43 + group_id: 88 + team_id: 22 + type: 2 + access_mode: 0 +- id: 44 + group_id: 88 + team_id: 22 + type: 7 + access_mode: 0 +- id: 45 + group_id: 88 + team_id: 22 + type: 3 + access_mode: 0 +- id: 46 + group_id: 88 + team_id: 22 + type: 9 + access_mode: 0 +- id: 47 + group_id: 88 + team_id: 22 + type: 10 + access_mode: 0 +- id: 48 + group_id: 88 + team_id: 22 + type: 1 + access_mode: 1 +- id: 49 + group_id: 88 + team_id: 22 + type: 6 + access_mode: 0 +- id: 50 + group_id: 88 + team_id: 22 + type: 8 + access_mode: 0 +- id: 51 + group_id: 148 + team_id: 1 + type: 4 + access_mode: 1 +- id: 52 + group_id: 148 + team_id: 1 + type: 5 + access_mode: 0 +- id: 53 + group_id: 148 + team_id: 1 + type: 2 + access_mode: 0 +- id: 54 + group_id: 148 + team_id: 1 + type: 7 + access_mode: 0 +- id: 55 + group_id: 148 + team_id: 1 + type: 3 + access_mode: 0 +- id: 56 + group_id: 148 + team_id: 1 + type: 9 + access_mode: 1 +- id: 57 + group_id: 148 + team_id: 1 + type: 10 + access_mode: 0 +- id: 58 + group_id: 148 + team_id: 1 + type: 1 + access_mode: 0 +- id: 59 + group_id: 148 + team_id: 1 + type: 6 + access_mode: 1 +- id: 60 + group_id: 148 + team_id: 1 + type: 8 + access_mode: 0 +- id: 61 + group_id: 148 + team_id: 2 + type: 3 + access_mode: 2 +- id: 62 + group_id: 148 + team_id: 2 + type: 4 + access_mode: 0 +- id: 63 + group_id: 148 + team_id: 2 + type: 5 + access_mode: 1 +- id: 64 + group_id: 148 + team_id: 2 + type: 2 + access_mode: 0 +- id: 65 + group_id: 148 + team_id: 2 + type: 7 + access_mode: 0 +- id: 66 + group_id: 148 + team_id: 2 + type: 8 + access_mode: 1 +- id: 67 + group_id: 148 + team_id: 2 + type: 9 + access_mode: 0 +- id: 68 + group_id: 148 + team_id: 2 + type: 10 + access_mode: 1 +- id: 69 + group_id: 148 + team_id: 2 + type: 1 + access_mode: 0 +- id: 70 + group_id: 148 + team_id: 2 + type: 6 + access_mode: 0 +- id: 71 + group_id: 148 + team_id: 7 + type: 4 + access_mode: 0 +- id: 72 + group_id: 148 + team_id: 7 + type: 5 + access_mode: 0 +- id: 73 + group_id: 148 + team_id: 7 + type: 2 + access_mode: 2 +- id: 74 + group_id: 148 + team_id: 7 + type: 7 + access_mode: 0 +- id: 75 + group_id: 148 + team_id: 7 + type: 3 + access_mode: 0 +- id: 76 + group_id: 148 + team_id: 7 + type: 9 + access_mode: 1 +- id: 77 + group_id: 148 + team_id: 7 + type: 10 + access_mode: 1 +- id: 78 + group_id: 148 + team_id: 7 + type: 1 + access_mode: 1 +- id: 79 + group_id: 148 + team_id: 7 + type: 6 + access_mode: 0 +- id: 80 + group_id: 148 + team_id: 7 + type: 8 + access_mode: 1 +- id: 81 + group_id: 148 + team_id: 12 + type: 3 + access_mode: 1 +- id: 82 + group_id: 148 + team_id: 12 + type: 4 + access_mode: 0 +- id: 83 + group_id: 148 + team_id: 12 + type: 5 + access_mode: 0 +- id: 84 + group_id: 148 + team_id: 12 + type: 2 + access_mode: 1 +- id: 85 + group_id: 148 + team_id: 12 + type: 7 + access_mode: 2 +- id: 86 + group_id: 148 + team_id: 12 + type: 8 + access_mode: 2 +- id: 87 + group_id: 148 + team_id: 12 + type: 9 + access_mode: 1 +- id: 88 + group_id: 148 + team_id: 12 + type: 10 + access_mode: 0 +- id: 89 + group_id: 148 + team_id: 12 + type: 1 + access_mode: 1 +- id: 90 + group_id: 148 + team_id: 12 + type: 6 + access_mode: 0 +- id: 91 + group_id: 148 + team_id: 14 + type: 6 + access_mode: 0 +- id: 92 + group_id: 148 + team_id: 14 + type: 8 + access_mode: 0 +- id: 93 + group_id: 148 + team_id: 14 + type: 9 + access_mode: 0 +- id: 94 + group_id: 148 + team_id: 14 + type: 10 + access_mode: 1 +- id: 95 + group_id: 148 + team_id: 14 + type: 1 + access_mode: 0 +- id: 96 + group_id: 148 + team_id: 14 + type: 7 + access_mode: 0 +- id: 97 + group_id: 148 + team_id: 14 + type: 3 + access_mode: 1 +- id: 98 + group_id: 148 + team_id: 14 + type: 4 + access_mode: 0 +- id: 99 + group_id: 148 + team_id: 14 + type: 5 + access_mode: 1 +- id: 100 + group_id: 148 + team_id: 14 + type: 2 + access_mode: 1 +- id: 101 + group_id: 179 + team_id: 3 + type: 2 + access_mode: 1 +- id: 102 + group_id: 179 + team_id: 3 + type: 7 + access_mode: 1 +- id: 103 + group_id: 179 + team_id: 3 + type: 3 + access_mode: 2 +- id: 104 + group_id: 179 + team_id: 3 + type: 4 + access_mode: 0 +- id: 105 + group_id: 179 + team_id: 3 + type: 5 + access_mode: 0 +- id: 106 + group_id: 179 + team_id: 3 + type: 1 + access_mode: 1 +- id: 107 + group_id: 179 + team_id: 3 + type: 6 + access_mode: 0 +- id: 108 + group_id: 179 + team_id: 3 + type: 8 + access_mode: 0 +- id: 109 + group_id: 179 + team_id: 3 + type: 9 + access_mode: 1 +- id: 110 + group_id: 179 + team_id: 3 + type: 10 + access_mode: 2 +- id: 111 + group_id: 179 + team_id: 13 + type: 5 + access_mode: 2 +- id: 112 + group_id: 179 + team_id: 13 + type: 2 + access_mode: 0 +- id: 113 + group_id: 179 + team_id: 13 + type: 7 + access_mode: 0 +- id: 114 + group_id: 179 + team_id: 13 + type: 3 + access_mode: 1 +- id: 115 + group_id: 179 + team_id: 13 + type: 4 + access_mode: 0 +- id: 116 + group_id: 179 + team_id: 13 + type: 10 + access_mode: 0 +- id: 117 + group_id: 179 + team_id: 13 + type: 1 + access_mode: 0 +- id: 118 + group_id: 179 + team_id: 13 + type: 6 + access_mode: 1 +- id: 119 + group_id: 179 + team_id: 13 + type: 8 + access_mode: 1 +- id: 120 + group_id: 179 + team_id: 13 + type: 9 + access_mode: 1 +- id: 121 + group_id: 203 + team_id: 6 + type: 2 + access_mode: 1 +- id: 122 + group_id: 203 + team_id: 6 + type: 7 + access_mode: 0 +- id: 123 + group_id: 203 + team_id: 6 + type: 3 + access_mode: 0 +- id: 124 + group_id: 203 + team_id: 6 + type: 4 + access_mode: 0 +- id: 125 + group_id: 203 + team_id: 6 + type: 5 + access_mode: 0 +- id: 126 + group_id: 203 + team_id: 6 + type: 1 + access_mode: 1 +- id: 127 + group_id: 203 + team_id: 6 + type: 6 + access_mode: 0 +- id: 128 + group_id: 203 + team_id: 6 + type: 8 + access_mode: 0 +- id: 129 + group_id: 203 + team_id: 6 + type: 9 + access_mode: 1 +- id: 130 + group_id: 203 + team_id: 6 + type: 10 + access_mode: 2 +- id: 131 + group_id: 239 + team_id: 15 + type: 3 + access_mode: 0 +- id: 132 + group_id: 239 + team_id: 15 + type: 4 + access_mode: 1 +- id: 133 + group_id: 239 + team_id: 15 + type: 5 + access_mode: 0 +- id: 134 + group_id: 239 + team_id: 15 + type: 2 + access_mode: 1 +- id: 135 + group_id: 239 + team_id: 15 + type: 7 + access_mode: 0 +- id: 136 + group_id: 239 + team_id: 15 + type: 8 + access_mode: 0 +- id: 137 + group_id: 239 + team_id: 15 + type: 9 + access_mode: 0 +- id: 138 + group_id: 239 + team_id: 15 + type: 10 + access_mode: 0 +- id: 139 + group_id: 239 + team_id: 15 + type: 1 + access_mode: 0 +- id: 140 + group_id: 239 + team_id: 15 + type: 6 + access_mode: 1 +- id: 141 + group_id: 241 + team_id: 19 + type: 1 + access_mode: 0 +- id: 142 + group_id: 241 + team_id: 19 + type: 6 + access_mode: 1 +- id: 143 + group_id: 241 + team_id: 19 + type: 8 + access_mode: 1 +- id: 144 + group_id: 241 + team_id: 19 + type: 9 + access_mode: 0 +- id: 145 + group_id: 241 + team_id: 19 + type: 10 + access_mode: 0 +- id: 146 + group_id: 241 + team_id: 19 + type: 2 + access_mode: 0 +- id: 147 + group_id: 241 + team_id: 19 + type: 7 + access_mode: 0 +- id: 148 + group_id: 241 + team_id: 19 + type: 3 + access_mode: 2 +- id: 149 + group_id: 241 + team_id: 19 + type: 4 + access_mode: 0 +- id: 150 + group_id: 241 + team_id: 19 + type: 5 + access_mode: 0 +- id: 151 + group_id: 241 + team_id: 20 + type: 9 + access_mode: 0 +- id: 152 + group_id: 241 + team_id: 20 + type: 10 + access_mode: 0 +- id: 153 + group_id: 241 + team_id: 20 + type: 1 + access_mode: 0 +- id: 154 + group_id: 241 + team_id: 20 + type: 6 + access_mode: 0 +- id: 155 + group_id: 241 + team_id: 20 + type: 8 + access_mode: 1 +- id: 156 + group_id: 241 + team_id: 20 + type: 4 + access_mode: 0 +- id: 157 + group_id: 241 + team_id: 20 + type: 5 + access_mode: 0 +- id: 158 + group_id: 241 + team_id: 20 + type: 2 + access_mode: 2 +- id: 159 + group_id: 241 + team_id: 20 + type: 7 + access_mode: 0 +- id: 160 + group_id: 241 + team_id: 20 + type: 3 + access_mode: 0 +- id: 161 + group_id: 280 + team_id: 4 + type: 9 + access_mode: 1 +- id: 162 + group_id: 280 + team_id: 4 + type: 10 + access_mode: 0 +- id: 163 + group_id: 280 + team_id: 4 + type: 1 + access_mode: 1 +- id: 164 + group_id: 280 + team_id: 4 + type: 6 + access_mode: 1 +- id: 165 + group_id: 280 + team_id: 4 + type: 8 + access_mode: 0 +- id: 166 + group_id: 280 + team_id: 4 + type: 4 + access_mode: 1 +- id: 167 + group_id: 280 + team_id: 4 + type: 5 + access_mode: 1 +- id: 168 + group_id: 280 + team_id: 4 + type: 2 + access_mode: 0 +- id: 169 + group_id: 280 + team_id: 4 + type: 7 + access_mode: 0 +- id: 170 + group_id: 280 + team_id: 4 + type: 3 + access_mode: 0 +- id: 171 + group_id: 312 + team_id: 5 + type: 5 + access_mode: 0 +- id: 172 + group_id: 312 + team_id: 5 + type: 2 + access_mode: 1 +- id: 173 + group_id: 312 + team_id: 5 + type: 7 + access_mode: 1 +- id: 174 + group_id: 312 + team_id: 5 + type: 3 + access_mode: 0 +- id: 175 + group_id: 312 + team_id: 5 + type: 4 + access_mode: 0 +- id: 176 + group_id: 312 + team_id: 5 + type: 10 + access_mode: 0 +- id: 177 + group_id: 312 + team_id: 5 + type: 1 + access_mode: 0 +- id: 178 + group_id: 312 + team_id: 5 + type: 6 + access_mode: 1 +- id: 179 + group_id: 312 + team_id: 5 + type: 8 + access_mode: 0 +- id: 180 + group_id: 312 + team_id: 5 + type: 9 + access_mode: 1 +- id: 181 + group_id: 312 + team_id: 8 + type: 1 + access_mode: 0 +- id: 182 + group_id: 312 + team_id: 8 + type: 6 + access_mode: 0 +- id: 183 + group_id: 312 + team_id: 8 + type: 8 + access_mode: 0 +- id: 184 + group_id: 312 + team_id: 8 + type: 9 + access_mode: 0 +- id: 185 + group_id: 312 + team_id: 8 + type: 10 + access_mode: 0 +- id: 186 + group_id: 312 + team_id: 8 + type: 2 + access_mode: 2 +- id: 187 + group_id: 312 + team_id: 8 + type: 7 + access_mode: 1 +- id: 188 + group_id: 312 + team_id: 8 + type: 3 + access_mode: 2 +- id: 189 + group_id: 312 + team_id: 8 + type: 4 + access_mode: 2 +- id: 190 + group_id: 312 + team_id: 8 + type: 5 + access_mode: 0 +- id: 191 + group_id: 312 + team_id: 9 + type: 5 + access_mode: 1 +- id: 192 + group_id: 312 + team_id: 9 + type: 2 + access_mode: 1 +- id: 193 + group_id: 312 + team_id: 9 + type: 7 + access_mode: 0 +- id: 194 + group_id: 312 + team_id: 9 + type: 3 + access_mode: 0 +- id: 195 + group_id: 312 + team_id: 9 + type: 4 + access_mode: 0 +- id: 196 + group_id: 312 + team_id: 9 + type: 10 + access_mode: 1 +- id: 197 + group_id: 312 + team_id: 9 + type: 1 + access_mode: 2 +- id: 198 + group_id: 312 + team_id: 9 + type: 6 + access_mode: 1 +- id: 199 + group_id: 312 + team_id: 9 + type: 8 + access_mode: 1 +- id: 200 + group_id: 312 + team_id: 9 + type: 9 + access_mode: 0 +- id: 201 + group_id: 360 + team_id: 16 + type: 8 + access_mode: 0 +- id: 202 + group_id: 360 + team_id: 16 + type: 9 + access_mode: 0 +- id: 203 + group_id: 360 + team_id: 16 + type: 10 + access_mode: 0 +- id: 204 + group_id: 360 + team_id: 16 + type: 1 + access_mode: 0 +- id: 205 + group_id: 360 + team_id: 16 + type: 6 + access_mode: 1 +- id: 206 + group_id: 360 + team_id: 16 + type: 3 + access_mode: 1 +- id: 207 + group_id: 360 + team_id: 16 + type: 4 + access_mode: 2 +- id: 208 + group_id: 360 + team_id: 16 + type: 5 + access_mode: 0 +- id: 209 + group_id: 360 + team_id: 16 + type: 2 + access_mode: 0 +- id: 210 + group_id: 360 + team_id: 16 + type: 7 + access_mode: 2 +- id: 211 + group_id: 360 + team_id: 17 + type: 1 + access_mode: 0 +- id: 212 + group_id: 360 + team_id: 17 + type: 6 + access_mode: 0 +- id: 213 + group_id: 360 + team_id: 17 + type: 8 + access_mode: 0 +- id: 214 + group_id: 360 + team_id: 17 + type: 9 + access_mode: 0 +- id: 215 + group_id: 360 + team_id: 17 + type: 10 + access_mode: 1 +- id: 216 + group_id: 360 + team_id: 17 + type: 2 + access_mode: 1 +- id: 217 + group_id: 360 + team_id: 17 + type: 7 + access_mode: 1 +- id: 218 + group_id: 360 + team_id: 17 + type: 3 + access_mode: 0 +- id: 219 + group_id: 360 + team_id: 17 + type: 4 + access_mode: 2 +- id: 220 + group_id: 360 + team_id: 17 + type: 5 + access_mode: 1 +- id: 221 + group_id: 376 + team_id: 18 + type: 2 + access_mode: 0 +- id: 222 + group_id: 376 + team_id: 18 + type: 7 + access_mode: 1 +- id: 223 + group_id: 376 + team_id: 18 + type: 3 + access_mode: 0 +- id: 224 + group_id: 376 + team_id: 18 + type: 4 + access_mode: 0 +- id: 225 + group_id: 376 + team_id: 18 + type: 5 + access_mode: 0 +- id: 226 + group_id: 376 + team_id: 18 + type: 1 + access_mode: 0 +- id: 227 + group_id: 376 + team_id: 18 + type: 6 + access_mode: 2 +- id: 228 + group_id: 376 + team_id: 18 + type: 8 + access_mode: 0 +- id: 229 + group_id: 376 + team_id: 18 + type: 9 + access_mode: 1 +- id: 230 + group_id: 376 + team_id: 18 + type: 10 + access_mode: 0 +- id: 231 + group_id: 376 + team_id: 24 + type: 6 + access_mode: 0 +- id: 232 + group_id: 376 + team_id: 24 + type: 8 + access_mode: 0 +- id: 233 + group_id: 376 + team_id: 24 + type: 9 + access_mode: 1 +- id: 234 + group_id: 376 + team_id: 24 + type: 10 + access_mode: 1 +- id: 235 + group_id: 376 + team_id: 24 + type: 1 + access_mode: 1 +- id: 236 + group_id: 376 + team_id: 24 + type: 7 + access_mode: 0 +- id: 237 + group_id: 376 + team_id: 24 + type: 3 + access_mode: 0 +- id: 238 + group_id: 376 + team_id: 24 + type: 4 + access_mode: 0 +- id: 239 + group_id: 376 + team_id: 24 + type: 5 + access_mode: 0 +- id: 240 + group_id: 376 + team_id: 24 + type: 2 + access_mode: 0 diff --git a/models/fixtures/repo_group.yml b/models/fixtures/repo_group.yml new file mode 100644 index 0000000000..2c1f09ff34 --- /dev/null +++ b/models/fixtures/repo_group.yml @@ -0,0 +1,12090 @@ +- id: 1 + owner_id: 25 + owner_name: org25 + lower_name: group 1 + name: group 1 + description: | + In his anyway it recently to horror. Company alas stream to the soon host. Out tensely to as spell his contrast. Today afterwards it board shower from are. Had hence whichever few alas man would. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install TomatoInexpensive + ''' + + \#\# Usage + '''python + result = tomatoinexpensive.perform("funny request") + print("tomatoinexpensive result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 1 +- id: 2 + owner_id: 25 + owner_name: org25 + lower_name: group 2 + name: group 2 + description: | + These then painting government when each myself. One afterwards friendly upstairs inquire ourselves onto. Brilliance yet union each soon ours sometimes. Group host she you my pout under. Videotape gee under those shall these you. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/TomatoConfusing/MotionlessBlender + ''' + + \#\# Usage + '''go + result \:= MotionlessBlender.execute("playful alert") + fmt.Println("motionlessblender result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 2 +- id: 3 + owner_id: 25 + owner_name: org25 + lower_name: group 3 + name: group 3 + description: | + Now while them elsewhere congregation accordingly it. Energy around gun promise fact spin utterly. Yours each occur week monthly quarterly anything. He elated theirs American them army brace. How indeed daily some of sharply nobody. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LegumeEnergetic264 + ''' + + \#\# Usage + '''javascript + const result = legumeenergetic264.process("funny request"); + console.log("legumeenergetic264 result\:", "success"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 1 + sort_order: 1 +- id: 4 + owner_id: 25 + owner_name: org25 + lower_name: group 4 + name: group 4 + description: | + First aha that these finally summation understanding. Their well quarterly posse rainbow dizzying upset. Where substantial victoriously wearily whose eek for. Either about anything Barbadian across about weekly. Several theirs how first monthly later due. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install MysteriousKangaroo99 + ''' + + \#\# Usage + '''javascript + const result = mysteriouskangaroo99.execute("playful alert"); + console.log("mysteriouskangaroo99 result\:", "terminated"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 3 +- id: 5 + owner_id: 25 + owner_name: org25 + lower_name: group 5 + name: group 5 + description: | + Ours either today lot generally tablet finally. Consequently I their little it sari some. Daily boldly yikes Indonesian ourselves the foot. Here could of same page mine include. Everything Chinese catalog through of mine because. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GorgeousRestaurant + ''' + + \#\# Usage + '''python + result = gorgeousrestaurant.handle("quirky message") + print("gorgeousrestaurant result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 1 + sort_order: 2 +- id: 6 + owner_id: 25 + owner_name: org25 + lower_name: group 6 + name: group 6 + description: | + His them Einsteinian this why give himself. To its ourselves nobody safely ouch suddenly. Tonight being bunch link us herself bevy. Had his gossip purely work most still. Later whatever galaxy yourself play ours day. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PagodaShakeer + ''' + + \#\# Usage + '''javascript + const result = pagodashakeer.run("funny request"); + console.log("pagodashakeer result\:", "completed"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 3 + sort_order: 1 +- id: 7 + owner_id: 25 + owner_name: org25 + lower_name: group 7 + name: group 7 + description: | + Head are instance daringly mango want of. That now inside tomorrow clump his eek. Annually well yikes what his Turkmen convert. I who must calm how exaltation before. Ourselves now instance man towards give where. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install YellowPainter524 + ''' + + \#\# Usage + '''javascript + const result = yellowpainter524.execute("funny request"); + console.log("yellowpainter524 result\:", "terminated"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 5 + sort_order: 1 +- id: 8 + owner_id: 25 + owner_name: org25 + lower_name: group 8 + name: group 8 + description: | + Then several out neither he cast yay. Yourselves where Diabolical your nobody brass nest. I how your from because what as. Meanwhile anger dazzle nightly range Shakespearean doctor. As including everybody been as near wrap. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ImportantGorilla7 + ''' + + \#\# Usage + '''javascript + const result = importantgorilla7.run("quirky message"); + console.log("importantgorilla7 result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 1 + sort_order: 3 +- id: 9 + owner_id: 25 + owner_name: org25 + lower_name: group 9 + name: group 9 + description: | + Here nearly did within sometimes inside patrol. Huh that hers mine key videotape her. He softly her muddy yearly london day. Secondly Pacific alas the here last Taiwanese. Its soon when yesterday band at metal. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install AdventurousChest1 + ''' + + \#\# Usage + '''python + result = adventurouschest1.execute("funny request") + print("adventurouschest1 result\:", "completed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 4 +- id: 10 + owner_id: 25 + owner_name: org25 + lower_name: group 10 + name: group 10 + description: | + Had first that that gee gee additionally. Within respond tonight my her ourselves today. Constantly how one German that clap dizzying. Through appear onto warmth this there not. Each everybody these up firstly unless has. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LemonModern24 + ''' + + \#\# Usage + '''javascript + const result = lemonmodern24.execute("funny request"); + console.log("lemonmodern24 result\:", "unknown"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 5 + sort_order: 2 +- id: 11 + owner_id: 25 + owner_name: org25 + lower_name: group 11 + name: group 11 + description: | + Batch firstly too will these depending them. Of onion father sometimes cackle sternly forest. Shall electricity himself as rarely way climb. Him up very game firstly adventurous huh. Finnish whereas growth before yesterday off behind. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/TaxiReader/OutrageousFarm264 + ''' + + \#\# Usage + '''go + result \:= OutrageousFarm264.execute("whimsical story") + fmt.Println("outrageousfarm264 result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 5 + sort_order: 3 +- id: 12 + owner_id: 25 + owner_name: org25 + lower_name: group 12 + name: group 12 + description: | + Of certain since my indoors how stand. Tonight yet by government goodness normally host. Pretty anthology of from some kiss yearly. Number him yikes myself for still shiny. Above shall pack its way some constantly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/DonkeyOpener836/CleverCrow + ''' + + \#\# Usage + '''go + result \:= CleverCrow.run("lighthearted command") + fmt.Println("clevercrow result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 11 + sort_order: 1 +- id: 13 + owner_id: 25 + owner_name: org25 + lower_name: group 13 + name: group 13 + description: | + Group at mine for whose why everybody. Along whose of which I bush rarely. Regularly mob certain wad everybody which to. How jump in deceit belong bread employment. These Indian electricity does that how all. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/GauvaRideer/DistinctCastle + ''' + + \#\# Usage + '''go + result \:= DistinctCastle.run("quirky message") + fmt.Println("distinctcastle result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 4 + sort_order: 1 +- id: 14 + owner_id: 25 + owner_name: org25 + lower_name: group 14 + name: group 14 + description: | + Each meanwhile hand joy love whoever weekly. Which yesterday of lastly furnish being me. Plant earlier few my finally had before. Unless monthly your gee begin by group. Fine in company French frequently give within. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install NeckShakeer0 + ''' + + \#\# Usage + '''python + result = neckshakeer0.run("playful alert") + print("neckshakeer0 result\:", "error") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 11 + sort_order: 2 +- id: 15 + owner_id: 25 + owner_name: org25 + lower_name: group 15 + name: group 15 + description: | + Who yours fight finally his dream back. I regularly follow annually that in bravo. Tibetan problem account regularly lag today scold. An wheat neither sing him anything hey. Had your each first nightly auspicious where. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install MelonImportant + ''' + + \#\# Usage + '''javascript + const result = melonimportant.handle("funny request"); + console.log("melonimportant result\:", "error"); + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 8 + sort_order: 1 +- id: 16 + owner_id: 25 + owner_name: org25 + lower_name: group 16 + name: group 16 + description: | + Near these almost she these without without. For listen of noise with conclude finally. Recklessly itself must highly we kill besides. Who mouse her realistic giraffe Gaussian racism. Pencil data some him hail then stand. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LycheeConfusing + ''' + + \#\# Usage + '''python + result = lycheeconfusing.handle("whimsical story") + print("lycheeconfusing result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 15 + sort_order: 1 +- id: 17 + owner_id: 25 + owner_name: org25 + lower_name: group 17 + name: group 17 + description: | + Under stand than designer hail their tough. Wisp being as yourselves labour he all. Salt ourselves government that off whose through. Constantly cautiously owing her then these hey. What in his including box those what. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install RedcurrantDull009 + ''' + + \#\# Usage + '''python + result = redcurrantdull009.handle("playful alert") + print("redcurrantdull009 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 12 + sort_order: 1 +- id: 18 + owner_id: 25 + owner_name: org25 + lower_name: group 18 + name: group 18 + description: | + Both these sternly how finally end by. Anyway from below next of filthy beautiful. How in annually eek to gently myself. Off but everything Thatcherite hedge notebook our. Nothing from than everything recently everybody problem. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install DisgustingMinnow + ''' + + \#\# Usage + '''javascript + const result = disgustingminnow.execute("whimsical story"); + console.log("disgustingminnow result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 2 + sort_order: 1 +- id: 19 + owner_id: 25 + owner_name: org25 + lower_name: group 19 + name: group 19 + description: | + Shall our American across fortnightly ourselves our. Brass in tomorrow itchy straightaway justice every. Summation then that someone that Chinese business. Someone has sink tonight packet inadequately than. That unless school how company busily other. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install DresserKisser + ''' + + \#\# Usage + '''python + result = dresserkisser.handle("quirky message") + print("dresserkisser result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 2 + sort_order: 2 +- id: 20 + owner_id: 25 + owner_name: org25 + lower_name: group 20 + name: group 20 + description: | + Result mob Jungian above nearly bunch there. His light answer last others vacate at. Sit those which tomorrow yearly here annually. Oops sand yearly drink are grammar secondly. Themselves lovely rather involve tomorrow tomorrow what. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WideShirt + ''' + + \#\# Usage + '''python + result = wideshirt.run("playful alert") + print("wideshirt result\:", "in progress") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 3 + sort_order: 2 +- id: 21 + owner_id: 25 + owner_name: org25 + lower_name: group 21 + name: group 21 + description: | + Often coat me fine huh covey completely. Ouch little whose as heart from theirs. His behind may sometimes could everything occasionally. Will us all whose along those munch. Few wow certain where where weight tonight. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/NectarineNice595/DelightfulWildebeest + ''' + + \#\# Usage + '''go + result \:= DelightfulWildebeest.perform("lighthearted command") + fmt.Println("delightfulwildebeest result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 14 + sort_order: 1 +- id: 22 + owner_id: 25 + owner_name: org25 + lower_name: group 22 + name: group 22 + description: | + Understimate her everything he modern nest without. At problem yearly loss my all determination. He there tonight us herself he life. His Peruvian thoroughly each next as what. Myself quarterly entirely which his my from. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SwimmingPoolEater27/CondemnedDinosaur + ''' + + \#\# Usage + '''go + result \:= CondemnedDinosaur.run("quirky message") + fmt.Println("condemneddinosaur result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 8 + sort_order: 2 +- id: 23 + owner_id: 25 + owner_name: org25 + lower_name: group 23 + name: group 23 + description: | + Shy I enough myself whose Pacific club. Company equally that you aloof fact generally. Next that lake why which liter other. Somebody buckles themselves in of many firstly. Murder off by absolutely wash town nobody. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install KangarooStacker + ''' + + \#\# Usage + '''python + result = kangaroostacker.process("playful alert") + print("kangaroostacker result\:", "unknown") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 9 + sort_order: 1 +- id: 24 + owner_id: 25 + owner_name: org25 + lower_name: group 24 + name: group 24 + description: | + Shall outside it of than yours these. So be next Mozartian a heavily brace. Yourself there paint hers tonight we pollution. Onto recline would red your hers anywhere. For near same anyone never appear fish. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GrumpyPrairieDog5 + ''' + + \#\# Usage + '''python + result = grumpyprairiedog5.execute("funny request") + print("grumpyprairiedog5 result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 22 + sort_order: 1 +- id: 25 + owner_id: 25 + owner_name: org25 + lower_name: group 25 + name: group 25 + description: | + Including frock where consist Senegalese virtually murder. Bother to its army till some by. Whose Shakespearean did might in her research. That mall murder normally stand Antarctic regularly. Door whoever instead each above secondly had. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CaneCrawler/ToughGrapes13 + ''' + + \#\# Usage + '''go + result \:= ToughGrapes13.handle("quirky message") + fmt.Println("toughgrapes13 result\:", "error") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 7 + sort_order: 1 +- id: 26 + owner_id: 25 + owner_name: org25 + lower_name: group 26 + name: group 26 + description: | + South nobody silence they from cloud transform. These these myself Einsteinian everyone someone therefore. Tribe beauty there sleep who what as. Congregation pack this out enlist monthly our. No lastly grip could hang our I. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PhysalisTense/PhysalisBusy383 + ''' + + \#\# Usage + '''go + result \:= PhysalisBusy383.perform("playful alert") + fmt.Println("physalisbusy383 result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 13 + sort_order: 1 +- id: 27 + owner_id: 25 + owner_name: org25 + lower_name: group 27 + name: group 27 + description: | + No little backwards just before your be. Bra off her should monthly wisdom why. African hmm gain who words itself oops. Fact obesity elsewhere flock these those he. Adorable hmm today insufficient horse generally behind. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PipeListener2 + ''' + + \#\# Usage + '''javascript + const result = pipelistener2.execute("lighthearted command"); + console.log("pipelistener2 result\:", "failed"); + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 2 + sort_order: 3 +- id: 28 + owner_id: 25 + owner_name: org25 + lower_name: group 28 + name: group 28 + description: | + Afterwards any some off meanwhile rapidly enough. By Greek now street sleepy up remove. Carry failure bread fairly troop his answer. A always life clap had why card. Sandals as hourly already deeply aha me. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PerfectCane + ''' + + \#\# Usage + '''python + result = perfectcane.execute("playful alert") + print("perfectcane result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 22 + sort_order: 2 +- id: 29 + owner_id: 25 + owner_name: org25 + lower_name: group 29 + name: group 29 + description: | + Wrack me off today class whose as. Of American theirs those since insert library. Anybody may from lastly quarterly that throughout. For unemployment are whose mob upstairs fortunately. What whom her tomorrow first few ours. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install EmbarrassedSheep + ''' + + \#\# Usage + '''python + result = embarrassedsheep.handle("lighthearted command") + print("embarrassedsheep result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 14 + sort_order: 2 +- id: 30 + owner_id: 25 + owner_name: org25 + lower_name: group 30 + name: group 30 + description: | + Cigarette part line first is few nightly. Where first none example him sock next. Confucian without those Kyrgyz seldom his that. They few us later moreover quarterly blushing. That Kyrgyz couch have am their spit. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WatermelonImpossible + ''' + + \#\# Usage + '''python + result = watermelonimpossible.run("quirky message") + print("watermelonimpossible result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 1 + sort_order: 4 +- id: 31 + owner_id: 26 + owner_name: org26 + lower_name: group 1 + name: group 1 + description: | + You whom bale where caravan veterinarian that. Weather then that for being outside disgusting. Mine she what party onto untie why. Another tomorrow what she previously him themselves. Monthly yet occasionally some him her daily. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install JoyousMonkey + ''' + + \#\# Usage + '''python + result = joyousmonkey.perform("playful alert") + print("joyousmonkey result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 5 +- id: 32 + owner_id: 26 + owner_name: org26 + lower_name: group 2 + name: group 2 + description: | + Drab which in occasionally apple congregation themselves. You an host from man he shall. To yourselves occasionally since monthly that power. We before late we your have obediently. His thing finally frequently joy dress end. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install KnightlyWoodchuck + ''' + + \#\# Usage + '''python + result = knightlywoodchuck.process("quirky message") + print("knightlywoodchuck result\:", "error") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 31 + sort_order: 1 +- id: 33 + owner_id: 26 + owner_name: org26 + lower_name: group 3 + name: group 3 + description: | + I after several when due remain in. Think any their these this with set. Then frequently sensibly hers hastily woman this. Elsewhere shower theirs above turkey safety horde. That with luxury this Kazakh that it. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/RedcurrantPowerless86/CurrantItchy + ''' + + \#\# Usage + '''go + result \:= CurrantItchy.handle("whimsical story") + fmt.Println("currantitchy result\:", "failed") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 31 + sort_order: 2 +- id: 34 + owner_id: 26 + owner_name: org26 + lower_name: group 4 + name: group 4 + description: | + Hmm key newspaper them rather for their. Cough formerly cut abundant huge back eek. Ourselves whom that your brace every monthly. Handle ours mine previously whenever few previously. Mustering into to I with off decidedly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install HungryToad + ''' + + \#\# Usage + '''javascript + const result = hungrytoad.perform("playful alert"); + console.log("hungrytoad result\:", "success"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 31 + sort_order: 3 +- id: 35 + owner_id: 26 + owner_name: org26 + lower_name: group 5 + name: group 5 + description: | + Whenever whose neither anxious generally this neither. Shall of somebody it party worrisome stack. Whichever these furthermore gladly group warmth might. Caravan chair those Barbadian theirs Nepalese knock. Tribe packet these he however those instance. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install GrapeEvil3 + ''' + + \#\# Usage + '''javascript + const result = grapeevil3.handle("funny request"); + console.log("grapeevil3 result\:", "in progress"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 6 +- id: 36 + owner_id: 26 + owner_name: org26 + lower_name: group 6 + name: group 6 + description: | + Inadequately electricity nervously monthly lucky these pair. Cravat these that hourly fortunately later these. For but Darwinian smile must patrol i.e.. Book bottle kuban how day the these. Nightly host phew judge he neither e.g.. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/DullImpala/KidLaugher + ''' + + \#\# Usage + '''go + result \:= KidLaugher.handle("funny request") + fmt.Println("kidlaugher result\:", "terminated") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 35 + sort_order: 1 +- id: 37 + owner_id: 26 + owner_name: org26 + lower_name: group 7 + name: group 7 + description: | + Nevertheless include somebody cooker that now petrify. Can desk down chest monthly which itself. Build virtually that inside everything recline ours. Archipelago regiment Monacan firstly weekly American troubling. They Colombian out what gee whomever neither. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GauvaClimber3 + ''' + + \#\# Usage + '''python + result = gauvaclimber3.handle("playful alert") + print("gauvaclimber3 result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 31 + sort_order: 4 +- id: 38 + owner_id: 26 + owner_name: org26 + lower_name: group 8 + name: group 8 + description: | + Fuel over in part an here he. All a Japanese terribly host why in. Formerly in were tribe it that his. May pouch next whisker whose elegance down. Might his since pronunciation stand really party. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ImportantDonkey + ''' + + \#\# Usage + '''javascript + const result = importantdonkey.perform("funny request"); + console.log("importantdonkey result\:", "failed"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 32 + sort_order: 1 +- id: 39 + owner_id: 26 + owner_name: org26 + lower_name: group 9 + name: group 9 + description: | + Barbadian it I monthly that down chair. These on at mine include who practically. Toothpaste whenever theirs mine wings that it. Today its hers though Sri-Lankan lastly important. Thing my cloud horde finally outcome can. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install JitteryModel + ''' + + \#\# Usage + '''javascript + const result = jitterymodel.execute("lighthearted command"); + console.log("jitterymodel result\:", "failed"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 35 + sort_order: 2 +- id: 40 + owner_id: 26 + owner_name: org26 + lower_name: group 10 + name: group 10 + description: | + Who joy an many generally rhythm time. Nobody alone whomever could where wash congregation. Joyously previously which nest where in woman. Week Congolese will has as full must. Additionally into us therefore whom tender also. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install DefiantNoise + ''' + + \#\# Usage + '''javascript + const result = defiantnoise.handle("funny request"); + console.log("defiantnoise result\:", "failed"); + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 7 +- id: 41 + owner_id: 26 + owner_name: org26 + lower_name: group 11 + name: group 11 + description: | + To seldom here look do you its. Education constantly backwards stack she these some. Which might besides tomorrow behind open indoors. Wow it alas phew careful is tonight. Gun information now did will garlic late. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/TerseTiger/PhysalisQuaint + ''' + + \#\# Usage + '''go + result \:= PhysalisQuaint.perform("playful alert") + fmt.Println("physalisquaint result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 34 + sort_order: 1 +- id: 42 + owner_id: 26 + owner_name: org26 + lower_name: group 12 + name: group 12 + description: | + Congregation it cook which accordingly wisp here. Nest painting staff none each weather it. Highly must bale do eye any hand. Might belong team stand including differs covey. Onion enough certain just nightly book very. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FaithfulCave + ''' + + \#\# Usage + '''python + result = faithfulcave.run("whimsical story") + print("faithfulcave result\:", "in progress") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 38 + sort_order: 1 +- id: 43 + owner_id: 26 + owner_name: org26 + lower_name: group 13 + name: group 13 + description: | + Sprint now now some some Cypriot instance. Far sorrow flock everyone meanwhile group we. Welsh peace frightening these relaxation recently most. I.e. one in either from them our. Him heap each life where about shower. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install RepulsivePotato + ''' + + \#\# Usage + '''javascript + const result = repulsivepotato.process("lighthearted command"); + console.log("repulsivepotato result\:", "terminated"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 31 + sort_order: 5 +- id: 44 + owner_id: 26 + owner_name: org26 + lower_name: group 14 + name: group 14 + description: | + Catch muddy above does yesterday many I. All her unless then other bunch shall. Is brace yearly seldom elsewhere throughout at. Monthly flock this as fortnightly just anything. Other ours scold quietly these for regularly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install EasyWildebeest + ''' + + \#\# Usage + '''javascript + const result = easywildebeest.run("funny request"); + console.log("easywildebeest result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 8 +- id: 45 + owner_id: 26 + owner_name: org26 + lower_name: group 15 + name: group 15 + description: | + Acknowledge away me there soon why for. Hmm as yesterday unless her they they. Corner car line smell toy where should. Differs so his gain ours colorful did. Painfully constantly for ouch few thing over. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/OutrageousDinosaur/BookstoreFighter + ''' + + \#\# Usage + '''go + result \:= BookstoreFighter.perform("playful alert") + fmt.Println("bookstorefighter result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 37 + sort_order: 1 +- id: 46 + owner_id: 26 + owner_name: org26 + lower_name: group 16 + name: group 16 + description: | + Am on out way into juice double. Foolishly Confucian time still next each outfit. Neither you most cut tickle then tightly. Him here have its you wow dig. Where several bless highly juicer whom his. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/MelonMuddy/AuntDiveer + ''' + + \#\# Usage + '''go + result \:= AuntDiveer.process("lighthearted command") + fmt.Println("auntdiveer result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 44 + sort_order: 1 +- id: 47 + owner_id: 26 + owner_name: org26 + lower_name: group 17 + name: group 17 + description: | + Whose boxers reel inside significant this thing. Away in finally finally yet my nearby. Hedge sandwich today our yours hurt edge. Far hourly theirs lastly therefore eat currency. Somebody work glamorous monthly accordingly him certain. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/RambutanDisgusting05/KiwiQueer + ''' + + \#\# Usage + '''go + result \:= KiwiQueer.handle("lighthearted command") + fmt.Println("kiwiqueer result\:", "success") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 36 + sort_order: 1 +- id: 48 + owner_id: 26 + owner_name: org26 + lower_name: group 18 + name: group 18 + description: | + Numerous could wisp when of you murder. Last normally crawl rudely seafood head lastly. The my slavery Pacific busily you his. Sometimes below lately poverty these deskpath on. Shoulder silently you live many great most. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PitayaHungry/DisgustingMango36 + ''' + + \#\# Usage + '''go + result \:= DisgustingMango36.perform("funny request") + fmt.Println("disgustingmango36 result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 37 + sort_order: 2 +- id: 49 + owner_id: 26 + owner_name: org26 + lower_name: group 19 + name: group 19 + description: | + Whose outcome for monthly widen of first. Previously yet we this in moreover on. Whom just fact tonight hourly up half. Joy Californian should bravely solemnly murder some. Rain your regularly in it read child. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install HilariousBrother + ''' + + \#\# Usage + '''javascript + const result = hilariousbrother.process("funny request"); + console.log("hilariousbrother result\:", "success"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 44 + sort_order: 2 +- id: 50 + owner_id: 26 + owner_name: org26 + lower_name: group 20 + name: group 20 + description: | + Hence cough flock troupe group nap ouch. Off tomorrow hourly sufficient which string any. Quiver auspicious mob inquisitively block tea why. Throughout leave that sometimes hers which drag. Tonight within anyway fade this bale those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/VastJuicer16/AnxiousWombat2 + ''' + + \#\# Usage + '''go + result \:= AnxiousWombat2.handle("funny request") + fmt.Println("anxiouswombat2 result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 31 + sort_order: 6 +- id: 51 + owner_id: 26 + owner_name: org26 + lower_name: group 21 + name: group 21 + description: | + Quarterly upon party pipe early ahead hers. Each e.g. sleep begin late those about. Mushy out today couple her then earlier. Me which this whoever these most fight. We that though weekly many Mozartian those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PlantThinker59 + ''' + + \#\# Usage + '''python + result = plantthinker59.handle("whimsical story") + print("plantthinker59 result\:", "unknown") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 38 + sort_order: 2 +- id: 52 + owner_id: 26 + owner_name: org26 + lower_name: group 22 + name: group 22 + description: | + Example mustering late now i.e. that with. These determination joyously cap weight when yourselves. One powerless that viplate always brace spotted. Tomorrow Putinist Peruvian work yet bill that. Hand which it they it fortnightly these. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install StupidChicken + ''' + + \#\# Usage + '''python + result = stupidchicken.execute("playful alert") + print("stupidchicken result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 48 + sort_order: 1 +- id: 53 + owner_id: 26 + owner_name: org26 + lower_name: group 23 + name: group 23 + description: | + Woman others board recognise today where me. Pod by juice car any pack would. Lastly whichever where his someone medicine consequently. Give between interest his will laugh ream. Last seldom album was to that also. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install EnchantedRabbit + ''' + + \#\# Usage + '''python + result = enchantedrabbit.process("quirky message") + print("enchantedrabbit result\:", "success") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 41 + sort_order: 1 +- id: 54 + owner_id: 26 + owner_name: org26 + lower_name: group 24 + name: group 24 + description: | + Magic e.g. almost frequently itself always who. Empty I stormy was these somebody heavily. Yesterday until these elephant Confucian though which. Whose here aha yay tired grip next. Everybody since pack covey us that which. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/RambutanCrowded/ShortsThrower12 + ''' + + \#\# Usage + '''go + result \:= ShortsThrower12.handle("playful alert") + fmt.Println("shortsthrower12 result\:", "error") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 42 + sort_order: 1 +- id: 55 + owner_id: 26 + owner_name: org26 + lower_name: group 25 + name: group 25 + description: | + Ride when any then begin thought where. Itself i.e. accordingly to example us yourselves. Us our whoever what me though flour. Team our rather rather in can write. Frail themselves cry Iraqi mine shoes lot. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ClumsyGnu055 + ''' + + \#\# Usage + '''python + result = clumsygnu055.process("quirky message") + print("clumsygnu055 result\:", "failed") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 53 + sort_order: 1 +- id: 56 + owner_id: 26 + owner_name: org26 + lower_name: group 26 + name: group 26 + description: | + Which ours Lebanese who set each consequently. Group flock huge beneath care hers to. Other party him madly together everything climb. Ream several pack nightly conclude to panda. Spoon his outside without little anyone their. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ArchitectSnoreer/CheerfulWombat276 + ''' + + \#\# Usage + '''go + result \:= CheerfulWombat276.perform("playful alert") + fmt.Println("cheerfulwombat276 result\:", "terminated") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 43 + sort_order: 1 +- id: 57 + owner_id: 26 + owner_name: org26 + lower_name: group 27 + name: group 27 + description: | + Anyone may annoyance away library whose Somali. That man grieving none which necklace that. Recline it now daughter nose luxuty to. Anxiously then what team tomorrow out wisp. Which in whose its pod eventually impossible. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FeijoaEasy + ''' + + \#\# Usage + '''python + result = feijoaeasy.process("funny request") + print("feijoaeasy result\:", "error") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 36 + sort_order: 2 +- id: 58 + owner_id: 26 + owner_name: org26 + lower_name: group 28 + name: group 28 + description: | + Conditioner her were as anxiously opposite e.g.. Pen eek nevertheless Dutch gather will itself. Soon anywhere arrow she this purely ever. Animal there your might patrol she less. Annually at think judge whose yourself their. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PencilClimber/RockMelonIll + ''' + + \#\# Usage + '''go + result \:= RockMelonIll.run("whimsical story") + fmt.Println("rockmelonill result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 54 + sort_order: 1 +- id: 59 + owner_id: 26 + owner_name: org26 + lower_name: group 29 + name: group 29 + description: | + Who yesterday what why repel building cheerfully. Today had you in to us yourselves. Yourselves she gang whoever e.g. nothing learn. Any where accordingly never even usually bunch. Hmm might childhood this regularly imitate those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install VillaWasher75 + ''' + + \#\# Usage + '''python + result = villawasher75.process("whimsical story") + print("villawasher75 result\:", "success") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 33 + sort_order: 1 +- id: 60 + owner_id: 26 + owner_name: org26 + lower_name: group 30 + name: group 30 + description: | + Talk outcome those badly next enough lastly. Towards sunshine to that whose abundant lately. Somebody he on pronunciation must yourself explode. We these whichever though regiment murder inside. Gee moreover whom thing patience there so. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install DefiantLeg + ''' + + \#\# Usage + '''python + result = defiantleg.perform("whimsical story") + print("defiantleg result\:", "failed") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 31 + sort_order: 7 +- id: 61 + owner_id: 41 + owner_name: org41 + lower_name: group 1 + name: group 1 + description: | + What avoid range range ourselves by enormously. About up should differs every number ankle. Several nest what what besides including jump. Tomorrow lastly then how monthly who east. Off another year upon scold those the. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install TelevisionCooker + ''' + + \#\# Usage + '''python + result = televisioncooker.execute("funny request") + print("televisioncooker result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 9 +- id: 62 + owner_id: 41 + owner_name: org41 + lower_name: group 2 + name: group 2 + description: | + On I did do there how in. Differs this heap there Einsteinian far within. Half off open instance then stealthily here. What they straight me instance where no. Trip upstairs purely handsome catalog moreover link. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ApricotObnoxious812/CheerfulVeterinarian35 + ''' + + \#\# Usage + '''go + result \:= CheerfulVeterinarian35.perform("playful alert") + fmt.Println("cheerfulveterinarian35 result\:", "failed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 61 + sort_order: 1 +- id: 63 + owner_id: 41 + owner_name: org41 + lower_name: group 3 + name: group 3 + description: | + Will scarcely provided finally his ever is. German child are school i.e. am from. Here week how day never day smell. On something been wit varied themselves outside. Outside then virtually few crib indeed full. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/MusicCuter07/StormyTomato + ''' + + \#\# Usage + '''go + result \:= StormyTomato.run("whimsical story") + fmt.Println("stormytomato result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 10 +- id: 64 + owner_id: 41 + owner_name: org41 + lower_name: group 4 + name: group 4 + description: | + Contrast harvest of his nightly vacate climb. English talk you behind leave that firstly. Result in us above is tomorrow hug. Why videotape cackle near through quarterly daughter. Company yesterday you sharply sometimes in which. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SoreCane1 + ''' + + \#\# Usage + '''python + result = sorecane1.process("quirky message") + print("sorecane1 result\:", "success") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 11 +- id: 65 + owner_id: 41 + owner_name: org41 + lower_name: group 5 + name: group 5 + description: | + Walk fact sleep shall quite pollution besides. Week whose either kindness earlier yet few. Lately how stress may just up stand. Troop airport there that herself cloud himself. Team of Atlantic tomorrow Dutch everyone conclude. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install HoneydewArrogant + ''' + + \#\# Usage + '''python + result = honeydewarrogant.handle("lighthearted command") + print("honeydewarrogant result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 64 + sort_order: 1 +- id: 66 + owner_id: 41 + owner_name: org41 + lower_name: group 6 + name: group 6 + description: | + I.e. i.e. battle comb here other most. We on faithfully anything him innocently hers. Fatally itself how body those were occasionally. Tie who hers person gun that fiction. Those whose to yay rarely that orange. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/DateHappy413/ToyDiger6 + ''' + + \#\# Usage + '''go + result \:= ToyDiger6.perform("lighthearted command") + fmt.Println("toydiger6 result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 63 + sort_order: 1 +- id: 67 + owner_id: 41 + owner_name: org41 + lower_name: group 7 + name: group 7 + description: | + When powerless Senegalese how hundreds sleep whom. Why we since does finally week hence. Fact how me theirs hourly to freedom. His single murder that Finnish estate ourselves. Therefore occasionally whichever hmm they about horror. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ElatedNewspaper + ''' + + \#\# Usage + '''javascript + const result = elatednewspaper.execute("funny request"); + console.log("elatednewspaper result\:", "in progress"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 66 + sort_order: 1 +- id: 68 + owner_id: 41 + owner_name: org41 + lower_name: group 8 + name: group 8 + description: | + One those this our will substantial upon. Agree our bird finally obediently there violently. Mine drink example it since hey what. Nobody yet father any conclude eek daily. Group of mourn had additionally then conclude. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FrighteningServal874 + ''' + + \#\# Usage + '''python + result = frighteningserval874.process("whimsical story") + print("frighteningserval874 result\:", "failed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 63 + sort_order: 2 +- id: 69 + owner_id: 41 + owner_name: org41 + lower_name: group 9 + name: group 9 + description: | + Troupe tomorrow regularly why without videotape case. Our gold truthfully that infrequently bow look. Other thing circumstances where example mustering watch. Whom world how down finally case their. Group murder reassure sprint we this earlier. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/WatermelonDelightful/GlassesCryer983 + ''' + + \#\# Usage + '''go + result \:= GlassesCryer983.handle("lighthearted command") + fmt.Println("glassescryer983 result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 62 + sort_order: 1 +- id: 70 + owner_id: 41 + owner_name: org41 + lower_name: group 10 + name: group 10 + description: | + Research publicity climb that eek about muster. Air everyone is yourselves tonight monthly fact. Somebody holiday few that Afghan later his. Read chicken flock dynasty life before opposite. Ring what Philippine then mine many brother. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install BlackcurrantRed83 + ''' + + \#\# Usage + '''python + result = blackcurrantred83.handle("whimsical story") + print("blackcurrantred83 result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 61 + sort_order: 2 +- id: 71 + owner_id: 41 + owner_name: org41 + lower_name: group 11 + name: group 11 + description: | + Mysteriously anybody up weekly them album pray. Laugh that red to transform whirl a. Nothing whoa poised pack in what because. Greatly whose hail formerly trend today open. Pasta week its them eye some these. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HilariousGorilla/ClementineMysterious + ''' + + \#\# Usage + '''go + result \:= ClementineMysterious.perform("funny request") + fmt.Println("clementinemysterious result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 64 + sort_order: 2 +- id: 72 + owner_id: 41 + owner_name: org41 + lower_name: group 12 + name: group 12 + description: | + Would up theirs how fine me when. Gallop who those anxiously whatever ski conclude. Troupe fall you vanish vanish number moreover. Over some cost are am yikes another. Wildly you select therefore host yours cast. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FineSheep679 + ''' + + \#\# Usage + '''python + result = finesheep679.execute("funny request") + print("finesheep679 result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 68 + sort_order: 1 +- id: 73 + owner_id: 41 + owner_name: org41 + lower_name: group 13 + name: group 13 + description: | + Monthly greatly next inexpensive whomever what I. Within company whose his what yet deceive. All whichever at hourly there my your. Weekly her one us anyone deliberately luxury. Huge on all line outfit conclude as. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HostOpener/LemonyGasStation + ''' + + \#\# Usage + '''go + result \:= LemonyGasStation.handle("lighthearted command") + fmt.Println("lemonygasstation result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 67 + sort_order: 1 +- id: 74 + owner_id: 41 + owner_name: org41 + lower_name: group 14 + name: group 14 + description: | + Yours you fine late me viplate eat. Since these then no delightful today lately. Economics her himself Belgian I then themselves. Way execute must roughly aha anybody most. Flock gracefully all sometimes throughout bookstore hence. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install OnionCuter + ''' + + \#\# Usage + '''javascript + const result = onioncuter.perform("lighthearted command"); + console.log("onioncuter result\:", "failed"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 70 + sort_order: 1 +- id: 75 + owner_id: 41 + owner_name: org41 + lower_name: group 15 + name: group 15 + description: | + Several day woman being limp fleet this. Are intensely honour Turkish him happiness of. Quarterly someone that which as recently alone. Myself today besides few hers marriage insufficient. How near us sedge a since speedily. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SkirtDreamer/OrangeSweater + ''' + + \#\# Usage + '''go + result \:= OrangeSweater.perform("playful alert") + fmt.Println("orangesweater result\:", "finished") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 73 + sort_order: 1 +- id: 76 + owner_id: 41 + owner_name: org41 + lower_name: group 16 + name: group 16 + description: | + Promise no grieving reel its yay besides. Lately slide that of in mob several. It with yet ball bill so what. This anyway whom week anybody hmm firstly. Upstairs how constantly whoever will happiness pleasure. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ElephantClimber0/PhysalisWitty + ''' + + \#\# Usage + '''go + result \:= PhysalisWitty.process("lighthearted command") + fmt.Println("physaliswitty result\:", "failed") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 63 + sort_order: 3 +- id: 77 + owner_id: 41 + owner_name: org41 + lower_name: group 17 + name: group 17 + description: | + Yet for whose are Christian yikes as. The swing from in without firstly i.e.. Stay fortnightly Christian of yourselves murder one. Patrol regularly Iranian wisp whose just fortnightly. Straightaway frankly being wad her what vanish. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GrievingTiger + ''' + + \#\# Usage + '''python + result = grievingtiger.perform("whimsical story") + print("grievingtiger result\:", "success") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 62 + sort_order: 2 +- id: 78 + owner_id: 41 + owner_name: org41 + lower_name: group 18 + name: group 18 + description: | + My joy extremely spelling had yours other. Little boat they occasionally these whom string. Shampoo glorious after innocently one none thing. Yours those think vanish an he my. Outside thing paint fact daily that cry. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SmilingSalt985 + ''' + + \#\# Usage + '''python + result = smilingsalt985.process("quirky message") + print("smilingsalt985 result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 70 + sort_order: 2 +- id: 79 + owner_id: 41 + owner_name: org41 + lower_name: group 19 + name: group 19 + description: | + Foolishly leap cheerful without most by orchard. Kindness their my themselves tonight myself in. Accordingly you be sometimes backwards thankful whichever. Cast boy recently impress i.e. say outside. Annually finally elsewhere woman ouch cackle both. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/HoneydewKnightly/UnusualShirt + ''' + + \#\# Usage + '''go + result \:= UnusualShirt.execute("lighthearted command") + fmt.Println("unusualshirt result\:", "in progress") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 64 + sort_order: 3 +- id: 80 + owner_id: 41 + owner_name: org41 + lower_name: group 20 + name: group 20 + description: | + Purse later he daily really place hat. Solitude where am now next little outcome. Theirs one without whatever that thoroughly yikes. Attractive down change firstly fortnightly while its. Supermarket somebody stand these clump me be. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CabinBatheer/ImportantCod4 + ''' + + \#\# Usage + '''go + result \:= ImportantCod4.execute("lighthearted command") + fmt.Println("importantcod4 result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 61 + sort_order: 3 +- id: 81 + owner_id: 41 + owner_name: org41 + lower_name: group 21 + name: group 21 + description: | + Under himself there itself usually fortnightly that. Were yesterday those contradict country number move. Must galaxy herself Nepalese pod my lie. Bale hand our the pose secondly exemplified. Well who ever that some eek lastly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BlushingWasp + ''' + + \#\# Usage + '''javascript + const result = blushingwasp.process("quirky message"); + console.log("blushingwasp result\:", "finished"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 73 + sort_order: 2 +- id: 82 + owner_id: 41 + owner_name: org41 + lower_name: group 22 + name: group 22 + description: | + Clothing shall American crowd so write previously. Why upon hmm far troupe down from. Nest late enormously party from exaltation reel. As must child many someone eek therefore. Ouch much while there chapter first each. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install KumquatDrab97 + ''' + + \#\# Usage + '''javascript + const result = kumquatdrab97.run("playful alert"); + console.log("kumquatdrab97 result\:", "completed"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 69 + sort_order: 1 +- id: 83 + owner_id: 41 + owner_name: org41 + lower_name: group 23 + name: group 23 + description: | + What from covey this themselves tweak stealthily. Kind those thing him summation remain easily. Gee whom away so happy group tomorrow. Book us finally them an next that. As ours your fascinate party cough is. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/WickedRaven116/SariBatheer + ''' + + \#\# Usage + '''go + result \:= SariBatheer.perform("lighthearted command") + fmt.Println("saribatheer result\:", "terminated") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 73 + sort_order: 3 +- id: 84 + owner_id: 41 + owner_name: org41 + lower_name: group 24 + name: group 24 + description: | + Tonight one above quarterly his yikes die. Down cautiously formerly company one purely cooker. Watch life were smoke I is highlight. Example spoon were team Mexican up normally. Yours after well inside previously other width. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/EvilViolin7/WickedFox + ''' + + \#\# Usage + '''go + result \:= WickedFox.execute("playful alert") + fmt.Println("wickedfox result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 76 + sort_order: 1 +- id: 85 + owner_id: 41 + owner_name: org41 + lower_name: group 25 + name: group 25 + description: | + Hey these upset everyone watch Honduran my. Evil do its week sadly company Swazi. Near doubtfully enough up additionally since salt. Purely away yours so though inside incredibly. Lonely himself deeply one enough may deceit. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FrailLizard + ''' + + \#\# Usage + '''python + result = fraillizard.handle("lighthearted command") + print("fraillizard result\:", "finished") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 80 + sort_order: 1 +- id: 86 + owner_id: 41 + owner_name: org41 + lower_name: group 26 + name: group 26 + description: | + Though lively hourly pencil why stemmed yourselves. Clap sew where yoga whichever besides himself. I.e. of this positively her may e.g.. Many either few when between which shower. Which how it warm light jumper where. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install AuspiciousAlligator09 + ''' + + \#\# Usage + '''javascript + const result = auspiciousalligator09.handle("playful alert"); + console.log("auspiciousalligator09 result\:", "finished"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 84 + sort_order: 1 +- id: 87 + owner_id: 41 + owner_name: org41 + lower_name: group 27 + name: group 27 + description: | + Her clump swiftly by out being theirs. Everybody all may his that him that. Normally in troop normally regularly this generally. Me yikes one this under his offend. Tomorrow blushing kiss hmm when widen speed. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/PleasantHead818/GrapesRideer975 + ''' + + \#\# Usage + '''go + result \:= GrapesRideer975.handle("whimsical story") + fmt.Println("grapesrideer975 result\:", "in progress") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 74 + sort_order: 1 +- id: 88 + owner_id: 41 + owner_name: org41 + lower_name: group 28 + name: group 28 + description: | + Happen enormously about hence next this theirs. Practically straightaway fortnightly let for why favor. Hungrily once which owing this air you. Envy intelligence that play ski yay in. Collection stand swallow him puzzle besides this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CandyWatcher60/StrawberryDiveer214 + ''' + + \#\# Usage + '''go + result \:= StrawberryDiveer214.perform("quirky message") + fmt.Println("strawberrydiveer214 result\:", "failed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 78 + sort_order: 1 +- id: 89 + owner_id: 41 + owner_name: org41 + lower_name: group 29 + name: group 29 + description: | + He arrive you being his themselves their. One widen often up none thought hair. Album hers sigh exaltation hand had secondly. Despite yourselves software indeed perfectly wander nightly. Bowl there fairly lastly unless hmm daily. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/SonDrinker/ShinyGorilla + ''' + + \#\# Usage + '''go + result \:= ShinyGorilla.execute("quirky message") + fmt.Println("shinygorilla result\:", "success") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 83 + sort_order: 1 +- id: 90 + owner_id: 41 + owner_name: org41 + lower_name: group 30 + name: group 30 + description: | + Tensely adorable chapter at first eat it. Occasionally blouse shower hilarious then yours into. With incredibly they through some some were. Theirs loneliness for hail in should both. Besides year did since them horse those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/IllCrab8/DeskDreamer + ''' + + \#\# Usage + '''go + result \:= DeskDreamer.handle("playful alert") + fmt.Println("deskdreamer result\:", "error") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 85 + sort_order: 1 +- id: 91 + owner_id: 42 + owner_name: org42 + lower_name: group 1 + name: group 1 + description: | + Beneath consequently fly whole however cash another. Whose up shake mob why with of. For whose yesterday therefore of beyond onto. Up tonight weekly thoroughly move last before. Our his so anyone his clock trip. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/AgreeableFilm/BlueberryTame + ''' + + \#\# Usage + '''go + result \:= BlueberryTame.process("funny request") + fmt.Println("blueberrytame result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 12 +- id: 92 + owner_id: 42 + owner_name: org42 + lower_name: group 2 + name: group 2 + description: | + Heap our most this lastly did everything. Though other fortnightly unemployment crew nobody fact. Many enough those it who did cook. Outside Mozartian child aha whom many sorrow. Eventually equally her she realistic terribly out. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LingeringKangaroo60 + ''' + + \#\# Usage + '''python + result = lingeringkangaroo60.handle("playful alert") + print("lingeringkangaroo60 result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 91 + sort_order: 1 +- id: 93 + owner_id: 42 + owner_name: org42 + lower_name: group 3 + name: group 3 + description: | + In up whichever be which enough of. Instance tonight whose pray quarterly numerous woman. Grapes library your beans whereas elsewhere yesterday. Eek hatred here murder couple of beneath. Cap even could smoothly in of who. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ScaryWaterMelon + ''' + + \#\# Usage + '''javascript + const result = scarywatermelon.execute("lighthearted command"); + console.log("scarywatermelon result\:", "finished"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 13 +- id: 94 + owner_id: 42 + owner_name: org42 + lower_name: group 4 + name: group 4 + description: | + Wad regiment these whose between it for. Shall they them hurriedly cry today instance. In on mysteriously besides meanwhile could instance. Truthfully Pacific due peace down head African. On posse his without that mob knowledge. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ScenicMicroscope + ''' + + \#\# Usage + '''python + result = scenicmicroscope.handle("lighthearted command") + print("scenicmicroscope result\:", "error") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 92 + sort_order: 1 +- id: 95 + owner_id: 42 + owner_name: org42 + lower_name: group 5 + name: group 5 + description: | + Usually weekly nothing formerly to group firstly. Mine that significant in themselves herself this. Her out tomorrow truthfully sometimes team however. Government I these next others respect yourselves. Respect handle as other otherwise cat this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install GrapeGrieving + ''' + + \#\# Usage + '''javascript + const result = grapegrieving.run("whimsical story"); + console.log("grapegrieving result\:", "failed"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 92 + sort_order: 2 +- id: 96 + owner_id: 42 + owner_name: org42 + lower_name: group 6 + name: group 6 + description: | + According infrequently that from each it day. Hmm early one despite pig instance does. Leap extremely highly someone every hmm order. Had Californian jealous these hourly elsewhere Congolese. Patience pod must besides win finally yours. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install UninterestedGuineaPig + ''' + + \#\# Usage + '''python + result = uninterestedguineapig.execute("funny request") + print("uninterestedguineapig result\:", "in progress") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 92 + sort_order: 3 +- id: 97 + owner_id: 42 + owner_name: org42 + lower_name: group 7 + name: group 7 + description: | + Whom friendly hilarious that those he tomorrow. Lastly anywhere additionally knightly range besides sorrow. Hug tonight patrol over butter his far. Yesterday because far trip party outside gallop. Solitude its fact ouch so quantity about. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/VastTiger/CherryBright + ''' + + \#\# Usage + '''go + result \:= CherryBright.execute("lighthearted command") + fmt.Println("cherrybright result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 91 + sort_order: 2 +- id: 98 + owner_id: 42 + owner_name: org42 + lower_name: group 8 + name: group 8 + description: | + Bit himself to into his whoa up. That for did hardly yesterday cautiously woman. He whom ours yourselves was your my. Those neither here cloud near sedge for. At laughter conclude instance me yourself wisp. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ThankfulGrandfather + ''' + + \#\# Usage + '''python + result = thankfulgrandfather.process("playful alert") + print("thankfulgrandfather result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 95 + sort_order: 1 +- id: 99 + owner_id: 42 + owner_name: org42 + lower_name: group 9 + name: group 9 + description: | + Weekly several nest that these indeed that. Often did her hey chest whose rudely. Generously as here business most oil snarl. Somebody Gabonese mysteriously should this regularly over. Protect in yours herself which silently why. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install FantasticShip + ''' + + \#\# Usage + '''javascript + const result = fantasticship.perform("quirky message"); + console.log("fantasticship result\:", "terminated"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 93 + sort_order: 1 +- id: 100 + owner_id: 42 + owner_name: org42 + lower_name: group 10 + name: group 10 + description: | + Government stand that her oops congregation secondly. Somewhat week grade of clean rarely they. Hilarious who each east must those already. May its whole full heavily alas sandwich. Yet within myself the one that who. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/UptightGinger/LungPainter + ''' + + \#\# Usage + '''go + result \:= LungPainter.process("playful alert") + fmt.Println("lungpainter result\:", "terminated") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 14 +- id: 101 + owner_id: 42 + owner_name: org42 + lower_name: group 11 + name: group 11 + description: | + Does yet Cambodian from fortnightly cackle conclude. Upon up regiment will those off hourly. Therefore happiness what words brave engine though. These fruit today little Alaskan here along. Wisp straightaway did are effect case its. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FranticCar + ''' + + \#\# Usage + '''python + result = franticcar.perform("playful alert") + print("franticcar result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 98 + sort_order: 1 +- id: 102 + owner_id: 42 + owner_name: org42 + lower_name: group 12 + name: group 12 + description: | + Early which shower hmm of mob what. Besides us in lastly shower regularly itself. Walk behind tie splendid when since be. Seldom little out your alas nearby hail. Almost Egyptian they couple cloud lie elegantly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PitayaHomeless + ''' + + \#\# Usage + '''python + result = pitayahomeless.run("quirky message") + print("pitayahomeless result\:", "failed") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 97 + sort_order: 1 +- id: 103 + owner_id: 42 + owner_name: org42 + lower_name: group 13 + name: group 13 + description: | + Melt which exemplified extremely still sister these. Turkmen i.e. at next before cat join. Belong whom grieving cackle say this why. Yet laughter soak apartment anyway therefore muster. Close way nightly now involve her us. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PenWriteer + ''' + + \#\# Usage + '''javascript + const result = penwriteer.execute("whimsical story"); + console.log("penwriteer result\:", "in progress"); + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 98 + sort_order: 2 +- id: 104 + owner_id: 42 + owner_name: org42 + lower_name: group 14 + name: group 14 + description: | + Laugh those Amazonian whichever near whenever through. Fortnightly motor earlier eventually out lately tonight. Fact heat sedge many friendship recently goodness. A than far alternatively neck without of. Yourself it carrot since nightly none what. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TerseSalmon + ''' + + \#\# Usage + '''javascript + const result = tersesalmon.process("funny request"); + console.log("tersesalmon result\:", "finished"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 92 + sort_order: 4 +- id: 105 + owner_id: 42 + owner_name: org42 + lower_name: group 15 + name: group 15 + description: | + Japanese themselves want highly to lastly your. To late where their Antarctic numerous alas. Love book she hair previously anger moment. Off music group one did this why. All everything above education down tonight snowman. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/EmbarrassedCamel452/DonkeyCryer + ''' + + \#\# Usage + '''go + result \:= DonkeyCryer.run("funny request") + fmt.Println("donkeycryer result\:", "finished") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 91 + sort_order: 3 +- id: 106 + owner_id: 42 + owner_name: org42 + lower_name: group 16 + name: group 16 + description: | + Hey soon them accordingly nothing powerless fortunately. That smell whose timing whoa still drag. Irritably what from absolutely caravan lastly whichever. Highly today furnish of her farm generously. One tribe regiment had regularly often yourselves. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install FeijoaTame12 + ''' + + \#\# Usage + '''javascript + const result = feijoatame12.process("funny request"); + console.log("feijoatame12 result\:", "terminated"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 95 + sort_order: 2 +- id: 107 + owner_id: 42 + owner_name: org42 + lower_name: group 17 + name: group 17 + description: | + Him away troupe next yikes they Slovak. You those next yourselves sleep Cambodian which. With one all lazily whoever nightly team. Sit were that with example nothing yearly. What now several politely otherwise for perfect. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SmoggySardine/ElderberryTired + ''' + + \#\# Usage + '''go + result \:= ElderberryTired.handle("funny request") + fmt.Println("elderberrytired result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 96 + sort_order: 1 +- id: 108 + owner_id: 42 + owner_name: org42 + lower_name: group 18 + name: group 18 + description: | + Eye because for as occasionally how these. In our himself bravo some quarterly nevertheless. May shall theirs him select there yesterday. Yesterday which i.e. its today persuade egg. Usually our that caravan why should of. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install WildBlack19 + ''' + + \#\# Usage + '''javascript + const result = wildblack19.handle("lighthearted command"); + console.log("wildblack19 result\:", "failed"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 100 + sort_order: 1 +- id: 109 + owner_id: 42 + owner_name: org42 + lower_name: group 19 + name: group 19 + description: | + Bale fortnightly there than whom which alas. Being hurt it leap that by this. Yourself band since whose party few even. Flock behind then to her trade whoa. Regularly where hers at transform snow onion. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ZooStacker + ''' + + \#\# Usage + '''python + result = zoostacker.execute("playful alert") + print("zoostacker result\:", "error") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 100 + sort_order: 2 +- id: 110 + owner_id: 42 + owner_name: org42 + lower_name: group 20 + name: group 20 + description: | + Edify annually still agree any example yesterday. Ourselves has whenever teen ship she on. Ourselves few is intensely herself case how. Yay pair goodness tonight it conclude recently. Outside several one every consequently were spin. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/RaisinTerrible/KumquatHealthy1 + ''' + + \#\# Usage + '''go + result \:= KumquatHealthy1.handle("whimsical story") + fmt.Println("kumquathealthy1 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 107 + sort_order: 1 +- id: 111 + owner_id: 42 + owner_name: org42 + lower_name: group 21 + name: group 21 + description: | + How socks it galaxy few e.g. above. Besides lead other whomever still shall hey. Due its mustering ours quarterly upon whom. Out cackle I yearly everybody today you. Some hotel while bundle catalog entirely boy. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install BananaDelightful6 + ''' + + \#\# Usage + '''python + result = bananadelightful6.handle("quirky message") + print("bananadelightful6 result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 110 + sort_order: 1 +- id: 112 + owner_id: 42 + owner_name: org42 + lower_name: group 22 + name: group 22 + description: | + Extremely poorly yikes of it me frightening. For straightaway next Freudian school care on. As chaise before green fight toy quarterly. Been business hungrily why fortnightly time about. Besides sprint ring fortunately for later thought. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install GrapefruitBad + ''' + + \#\# Usage + '''javascript + const result = grapefruitbad.execute("playful alert"); + console.log("grapefruitbad result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 97 + sort_order: 2 +- id: 113 + owner_id: 42 + owner_name: org42 + lower_name: group 23 + name: group 23 + description: | + Somebody therefore our you its me those. Last e.g. murder by by problem annually. Shakespearean stairs example here tame watch to. That instead monthly finally faithfully body collection. Read Atlantic eek correctly week company badly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BackThrower + ''' + + \#\# Usage + '''javascript + const result = backthrower.process("playful alert"); + console.log("backthrower result\:", "unknown"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 107 + sort_order: 2 +- id: 114 + owner_id: 42 + owner_name: org42 + lower_name: group 24 + name: group 24 + description: | + None squeak pod heavily additionally whichever relax. Year my team this does infancy for. Bravo outcome most to insufficient case oil. Army work skip painfully virtually congregation someone. None everybody my otherwise i.e. its scary. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install BoxersWaiter + ''' + + \#\# Usage + '''python + result = boxerswaiter.process("lighthearted command") + print("boxerswaiter result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 109 + sort_order: 1 +- id: 115 + owner_id: 42 + owner_name: org42 + lower_name: group 25 + name: group 25 + description: | + Empty lie why gee others at galaxy. Back woman that its previously time why. Courageously daily finally calm today aside air. Whose Buddhist transportation constantly conclude yet case. Moreover admit leave highlight murder would permission. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install InexpensiveSquirrel + ''' + + \#\# Usage + '''python + result = inexpensivesquirrel.run("funny request") + print("inexpensivesquirrel result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 95 + sort_order: 3 +- id: 116 + owner_id: 42 + owner_name: org42 + lower_name: group 26 + name: group 26 + description: | + How next anyway hospitality daily when then. Potato before enthusiastically have us when rather. Up yay have you anything blue sheaf. Had whereas each other enough consequently hurriedly. Ouch here pain weekly seafood deliberately weekly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install VictoriousApe + ''' + + \#\# Usage + '''python + result = victoriousape.run("quirky message") + print("victoriousape result\:", "unknown") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 111 + sort_order: 1 +- id: 117 + owner_id: 42 + owner_name: org42 + lower_name: group 27 + name: group 27 + description: | + Seldom that crawl up already back girl. Annually hug company as camp yet our. That gun behind frankly everybody those himself. Lots troop divorce do that weekly i.e.. Rather move shyly monthly swim before on. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install OpenCrocodile71 + ''' + + \#\# Usage + '''javascript + const result = opencrocodile71.handle("quirky message"); + console.log("opencrocodile71 result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 106 + sort_order: 1 +- id: 118 + owner_id: 42 + owner_name: org42 + lower_name: group 28 + name: group 28 + description: | + Cypriot still specify first an so regiment. Quarterly selfish ours Rooseveltian somebody he permission. Have shall punctually Viennese I in scenic. With why several earrings this off yet. Why something you lots it far where. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PlumThankful + ''' + + \#\# Usage + '''javascript + const result = plumthankful.handle("playful alert"); + console.log("plumthankful result\:", "completed"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 91 + sort_order: 4 +- id: 119 + owner_id: 42 + owner_name: org42 + lower_name: group 29 + name: group 29 + description: | + Why play be this firstly few seldom. Which because should before some so yet. Hmm Hindu of finally besides you simply. Torontonian yourselves really does since shall besides. Yesterday muster in care purely she far. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/WittyBread/FranticDaughter46 + ''' + + \#\# Usage + '''go + result \:= FranticDaughter46.perform("lighthearted command") + fmt.Println("franticdaughter46 result\:", "in progress") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 95 + sort_order: 4 +- id: 120 + owner_id: 42 + owner_name: org42 + lower_name: group 30 + name: group 30 + description: | + Twist lastly promise unless nest that along. Those candy smell next library yesterday next. So where under it fear horde his. Fondly might slippers everybody silence often straight. Calm simply its say fight yesterday was. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ZooDanceer + ''' + + \#\# Usage + '''javascript + const result = zoodanceer.process("lighthearted command"); + console.log("zoodanceer result\:", "success"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 95 + sort_order: 5 +- id: 121 + owner_id: 3 + owner_name: org3 + lower_name: group 1 + name: group 1 + description: | + Yourself to none alas by it should. Few how there few can was ourselves. Example Rooseveltian noisily to time the yours. Ride somebody monthly Lincolnian from who out. It how her everybody hail you yourselves. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LampSkier19 + ''' + + \#\# Usage + '''javascript + const result = lampskier19.handle("funny request"); + console.log("lampskier19 result\:", "completed"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 15 +- id: 122 + owner_id: 3 + owner_name: org3 + lower_name: group 2 + name: group 2 + description: | + Black where army caused in idea leap. Yesterday being advertising it outside now cackle. But where wow egg theirs here whomever. Badly moreover say those nobody run tonight. My sigh widen who child none hug. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AdorableCricket/ProudCave + ''' + + \#\# Usage + '''go + result \:= ProudCave.run("whimsical story") + fmt.Println("proudcave result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 121 + sort_order: 1 +- id: 123 + owner_id: 3 + owner_name: org3 + lower_name: group 3 + name: group 3 + description: | + Disappear brush grow yet frequently together its. Himself to leap wash to Turkmen first. Of whom coffee Peruvian frankly fashion host. Therefore eye yourselves previously under it care. Cheese any which why dynasty your happy. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TastyWings + ''' + + \#\# Usage + '''javascript + const result = tastywings.perform("playful alert"); + console.log("tastywings result\:", "failed"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 16 +- id: 124 + owner_id: 3 + owner_name: org3 + lower_name: group 4 + name: group 4 + description: | + Dance kindness clarity tonight Marxist its tonight. Lastly together example behind her man information. Kneel of fairly have were so here. Must whose earlier later sister up pronunciation. For way from abroad read recently nightly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install MelonAlive + ''' + + \#\# Usage + '''python + result = melonalive.run("quirky message") + print("melonalive result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 121 + sort_order: 2 +- id: 125 + owner_id: 3 + owner_name: org3 + lower_name: group 5 + name: group 5 + description: | + You nobody these these those what food. Occasionally whoever abroad every onto decidedly lemony. You first lastly been several upon phew. Dog before moreover should a yourselves regularly. Muster yesterday thought few up crowd i.e.. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install SheepStander170 + ''' + + \#\# Usage + '''javascript + const result = sheepstander170.handle("playful alert"); + console.log("sheepstander170 result\:", "error"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 124 + sort_order: 1 +- id: 126 + owner_id: 3 + owner_name: org3 + lower_name: group 6 + name: group 6 + description: | + It then these is today bale right. Positively onto he will by lag nearly. Mistake solemnly nearby whichever nervous that agree. Hardly team rarely whom there whenever according. What whoa case now pose hedge the. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install RaisinCruel + ''' + + \#\# Usage + '''javascript + const result = raisincruel.execute("funny request"); + console.log("raisincruel result\:", "success"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 121 + sort_order: 3 +- id: 127 + owner_id: 3 + owner_name: org3 + lower_name: group 7 + name: group 7 + description: | + Possess brace I army to its under. Bunch there enough whom phew us another. They already that everybody machine already whenever. Themselves packet normally strongly above that pair. Dynasty whichever open no her pause anybody. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install DamsonDisgusting + ''' + + \#\# Usage + '''javascript + const result = damsondisgusting.process("quirky message"); + console.log("damsondisgusting result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 128 + sort_order: 2 +- id: 128 + owner_id: 3 + owner_name: org3 + lower_name: group 8 + name: group 8 + description: | + Vacate float imitate i.e. you which Cypriot. Run publicity fantastic firstly his troop were. Weekly these our up party harvest place. Nap irritably straight army win next everyone. Hers famous throughout which selfish another regularly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WildChinchilla + ''' + + \#\# Usage + '''python + result = wildchinchilla.perform("playful alert") + print("wildchinchilla result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 126 + sort_order: 1 +- id: 129 + owner_id: 3 + owner_name: org3 + lower_name: group 9 + name: group 9 + description: | + Grammar failure unemployment heavily where who whomever. Some then hourly have i.e. what Tibetan. Prepare does am that this which play. You this in whom trip I i.e.. This finally others yourselves as she wow. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install CuriosWorm231 + ''' + + \#\# Usage + '''python + result = curiosworm231.process("funny request") + print("curiosworm231 result\:", "success") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 123 + sort_order: 1 +- id: 130 + owner_id: 3 + owner_name: org3 + lower_name: group 10 + name: group 10 + description: | + Out whereas spoon loneliness together dolphin board. Spread theirs arrow that is why Indonesian. Batch of senator one to whichever rather. By consequently by fortnightly accordingly man she. Several caravan certain at me rarely stack. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GorgeousCoyote + ''' + + \#\# Usage + '''python + result = gorgeouscoyote.perform("whimsical story") + print("gorgeouscoyote result\:", "failed") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 127 + sort_order: 1 +- id: 131 + owner_id: 3 + owner_name: org3 + lower_name: group 11 + name: group 11 + description: | + Her so everybody hers yourselves yours archipelago. Couple along consequently lastly recklessly how tonight. What yours time bunch words over government. You think why besides highly yay are. How win everything when sedge to here. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SillyImpala + ''' + + \#\# Usage + '''python + result = sillyimpala.execute("lighthearted command") + print("sillyimpala result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 123 + sort_order: 2 +- id: 132 + owner_id: 3 + owner_name: org3 + lower_name: group 12 + name: group 12 + description: | + Some that without work soon is their. His conclude his himself tonight yours appear. Then hence whom nothing most tonight brother. Advantage consequently between then that slowly also. Army this than such effect we first. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install JambulClear278 + ''' + + \#\# Usage + '''python + result = jambulclear278.execute("playful alert") + print("jambulclear278 result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 130 + sort_order: 1 +- id: 133 + owner_id: 3 + owner_name: org3 + lower_name: group 13 + name: group 13 + description: | + Nightly choir provided fortnightly person between carry. An host monthly smoke apart that shower. The her yours anyone everyone him Elizabethan. Include just their ability since this her. Cambodian how have e.g. mine still party. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AttractiveBikini/ThoughtfulTrout + ''' + + \#\# Usage + '''go + result \:= ThoughtfulTrout.execute("funny request") + fmt.Println("thoughtfultrout result\:", "success") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 17 +- id: 134 + owner_id: 3 + owner_name: org3 + lower_name: group 14 + name: group 14 + description: | + Had his there inspect basket been a. To listen that week whichever these these. Bathe these then soon hand place has. Themselves to about time who when there. Whomever secondly her how work enough you. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install AuspiciousBrass578 + ''' + + \#\# Usage + '''javascript + const result = auspiciousbrass578.perform("lighthearted command"); + console.log("auspiciousbrass578 result\:", "completed"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 133 + sort_order: 1 +- id: 135 + owner_id: 3 + owner_name: org3 + lower_name: group 15 + name: group 15 + description: | + Next wave outside whose tribe reel may. Those her myself it stagger formerly close. Regularly daily nobody downstairs their afterwards to. Phew today fortunately this slowly himself disregard. All scarcely anthology next Laotian then that. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LazyStairs + ''' + + \#\# Usage + '''javascript + const result = lazystairs.process("funny request"); + console.log("lazystairs result\:", "in progress"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 128 + sort_order: 1 +- id: 136 + owner_id: 3 + owner_name: org3 + lower_name: group 16 + name: group 16 + description: | + Consequently book whose theirs tough firstly we. Many whose Cormoran pod quickly we could. Tomorrow tie here through panic mine whom. Shower flock umbrella indoors musician of any. Someone awfully revolt lay why you yet. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WittyTheater + ''' + + \#\# Usage + '''python + result = wittytheater.execute("whimsical story") + print("wittytheater result\:", "success") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 124 + sort_order: 3 +- id: 137 + owner_id: 3 + owner_name: org3 + lower_name: group 17 + name: group 17 + description: | + Board rather dream our besides each to. These yay upstairs e.g. which generally aha. The since which instance case at hence. Tribe therefore slide where our as this. Before previously for myself Congolese anyone will. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/OrangeEater3/IllDinosaur + ''' + + \#\# Usage + '''go + result \:= IllDinosaur.execute("quirky message") + fmt.Println("illdinosaur result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 127 + sort_order: 2 +- id: 138 + owner_id: 3 + owner_name: org3 + lower_name: group 18 + name: group 18 + description: | + Orange woman Einsteinian everyone child tribe elsewhere. Awkwardly comfortable today walk rice several most. Look child you twist I alas within. You should regiment his my half over. Here whose Mexican then content yourself been. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install KumquatHelpless + ''' + + \#\# Usage + '''javascript + const result = kumquathelpless.process("quirky message"); + console.log("kumquathelpless result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 121 + sort_order: 4 +- id: 139 + owner_id: 3 + owner_name: org3 + lower_name: group 19 + name: group 19 + description: | + Contrast generally bag seldom spread still even. Of sunshine infrequently production hair above when. Purely choir highly they all boldly rapidly. Normally cackle clever batch opposite yesterday purely. I they trust munch raise interest which. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install AppleSleepy + ''' + + \#\# Usage + '''javascript + const result = applesleepy.process("lighthearted command"); + console.log("applesleepy result\:", "success"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 127 + sort_order: 3 +- id: 140 + owner_id: 3 + owner_name: org3 + lower_name: group 20 + name: group 20 + description: | + Range are apart riches full whose scream. Irritate delightful those meanwhile full furthermore work. Back whose where always sometimes most thrill. Class each on it work firstly condemned. Ask am strawberry these because oops that. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install AuspiciousWombat + ''' + + \#\# Usage + '''python + result = auspiciouswombat.perform("quirky message") + print("auspiciouswombat result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 137 + sort_order: 1 +- id: 141 + owner_id: 3 + owner_name: org3 + lower_name: group 21 + name: group 21 + description: | + We any practically whom so besides everyone. Government whom whereas many wad in everyone. Themselves many intensely one for yourselves anyway. Because other earlier inside who outfit of. Window patrol down why leap place then. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install HoneydewUgly685 + ''' + + \#\# Usage + '''python + result = honeydewugly685.perform("quirky message") + print("honeydewugly685 result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 136 + sort_order: 1 +- id: 142 + owner_id: 3 + owner_name: org3 + lower_name: group 22 + name: group 22 + description: | + Tonight that life fierce everyone deceive Burkinese. His fast whatever baby Uzbek elsewhere moreover. Your train moreover fight at itself brilliance. Somebody mine now are which instance horde. Victoriously what e.g. management clear eek eek. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install HilariousPlane + ''' + + \#\# Usage + '''python + result = hilariousplane.process("playful alert") + print("hilariousplane result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 131 + sort_order: 1 +- id: 143 + owner_id: 3 + owner_name: org3 + lower_name: group 23 + name: group 23 + description: | + Away exaltation what have here so movement. Several bravo noun talented tonight fleet dream. Somebody up first though alone were annoyance. Can fleet was this him fuel yourselves. Host just oops range whose which out. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AdorableBeetle/UninterestedWatch + ''' + + \#\# Usage + '''go + result \:= UninterestedWatch.run("funny request") + fmt.Println("uninterestedwatch result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 135 + sort_order: 1 +- id: 144 + owner_id: 3 + owner_name: org3 + lower_name: group 24 + name: group 24 + description: | + Muster over untie he already anyone do. These any onto whatever week this purse. Irritation is any tomorrow away bunch whatever. Mine my theirs many army hat these. Much infancy safely band someone sand then. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CondemnedDolphin881/MangoJittery + ''' + + \#\# Usage + '''go + result \:= MangoJittery.process("lighthearted command") + fmt.Println("mangojittery result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 130 + sort_order: 2 +- id: 145 + owner_id: 3 + owner_name: org3 + lower_name: group 25 + name: group 25 + description: | + Without lamp luck sleep those everybody loudly. No listen there to scarcely their to. Punch twist e.g. what as then that. Will these furthermore eat party victorious everybody. Summation nightly i.e. us yesterday is bunch. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ExcitingToothbrush119/HurtRaven94 + ''' + + \#\# Usage + '''go + result \:= HurtRaven94.perform("funny request") + fmt.Println("hurtraven94 result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 140 + sort_order: 1 +- id: 146 + owner_id: 3 + owner_name: org3 + lower_name: group 26 + name: group 26 + description: | + Whose group upon beans that generation conclude. Whichever that he down sometimes monthly fatally. Myself there do on luxury normally in. Spell words an even however the he. So yourselves board these leisure one shall. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/FilthyBeetle/JitteryElephant760 + ''' + + \#\# Usage + '''go + result \:= JitteryElephant760.process("quirky message") + fmt.Println("jitteryelephant760 result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 122 + sort_order: 1 +- id: 147 + owner_id: 3 + owner_name: org3 + lower_name: group 27 + name: group 27 + description: | + Has other page finally battery tonight over. Monthly extremely indoors this prepare moreover tax. Dollar hers you son it today way. Do those dream Uzbek you laugh since. Of that there once leap week can. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BlackElephant + ''' + + \#\# Usage + '''javascript + const result = blackelephant.perform("whimsical story"); + console.log("blackelephant result\:", "error"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 125 + sort_order: 1 +- id: 148 + owner_id: 3 + owner_name: org3 + lower_name: group 28 + name: group 28 + description: | + Comfort wit does aha cigarette yourselves refill. Yours dance himself those tonight outside cry. End your bouquet whoever several well as. Ouch almost yourself himself my goal juice. There away it sandals may irritate yearly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/CautiousPancake69/SingerRideer7 + ''' + + \#\# Usage + '''go + result \:= SingerRideer7.run("funny request") + fmt.Println("singerrideer7 result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 139 + sort_order: 1 +- id: 149 + owner_id: 3 + owner_name: org3 + lower_name: group 29 + name: group 29 + description: | + Normally hourly elegant hers instance whose yourself. Than case patience trip anyone mine fact. Due rather lately advantage alas being disgusting. Person it this his life clear has. Are day an company you ever daily. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WanderingBones + ''' + + \#\# Usage + '''python + result = wanderingbones.run("quirky message") + print("wanderingbones result\:", "completed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 133 + sort_order: 2 +- id: 150 + owner_id: 3 + owner_name: org3 + lower_name: group 30 + name: group 30 + description: | + Least either few on life whatever next. Hurriedly then in for everybody often teach. Any may daily Philippine her quite leap. Formerly stand stand begin my sew often. Someone yours hand cabinet your sometimes through. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LycheeHorrible + ''' + + \#\# Usage + '''javascript + const result = lycheehorrible.handle("quirky message"); + console.log("lycheehorrible result\:", "unknown"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 147 + sort_order: 1 +- id: 151 + owner_id: 6 + owner_name: org6 + lower_name: group 1 + name: group 1 + description: | + Why at powerfully phew second Swazi every. Next which e.g. which since which elegant. Rather there a generally myself very it. Yearly unless heavily buy luck soften time. Than e.g. am sorrow time his being. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/OutstandingGnat/ScaryEel + ''' + + \#\# Usage + '''go + result \:= ScaryEel.process("whimsical story") + fmt.Println("scaryeel result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 18 +- id: 152 + owner_id: 6 + owner_name: org6 + lower_name: group 2 + name: group 2 + description: | + Myself troop of i.e. these those those. Turkishish repeatedly was your in pleasure always. Am it pumpkin those for huh besides. Light can the her whose therefore all. Just as you her wit absolutely provided. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/NiceManatee/ChairSkier686 + ''' + + \#\# Usage + '''go + result \:= ChairSkier686.perform("playful alert") + fmt.Println("chairskier686 result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 19 +- id: 153 + owner_id: 6 + owner_name: org6 + lower_name: group 3 + name: group 3 + description: | + Timing government on therefore other religion their. Mayan earlier yourself some only few these. Who friendship whose fine e.g. little why. Staff day how effect that shall too. Upon empty group her of upon those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PearFrail696 + ''' + + \#\# Usage + '''javascript + const result = pearfrail696.perform("whimsical story"); + console.log("pearfrail696 result\:", "failed"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 152 + sort_order: 1 +- id: 154 + owner_id: 6 + owner_name: org6 + lower_name: group 4 + name: group 4 + description: | + Within stack Bahrainean her day themselves some. There result his itself jump plant to. Ourselves Colombian this how which body monthly. Weekly enough weekly wall between hmm Christian. Few each clump idea exaltation there so. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/FaithfulSeal434/DistinctSofa + ''' + + \#\# Usage + '''go + result \:= DistinctSofa.execute("playful alert") + fmt.Println("distinctsofa result\:", "failed") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 152 + sort_order: 2 +- id: 155 + owner_id: 6 + owner_name: org6 + lower_name: group 5 + name: group 5 + description: | + Sit then whose so hundred yesterday wave. Huh stand as to earlier regularly are. Whose that cry down daily whose therefore. Tough dive yearly tribe growth alas each. Annually that their therefore theirs posse up. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install UglyGarlic + ''' + + \#\# Usage + '''javascript + const result = uglygarlic.execute("whimsical story"); + console.log("uglygarlic result\:", "error"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 151 + sort_order: 1 +- id: 156 + owner_id: 6 + owner_name: org6 + lower_name: group 6 + name: group 6 + description: | + Weekly bookstore tomorrow these Barbadian whose nobody. Previously frailty Guyanese soon whatever our whichever. Cough so it still fall often the. Was what gather of hence why for. Warmly wisp above they outside their has. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BeautifulNeck + ''' + + \#\# Usage + '''javascript + const result = beautifulneck.run("lighthearted command"); + console.log("beautifulneck result\:", "failed"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 151 + sort_order: 2 +- id: 157 + owner_id: 6 + owner_name: org6 + lower_name: group 7 + name: group 7 + description: | + Group their few never itchy that her. Themselves fortnightly beneath at genetics utterly then. I which then usage owing everyone brown. Why leap moreover today his who children. This previously consequently infrequently have bevy yesterday. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/PlumQuaint/LegEater120 + ''' + + \#\# Usage + '''go + result \:= LegEater120.execute("lighthearted command") + fmt.Println("legeater120 result\:", "success") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 154 + sort_order: 1 +- id: 158 + owner_id: 6 + owner_name: org6 + lower_name: group 8 + name: group 8 + description: | + Fortnightly its several animal what daily hers. Musician posse some one might however ream. Theirs tightly Plutonian occasionally late besides now. That upon what lately ourselves daringly themselves. Do pounce shyly hedge upstairs some yay. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/MysteriousApe/RestaurantCooker0 + ''' + + \#\# Usage + '''go + result \:= RestaurantCooker0.run("quirky message") + fmt.Println("restaurantcooker0 result\:", "finished") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 153 + sort_order: 1 +- id: 159 + owner_id: 6 + owner_name: org6 + lower_name: group 9 + name: group 9 + description: | + Being bouquet philosophy by yesterday whichever regularly. Child deceit think belong since respond you. Daily she have their never yours shall. From intensely where adult them at Torontonian. Will those agree their we this annually. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install KindLion + ''' + + \#\# Usage + '''python + result = kindlion.perform("funny request") + print("kindlion result\:", "error") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 155 + sort_order: 1 +- id: 160 + owner_id: 6 + owner_name: org6 + lower_name: group 10 + name: group 10 + description: | + Tonight whomever those many many strongly hurriedly. About fire ours so positively whose anything. Frankly how must scold Mexican repulsive them. Straightaway under with host clap these bravo. But nearly whereas those whomever yourselves single. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ImprovisedHound952 + ''' + + \#\# Usage + '''python + result = improvisedhound952.run("whimsical story") + print("improvisedhound952 result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 159 + sort_order: 1 +- id: 161 + owner_id: 6 + owner_name: org6 + lower_name: group 11 + name: group 11 + description: | + Herself where whose wait life computer calm. Earlier behind tonight number until somebody earlier. Either murder its someone Taiwanese today mine. These those art project after yet rudely. Link whom may Roman i.e. (space) when. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BananaUgly + ''' + + \#\# Usage + '''javascript + const result = bananaugly.run("quirky message"); + console.log("bananaugly result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 153 + sort_order: 2 +- id: 162 + owner_id: 6 + owner_name: org6 + lower_name: group 12 + name: group 12 + description: | + Here answer so was addition why gifted. These yesterday whom packet palm usually regularly. Whoa band Turkishish which you shake accordingly. They hundreds entirely wake it incredibly these. Tonight to equipment quarterly him downstairs troupe. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install RockMelonElegant + ''' + + \#\# Usage + '''javascript + const result = rockmelonelegant.run("playful alert"); + console.log("rockmelonelegant result\:", "success"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 158 + sort_order: 1 +- id: 163 + owner_id: 6 + owner_name: org6 + lower_name: group 13 + name: group 13 + description: | + What here beyond constantly regularly though what. Consequently that Confucian without everyone lean fortnightly. Anywhere extremely e.g. under fleet repel motionless. Our peace usually whichever Iraqi you these. Where stand it am who are in. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install GentleYellowjacket + ''' + + \#\# Usage + '''javascript + const result = gentleyellowjacket.handle("quirky message"); + console.log("gentleyellowjacket result\:", "in progress"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 159 + sort_order: 2 +- id: 164 + owner_id: 6 + owner_name: org6 + lower_name: group 14 + name: group 14 + description: | + Fight itself are alternatively several tomorrow water. Through nightly ours recently bale year Senegalese. Meanwhile imitate eek being lately one it. Weather whomever annually cautious his Turkishish ever. Same recognise his company now other each. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install FamousTelevision + ''' + + \#\# Usage + '''javascript + const result = famoustelevision.execute("whimsical story"); + console.log("famoustelevision result\:", "unknown"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 153 + sort_order: 3 +- id: 165 + owner_id: 6 + owner_name: org6 + lower_name: group 15 + name: group 15 + description: | + Christian besides it between how some you. Others out which when whichever herself at. Her these at that in behind part. Street those sedge be completely for whatever. Everybody so hourly yourself red here without. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install NiceTrenchCoat58 + ''' + + \#\# Usage + '''python + result = nicetrenchcoat58.execute("quirky message") + print("nicetrenchcoat58 result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 158 + sort_order: 2 +- id: 166 + owner_id: 6 + owner_name: org6 + lower_name: group 16 + name: group 16 + description: | + But her it shoulder year up American. Away outfit caused archipelago according advertising your. Day whose were year dark widen then. What from do may one seldom stand. Troupe why whoever one weekly go pod. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ThankfulWorm/VastMonkey0 + ''' + + \#\# Usage + '''go + result \:= VastMonkey0.execute("lighthearted command") + fmt.Println("vastmonkey0 result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 158 + sort_order: 3 +- id: 167 + owner_id: 6 + owner_name: org6 + lower_name: group 17 + name: group 17 + description: | + Tonight must annually swing danger cackle generally. On scold after at door muster rather. Without eagerly cry as son time lately. Because are oops sprint man quarterly monthly. Nature these shake that themselves out toilet. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LionWiner + ''' + + \#\# Usage + '''python + result = lionwiner.handle("whimsical story") + print("lionwiner result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 159 + sort_order: 3 +- id: 168 + owner_id: 6 + owner_name: org6 + lower_name: group 18 + name: group 18 + description: | + Wrap then towards she mob yet how. Host even therefore mother rarely when without. Whereas tonight leap under when from belong. For was addition our government next up. Ourselves additionally nobody then whatever donkey about. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PeachNice/PleasantFrog65 + ''' + + \#\# Usage + '''go + result \:= PleasantFrog65.process("whimsical story") + fmt.Println("pleasantfrog65 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 162 + sort_order: 1 +- id: 169 + owner_id: 6 + owner_name: org6 + lower_name: group 19 + name: group 19 + description: | + Wait in for for those out army. Fleet far wall provided besides archipelago her. Caused it admit several offend deeply can. Unless are hers how leap gracefully reel. Neither our nevertheless daily government aha this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/MirrorSkier/BucketReader + ''' + + \#\# Usage + '''go + result \:= BucketReader.handle("quirky message") + fmt.Println("bucketreader result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 163 + sort_order: 1 +- id: 170 + owner_id: 6 + owner_name: org6 + lower_name: group 20 + name: group 20 + description: | + These those yourselves first this those why. Some enough successful person myself dazzle that. These since handle by shall opposite is. World jittery weekly as owing board along. Clean finally elegant so a do additionally. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install FinePorcupine + ''' + + \#\# Usage + '''javascript + const result = fineporcupine.run("funny request"); + console.log("fineporcupine result\:", "finished"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 169 + sort_order: 1 +- id: 171 + owner_id: 6 + owner_name: org6 + lower_name: group 21 + name: group 21 + description: | + Cruelly army number the pollution extremely wear. At theirs nightly her lastly second then. Up my conclude army still previously comfort. Her all in whereas fact wow secondly. Our kindness African secondly wrack that school. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PyramidHuger60/ClementineGlorious058 + ''' + + \#\# Usage + '''go + result \:= ClementineGlorious058.process("whimsical story") + fmt.Println("clementineglorious058 result\:", "success") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 169 + sort_order: 2 +- id: 172 + owner_id: 6 + owner_name: org6 + lower_name: group 22 + name: group 22 + description: | + Do moreover were whose that myself ball. Later distinct judge monthly myself an that. Class it how medicine quarterly next whose. Jump odd her virtually child what hug. Him the due of which finally when. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install NicheWashingMachine + ''' + + \#\# Usage + '''python + result = nichewashingmachine.perform("whimsical story") + print("nichewashingmachine result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 157 + sort_order: 1 +- id: 173 + owner_id: 6 + owner_name: org6 + lower_name: group 23 + name: group 23 + description: | + Think in she after problem him Burmese. Muster my then been sore outfit to. Lately us bother part weight extremely lot. Panic staff gee were sigh how ours. Lastly bus seldom point kindly i.e. himself. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/BrownSurgeon5/VoiceCrawler86 + ''' + + \#\# Usage + '''go + result \:= VoiceCrawler86.process("quirky message") + fmt.Println("voicecrawler86 result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 160 + sort_order: 1 +- id: 174 + owner_id: 6 + owner_name: org6 + lower_name: group 24 + name: group 24 + description: | + Down in themselves the however sew you. May in may might we troupe alas. Woman politely that whose outrageous there i.e.. Yesterday you clump key has positively whose. Pray her hers early shower gang whoever. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/LegumeEvil/BucketCooker36 + ''' + + \#\# Usage + '''go + result \:= BucketCooker36.execute("whimsical story") + fmt.Println("bucketcooker36 result\:", "failed") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 152 + sort_order: 3 +- id: 175 + owner_id: 6 + owner_name: org6 + lower_name: group 25 + name: group 25 + description: | + Game finally under some anthology quarterly annually. Garden to talent body whichever nightly yours. Mob nearby crowded dynasty am these everybody. Kiss secondly powerfully one next Darwinian about. Without sufficient group we meanwhile so quite. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install KumquatClever14 + ''' + + \#\# Usage + '''python + result = kumquatclever14.perform("whimsical story") + print("kumquatclever14 result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 154 + sort_order: 2 +- id: 176 + owner_id: 6 + owner_name: org6 + lower_name: group 26 + name: group 26 + description: | + Monthly some there regularly who dive inside. Yours that nothing life summation next tired. Up seldom tomorrow Italian covey meanwhile unload. This quarterly everything carelessly on e.g. delay. Why from hers though troop regularly page. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install HandsomeBow54 + ''' + + \#\# Usage + '''python + result = handsomebow54.run("quirky message") + print("handsomebow54 result\:", "failed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 154 + sort_order: 3 +- id: 177 + owner_id: 6 + owner_name: org6 + lower_name: group 27 + name: group 27 + description: | + None him which brilliance what on oops. Train should politely problem when up you. Its I gather wisdom Bangladeshi eek of. Nearby his swim terribly practically till preen. First peace off I this them cooperative. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BreadRideer/TamePark + ''' + + \#\# Usage + '''go + result \:= TamePark.handle("funny request") + fmt.Println("tamepark result\:", "error") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 173 + sort_order: 1 +- id: 178 + owner_id: 6 + owner_name: org6 + lower_name: group 28 + name: group 28 + description: | + That wildly what ball had why these. Battery themselves her auspicious huh body solitude. Tomorrow few infrequently fierce anything snarl as. Those several secondly infrequently drink when life. Mob wipe dream voice is how weekly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PoisedSquirrel + ''' + + \#\# Usage + '''python + result = poisedsquirrel.handle("funny request") + print("poisedsquirrel result\:", "failed") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 176 + sort_order: 1 +- id: 179 + owner_id: 6 + owner_name: org6 + lower_name: group 29 + name: group 29 + description: | + Monthly one at without salt little did. Straightaway one sedge how then company kettle. She ability fortnightly moreover which that ski. Yell other phew where would before bravo. African gossip you troop ream wolf already. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install HelplessStar + ''' + + \#\# Usage + '''python + result = helplessstar.run("playful alert") + print("helplessstar result\:", "failed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 175 + sort_order: 1 +- id: 180 + owner_id: 6 + owner_name: org6 + lower_name: group 30 + name: group 30 + description: | + Yikes harvest yearly of furniture everyone have. Murder host there it of slowly away. Yourself theirs how kuban it some herself. Yours much Guyanese truth therefore theirs remote. Finally scold may themselves many whose to. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CourageousRhinoceros/BoyTalker249 + ''' + + \#\# Usage + '''go + result \:= BoyTalker249.handle("lighthearted command") + fmt.Println("boytalker249 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 164 + sort_order: 1 +- id: 181 + owner_id: 19 + owner_name: org19 + lower_name: group 1 + name: group 1 + description: | + For wood advertising then every which aunt. Election arrogant awfully there yoga is mine. Enough obesity because closely least crew posse. His milk sedge several anxiously confusion pound. Anyone from poison without whose you never. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LambBatheer + ''' + + \#\# Usage + '''python + result = lambbatheer.perform("whimsical story") + print("lambbatheer result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 20 +- id: 182 + owner_id: 19 + owner_name: org19 + lower_name: group 2 + name: group 2 + description: | + Smile everything rudely tax those line what. Then secondly close quarterly soon Darwinian weekly. She meanwhile dizzying bundle capture provided kindness. Each may were detective in her in. One can up how early stealthily here. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PaperPainter94/ClearFish + ''' + + \#\# Usage + '''go + result \:= ClearFish.execute("lighthearted command") + fmt.Println("clearfish result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 181 + sort_order: 1 +- id: 183 + owner_id: 19 + owner_name: org19 + lower_name: group 3 + name: group 3 + description: | + Anyway happiness for aha its there example. Unless either than some when next i.e.. May where elsewhere Roman Putinist recently well. Many over everything huh hand themselves daringly. Many despite in himself as yikes whose. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HealthyBeetle/ElderberryOpen + ''' + + \#\# Usage + '''go + result \:= ElderberryOpen.process("playful alert") + fmt.Println("elderberryopen result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 21 +- id: 184 + owner_id: 19 + owner_name: org19 + lower_name: group 4 + name: group 4 + description: | + Every bag this now cheerfully such to. Every anybody Polynesian Spanish lay bed conclude. You quarterly which please which one several. Yourself hmm occur instance might eat which. Month enough recently bread light us whoa. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/ElderberryFragile/WaterStacker8 + ''' + + \#\# Usage + '''go + result \:= WaterStacker8.process("funny request") + fmt.Println("waterstacker8 result\:", "in progress") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 183 + sort_order: 1 +- id: 185 + owner_id: 19 + owner_name: org19 + lower_name: group 5 + name: group 5 + description: | + Being blue where town would in some. Day e.g. that backwards those but kuban. Instance theirs gee ourselves each each all. Ours were for about whole mustering which. That her it yourselves then first orchard. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install FineCrocodile + ''' + + \#\# Usage + '''javascript + const result = finecrocodile.run("funny request"); + console.log("finecrocodile result\:", "error"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 183 + sort_order: 2 +- id: 186 + owner_id: 19 + owner_name: org19 + lower_name: group 6 + name: group 6 + description: | + Antarctic yay am eventually themselves galaxy never. Swazi flock substantial watch dance in distinct. Rarely lastly carefully they of his than. Due away management patience path anyway well. Out would never so incredibly next you. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BeautifulCattle + ''' + + \#\# Usage + '''javascript + const result = beautifulcattle.run("funny request"); + console.log("beautifulcattle result\:", "error"); + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 22 +- id: 187 + owner_id: 19 + owner_name: org19 + lower_name: group 7 + name: group 7 + description: | + Under crew this comb successfully advantage oops. Pharmacy wake them wisdom candy enchanted pride. Pod hurriedly some it it problem year. Contradict over poison amused progress corruption hers. Has grip which cluster French which significant. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/TersePark/InnocentWombat + ''' + + \#\# Usage + '''go + result \:= InnocentWombat.run("lighthearted command") + fmt.Println("innocentwombat result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 181 + sort_order: 2 +- id: 188 + owner_id: 19 + owner_name: org19 + lower_name: group 8 + name: group 8 + description: | + Eat right upshot many yesterday all you. Seldom well bravo whose include let host. Sorrow lastly yours exaltation have including addition. Boldly in he over promptly often his. Carelessly in yet of today club down. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install MedicineDrinker + ''' + + \#\# Usage + '''python + result = medicinedrinker.perform("whimsical story") + print("medicinedrinker result\:", "success") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 184 + sort_order: 1 +- id: 189 + owner_id: 19 + owner_name: org19 + lower_name: group 9 + name: group 9 + description: | + Whom which covey thoroughly yearly they explode. Instance theirs you honesty herself their mine. Our orchard but it before who so. Tongue themselves his goodness accept baby a. Nothing library a soon its wash woman. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ClementineNice + ''' + + \#\# Usage + '''javascript + const result = clementinenice.process("quirky message"); + console.log("clementinenice result\:", "finished"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 188 + sort_order: 1 +- id: 190 + owner_id: 19 + owner_name: org19 + lower_name: group 10 + name: group 10 + description: | + Any much there rather could we effect. Ours chest all less for conclude myself. Think rarely help hand which underwear by. Safely yet little i.e. limp farm good. None world her ever next my about. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ViolinTalker + ''' + + \#\# Usage + '''python + result = violintalker.handle("whimsical story") + print("violintalker result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 183 + sort_order: 3 +- id: 191 + owner_id: 19 + owner_name: org19 + lower_name: group 11 + name: group 11 + description: | + Cast wow each place his any in. Insufficient of today transportation would outside your. Whoever here finally me scenic herself provided. Dream hey beneath film everything where slavery. Spaghetti she did here herself whose off. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LuckySenator9 + ''' + + \#\# Usage + '''python + result = luckysenator9.handle("lighthearted command") + print("luckysenator9 result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 185 + sort_order: 1 +- id: 192 + owner_id: 19 + owner_name: org19 + lower_name: group 12 + name: group 12 + description: | + Example move each could on had e.g.. Room who my drag those his he. Kilometer helpless crew either the then which. Whose data fade is nest who as. Try Vietnamese thing few next your being. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install RealisticJuicer + ''' + + \#\# Usage + '''javascript + const result = realisticjuicer.handle("lighthearted command"); + console.log("realisticjuicer result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 23 +- id: 193 + owner_id: 19 + owner_name: org19 + lower_name: group 13 + name: group 13 + description: | + To of in somebody each coffee what. Entirely example English cost ouch result who. Those tonight anyone in teacher from how. Yourselves why elsewhere how we you nearby. Lastly walk firstly then being doubtfully most. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install HoneydewBlushing5 + ''' + + \#\# Usage + '''python + result = honeydewblushing5.run("playful alert") + print("honeydewblushing5 result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 24 +- id: 194 + owner_id: 19 + owner_name: org19 + lower_name: group 14 + name: group 14 + description: | + To goal Norwegian your team were besides. Yet those now ours hourly occasionally however. E.g. without you Viennese for promptly wow. Load some ride annually hers laptop Atlantic. Still to soup we yet including dunk. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/MelonEmbarrassed86/LivelyMacaw + ''' + + \#\# Usage + '''go + result \:= LivelyMacaw.handle("quirky message") + fmt.Println("livelymacaw result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 182 + sort_order: 1 +- id: 195 + owner_id: 19 + owner_name: org19 + lower_name: group 15 + name: group 15 + description: | + Part shower film harm mustering upon so. Courage nevertheless as all his us can. Conclude leap what somewhat might up time. Numerous mother lately them that somebody what. Let healthy every hurt in monthly forest. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SaxophoneKisser/HungryFox + ''' + + \#\# Usage + '''go + result \:= HungryFox.handle("funny request") + fmt.Println("hungryfox result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 186 + sort_order: 1 +- id: 196 + owner_id: 19 + owner_name: org19 + lower_name: group 16 + name: group 16 + description: | + Our window each life being besides must. This my thing still eat evidence edge. Which her with whose scarcely most the. Bouquet enough as stand why truth before. Powerless straightaway today why sit battery anyway. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BedReader4 + ''' + + \#\# Usage + '''javascript + const result = bedreader4.run("funny request"); + console.log("bedreader4 result\:", "completed"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 187 + sort_order: 1 +- id: 197 + owner_id: 19 + owner_name: org19 + lower_name: group 17 + name: group 17 + description: | + Who much archipelago then effect those to. Marriage wad wade because carelessly before nightly. That lastly your time there the content. They these person bottle life we did. This tomorrow read finally life has so. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BlouseCrawler + ''' + + \#\# Usage + '''javascript + const result = blousecrawler.perform("whimsical story"); + console.log("blousecrawler result\:", "in progress"); + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 194 + sort_order: 1 +- id: 198 + owner_id: 19 + owner_name: org19 + lower_name: group 18 + name: group 18 + description: | + Upon bell orange huh she batch even. Some why regularly quiver ability of nothing. There because annually smell our all whose. He whose how hardly finally east tribe. Next leap none ahead brace towards therefore. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install NiceCicada + ''' + + \#\# Usage + '''javascript + const result = nicecicada.execute("funny request"); + console.log("nicecicada result\:", "in progress"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 192 + sort_order: 1 +- id: 199 + owner_id: 19 + owner_name: org19 + lower_name: group 19 + name: group 19 + description: | + What shake may out quarterly her fortnightly. Stand of to quarterly peep where however. Forest her wake this all from that. What shower another kindly in on his. E.g. anywhere under additionally those since between. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install EmbarrassedLung721 + ''' + + \#\# Usage + '''javascript + const result = embarrassedlung721.run("lighthearted command"); + console.log("embarrassedlung721 result\:", "error"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 197 + sort_order: 1 +- id: 200 + owner_id: 19 + owner_name: org19 + lower_name: group 20 + name: group 20 + description: | + Are project model am Jungian outcome bravo. To it elegant whom from your someone. Where openly something baby in wow staff. For no do though this on group. Under to who card those chair all. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ConfusingCoyote + ''' + + \#\# Usage + '''javascript + const result = confusingcoyote.execute("quirky message"); + console.log("confusingcoyote result\:", "finished"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 186 + sort_order: 2 +- id: 201 + owner_id: 19 + owner_name: org19 + lower_name: group 21 + name: group 21 + description: | + Beat fuel speed fashion above thing weakly. Its here certain belong it do regularly. Seldom generally another huh riches above later. Never despite her kind quit those to. This should each unless its her stack. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/FilthySeal/MushyFoot + ''' + + \#\# Usage + '''go + result \:= MushyFoot.perform("lighthearted command") + fmt.Println("mushyfoot result\:", "finished") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 195 + sort_order: 1 +- id: 202 + owner_id: 19 + owner_name: org19 + lower_name: group 22 + name: group 22 + description: | + Are therefore within her firstly Bangladeshi her. Now sock mine here why enable amused. How fact as childhood since nobody lastly. Other would instance soon outfit none anyone. Open these doctor his occasionally have nurse. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install RealisticKangaroo + ''' + + \#\# Usage + '''javascript + const result = realistickangaroo.perform("funny request"); + console.log("realistickangaroo result\:", "in progress"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 199 + sort_order: 1 +- id: 203 + owner_id: 19 + owner_name: org19 + lower_name: group 23 + name: group 23 + description: | + Its end herself any previously its last. Yesterday silently swim everyone let weekly besides. Effect your regularly lately beneath yet speed. Others squeak who town where you from. How few where this day refill nightly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ColorfulStove + ''' + + \#\# Usage + '''javascript + const result = colorfulstove.process("lighthearted command"); + console.log("colorfulstove result\:", "in progress"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 183 + sort_order: 4 +- id: 204 + owner_id: 19 + owner_name: org19 + lower_name: group 24 + name: group 24 + description: | + Do therefore distinct first you waiter any. There what regularly now skip instance of. Am each there oops that group week. Whom now themselves with lastly furthermore model. Shorts which the difficult now lately up. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ComfortableRabbit90/LimeWhite + ''' + + \#\# Usage + '''go + result \:= LimeWhite.perform("lighthearted command") + fmt.Println("limewhite result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 200 + sort_order: 1 +- id: 205 + owner_id: 19 + owner_name: org19 + lower_name: group 25 + name: group 25 + description: | + Tonight jaw would nobody this somebody above. Down there Bahrainean pack yours by Kyrgyz. Generously also over onion for now no. Envy it theirs link tomorrow those packet. Yikes finally yourselves secondly how Lilliputian quite. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install CuteMonkey16 + ''' + + \#\# Usage + '''javascript + const result = cutemonkey16.run("lighthearted command"); + console.log("cutemonkey16 result\:", "unknown"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 199 + sort_order: 2 +- id: 206 + owner_id: 19 + owner_name: org19 + lower_name: group 26 + name: group 26 + description: | + To question as where tea ski can. Usually heap in his to beyond advantage. Lie whose donkey elsewhere there day itself. Government unless anyone some powerfully ours his. Inside fly you there turn down nutrition. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install JackfruitOdd5 + ''' + + \#\# Usage + '''javascript + const result = jackfruitodd5.process("quirky message"); + console.log("jackfruitodd5 result\:", "unknown"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 199 + sort_order: 3 +- id: 207 + owner_id: 19 + owner_name: org19 + lower_name: group 27 + name: group 27 + description: | + Nevertheless hatred our quarterly under those everyone. News Sammarinese Einsteinian rise fortnightly finally only. From Newtonian then which just unlock favor. Those his include indeed well each yours. As pretty up laugh herself monthly mob. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install CurrantTerse + ''' + + \#\# Usage + '''javascript + const result = currantterse.perform("playful alert"); + console.log("currantterse result\:", "unknown"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 202 + sort_order: 1 +- id: 208 + owner_id: 19 + owner_name: org19 + lower_name: group 28 + name: group 28 + description: | + Peruvian island do under collection hers cast. Weekly at incredibly scold inside childhood that. Mob luck sharply which she was bag. Forest juicer onto though those may on. Due ever firstly understimate soup itself it. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install DurianImpossible + ''' + + \#\# Usage + '''javascript + const result = durianimpossible.run("lighthearted command"); + console.log("durianimpossible result\:", "unknown"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 206 + sort_order: 1 +- id: 209 + owner_id: 19 + owner_name: org19 + lower_name: group 29 + name: group 29 + description: | + Barely boxers without intensely nevertheless stack from. Painfully trip army herself rarely that park. Here constantly circumstances tomorrow none might light. That can second ocean hourly oops jittery. Her it when class deceit weekly from. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install QueerBeaver + ''' + + \#\# Usage + '''javascript + const result = queerbeaver.process("lighthearted command"); + console.log("queerbeaver result\:", "completed"); + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 186 + sort_order: 3 +- id: 210 + owner_id: 19 + owner_name: org19 + lower_name: group 30 + name: group 30 + description: | + Whose man inside ouch an he kindness. Of may throughout quietly luck is upon. Goodness exaltation nobody your utterly might me. Quiver outfit whose of who Welsh that. Snore accordingly had of whom usually yearly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TenderCod281 + ''' + + \#\# Usage + '''javascript + const result = tendercod281.perform("playful alert"); + console.log("tendercod281 result\:", "failed"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 204 + sort_order: 1 +- id: 211 + owner_id: 22 + owner_name: limited_org + lower_name: group 1 + name: group 1 + description: | + Pod listen quarterly basket bottle those completely. Limit she Eastern we some in just. Being for house instead which fine someone. Are wait our wisp pounce life been. Because cast ouch room monthly this bathe. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/CantaloupeAngry659/MotherCrawler + ''' + + \#\# Usage + '''go + result \:= MotherCrawler.process("lighthearted command") + fmt.Println("mothercrawler result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 25 +- id: 212 + owner_id: 22 + owner_name: limited_org + lower_name: group 2 + name: group 2 + description: | + Downstairs other horrible shake that jump which. That where above additionally too weekly him. Flower gold since gleaming light Norwegian but. Bridge bread thing plate has after crack. Fly phew after upon anger crowded e.g.. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/EnviousCat/NectarineClever + ''' + + \#\# Usage + '''go + result \:= NectarineClever.process("playful alert") + fmt.Println("nectarineclever result\:", "success") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 26 +- id: 213 + owner_id: 22 + owner_name: limited_org + lower_name: group 3 + name: group 3 + description: | + Bus a lastly joy occasionally each anyway. From in at carry indoors words his. That ours bravo hospital my addition their. Upon often east besides this whom anyone. So most ouch because troop child east. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/SelfishWallaby9/MangoSore7 + ''' + + \#\# Usage + '''go + result \:= MangoSore7.process("whimsical story") + fmt.Println("mangosore7 result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 27 +- id: 214 + owner_id: 22 + owner_name: limited_org + lower_name: group 4 + name: group 4 + description: | + Nevertheless when that her shoulder weekly frantically. Those me hey far that I it. Them his because several is besides onto. Alaskan usually damage besides write in lot. Some happiness his infancy been wit where. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install DamsonLonely + ''' + + \#\# Usage + '''javascript + const result = damsonlonely.run("playful alert"); + console.log("damsonlonely result\:", "terminated"); + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 212 + sort_order: 1 +- id: 215 + owner_id: 22 + owner_name: limited_org + lower_name: group 5 + name: group 5 + description: | + Numerous than anyone sparse government only persuade. In school certain leggings Russian do way. Party was even petrify inside whom us. Few mob for previously below rabbit oops. Great enough to in from herself few. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install AvocadoWitty695 + ''' + + \#\# Usage + '''javascript + const result = avocadowitty695.execute("whimsical story"); + console.log("avocadowitty695 result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 213 + sort_order: 1 +- id: 216 + owner_id: 22 + owner_name: limited_org + lower_name: group 6 + name: group 6 + description: | + His the next parrot pretty poverty be. Hmm girl school nightly numerous cloud either. With eek straight all it its to. Giraffe aid in hey ever usage had. Elegantly say powerfully talk freeze consequently sew. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/MysteriousSardine/CarWasher + ''' + + \#\# Usage + '''go + result \:= CarWasher.perform("funny request") + fmt.Println("carwasher result\:", "success") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 28 +- id: 217 + owner_id: 22 + owner_name: limited_org + lower_name: group 7 + name: group 7 + description: | + Congregation dream such ever many exaltation kiss. On conclude this her than never whom. How e.g. result wait instance few it. Mine just sleep my previously alas her. Next next Romanian where in itself it. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PoorGorilla + ''' + + \#\# Usage + '''python + result = poorgorilla.perform("whimsical story") + print("poorgorilla result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 216 + sort_order: 1 +- id: 218 + owner_id: 22 + owner_name: limited_org + lower_name: group 8 + name: group 8 + description: | + Tired instead lastly back outfit since even. Where but phone grease such over their. Has Parisian everybody may her such upstairs. Appear healthily roll child for significant up. Her my still here turn it prickling. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ComposerSkier + ''' + + \#\# Usage + '''javascript + const result = composerskier.handle("funny request"); + console.log("composerskier result\:", "in progress"); + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 214 + sort_order: 1 +- id: 219 + owner_id: 22 + owner_name: limited_org + lower_name: group 9 + name: group 9 + description: | + I which chest my Diabolical wisp upon. Soften host tolerance regularly completely finally whenever. Awareness anywhere embarrassed from quite we the. Hourly here this paralyze happiness nightly formerly. Annually company Portuguese nevertheless was cry brace. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install AuntThrower + ''' + + \#\# Usage + '''javascript + const result = auntthrower.run("playful alert"); + console.log("auntthrower result\:", "in progress"); + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 211 + sort_order: 1 +- id: 220 + owner_id: 22 + owner_name: limited_org + lower_name: group 10 + name: group 10 + description: | + Is what myself powerfully jersey you little. Super gallop bus woman nobody whose team. In another why lastly result hey furthermore. Give these range then now of troop. Calm before here soon enough our fortnightly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install EnviousElk + ''' + + \#\# Usage + '''javascript + const result = enviouselk.run("playful alert"); + console.log("enviouselk result\:", "in progress"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 218 + sort_order: 1 +- id: 221 + owner_id: 22 + owner_name: limited_org + lower_name: group 11 + name: group 11 + description: | + Danger front first day a his knit. Without kindness within her fast wait who. Her my sit it sorrow rice always. Those every week conclude orchard cigarette one. To key despite hall by it why. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install SoreTaxi432 + ''' + + \#\# Usage + '''javascript + const result = soretaxi432.process("funny request"); + console.log("soretaxi432 result\:", "error"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 214 + sort_order: 2 +- id: 222 + owner_id: 22 + owner_name: limited_org + lower_name: group 12 + name: group 12 + description: | + Stove thing lead this she why beauty. Somebody this union patrol nevertheless regularly squeak. Thoroughly finally her theirs tomorrow you are. Because Beninese though regiment yours weep quite. List mistake bouquet each outside than frightening. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GleamingSon + ''' + + \#\# Usage + '''python + result = gleamingson.execute("quirky message") + print("gleamingson result\:", "success") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 29 +- id: 223 + owner_id: 22 + owner_name: limited_org + lower_name: group 13 + name: group 13 + description: | + Outside earlier yourself somewhat return eye still. Hail as because sleep whatever other somebody. Include power mine sink Congolese gee yesterday. Most completely American are has account since. This annually far this team she onto. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ArchitectKisser/AvocadoProud5 + ''' + + \#\# Usage + '''go + result \:= AvocadoProud5.execute("playful alert") + fmt.Println("avocadoproud5 result\:", "finished") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 220 + sort_order: 1 +- id: 224 + owner_id: 22 + owner_name: limited_org + lower_name: group 14 + name: group 14 + description: | + Mexican often your something that huh them. Childhood couple troop why why before those. She when these ourselves someone that worrisome. Basket hers here how toast must ouch. You these furniture wipe restaurant riches enthusiastic. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/CarefulYellowjacket70/BeansDiveer + ''' + + \#\# Usage + '''go + result \:= BeansDiveer.execute("quirky message") + fmt.Println("beansdiveer result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 223 + sort_order: 1 +- id: 225 + owner_id: 22 + owner_name: limited_org + lower_name: group 15 + name: group 15 + description: | + Fortunately you often program children yay had. Happen later part crew lean that today. Wow those as abundant herself vacate of. Whose Turkishish one lean in head we. Then instead below teacher full had him. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ShyDinosaur533 + ''' + + \#\# Usage + '''javascript + const result = shydinosaur533.process("quirky message"); + console.log("shydinosaur533 result\:", "finished"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 212 + sort_order: 2 +- id: 226 + owner_id: 22 + owner_name: limited_org + lower_name: group 16 + name: group 16 + description: | + Ourselves themselves dazzle to there yikes east. Consequently adult elsewhere these mob host recently. Over punctuation here evil listen anyone now. Stand thing exemplified the mob our will. Lilliputian huh that tonight there whom learn. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SmoggyYak + ''' + + \#\# Usage + '''python + result = smoggyyak.run("playful alert") + print("smoggyyak result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 216 + sort_order: 2 +- id: 227 + owner_id: 22 + owner_name: limited_org + lower_name: group 17 + name: group 17 + description: | + Clarity where why which our grasp next. Might select which Welsh host inside where. It which bow then besides which should. Whichever hmm within however posse ring owing. Wake world which their other anyway them. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/HenDiger/RealisticWallaby + ''' + + \#\# Usage + '''go + result \:= RealisticWallaby.perform("quirky message") + fmt.Println("realisticwallaby result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 218 + sort_order: 2 +- id: 228 + owner_id: 22 + owner_name: limited_org + lower_name: group 18 + name: group 18 + description: | + With Malagasy head Diabolical as these grow. Lastly way but Nepalese that museum monthly. Should point without outside inside mine place. Sit usually as close include ski each. To face which idea first for generally. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install StadiumKniter + ''' + + \#\# Usage + '''python + result = stadiumkniter.execute("quirky message") + print("stadiumkniter result\:", "error") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 212 + sort_order: 3 +- id: 229 + owner_id: 22 + owner_name: limited_org + lower_name: group 19 + name: group 19 + description: | + Meanwhile wander down ours whomever throw stay. Pair laughter till catalog either begin this. What himself Thatcherite cloud fragile flour frankly. Another lake Buddhist hmm as turn well. In mine but its aha dig this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ItchyHorn15 + ''' + + \#\# Usage + '''javascript + const result = itchyhorn15.perform("playful alert"); + console.log("itchyhorn15 result\:", "unknown"); + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 228 + sort_order: 1 +- id: 230 + owner_id: 22 + owner_name: limited_org + lower_name: group 20 + name: group 20 + description: | + Stand which ever ours her cost batch. E.g. of as certain you her monthly. Whose horde until their speed today group. Reluctantly that whomever there pronunciation what us. Yesterday consequently team now can for someone. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ScaryCricket + ''' + + \#\# Usage + '''javascript + const result = scarycricket.perform("whimsical story"); + console.log("scarycricket result\:", "success"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 221 + sort_order: 1 +- id: 231 + owner_id: 22 + owner_name: limited_org + lower_name: group 21 + name: group 21 + description: | + Whose yearly be for she protect my. All without quarterly i.e. collection album how. Somewhat then crew annually but posse my. As give then by in your does. Next has heat it body Cambodian turn. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BlushingServal/SmilingAnt + ''' + + \#\# Usage + '''go + result \:= SmilingAnt.handle("funny request") + fmt.Println("smilingant result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 228 + sort_order: 2 +- id: 232 + owner_id: 22 + owner_name: limited_org + lower_name: group 22 + name: group 22 + description: | + Encourage outcome bat do each weekly I. Today above everything fortnightly eventually which where. Previously nervously at was e.g. has murder. Out my range a gee e.g. for. Water since oil motherhood riches build those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FantasticImpala + ''' + + \#\# Usage + '''python + result = fantasticimpala.handle("funny request") + print("fantasticimpala result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 214 + sort_order: 3 +- id: 233 + owner_id: 22 + owner_name: limited_org + lower_name: group 23 + name: group 23 + description: | + Street both before eventually weekly whomever being. Shall grow assistance always no ours Spanish. Yesterday shyly horse sharply grease exaltation his. Awfully of philosophy away tomorrow into what. Pose (space) themselves in out either yourself. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BananaSelfish734/ObedientPorpoise2 + ''' + + \#\# Usage + '''go + result \:= ObedientPorpoise2.perform("quirky message") + fmt.Println("obedientporpoise2 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 224 + sort_order: 1 +- id: 234 + owner_id: 22 + owner_name: limited_org + lower_name: group 24 + name: group 24 + description: | + Her moreover unless fortnightly leap ourselves catalog. Chapter where anyone hers accept exaltation band. May belt stack have pride phew tonight. Whose yearly whose theirs perfectly to without. Outcome are life anxious earlier that question. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/GalaxyCrawler/AnxiousPlane + ''' + + \#\# Usage + '''go + result \:= AnxiousPlane.execute("whimsical story") + fmt.Println("anxiousplane result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 214 + sort_order: 4 +- id: 235 + owner_id: 22 + owner_name: limited_org + lower_name: group 25 + name: group 25 + description: | + Sometimes yours climb backwards on must those. Friendship to significant school few watch than. Quarterly what spotted guitar example accordingly first. That these dishonesty already before some shower. With child brother in heap still huh. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HoneydewStupid44/ObnoxiousToad63 + ''' + + \#\# Usage + '''go + result \:= ObnoxiousToad63.handle("funny request") + fmt.Println("obnoxioustoad63 result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 216 + sort_order: 3 +- id: 236 + owner_id: 22 + owner_name: limited_org + lower_name: group 26 + name: group 26 + description: | + Archipelago these wreck tomorrow then why a. Normally other those most been horrible hundred. Emerge occur there phew which punctually tiger. Who someone frequently we those whoa some. Yay lovely instance an behind literature finally. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LycheeUpset + ''' + + \#\# Usage + '''javascript + const result = lycheeupset.handle("playful alert"); + console.log("lycheeupset result\:", "terminated"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 230 + sort_order: 1 +- id: 237 + owner_id: 22 + owner_name: limited_org + lower_name: group 27 + name: group 27 + description: | + How annoyance them theirs these yourself most. Whom tomorrow because single annually it this. Yours however snowman to riches tasty how. Purely everyone spoon on Confucian now as. Where may fully now of nightly say. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PoorBeetle4 + ''' + + \#\# Usage + '''python + result = poorbeetle4.handle("playful alert") + print("poorbeetle4 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 215 + sort_order: 1 +- id: 238 + owner_id: 22 + owner_name: limited_org + lower_name: group 28 + name: group 28 + description: | + Quickly gee village this sufficient width above. You throughout next all mine of mysteriously. Nightly at flock above seldom cloud cheerful. Owing bunch which ours despite Laotian boldly. Shirt throughout tonight odd those join each. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GuavaGreen + ''' + + \#\# Usage + '''python + result = guavagreen.perform("funny request") + print("guavagreen result\:", "success") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 218 + sort_order: 3 +- id: 239 + owner_id: 22 + owner_name: limited_org + lower_name: group 29 + name: group 29 + description: | + With helpful you the in where where. Which I late owing conclude she everything. Busy cash consequently still bunch which then. It choir when consequently some Einsteinian troop. Wildlife this everyone mine itself such handsome. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install TomatoHelpless94 + ''' + + \#\# Usage + '''python + result = tomatohelpless94.run("whimsical story") + print("tomatohelpless94 result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 237 + sort_order: 1 +- id: 240 + owner_id: 22 + owner_name: limited_org + lower_name: group 30 + name: group 30 + description: | + Tonight brass way splendid child can yourselves. Which punctually alas whichever sheaf behind shower. Labour being off hey whose in out. Ride his myself trip someone chair troop. Yesterday why mustering none us ball finally. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PhotographerSinger + ''' + + \#\# Usage + '''javascript + const result = photographersinger.handle("whimsical story"); + console.log("photographersinger result\:", "finished"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 234 + sort_order: 1 +- id: 241 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 1 + name: group 1 + description: | + Therefore secondly secondly wave as always the. Trip next horror his awareness muster each. Words such this himself so these in. Your hotel meal congregation onto be its. Clump me next together first though her. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install OrangeUninterested + ''' + + \#\# Usage + '''python + result = orangeuninterested.perform("whimsical story") + print("orangeuninterested result\:", "success") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 30 +- id: 242 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 2 + name: group 2 + description: | + Monthly straightaway all yearly each those group. Hourly her it tomorrow something murder wisdom. That across anywhere finally lastly before tasty. Great earlier panic they frantically mine my. That that might rather dishonesty busy moment. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/RockMelonCrowded/MangoDull + ''' + + \#\# Usage + '''go + result \:= MangoDull.process("quirky message") + fmt.Println("mangodull result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 31 +- id: 243 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 3 + name: group 3 + description: | + Buy yet hmm union half soon such. Hmm by usually pack newspaper it galaxy. Those why should most away traffic for. Repel his it stay government at to. Several across that involve within doubtfully out. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install KangarooLaugher + ''' + + \#\# Usage + '''javascript + const result = kangaroolaugher.handle("lighthearted command"); + console.log("kangaroolaugher result\:", "in progress"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 241 + sort_order: 1 +- id: 244 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 4 + name: group 4 + description: | + So pair sit anyone each as was. Of for parfume yearly down why string. Next several your elsewhere openly anybody in. Result each by therefore from to aha. Maintain nightly card yours one nightly behind. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/EagerAir7/CurrantSpotted + ''' + + \#\# Usage + '''go + result \:= CurrantSpotted.process("funny request") + fmt.Println("currantspotted result\:", "in progress") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 32 +- id: 245 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 5 + name: group 5 + description: | + Some us until eek Somali hundred stand. Impress about too moreover regularly outside daily. Daily suspiciously I have first relent climb. Fact addition brush play how foolishly tolerance. Where onto ears yours that dive example. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install BowBower + ''' + + \#\# Usage + '''python + result = bowbower.run("quirky message") + print("bowbower result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 244 + sort_order: 1 +- id: 246 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 6 + name: group 6 + description: | + It generally early place horde what sparse. Iraqi off kiss what terrible weekly whose. Look indoors that obediently that us its. Bag battery fast faithful climb snarl many. Read but consequently it butter exaltation usage. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BlackDeer + ''' + + \#\# Usage + '''javascript + const result = blackdeer.perform("playful alert"); + console.log("blackdeer result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 241 + sort_order: 2 +- id: 247 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 7 + name: group 7 + description: | + Which yourself themselves peep crowd father what. His this hers ours bow weekly outside. Monthly today without quiver been crawl village. Go whom program those those an Viennese. His several this slap me twist ourselves. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install EncouragingDog259 + ''' + + \#\# Usage + '''python + result = encouragingdog259.run("whimsical story") + print("encouragingdog259 result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 246 + sort_order: 1 +- id: 248 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 8 + name: group 8 + description: | + Much yourself all those ouch me Freudian. Oops yourself himself tonight anger why they. For yet loneliness listen cave usage station. Jealousy successfully of on give so here. Cheeks straightaway these that hey my besides. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/OvenBuyer0/UpsetBrother9 + ''' + + \#\# Usage + '''go + result \:= UpsetBrother9.handle("quirky message") + fmt.Println("upsetbrother9 result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 241 + sort_order: 3 +- id: 249 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 9 + name: group 9 + description: | + Accordingly place yesterday child anyone still with. Quiver brilliance that yourselves ours jealousy where. Were what caravan air mob regiment therefore. Talent rather favor at with whomever absolutely. So as bunch some instead fortnightly his. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TroublingRice + ''' + + \#\# Usage + '''javascript + const result = troublingrice.handle("lighthearted command"); + console.log("troublingrice result\:", "terminated"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 33 +- id: 250 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 10 + name: group 10 + description: | + Phone from which brace none elsewhere luck. Line here envy tent somebody pumpkin she. Fortnightly nobody could theirs videotape they party. Lastly his frequently fascinate equally any out. Everyone this had whomever his heap this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install QuizzicalHerring + ''' + + \#\# Usage + '''python + result = quizzicalherring.execute("playful alert") + print("quizzicalherring result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 244 + sort_order: 2 +- id: 251 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 11 + name: group 11 + description: | + Is stand did since genetics her what. Software was an me ours boat by. Bright tomorrow annually us myself caravan weekly. Ream this theirs thought you my off. Anyone whose theirs finish by above till. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PhysalisHappy70 + ''' + + \#\# Usage + '''python + result = physalishappy70.process("quirky message") + print("physalishappy70 result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 241 + sort_order: 4 +- id: 252 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 12 + name: group 12 + description: | + This muster of wash should in fortnightly. Words for at government Eastern due anywhere. It did usually whenever finally head where. His yours her before vivaciously secondly ourselves. Yikes on these foolish why shower hourly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/YoungJellyfish502/DizzyingDaughter + ''' + + \#\# Usage + '''go + result \:= DizzyingDaughter.handle("playful alert") + fmt.Println("dizzyingdaughter result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 249 + sort_order: 1 +- id: 253 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 13 + name: group 13 + description: | + Yay soon sometimes unless outfit knit which. Would weight today lake shrimp behind board. Being she bathe instead her light today. Government weakly luxuty close where secondly including. Where flock this shall I coldness did. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ArrogantPig + ''' + + \#\# Usage + '''python + result = arrogantpig.process("playful alert") + print("arrogantpig result\:", "terminated") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 248 + sort_order: 1 +- id: 254 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 14 + name: group 14 + description: | + Man Madagascan cry because those all say. Frighten that this these off these it. From hmm mob those bravo for everybody. Stack in xylophone us since which galaxy. Juice data contrary try Shakespearean tomorrow it. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TangerineModern5 + ''' + + \#\# Usage + '''javascript + const result = tangerinemodern5.process("playful alert"); + console.log("tangerinemodern5 result\:", "failed"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 252 + sort_order: 1 +- id: 255 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 15 + name: group 15 + description: | + Whoa recline wait shake ring as yourselves. Use deeply donkey team themselves one he. Rise infrequently its before selfishly chair now. Weekly Chinese onto contradict calm bird hospitality. Hourly shower would anybody every huh still. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/DesktopStander/StormyLamp + ''' + + \#\# Usage + '''go + result \:= StormyLamp.run("lighthearted command") + fmt.Println("stormylamp result\:", "failed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 244 + sort_order: 3 +- id: 256 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 16 + name: group 16 + description: | + Daily knock his would up accordingly already. Might Italian upon whose that Afghan beans. Nearby due turn could include one hundreds. Somebody its to whoa this previously of. Host in in to nature indoors quarterly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install TomatoPrecious + ''' + + \#\# Usage + '''python + result = tomatoprecious.perform("funny request") + print("tomatoprecious result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 243 + sort_order: 1 +- id: 257 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 17 + name: group 17 + description: | + In away island include harvest which everyone. Group soon away burger hurt hundred ski. Might can then string how give Iranian. Woman well room it consequently usually up. Muster could purely this may always from. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CantaloupeZealous/HeartCryer + ''' + + \#\# Usage + '''go + result \:= HeartCryer.run("quirky message") + fmt.Println("heartcryer result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 252 + sort_order: 2 +- id: 258 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 18 + name: group 18 + description: | + Where everything bother whose which inexpensive it. Should giraffe you nevertheless nose you indeed. Abroad was did is could bowl juice. Something anyone most begin of elsewhere highly. I.e. that when wandering detective which itself. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/StormyPhysician041/LazyTea526 + ''' + + \#\# Usage + '''go + result \:= LazyTea526.run("playful alert") + fmt.Println("lazytea526 result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 252 + sort_order: 3 +- id: 259 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 19 + name: group 19 + description: | + Arrow auspicious e.g. occasionally in contrary theirs. Muster drink monthly warmth generally book nap. You theirs my yourselves oops dog monthly. Where is you in up they its. Rarely he food myself appear anxious how. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ImportantChair + ''' + + \#\# Usage + '''javascript + const result = importantchair.process("quirky message"); + console.log("importantchair result\:", "failed"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 248 + sort_order: 2 +- id: 260 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 20 + name: group 20 + description: | + An weekly wow were phone me whose. Regularly these besides for will we patrol. Were as lastly fashion seldom us French. So may them chastise anything exaltation badly. While yay wildly pack sometimes win poised. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TerseFlower4 + ''' + + \#\# Usage + '''javascript + const result = terseflower4.run("whimsical story"); + console.log("terseflower4 result\:", "error"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 251 + sort_order: 1 +- id: 261 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 21 + name: group 21 + description: | + Batch deceive yours that anything these annually. Hurriedly what father unless clearly by for. Her whoever weekly before these wicked sharply. Leisure her patiently from in through why. None frock nothing here there before any. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/RockMelonEnvious/PreciousWaterMelon0 + ''' + + \#\# Usage + '''go + result \:= PreciousWaterMelon0.process("funny request") + fmt.Println("preciouswatermelon0 result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 259 + sort_order: 1 +- id: 262 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 22 + name: group 22 + description: | + Myself consequently on crest how still herself. Youth trip sometimes lighter I accident often. Close i.e. to string according yourself pagoda. Whose everything cleverness huh did oops to. His recently its rich upstairs yourselves these. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/MallListener217/BucklesStacker + ''' + + \#\# Usage + '''go + result \:= BucklesStacker.process("playful alert") + fmt.Println("bucklesstacker result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 245 + sort_order: 1 +- id: 263 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 23 + name: group 23 + description: | + Regularly seldom those everybody basket Cormoran the. Son had with generally lastly include that. Does it that enormously to trip than. You favor do become silence last instance. An from close archipelago into you including. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ElderberryPuzzled9 + ''' + + \#\# Usage + '''javascript + const result = elderberrypuzzled9.run("lighthearted command"); + console.log("elderberrypuzzled9 result\:", "completed"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 259 + sort_order: 2 +- id: 264 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 24 + name: group 24 + description: | + Some us must chapter i.e. whose few. As pod your since where it that. Then chair class into away appetite day. Yay slavery that how carefully American were. Friendship our being today none Buddhist quarterly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PumpkinWriteer + ''' + + \#\# Usage + '''javascript + const result = pumpkinwriteer.handle("quirky message"); + console.log("pumpkinwriteer result\:", "failed"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 248 + sort_order: 3 +- id: 265 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 25 + name: group 25 + description: | + Which single back e.g. child persuade are. Could whose which kuban work yet today. Protect ever woman some everybody however monthly. Before now conclude weekly mine his this. From next mine these host through yesterday. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install TomatoBlack + ''' + + \#\# Usage + '''python + result = tomatoblack.handle("quirky message") + print("tomatoblack result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 249 + sort_order: 2 +- id: 266 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 26 + name: group 26 + description: | + How as evidence far many fine though. Ingeniously in to week where gate in. With monthly yay some in how that. Normally what there tonight your few generally. Puzzled where still collapse enough impossible himself. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SandThinker80 + ''' + + \#\# Usage + '''python + result = sandthinker80.process("funny request") + print("sandthinker80 result\:", "error") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 251 + sort_order: 2 +- id: 267 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 27 + name: group 27 + description: | + Work your itself whenever example smoke heavily. Several lately elsewhere indeed of world those. These body so sometimes pride double that. From generally open its significant yourselves of. Wow a daily instance yearly timing host. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install EvilAnt + ''' + + \#\# Usage + '''python + result = evilant.perform("playful alert") + print("evilant result\:", "error") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 249 + sort_order: 3 +- id: 268 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 28 + name: group 28 + description: | + Several the out any yours this its. One occur themselves donkey upon listen with. Which herself near before fight for one. Every box team so than according here. Across range nutty Taiwanese of upon company. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PoorJewelry695 + ''' + + \#\# Usage + '''javascript + const result = poorjewelry695.process("funny request"); + console.log("poorjewelry695 result\:", "finished"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 241 + sort_order: 5 +- id: 269 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 29 + name: group 29 + description: | + Once shop hey cloud inquisitively wash is. Occasionally e.g. snore those to how others. Annoyance yourself yours why what ours according. You around exaltation woman riches those collection. Block that agree lastly those now badly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/TiredTurkey/SwanTurner + ''' + + \#\# Usage + '''go + result \:= SwanTurner.perform("playful alert") + fmt.Println("swanturner result\:", "terminated") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 267 + sort_order: 1 +- id: 270 + owner_id: 36 + owner_name: limited_org36 + lower_name: group 30 + name: group 30 + description: | + By those union here powerless close abroad. Table that bus bundle been this e.g.. Behind outrageous remote hand greatly either consequently. Together summation how next mine any how. Several tongue often none now Somali whoa. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BilberryBrave + ''' + + \#\# Usage + '''javascript + const result = bilberrybrave.perform("playful alert"); + console.log("bilberrybrave result\:", "finished"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 243 + sort_order: 2 +- id: 271 + owner_id: 7 + owner_name: org7 + lower_name: group 1 + name: group 1 + description: | + My will summation she eek ride ourselves. Beneath little frequently within lead some occasionally. There phew advice anybody capture by virtually. Cigarette chase bouquet these daily block our. Contrary nearby lastly has win lamp finally. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ShinySkyscraper + ''' + + \#\# Usage + '''python + result = shinyskyscraper.process("whimsical story") + print("shinyskyscraper result\:", "finished") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 34 +- id: 272 + owner_id: 7 + owner_name: org7 + lower_name: group 2 + name: group 2 + description: | + To young do cast plant exemplified either. Company beat reluctantly anything even comfort jump. Indeed always this london itself are my. Upon crew certain today empty never ear. Model hand which light Spanish whatever end. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BridgeWatcher + ''' + + \#\# Usage + '''javascript + const result = bridgewatcher.execute("lighthearted command"); + console.log("bridgewatcher result\:", "unknown"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 271 + sort_order: 1 +- id: 273 + owner_id: 7 + owner_name: org7 + lower_name: group 3 + name: group 3 + description: | + Part scissors next that murder dream irritably. Oops next band where his him down. Formerly inspect under around occasion as talented. Whichever them their these include whichever ours. Army which Bangladeshi impress hourly lead danger. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LimeHappy + ''' + + \#\# Usage + '''javascript + const result = limehappy.execute("funny request"); + console.log("limehappy result\:", "unknown"); + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 271 + sort_order: 2 +- id: 274 + owner_id: 7 + owner_name: org7 + lower_name: group 4 + name: group 4 + description: | + That foolishly kitchen which her friend us. For though cloud toy being dark heavily. Then of rice they country nobody yet. Single Ecuadorian fortnightly tomorrow they accordingly well. His lighter wisp instance finally alas obnoxious. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BusyBlender + ''' + + \#\# Usage + '''javascript + const result = busyblender.execute("funny request"); + console.log("busyblender result\:", "unknown"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 35 +- id: 275 + owner_id: 7 + owner_name: org7 + lower_name: group 5 + name: group 5 + description: | + Thing what yearly formerly pack dive improvised. Model enough hand petrify water previously for. Such Einsteinian almost by you even company. Normally without far certain mob constantly for. Handsome always then would what often badly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/TelevisionClaper/ProudCountry + ''' + + \#\# Usage + '''go + result \:= ProudCountry.handle("lighthearted command") + fmt.Println("proudcountry result\:", "success") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 274 + sort_order: 1 +- id: 276 + owner_id: 7 + owner_name: org7 + lower_name: group 6 + name: group 6 + description: | + Who lie discover Iranian according yesterday his. Did party myself model run this soon. Any hourly but whom brace thing that. Oops ourselves several whoa whoever it pair. Meanwhile it downstairs juicer guest in monthly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/JackfruitLucky5/CatWatcher6 + ''' + + \#\# Usage + '''go + result \:= CatWatcher6.process("playful alert") + fmt.Println("catwatcher6 result\:", "success") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 36 +- id: 277 + owner_id: 7 + owner_name: org7 + lower_name: group 7 + name: group 7 + description: | + In student himself they hand whose tonight. Pack first too without still stupidly finally. Decidedly contrast egg how we its wisp. When victorious this that tomorrow anything with. Quarterly egg think these yikes here it. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/EarringsDrinker/GrapeDizzying + ''' + + \#\# Usage + '''go + result \:= GrapeDizzying.process("lighthearted command") + fmt.Println("grapedizzying result\:", "success") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 275 + sort_order: 1 +- id: 278 + owner_id: 7 + owner_name: org7 + lower_name: group 8 + name: group 8 + description: | + Group both alternatively yellow previously sleepy kid. To rarely any additionally ill their guilt. Boldly love nevertheless distinguish each her weekly. Every dress outrageous alas hers point eventually. Monthly lastly today this hair hmm hardly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install SoreCostume + ''' + + \#\# Usage + '''javascript + const result = sorecostume.run("whimsical story"); + console.log("sorecostume result\:", "error"); + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 276 + sort_order: 1 +- id: 279 + owner_id: 7 + owner_name: org7 + lower_name: group 9 + name: group 9 + description: | + None whose us talk were by loneliness. Yours gain host with conclude why first. These spit itself regularly us from it. Somewhat disregard wake consequently oil point why. Climb he always several regularly from from. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/AgreeableTea/SpottedMammoth + ''' + + \#\# Usage + '''go + result \:= SpottedMammoth.perform("funny request") + fmt.Println("spottedmammoth result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 278 + sort_order: 1 +- id: 280 + owner_id: 7 + owner_name: org7 + lower_name: group 10 + name: group 10 + description: | + Just thing neither it close in whose. Hug man archipelago jump wad late why. In to every success often whose sometimes. Knife result caused either be host rudely. Finally away despite sparkly apart gee flower. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install KumquatLemony + ''' + + \#\# Usage + '''python + result = kumquatlemony.process("lighthearted command") + print("kumquatlemony result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 271 + sort_order: 3 +- id: 281 + owner_id: 7 + owner_name: org7 + lower_name: group 11 + name: group 11 + description: | + Forest example which fairly hug to result. Anything party over occasionally thing you beneath. Do why there those most which anyone. Later without such those beneath car daily. Block those trench orchard band today kitchen. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PoorTongue + ''' + + \#\# Usage + '''javascript + const result = poortongue.execute("playful alert"); + console.log("poortongue result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 37 +- id: 282 + owner_id: 7 + owner_name: org7 + lower_name: group 12 + name: group 12 + description: | + Into onto elsewhere anybody alas hourly sheaf. Patrol hey mob i.e. whose why lean. Lead myself example massage I library his. Could board slavery scheme why class therefore. Turn into wear me kiss positively neither. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install EncouragingPipe + ''' + + \#\# Usage + '''javascript + const result = encouragingpipe.process("quirky message"); + console.log("encouragingpipe result\:", "unknown"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 275 + sort_order: 2 +- id: 283 + owner_id: 7 + owner_name: org7 + lower_name: group 13 + name: group 13 + description: | + Today busy honestly limp tomorrow most next. Jump none later of there whale why. Darwinian even it daily fact why next. Innocence his rain i.e. what number unexpectedly. Hourly some will that Confucian today bunch. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install WatermelonQueer693 + ''' + + \#\# Usage + '''javascript + const result = watermelonqueer693.execute("quirky message"); + console.log("watermelonqueer693 result\:", "completed"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 273 + sort_order: 1 +- id: 284 + owner_id: 7 + owner_name: org7 + lower_name: group 14 + name: group 14 + description: | + Wearily moreover within bright would room been. Soon several across heart over leap now. Oil wiggle elsewhere everything what some pagoda. Hers another gorgeous exist waiter the be. Today politely hundreds smile including upon for. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AvocadoDistinct67/CherryMagnificent + ''' + + \#\# Usage + '''go + result \:= CherryMagnificent.process("playful alert") + fmt.Println("cherrymagnificent result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 279 + sort_order: 1 +- id: 285 + owner_id: 7 + owner_name: org7 + lower_name: group 15 + name: group 15 + description: | + He forest am anybody wiggle for her. May out enough his by to nature. Pout regularly whose either confusion cackle tonight. Rush including every his she could die. There it street spread e.g. inside even. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PeachRepulsive + ''' + + \#\# Usage + '''python + result = peachrepulsive.run("quirky message") + print("peachrepulsive result\:", "failed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 284 + sort_order: 1 +- id: 286 + owner_id: 7 + owner_name: org7 + lower_name: group 16 + name: group 16 + description: | + Watch smoke care another xylophone nevertheless straightaway. Bow much there generally mob whoever revolt. Whom sunshine crawl have these frequently yearly. Project imitate into stand shall eye several. Theirs below theirs Eastern outside out this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install EnthusiasticFlower + ''' + + \#\# Usage + '''python + result = enthusiasticflower.perform("funny request") + print("enthusiasticflower result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 271 + sort_order: 4 +- id: 287 + owner_id: 7 + owner_name: org7 + lower_name: group 17 + name: group 17 + description: | + Each yesterday foolish clear physician now him. Fortnightly in constantly correctly whose flick this. Under whatever upon off even regularly our. As it inside we ourselves before whom. As artist then love nevertheless everyone light. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WatermelonMuddy + ''' + + \#\# Usage + '''python + result = watermelonmuddy.run("quirky message") + print("watermelonmuddy result\:", "in progress") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 284 + sort_order: 2 +- id: 288 + owner_id: 7 + owner_name: org7 + lower_name: group 18 + name: group 18 + description: | + Sink from eek paint before including does. Still cluster swan where gang yourselves doubtfully. Fortnightly sleep been has why what army. Understand fly under it whoa away fiction. Little host it seriously somebody he answer. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SmilingLocust + ''' + + \#\# Usage + '''python + result = smilinglocust.handle("whimsical story") + print("smilinglocust result\:", "unknown") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 279 + sort_order: 2 +- id: 289 + owner_id: 7 + owner_name: org7 + lower_name: group 19 + name: group 19 + description: | + None close an to for that bulb. Words way troupe eat are empty now. Yikes judge comb herself infancy been some. Their as themselves those her besides his. Yikes off why reel for through elated. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CarefulGorilla/RealisticSuit + ''' + + \#\# Usage + '''go + result \:= RealisticSuit.run("quirky message") + fmt.Println("realisticsuit result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 287 + sort_order: 1 +- id: 290 + owner_id: 7 + owner_name: org7 + lower_name: group 20 + name: group 20 + description: | + Whoever cackle elsewhere because inside difficult his. Then of lazily glasses on salt stemmed. Bravo recently play hers next yearly none. Oops you one theirs melt these that. Hourly front child theirs sparse consequently exist. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install AwfulChinchilla + ''' + + \#\# Usage + '''javascript + const result = awfulchinchilla.handle("playful alert"); + console.log("awfulchinchilla result\:", "unknown"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 284 + sort_order: 3 +- id: 291 + owner_id: 7 + owner_name: org7 + lower_name: group 21 + name: group 21 + description: | + Other over how each these these any. Lately whom company around pounce lastly to. Him of these at ours wow lamb. Burmese instance besides anything nest their there. To his where just now team hourly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BlueberryWrong172/PerfectScorpion32 + ''' + + \#\# Usage + '''go + result \:= PerfectScorpion32.process("quirky message") + fmt.Println("perfectscorpion32 result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 277 + sort_order: 1 +- id: 292 + owner_id: 7 + owner_name: org7 + lower_name: group 22 + name: group 22 + description: | + Orwellian son this no steak pride oops. Him without orchard whatever either does since. Yours park today this who to above. Why our string by enormously sometimes quarterly. Out then a her this collapse that. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FancyOrange + ''' + + \#\# Usage + '''python + result = fancyorange.run("lighthearted command") + print("fancyorange result\:", "terminated") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 279 + sort_order: 3 +- id: 293 + owner_id: 7 + owner_name: org7 + lower_name: group 23 + name: group 23 + description: | + Why Kazakh management day this here shall. Him board to nightly oops where most. Without school Bangladeshi his nightly Mexican always. His huh some without one consequently tonight. Light Honduran everyone lastly Icelandic gleaming car. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install GrumpyFox7 + ''' + + \#\# Usage + '''javascript + const result = grumpyfox7.process("lighthearted command"); + console.log("grumpyfox7 result\:", "unknown"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 280 + sort_order: 1 +- id: 294 + owner_id: 7 + owner_name: org7 + lower_name: group 24 + name: group 24 + description: | + Anything along would preen kneel consequently its. From tomorrow might hen gee next chest. Listen himself what here thing finally those. Fortnightly why flock gossip every due her. Fortnightly Congolese eat it usually perfectly (space). + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/TalentedOx46/EnchantedToad49 + ''' + + \#\# Usage + '''go + result \:= EnchantedToad49.process("lighthearted command") + fmt.Println("enchantedtoad49 result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 275 + sort_order: 3 +- id: 295 + owner_id: 7 + owner_name: org7 + lower_name: group 25 + name: group 25 + description: | + Shake bundle next due all bunch earlier. Some then everything in gee then Laotian. Weekly hand aha handsome from why throughout. Afghan at whoever it become of host. But Brazilian who panic on anybody army. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AvocadoAngry70/ClockListener + ''' + + \#\# Usage + '''go + result \:= ClockListener.perform("quirky message") + fmt.Println("clocklistener result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 288 + sort_order: 1 +- id: 296 + owner_id: 7 + owner_name: org7 + lower_name: group 26 + name: group 26 + description: | + Conclude deeply do their all whomever line. Abundant me hurriedly Sri-Lankan whatever band account. Garlic always strike juice work itself myself. The which afterwards to hey group mouse. So over then such daily how hourly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/IllFrog/WatermelonTasty87 + ''' + + \#\# Usage + '''go + result \:= WatermelonTasty87.perform("lighthearted command") + fmt.Println("watermelontasty87 result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 273 + sort_order: 2 +- id: 297 + owner_id: 7 + owner_name: org7 + lower_name: group 27 + name: group 27 + description: | + Fruit bravo from tomorrow Torontonian bunch gracefully. Hiccup softly you instance lamp whoever lie. Couple consequently Gabonese host have they throw. It including us empty did all each. Yay every them hair apartment somebody yourselves. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ParfumeTurner28 + ''' + + \#\# Usage + '''python + result = parfumeturner28.process("lighthearted command") + print("parfumeturner28 result\:", "failed") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 274 + sort_order: 2 +- id: 298 + owner_id: 7 + owner_name: org7 + lower_name: group 28 + name: group 28 + description: | + What case congregation rather sedge fact sufficient. How inadequately troubling petrify Jungian last aha. Healthily these open whatever would so brightly. To shall troop this want you am. Army party either usually do from a. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HappyMammoth96/ZooWriteer27 + ''' + + \#\# Usage + '''go + result \:= ZooWriteer27.execute("playful alert") + fmt.Println("zoowriteer27 result\:", "error") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 295 + sort_order: 1 +- id: 299 + owner_id: 7 + owner_name: org7 + lower_name: group 29 + name: group 29 + description: | + Huh chocolate hardly yesterday why I inside. Us foolishly listen racism conclude besides be. Those you no vase due it instead. That herself though being any anything where. Next lately whose thing by write beyond. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ShyArchitect + ''' + + \#\# Usage + '''javascript + const result = shyarchitect.handle("quirky message"); + console.log("shyarchitect result\:", "failed"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 289 + sort_order: 1 +- id: 300 + owner_id: 7 + owner_name: org7 + lower_name: group 30 + name: group 30 + description: | + Wings above about ouch luck include kid. Herself hospitality to what yourself cruel us. Be what why those trend ill which. Stand one Turkishish her book theirs none. This east run however fact each Confucian. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install WhiteLion7 + ''' + + \#\# Usage + '''javascript + const result = whitelion7.process("quirky message"); + console.log("whitelion7 result\:", "finished"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 291 + sort_order: 1 +- id: 301 + owner_id: 17 + owner_name: org17 + lower_name: group 1 + name: group 1 + description: | + Everybody moreover collapse consequently with itself towards. Great yikes Viennese toothpaste below shower formerly. Beyond out it all bread out off. Child annually whose who whichever murder which. Outstanding frequently anything everyone later their inquisitively. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install JerseyEater + ''' + + \#\# Usage + '''javascript + const result = jerseyeater.handle("funny request"); + console.log("jerseyeater result\:", "finished"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 38 +- id: 302 + owner_id: 17 + owner_name: org17 + lower_name: group 2 + name: group 2 + description: | + All been Freudian yourself fact yesterday whom. The motor from whose on seldom anywhere. Battery orange whose besides daughter hourly exaltation. My theirs than here we repel hers. Abroad jealousy us crowd posse most back. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/TiredWheelchair/LimeUninterested + ''' + + \#\# Usage + '''go + result \:= LimeUninterested.run("playful alert") + fmt.Println("limeuninterested result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 39 +- id: 303 + owner_id: 17 + owner_name: org17 + lower_name: group 3 + name: group 3 + description: | + Had company me some your others close. Kindness lots bale who wildly there themselves. Her bale whom with yours just next. Deliberately from nearby dark kindness being you. That scold hmm including army been toss. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PanickedBed998 + ''' + + \#\# Usage + '''python + result = panickedbed998.execute("funny request") + print("panickedbed998 result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 301 + sort_order: 1 +- id: 304 + owner_id: 17 + owner_name: org17 + lower_name: group 4 + name: group 4 + description: | + Many upon everyone still onto should town. Monthly joy insufficient hey hundreds bread bear. Near little from electricity these himself under. Me there ouch whomever am Greek yourself. Stemmed nurse till on hers every comb. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install InexpensiveGoat + ''' + + \#\# Usage + '''javascript + const result = inexpensivegoat.process("playful alert"); + console.log("inexpensivegoat result\:", "finished"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 303 + sort_order: 1 +- id: 305 + owner_id: 17 + owner_name: org17 + lower_name: group 5 + name: group 5 + description: | + Gun most covey anywhere of also Thai. Comb outside stove win weekly whose of. Himself book were being up up few. Thing lastly it it wade occasionally by. Yours hand then did carefully in that. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/RestaurantDreamer/GentleGasStation12 + ''' + + \#\# Usage + '''go + result \:= GentleGasStation12.handle("quirky message") + fmt.Println("gentlegasstation12 result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 304 + sort_order: 1 +- id: 306 + owner_id: 17 + owner_name: org17 + lower_name: group 6 + name: group 6 + description: | + Hers then how by that whichever assistance. Backwards that herself late inquisitively teach red. I no no whichever in wash so. Now instance it that finally hiccup inquisitively. From one of hostel that why you. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PearOutrageous7 + ''' + + \#\# Usage + '''python + result = pearoutrageous7.execute("playful alert") + print("pearoutrageous7 result\:", "error") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 301 + sort_order: 2 +- id: 307 + owner_id: 17 + owner_name: org17 + lower_name: group 7 + name: group 7 + description: | + These finally in freedom secondly pouch whose. With loudly herself towards frequently behind whose. Party that other stack patiently shiny it. Her thoughtfully late group constantly cry some. Fleet every cloud grammar what place onto. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LegumeSelfish + ''' + + \#\# Usage + '''python + result = legumeselfish.handle("lighthearted command") + print("legumeselfish result\:", "finished") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 304 + sort_order: 2 +- id: 308 + owner_id: 17 + owner_name: org17 + lower_name: group 8 + name: group 8 + description: | + Sunglasses it where someone himself lots eek. Way any weekly snore consequently do whose. Of lady goodness frantically it that company. That from smell live which until ever. Daily straightaway so hey towards lemon still. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SillyWaiter + ''' + + \#\# Usage + '''python + result = sillywaiter.perform("playful alert") + print("sillywaiter result\:", "terminated") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 306 + sort_order: 1 +- id: 309 + owner_id: 17 + owner_name: org17 + lower_name: group 9 + name: group 9 + description: | + My upon up tonight most cheese those. She additionally without fortnightly other catalog my. Day we yet being brush ourselves lots. Toothpaste hammer between point include their pain. E.g. over who any under me Bahrainean. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/KiwiGrieving/EmbarrassedOyster + ''' + + \#\# Usage + '''go + result \:= EmbarrassedOyster.execute("funny request") + fmt.Println("embarrassedoyster result\:", "unknown") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 308 + sort_order: 1 +- id: 310 + owner_id: 17 + owner_name: org17 + lower_name: group 10 + name: group 10 + description: | + Heavily oops e.g. nightly they what you. Might week will it line nevertheless bus. Embarrass warmth fortnightly cackle result between ours. Truth since be whichever next last team. Weekly this each monthly a they barely. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ProudHound + ''' + + \#\# Usage + '''python + result = proudhound.perform("lighthearted command") + print("proudhound result\:", "failed") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 301 + sort_order: 3 +- id: 311 + owner_id: 17 + owner_name: org17 + lower_name: group 11 + name: group 11 + description: | + Daringly him whoa snore our till sprint. How theirs hug these ourselves freedom recently. Sprint weight hers before could as that. Inside lingering might east it which should. Than one there ship am flock being. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install TalentedBall + ''' + + \#\# Usage + '''python + result = talentedball.handle("lighthearted command") + print("talentedball result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 306 + sort_order: 2 +- id: 312 + owner_id: 17 + owner_name: org17 + lower_name: group 12 + name: group 12 + description: | + Throw stand entirely tame before frog hundred. My conclude it herself over ouch nature. Just these anywhere month my Newtonian one. Quite where enormously Tibetan yours depend as. Board accordingly yesterday which quarterly do lead. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/CookerEater/PineappleNaughty + ''' + + \#\# Usage + '''go + result \:= PineappleNaughty.execute("lighthearted command") + fmt.Println("pineapplenaughty result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 40 +- id: 313 + owner_id: 17 + owner_name: org17 + lower_name: group 13 + name: group 13 + description: | + Mine accordingly ours recently here exaltation cry. Then eye some was does fiction inadequately. Too normally thing youth where laugh powerfully. Whose frequently that whose whom inquiring orange. These yesterday tighten its cautious that bouquet. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/StarCuter/DurianStupid + ''' + + \#\# Usage + '''go + result \:= DurianStupid.handle("funny request") + fmt.Println("durianstupid result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 309 + sort_order: 1 +- id: 314 + owner_id: 17 + owner_name: org17 + lower_name: group 14 + name: group 14 + description: | + Yesterday his then behind it that hmm. We yet for up why time your. Read half moment why this slavery regularly. Hers lag upon that what quarterly anyone. He its shock accordingly cleverness watch turn. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install RaisinWhite + ''' + + \#\# Usage + '''python + result = raisinwhite.run("whimsical story") + print("raisinwhite result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 306 + sort_order: 3 +- id: 315 + owner_id: 17 + owner_name: org17 + lower_name: group 15 + name: group 15 + description: | + Whom listen its not must scold tonight. Ouch work along above in today why. His disturbed finally huge church any were. It have by stand himself government everything. Finally lay she it emerge his could. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GuavaHelpful + ''' + + \#\# Usage + '''python + result = guavahelpful.perform("quirky message") + print("guavahelpful result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 307 + sort_order: 1 +- id: 316 + owner_id: 17 + owner_name: org17 + lower_name: group 16 + name: group 16 + description: | + Of then crowd that ever which eventually. Doctor hourly between precious moreover will why. Hmm ever in of i.e. am why. Which many company neither tender flock secondly. Loudly absolutely sedge how his for Buddhist. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BananaScenic/ClearStomach3 + ''' + + \#\# Usage + '''go + result \:= ClearStomach3.execute("playful alert") + fmt.Println("clearstomach3 result\:", "terminated") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 306 + sort_order: 4 +- id: 317 + owner_id: 17 + owner_name: org17 + lower_name: group 17 + name: group 17 + description: | + He behind yourselves what this whom we. Our bowl ours hair sufficient accidentally for. Herself mob is why secondly use nothing. Congregation those wear there from his frailty. Being upon album that to everything galaxy. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ToesListener + ''' + + \#\# Usage + '''python + result = toeslistener.run("whimsical story") + print("toeslistener result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 307 + sort_order: 2 +- id: 318 + owner_id: 17 + owner_name: org17 + lower_name: group 18 + name: group 18 + description: | + Gee today little it this accordingly how. Mine being then that staff which single. Say to often wash so band her. Anything onto hence I meeting time riches. Be few to accordingly with yesterday shall. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/YellowWombat21/ProudHyena + ''' + + \#\# Usage + '''go + result \:= ProudHyena.handle("whimsical story") + fmt.Println("proudhyena result\:", "failed") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 41 +- id: 319 + owner_id: 17 + owner_name: org17 + lower_name: group 19 + name: group 19 + description: | + Whereas someone few tomorrow too her others. Cast besides whomever yearly hourly furniture alternatively. Wow any us ouch under have sit. Little tonight together relieved me almost someone. Inside kiss respects goodness an anyone his. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/BootsDiger/ToothpasteStacker + ''' + + \#\# Usage + '''go + result \:= ToothpasteStacker.process("whimsical story") + fmt.Println("toothpastestacker result\:", "failed") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 316 + sort_order: 1 +- id: 320 + owner_id: 17 + owner_name: org17 + lower_name: group 20 + name: group 20 + description: | + Myself my late nevertheless Alpine list she. All above cut being person which has. Which whoever monthly annually been them his. Bouquet this wit bravery out by whose. Those distinguish posse down others firstly whoever. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SunReader6/OrangeSandwich + ''' + + \#\# Usage + '''go + result \:= OrangeSandwich.run("playful alert") + fmt.Println("orangesandwich result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 315 + sort_order: 1 +- id: 321 + owner_id: 17 + owner_name: org17 + lower_name: group 21 + name: group 21 + description: | + Next these several graceful several cackle kindly. His these angry openly as then frequently. Blender it purely chest of do lastly. Strongly his her nearby such so heavily. Whereas our whom float half here also. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install SingerThinker + ''' + + \#\# Usage + '''javascript + const result = singerthinker.handle("lighthearted command"); + console.log("singerthinker result\:", "error"); + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 317 + sort_order: 1 +- id: 322 + owner_id: 17 + owner_name: org17 + lower_name: group 22 + name: group 22 + description: | + Alas group estate leg additionally year instance. Union for cookware transform your there may. This yet stemmed team week it glorious. Her which oops us annually mob themselves. Bouquet some loosely I how in whose. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CondemnedCasino326/SlippersDiger + ''' + + \#\# Usage + '''go + result \:= SlippersDiger.perform("whimsical story") + fmt.Println("slippersdiger result\:", "terminated") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 42 +- id: 323 + owner_id: 17 + owner_name: org17 + lower_name: group 23 + name: group 23 + description: | + First upon since whoa regiment anything those. You less itself sari sedge as both. Freedom costume play hedge you this turn. Me mine posse yesterday up single today. Read to secondly Burmese since stand play. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FeijoaSelfish461 + ''' + + \#\# Usage + '''python + result = feijoaselfish461.handle("lighthearted command") + print("feijoaselfish461 result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 319 + sort_order: 1 +- id: 324 + owner_id: 17 + owner_name: org17 + lower_name: group 24 + name: group 24 + description: | + Her those towards generation I which finally. Our tablet Gaussian instance do we annually. Omen work murder nightly lastly tonight even. Depend murder even therefore though which first. Here your otherwise viplate in fortnightly this. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AwfulCasino/TangerineAuspicious + ''' + + \#\# Usage + '''go + result \:= TangerineAuspicious.run("quirky message") + fmt.Println("tangerineauspicious result\:", "error") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 309 + sort_order: 2 +- id: 325 + owner_id: 17 + owner_name: org17 + lower_name: group 25 + name: group 25 + description: | + Jump beautifully maintain than these yet team. Covey out software their yell its later. Have for other massage light stand the. Certain yourselves mob infrequently steak upon into. Some another snore week Canadian would speed. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LonelyBill + ''' + + \#\# Usage + '''python + result = lonelybill.perform("playful alert") + print("lonelybill result\:", "terminated") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 324 + sort_order: 1 +- id: 326 + owner_id: 17 + owner_name: org17 + lower_name: group 26 + name: group 26 + description: | + String innocently dance that nearby ever sometimes. Union whose of little not positively unless. Each orchard all rather of doubtfully crew. In alas clump some host that tribe. Now my each numerous ability your work. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TomatoConfusing31 + ''' + + \#\# Usage + '''javascript + const result = tomatoconfusing31.perform("quirky message"); + console.log("tomatoconfusing31 result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 303 + sort_order: 2 +- id: 327 + owner_id: 17 + owner_name: org17 + lower_name: group 27 + name: group 27 + description: | + From dynasty way onto shorts next embarrass. Cluster out to instance vanish no Guyanese. Anyone what since bevy whose comfort previously. Child bakery it in somewhat secondly timing. There swim moreover cast that above today. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LegumePowerless + ''' + + \#\# Usage + '''python + result = legumepowerless.perform("funny request") + print("legumepowerless result\:", "in progress") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 324 + sort_order: 2 +- id: 328 + owner_id: 17 + owner_name: org17 + lower_name: group 28 + name: group 28 + description: | + Fortnightly whenever Afghan because where yikes been. Mine research this indeed soon work eye. Anger yikes group soon load cluster me. Ourselves wandering whoever just bunch Burmese today. Ourselves him them these describe yikes plant. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ClumsySalmon/JambulTame + ''' + + \#\# Usage + '''go + result \:= JambulTame.run("quirky message") + fmt.Println("jambultame result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 311 + sort_order: 1 +- id: 329 + owner_id: 17 + owner_name: org17 + lower_name: group 29 + name: group 29 + description: | + Did before these talk certain however since. Weekly it his vast we those one. Have architect half exuberant genetics tonight plant. Time though anyone were wad where a. How pod friendship previously instance this fact. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install FantasticTemple8 + ''' + + \#\# Usage + '''javascript + const result = fantastictemple8.process("playful alert"); + console.log("fantastictemple8 result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 307 + sort_order: 3 +- id: 330 + owner_id: 17 + owner_name: org17 + lower_name: group 30 + name: group 30 + description: | + He her dream whichever few growth with. Still nightly you importance from that tomorrow. Somebody reel infrequently key yourself roll most. Its however why upstairs Peruvian each armchair. Fact hand rather hurt bevy think whenever. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install CantaloupePrickling + ''' + + \#\# Usage + '''javascript + const result = cantaloupeprickling.execute("lighthearted command"); + console.log("cantaloupeprickling result\:", "unknown"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 321 + sort_order: 1 +- id: 331 + owner_id: 23 + owner_name: privated_org + lower_name: group 1 + name: group 1 + description: | + Repulsive fortnightly flower regiment when roll chair. Fortnightly all indeed those there patrol first. Tomorrow anthology whose those greedily nest about. Afterwards rabbit sprint how sedge those basket. Troop each his whose huh wad of. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ConfusingTelevision/MushyKoala78 + ''' + + \#\# Usage + '''go + result \:= MushyKoala78.run("playful alert") + fmt.Println("mushykoala78 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 43 +- id: 332 + owner_id: 23 + owner_name: privated_org + lower_name: group 2 + name: group 2 + description: | + Remain woman despite slavery in Norwegian squeak. Every us was black in himself everybody. For next on anyway by though divorce. Troop success within theirs turn we exaltation. Hardly yours government though rather Polynesian eyes. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BoyStander72/PinkFrog + ''' + + \#\# Usage + '''go + result \:= PinkFrog.execute("whimsical story") + fmt.Println("pinkfrog result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 331 + sort_order: 1 +- id: 333 + owner_id: 23 + owner_name: privated_org + lower_name: group 3 + name: group 3 + description: | + My anybody should happiness too Finnish lastly. Garage time staff nightly however downstairs dog. On lastly chocolate daughter tonight what might. Oops much this consist last quarterly last. School where hence this moreover mine game. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/ScenicCockroach/CleanMink + ''' + + \#\# Usage + '''go + result \:= CleanMink.handle("lighthearted command") + fmt.Println("cleanmink result\:", "error") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 0 + sort_order: 44 +- id: 334 + owner_id: 23 + owner_name: privated_org + lower_name: group 4 + name: group 4 + description: | + Wearily so tensely admit our should case. Half government inquiring due most brace the. So film this any usually this point. E.g. differs weary Einsteinian mobile why Burmese. They example clever must woman numerous my. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/EmbarrassedDog7/StrangeDolphin + ''' + + \#\# Usage + '''go + result \:= StrangeDolphin.perform("funny request") + fmt.Println("strangedolphin result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 331 + sort_order: 2 +- id: 335 + owner_id: 23 + owner_name: privated_org + lower_name: group 5 + name: group 5 + description: | + First which why under in with transportation. Yesterday hey riches in lucky upon kuban. One one you beneath since as the. This example which really nobody barely first. Pleasure cautiously these hand case what ingeniously. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install GlamorousLamp61 + ''' + + \#\# Usage + '''python + result = glamorouslamp61.handle("whimsical story") + print("glamorouslamp61 result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 332 + sort_order: 1 +- id: 336 + owner_id: 23 + owner_name: privated_org + lower_name: group 6 + name: group 6 + description: | + Were Elizabethan were you fact this rather. Line wit you themselves you Iraqi would. These Aristotelian occasion stay hence scold creepy. That being then indeed yesterday these his. Might this frequently heavy been person now. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/TiredBalloon/ImportantWeasel + ''' + + \#\# Usage + '''go + result \:= ImportantWeasel.execute("whimsical story") + fmt.Println("importantweasel result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 334 + sort_order: 1 +- id: 337 + owner_id: 23 + owner_name: privated_org + lower_name: group 7 + name: group 7 + description: | + Team her on bundle cast tonight disregard. Despite all mine the scream mustering they. Muscovite was of where all I in. Deeply person extremely beneath well itself cast. Rich instance every did stack host hourly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WaterCooker + ''' + + \#\# Usage + '''python + result = watercooker.perform("lighthearted command") + print("watercooker result\:", "error") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 334 + sort_order: 2 +- id: 338 + owner_id: 23 + owner_name: privated_org + lower_name: group 8 + name: group 8 + description: | + Obediently Cambodian her the ever could when. Too their since panic firstly each mine. Aristotelian whichever today lastly you did her. Depending dynasty his gee first ring does. Little suitcase problem so most its because. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install EncouragingCinema + ''' + + \#\# Usage + '''javascript + const result = encouragingcinema.handle("quirky message"); + console.log("encouragingcinema result\:", "failed"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 334 + sort_order: 3 +- id: 339 + owner_id: 23 + owner_name: privated_org + lower_name: group 9 + name: group 9 + description: | + Scale these shall cackle certain for yours. Other up their which everything well that. In today firstly milk themselves strongly off. Tomorrow lean stack yourself whom that stadium. Now that me shake mob everybody vivaciously. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install KiwiGleaming + ''' + + \#\# Usage + '''python + result = kiwigleaming.process("quirky message") + print("kiwigleaming result\:", "failed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 333 + sort_order: 1 +- id: 340 + owner_id: 23 + owner_name: privated_org + lower_name: group 10 + name: group 10 + description: | + Including wash others wave being judge wings. Far Pacific team I i.e. she as. Infrequently was management move host aha whose. Whose interrupt formerly bale throughout maintain other. Always museum honesty that oops wrap riches. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/JoyousMink/TangerineFrantic + ''' + + \#\# Usage + '''go + result \:= TangerineFrantic.process("whimsical story") + fmt.Println("tangerinefrantic result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 334 + sort_order: 4 +- id: 341 + owner_id: 23 + owner_name: privated_org + lower_name: group 11 + name: group 11 + description: | + None formerly in with that weekly Bangladeshi. Somebody her fact luck what strongly yet. Deeply bundle finally you lastly half on. Innocence first that because paralyze single those. Portuguese might someone whose sufficient instead moreover. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/PlumGrumpy/HelplessBuffalo01 + ''' + + \#\# Usage + '''go + result \:= HelplessBuffalo01.handle("playful alert") + fmt.Println("helplessbuffalo01 result\:", "unknown") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 45 +- id: 342 + owner_id: 23 + owner_name: privated_org + lower_name: group 12 + name: group 12 + description: | + Sometimes end group in point neither tomorrow. Could part Hindu east there afterwards a. Though child number what justice an accordingly. Doubtfully conclude either be my he under. Several hardly his since jump tomorrow whoa. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LimeFancy + ''' + + \#\# Usage + '''python + result = limefancy.run("playful alert") + print("limefancy result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 334 + sort_order: 5 +- id: 343 + owner_id: 23 + owner_name: privated_org + lower_name: group 13 + name: group 13 + description: | + Any cookware firstly who greatly do here. Whose whoever lastly frantically today still sedge. Virtually cast lie ouch from he gee. My each Cormoran forget hang was other. At later awfully Uzbek several happen wisely. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PitayaRepulsive4/SchoolSleeper + ''' + + \#\# Usage + '''go + result \:= SchoolSleeper.execute("quirky message") + fmt.Println("schoolsleeper result\:", "terminated") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 341 + sort_order: 1 +- id: 344 + owner_id: 23 + owner_name: privated_org + lower_name: group 14 + name: group 14 + description: | + In shirt cup enough their plain also. Here that whom whom east Bismarckian bird. Lincolnian hour each how one when huh. Tomorrow anything lastly Costa whose shake drink. Ours has finally from agree than lastly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TerseBear + ''' + + \#\# Usage + '''javascript + const result = tersebear.execute("whimsical story"); + console.log("tersebear result\:", "success"); + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 341 + sort_order: 2 +- id: 345 + owner_id: 23 + owner_name: privated_org + lower_name: group 15 + name: group 15 + description: | + Generally their everybody outside they chest ours. Week finger library toilet eventually myself myself. Am grab government never than this hers. Its tolerance moreover these set on straw. Child luxury us either than will slide. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/TerseGiraffe/BeautifulButterfly7 + ''' + + \#\# Usage + '''go + result \:= BeautifulButterfly7.execute("playful alert") + fmt.Println("beautifulbutterfly7 result\:", "completed") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 337 + sort_order: 1 +- id: 346 + owner_id: 23 + owner_name: privated_org + lower_name: group 16 + name: group 16 + description: | + Indeed besides yay whichever yourselves herself speedily. Ourselves ourselves thing Malagasy problem whose joyously. That him after most certain many crow. Gee select last begin you under so. Then on pack firstly itself first sheep. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/IllChildren969/PoisedLizard8 + ''' + + \#\# Usage + '''go + result \:= PoisedLizard8.run("funny request") + fmt.Println("poisedlizard8 result\:", "in progress") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 344 + sort_order: 1 +- id: 347 + owner_id: 23 + owner_name: privated_org + lower_name: group 17 + name: group 17 + description: | + Whose lots till whose should shake my. Slovak inside on whose who for may. None was place many contrast regularly across. But nap it album some of team. Those ride peace now pretty team nightly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AloofLocust0/KumquatFrantic + ''' + + \#\# Usage + '''go + result \:= KumquatFrantic.process("quirky message") + fmt.Println("kumquatfrantic result\:", "completed") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 343 + sort_order: 1 +- id: 348 + owner_id: 23 + owner_name: privated_org + lower_name: group 18 + name: group 18 + description: | + Weekly must finally fully supermarket out nevertheless. Laugh including scold otherwise upon hail ever. Why our belief of which shall his. Key whose happen whose something pronunciation himself. To hospitality many wow frantically gee in. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CharmingMacaw497/CantaloupeHelpless + ''' + + \#\# Usage + '''go + result \:= CantaloupeHelpless.handle("quirky message") + fmt.Println("cantaloupehelpless result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 344 + sort_order: 2 +- id: 349 + owner_id: 23 + owner_name: privated_org + lower_name: group 19 + name: group 19 + description: | + Now these world year it perfectly lot. Box mustering themselves decidedly other lie summation. Upshot it of monthly us pod Polish. Very ours generally huh hourly annually that. That meeting week whom loss yesterday itself. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SurgeonJumper + ''' + + \#\# Usage + '''python + result = surgeonjumper.perform("lighthearted command") + print("surgeonjumper result\:", "terminated") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 341 + sort_order: 3 +- id: 350 + owner_id: 23 + owner_name: privated_org + lower_name: group 20 + name: group 20 + description: | + Pharmacy bravo Monacan bravo half then in. Through swiftly whom pray this Guyanese how. When will deceit now from are lastly. Many giraffe product can band there these. Whose toss terrible some meal retard much. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/ToothbrushCrawler4/RedcurrantJoyous780 + ''' + + \#\# Usage + '''go + result \:= RedcurrantJoyous780.execute("playful alert") + fmt.Println("redcurrantjoyous780 result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 337 + sort_order: 2 +- id: 351 + owner_id: 23 + owner_name: privated_org + lower_name: group 21 + name: group 21 + description: | + Contrast dive a voice tense yearly loudly. Towards whatever elsewhere besides Diabolical unless British. Galaxy till how little whoever of wear. None little noisily half should formerly for. You some those early as each a. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PeachScenic + ''' + + \#\# Usage + '''python + result = peachscenic.execute("whimsical story") + print("peachscenic result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 348 + sort_order: 1 +- id: 352 + owner_id: 23 + owner_name: privated_org + lower_name: group 22 + name: group 22 + description: | + Blindly galaxy accommodation will little board apartment. Without you egg why till our instead. In ouch somebody work college what certain. You which point embarrass yoga what oxygen. Where troop gladly castle eat was that. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install FruitBatheer + ''' + + \#\# Usage + '''python + result = fruitbatheer.process("lighthearted command") + print("fruitbatheer result\:", "success") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 336 + sort_order: 1 +- id: 353 + owner_id: 23 + owner_name: privated_org + lower_name: group 23 + name: group 23 + description: | + Improvised her next open promptly how trip. First whatever mistake whom tomorrow preen heap. Religion hourly each Somali ouch meeting there. Out deceive for off we she eat. Pair us retard but problem whose that. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/BananaAshamed/DateUninterested7 + ''' + + \#\# Usage + '''go + result \:= DateUninterested7.execute("lighthearted command") + fmt.Println("dateuninterested7 result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 336 + sort_order: 2 +- id: 354 + owner_id: 23 + owner_name: privated_org + lower_name: group 24 + name: group 24 + description: | + Such timing whose to angrily it fortnightly. A yet unexpectedly e.g. bathe light where. Hence wow how alas frailty any tomorrow. Watch had her what Lebanese violin however. Whose army tribe example attractive man then. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install MangoProud + ''' + + \#\# Usage + '''javascript + const result = mangoproud.perform("playful alert"); + console.log("mangoproud result\:", "terminated"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 341 + sort_order: 4 +- id: 355 + owner_id: 23 + owner_name: privated_org + lower_name: group 25 + name: group 25 + description: | + Whom some an pain sleep down generally. You shiny oops myself slap think every. Sparse desktop provided tasty punctuation you Burkinese. From eventually been a wit occasionally mob. Conclude congregation sit what anything fact of. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SpottedHerring8/FeijoaThankful9 + ''' + + \#\# Usage + '''go + result \:= FeijoaThankful9.perform("playful alert") + fmt.Println("feijoathankful9 result\:", "finished") + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 354 + sort_order: 1 +- id: 356 + owner_id: 23 + owner_name: privated_org + lower_name: group 26 + name: group 26 + description: | + Gently tribe nobody up yay otherwise onto. Perfectly under apart company enough down within. That you aha strongly too in her. Besides fly patience her why hers body. Today fortnightly furthermore whose i.e. daily formerly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install OrangeDefiant + ''' + + \#\# Usage + '''python + result = orangedefiant.handle("quirky message") + print("orangedefiant result\:", "success") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 353 + sort_order: 1 +- id: 357 + owner_id: 23 + owner_name: privated_org + lower_name: group 27 + name: group 27 + description: | + Alternatively are ourselves husband firstly until we. From peep do additionally repulsive hers team. Keep correctly yesterday how i.e. tomorrow her. Justice nice handle ride religion to now. Cat positively tomorrow might mine owing quarterly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install JealousShorts + ''' + + \#\# Usage + '''python + result = jealousshorts.handle("whimsical story") + print("jealousshorts result\:", "terminated") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 350 + sort_order: 1 +- id: 358 + owner_id: 23 + owner_name: privated_org + lower_name: group 28 + name: group 28 + description: | + I it why being above obesity phew. Open both lastly any these Mayan before. Whomever him motionless because then ever how. Those distinguish Canadian include every monthly yearly. Swim itself whom your here this out. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CheerfulHerring/SuperSparrow + ''' + + \#\# Usage + '''go + result \:= SuperSparrow.handle("whimsical story") + fmt.Println("supersparrow result\:", "completed") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 351 + sort_order: 1 +- id: 359 + owner_id: 23 + owner_name: privated_org + lower_name: group 29 + name: group 29 + description: | + To hourly rush who off many embarrass. Wallet another but look whose there packet. My group of couple conclude she circumstances. All whereas beyond yearly throughout you quarterly. Enough tomorrow someone accordingly why result many. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install LemonBower + ''' + + \#\# Usage + '''python + result = lemonbower.process("funny request") + print("lemonbower result\:", "unknown") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 339 + sort_order: 1 +- id: 360 + owner_id: 23 + owner_name: privated_org + lower_name: group 30 + name: group 30 + description: | + Painfully his quarterly parrot mustering man few. Before quite why taste but her where. Happiness fact its timing hastily my its. Ourselves madly everything heavily though our how. Over you jump still ever Caesarian Turkmen. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install SpoonCuter5 + ''' + + \#\# Usage + '''python + result = spooncuter5.process("funny request") + print("spooncuter5 result\:", "unknown") + ''' + + \#\# License + GPL-3.0 + + visibility: 2 + avatar: "" + parent_group_id: 338 + sort_order: 1 +- id: 361 + owner_id: 35 + owner_name: private_org35 + lower_name: group 1 + name: group 1 + description: | + Covey couple what upon nobody neck bundle. Shakespearean as yikes therefore politely all today. We chair artist itself rather finally several. Scary whomever philosophy weight one light quantity. Do politely these spit nightly that to. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ApartmentBatheer + ''' + + \#\# Usage + '''python + result = apartmentbatheer.execute("whimsical story") + print("apartmentbatheer result\:", "error") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 0 + sort_order: 46 +- id: 362 + owner_id: 35 + owner_name: private_org35 + lower_name: group 2 + name: group 2 + description: | + It has than Tibetan for class can. Which city nearby any ours they calmly. Anybody some where party nest fact onto. Slide when monthly secondly straightaway Sammarinese oops. Should most any by group must our. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BowCloseer/MagnificentSuit + ''' + + \#\# Usage + '''go + result \:= MagnificentSuit.perform("whimsical story") + fmt.Println("magnificentsuit result\:", "in progress") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 361 + sort_order: 1 +- id: 363 + owner_id: 35 + owner_name: private_org35 + lower_name: group 3 + name: group 3 + description: | + Rather what his secondly tax rather of. Troop barely do neither of first then. Does now yesterday religion consequently whoa bevy. How bulb shark theirs ours smoggy whose. Wide next ours courage woman above who. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install MotionlessOcean26 + ''' + + \#\# Usage + '''javascript + const result = motionlessocean26.process("lighthearted command"); + console.log("motionlessocean26 result\:", "finished"); + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 362 + sort_order: 1 +- id: 364 + owner_id: 35 + owner_name: private_org35 + lower_name: group 4 + name: group 4 + description: | + Exactly obesity she respond luggage up over. She yet your yours battery refill case. Wad that yet pretty each underwear myself. Your though wade off baby poison should. Me beautifully hers weep repel do happiness. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ConcerningHyena587 + ''' + + \#\# Usage + '''javascript + const result = concerninghyena587.perform("lighthearted command"); + console.log("concerninghyena587 result\:", "failed"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 0 + avatar: "" + parent_group_id: 362 + sort_order: 2 +- id: 365 + owner_id: 35 + owner_name: private_org35 + lower_name: group 5 + name: group 5 + description: | + For then himself catalog dynasty book constantly. Tomorrow everyone indeed what what my quiver. Wisp horrible Hindu delightful something yay were. Somebody after it there nothing this alternatively. Band at theirs firstly it quarterly backwards. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CourageousYellowjacket/CheerfulRaven + ''' + + \#\# Usage + '''go + result \:= CheerfulRaven.run("quirky message") + fmt.Println("cheerfulraven result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 363 + sort_order: 1 +- id: 366 + owner_id: 35 + owner_name: private_org35 + lower_name: group 6 + name: group 6 + description: | + Eventually early crawl company some meanwhile host. Whichever tennis nap shake world Uzbek are. Above his under these anyone rarely off. Out which dream them sit bow grains. Accordingly what dream lastly Turkmen problem somebody. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/BeautifulSardine/TroublingTown0 + ''' + + \#\# Usage + '''go + result \:= TroublingTown0.execute("whimsical story") + fmt.Println("troublingtown0 result\:", "in progress") + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 361 + sort_order: 2 +- id: 367 + owner_id: 35 + owner_name: private_org35 + lower_name: group 7 + name: group 7 + description: | + Across Hitlerian might ours such today look. His fortnightly when in whose man into. Us off dream nevertheless capture those a. Not themselves phew with always its which. Nevertheless you were e.g. horde would whatever. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BoredMole38 + ''' + + \#\# Usage + '''javascript + const result = boredmole38.run("funny request"); + console.log("boredmole38 result\:", "completed"); + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 362 + sort_order: 3 +- id: 368 + owner_id: 35 + owner_name: private_org35 + lower_name: group 8 + name: group 8 + description: | + Few body month none whom herself as. Wandering mine before lazy its weekly any. Her off heavily example account anger have. Right how anybody bowl to least result. Up several whose dizzying later incredibly barely. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PouchSmeller499/SoreSwimmingPool + ''' + + \#\# Usage + '''go + result \:= SoreSwimmingPool.handle("quirky message") + fmt.Println("soreswimmingpool result\:", "completed") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 361 + sort_order: 3 +- id: 369 + owner_id: 35 + owner_name: private_org35 + lower_name: group 9 + name: group 9 + description: | + My far instead quite quarterly despite nightly. Certain as can muster many over of. Catalog perfectly clean every whomever justice anything. Snarl indeed yet neck brightly besides annually. Him shake wake yourself including remain downstairs. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install PumpkinStander + ''' + + \#\# Usage + '''python + result = pumpkinstander.perform("funny request") + print("pumpkinstander result\:", "error") + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 361 + sort_order: 4 +- id: 370 + owner_id: 35 + owner_name: private_org35 + lower_name: group 10 + name: group 10 + description: | + Consequently who time annually upon early you. Patience remain had must solemnly whose woman. Dark place where from daily baby she. Tonight infrequently which run castle rhythm equally. Yet utterly its be frequently indeed had. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/DisturbedPlatypus/QueerWaterBuffalo + ''' + + \#\# Usage + '''go + result \:= QueerWaterBuffalo.perform("whimsical story") + fmt.Println("queerwaterbuffalo result\:", "in progress") + ''' + + \#\# License + MIT + + visibility: 0 + avatar: "" + parent_group_id: 363 + sort_order: 2 +- id: 371 + owner_id: 35 + owner_name: private_org35 + lower_name: group 11 + name: group 11 + description: | + Here barely his her what year intensely. Understimate tomorrow him joyously Viennese furthermore several. Sternly back neither toss here hundreds for. Interrupt bank from yet accordingly lots myself. Fall earlier define finally tonight where now. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/GrapefruitScary/FilthyCockroach + ''' + + \#\# Usage + '''go + result \:= FilthyCockroach.process("quirky message") + fmt.Println("filthycockroach result\:", "failed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 368 + sort_order: 1 +- id: 372 + owner_id: 35 + owner_name: private_org35 + lower_name: group 12 + name: group 12 + description: | + Near swiftly down with yesterday evidence corner. Closely some might Portuguese fondly now since. Still above sprint whose did Malagasy later. This for theirs but equipment raise peep. Finally troop finally mustering remind for none. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/AircraftCrawler/SenatorDreamer + ''' + + \#\# Usage + '''go + result \:= SenatorDreamer.process("funny request") + fmt.Println("senatordreamer result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 0 + avatar: "" + parent_group_id: 0 + sort_order: 47 +- id: 373 + owner_id: 35 + owner_name: private_org35 + lower_name: group 13 + name: group 13 + description: | + Elsewhere there theirs garage frequently in so. Do black them gee boots himself ball. There throughout murder itself tickle patience almost. Those failure at who his carry point. Chastise e.g. scold I whose every electricity. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ThoughtfulGloves + ''' + + \#\# Usage + '''python + result = thoughtfulgloves.run("quirky message") + print("thoughtfulgloves result\:", "success") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 361 + sort_order: 5 +- id: 374 + owner_id: 35 + owner_name: private_org35 + lower_name: group 14 + name: group 14 + description: | + With without that these then who daringly. Tensely early moreover to crawl theirs wildly. How fuel pose cackle each those hmm. Ourselves how secondly leggings who I eat. Next none also summation why whose scold. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/RelievedKid/GrumpyRaven + ''' + + \#\# Usage + '''go + result \:= GrumpyRaven.execute("lighthearted command") + fmt.Println("grumpyraven result\:", "terminated") + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 369 + sort_order: 1 +- id: 375 + owner_id: 35 + owner_name: private_org35 + lower_name: group 15 + name: group 15 + description: | + Deceive whereas afterwards any tightly accordingly annually. Thing instance yikes with water its of. Practically my what time as what all. I her some love our e.g. muster. However queer anyone depending any will her. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/GrapefruitCalm/BlueberryIll + ''' + + \#\# Usage + '''go + result \:= BlueberryIll.perform("playful alert") + fmt.Println("blueberryill result\:", "finished") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 370 + sort_order: 1 +- id: 376 + owner_id: 35 + owner_name: private_org35 + lower_name: group 16 + name: group 16 + description: | + Fortnightly up today before hundred this range. Energy your advertising nobody what intimidate why. Yesterday consist first grandmother whichever how be. Yet the where whole ouch her greatly. Mob our luck yesterday usually preen those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SenatorOpener/CantaloupeTired + ''' + + \#\# Usage + '''go + result \:= CantaloupeTired.handle("lighthearted command") + fmt.Println("cantaloupetired result\:", "finished") + ''' + + \#\# License + MIT + + visibility: 1 + avatar: "" + parent_group_id: 372 + sort_order: 1 +- id: 377 + owner_id: 35 + owner_name: private_org35 + lower_name: group 17 + name: group 17 + description: | + Dangerous of British into nobody neither play. Anyone other it several what will constantly. Earlier across pounce our soon class must. Accordingly mine thing Bahrainean heavy whoever union. Team who were have hurt everyone tomorrow. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install InnocentMuskrat161 + ''' + + \#\# Usage + '''javascript + const result = innocentmuskrat161.process("playful alert"); + console.log("innocentmuskrat161 result\:", "in progress"); + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 362 + sort_order: 4 +- id: 378 + owner_id: 35 + owner_name: private_org35 + lower_name: group 18 + name: group 18 + description: | + This it sometimes their nobody Laotian its. These formerly later without its all loneliness. Anything consequently what down join hey himself. Point which those east yours in Einsteinian. Comfort not teacher nevertheless might what antlers. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BrightMink71 + ''' + + \#\# Usage + '''javascript + const result = brightmink71.perform("funny request"); + console.log("brightmink71 result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 1 + avatar: "" + parent_group_id: 367 + sort_order: 1 +- id: 379 + owner_id: 35 + owner_name: private_org35 + lower_name: group 19 + name: group 19 + description: | + It did childhood wisp ours wisdom hourly. As these otherwise then pack Iraqi their. Sew generally to bed define occasionally she. Earlier hiccup damage warmly Elizabethan now upstairs. Fall have another vision those this almost. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/TenderSlippers/JewelryHuger103 + ''' + + \#\# Usage + '''go + result \:= JewelryHuger103.perform("lighthearted command") + fmt.Println("jewelryhuger103 result\:", "error") + ''' + + \#\# License + Apache 2.0 + + visibility: 1 + avatar: "" + parent_group_id: 376 + sort_order: 1 +- id: 380 + owner_id: 35 + owner_name: private_org35 + lower_name: group 20 + name: group 20 + description: | + Anyway everyone car recently are consist Rican. Ever so was her open besides whichever. You herself terrible do whose clump whoa. Under healthy how phew straightaway seafood consequently. Other Norwegian other you gloves life including. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/DetectiveOpener/UglyChinchilla + ''' + + \#\# Usage + '''go + result \:= UglyChinchilla.perform("whimsical story") + fmt.Println("uglychinchilla result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + + visibility: 2 + avatar: "" + parent_group_id: 363 + sort_order: 3 +- id: 381 + owner_id: 35 + owner_name: private_org35 + lower_name: group 21 + name: group 21 + description: | + Stand whom either a innocent neither being. Whose is occasionally may sometimes inside so. Antarctic recently finally sedge him ever must. Which hotel weekly i.e. line us work. Today line over let itself tonight soon. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install WearyPorpoise + ''' + + \#\# Usage + '''javascript + const result = wearyporpoise.execute("lighthearted command"); + console.log("wearyporpoise result\:", "unknown"); + ''' + + \#\# License + GPL-3.0 + + visibility: 0 + avatar: "" + parent_group_id: 370 + sort_order: 2 +- id: 382 + owner_id: 35 + owner_name: private_org35 + lower_name: group 22 + name: group 22 + description: | + Her machine fortnightly hand shall many failure. Car anyone down thing away elsewhere where. Many to fight irritate yoga pod terribly. Finally snore now instance envy this everybody. Where yet shall any specify next its. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install DistinctCrocodile + ''' + + \#\# Usage + '''python + result = distinctcrocodile.handle("funny request") + print("distinctcrocodile result\:", "completed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 1 + avatar: "" + parent_group_id: 368 + sort_order: 2 +- id: 383 + owner_id: 35 + owner_name: private_org35 + lower_name: group 23 + name: group 23 + description: | + Accordingly place now garage its wait to. Usage of kindness example crime herself upon. Crawl head wave frail whom entirely thing. What number i.e. its woman a path. Anyone yourself disregard each because lastly give. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/EmbarrassedReindeer/WearySinger + ''' + + \#\# Usage + '''go + result \:= WearySinger.run("quirky message") + fmt.Println("wearysinger result\:", "completed") + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 376 + sort_order: 2 +- id: 384 + owner_id: 35 + owner_name: private_org35 + lower_name: group 24 + name: group 24 + description: | + Will earlier one near class idea me. Caesarian anything kiss secondly Machiavellian under including. Greatly whose accordingly onto these hug soon. Does occur the were constantly bunch tonight. Those all later others within did spin. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/LovelyHouse3/RockMelonFrail + ''' + + \#\# Usage + '''go + result \:= RockMelonFrail.perform("funny request") + fmt.Println("rockmelonfrail result\:", "success") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 366 + sort_order: 1 +- id: 385 + owner_id: 35 + owner_name: private_org35 + lower_name: group 25 + name: group 25 + description: | + Tomorrow how example upon hers choir across. Mob outside neither tonight e.g. anyone occasionally. Cackle accordingly what army monthly its ours. What niche theirs wealth heap beneath through. Hail nightly back which bunch its he. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install ZealousConditioner + ''' + + \#\# Usage + '''python + result = zealousconditioner.handle("quirky message") + print("zealousconditioner result\:", "error") + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 365 + sort_order: 1 +- id: 386 + owner_id: 35 + owner_name: private_org35 + lower_name: group 26 + name: group 26 + description: | + Most shoulder fast whatever huh summation battery. Soon which those happiness whose whose those. Far before work about pod us much. Rainbow early pad child there begin hers. Man time it I must crime those. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PhysalisWicked2 + ''' + + \#\# Usage + '''javascript + const result = physaliswicked2.process("funny request"); + console.log("physaliswicked2 result\:", "finished"); + ''' + + \#\# License + ISC + + visibility: 0 + avatar: "" + parent_group_id: 375 + sort_order: 1 +- id: 387 + owner_id: 35 + owner_name: private_org35 + lower_name: group 27 + name: group 27 + description: | + How band heavy rarely tasty less without. Talk besides other nervously infrequently as Colombian. From finally one palm that completely then. Huh this when relent yearly party hourly. Through weekly straightaway perfectly whom live lead. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install DistinctHound + ''' + + \#\# Usage + '''javascript + const result = distincthound.run("funny request"); + console.log("distincthound result\:", "success"); + ''' + + \#\# License + BSD-3-Clause + + visibility: 2 + avatar: "" + parent_group_id: 386 + sort_order: 1 +- id: 388 + owner_id: 35 + owner_name: private_org35 + lower_name: group 28 + name: group 28 + description: | + To are cluster week with angry that. Yesterday hmm slavery company first on infrequently. Tomorrow host odd company nightly off theirs. Neither as our those we over snarl. Bunch eye ourselves seriously besides slavery there. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ModernGnu/JewelryLaugher + ''' + + \#\# Usage + '''go + result \:= JewelryLaugher.run("funny request") + fmt.Println("jewelrylaugher result\:", "unknown") + ''' + + \#\# License + MIT + + visibility: 2 + avatar: "" + parent_group_id: 369 + sort_order: 2 +- id: 389 + owner_id: 35 + owner_name: private_org35 + lower_name: group 29 + name: group 29 + description: | + Scenic just in one who still that. Whom ouch however Machiavellian lie nobody that. Any ring huh himself to these fragile. E.g. rarely due themselves in rice day. One enough her e.g. gift daringly finally. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install BlushingCookware05 + ''' + + \#\# Usage + '''javascript + const result = blushingcookware05.perform("lighthearted command"); + console.log("blushingcookware05 result\:", "failed"); + ''' + + \#\# License + ISC + + visibility: 2 + avatar: "" + parent_group_id: 374 + sort_order: 1 +- id: 390 + owner_id: 35 + owner_name: private_org35 + lower_name: group 30 + name: group 30 + description: | + Differs has spin that does to lower. For thing their according murder there line. This of piano yikes imagination but finally. In under example bundle panicked bridge onto. That down few under earlier party would. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/GloriousMallard/BilberryBlack85 + ''' + + \#\# Usage + '''go + result \:= BilberryBlack85.process("funny request") + fmt.Println("bilberryblack85 result\:", "failed") + ''' + + \#\# License + GPL-3.0 + + visibility: 1 + avatar: "" + parent_group_id: 361 + sort_order: 6 diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index d8eb796207..e093552a2b 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -1,10 +1,10 @@ -# don't forget to add fixtures in repo_unit.yml -- - id: 1 +- id: 1 owner_id: 2 owner_name: user2 lower_name: repo1 name: repo1 + description: "" + website: "" default_branch: master num_watches: 4 num_stars: 0 @@ -22,20 +22,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 2 + group_id: 0 + group_sort_order: 0 +- id: 2 owner_id: 2 owner_name: user2 lower_name: repo2 name: repo2 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 1 @@ -53,20 +55,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: true - -- - id: 3 + group_id: 0 + group_sort_order: 0 +- id: 3 owner_id: 3 owner_name: org3 lower_name: repo3 name: repo3 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -84,20 +88,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 4 + group_id: 129 + group_sort_order: 1 +- id: 4 owner_id: 5 owner_name: user5 lower_name: repo4 name: repo4 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 1 @@ -117,20 +123,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 5 + group_id: 0 + group_sort_order: 0 +- id: 5 owner_id: 3 owner_name: org3 lower_name: repo5 name: repo5 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -147,20 +156,23 @@ is_archived: false is_mirror: true status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 6 + group_id: 139 + group_sort_order: 1 +- id: 6 owner_id: 10 owner_name: user10 lower_name: repo6 name: repo6 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -177,20 +189,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 7 + group_id: 0 + group_sort_order: 0 +- id: 7 owner_id: 10 owner_name: user10 lower_name: repo7 name: repo7 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -207,20 +222,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 8 + group_id: 0 + group_sort_order: 0 +- id: 8 owner_id: 10 owner_name: user10 lower_name: repo8 name: repo8 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -237,20 +255,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 9 + group_id: 0 + group_sort_order: 0 +- id: 9 owner_id: 11 owner_name: user11 lower_name: repo9 name: repo9 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -267,20 +288,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 10 + group_id: 0 + group_sort_order: 0 +- id: 10 owner_id: 12 owner_name: user12 lower_name: repo10 name: repo10 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -298,20 +321,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 11 + group_id: 0 + group_sort_order: 0 +- id: 11 owner_id: 13 owner_name: user13 lower_name: repo11 name: repo11 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -329,20 +354,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: true fork_id: 10 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 12 + group_id: 0 + group_sort_order: 0 +- id: 12 owner_id: 14 owner_name: user14 lower_name: test_repo_12 name: test_repo_12 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -359,20 +387,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 13 + group_id: 0 + group_sort_order: 0 +- id: 13 owner_id: 14 owner_name: user14 lower_name: test_repo_13 name: test_repo_13 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -389,21 +420,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 14 + group_id: 0 + group_sort_order: 0 +- id: 14 owner_id: 14 owner_name: user14 lower_name: test_repo_14 name: test_repo_14 description: test_description_14 + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -420,20 +453,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 15 + group_id: 0 + group_sort_order: 0 +- id: 15 owner_id: 2 owner_name: user2 lower_name: repo15 name: repo15 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -451,20 +486,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 16 + group_id: 0 + group_sort_order: 0 +- id: 16 owner_id: 2 owner_name: user2 lower_name: repo16 name: repo16 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -482,20 +519,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 17 + group_id: 0 + group_sort_order: 0 +- id: 17 owner_id: 15 owner_name: user15 lower_name: big_test_public_1 name: big_test_public_1 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -512,20 +552,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 18 + group_id: 0 + group_sort_order: 0 +- id: 18 owner_id: 15 owner_name: user15 lower_name: big_test_public_2 name: big_test_public_2 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -542,20 +585,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 19 + group_id: 0 + group_sort_order: 0 +- id: 19 owner_id: 15 owner_name: user15 lower_name: big_test_private_1 name: big_test_private_1 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -572,20 +618,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 20 + group_id: 0 + group_sort_order: 0 +- id: 20 owner_id: 15 owner_name: user15 lower_name: big_test_private_2 name: big_test_private_2 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -602,20 +651,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 21 + group_id: 0 + group_sort_order: 0 +- id: 21 owner_id: 16 owner_name: user16 lower_name: big_test_public_3 name: big_test_public_3 + description: "" + website: "" + default_branch: "" num_watches: 1 num_stars: 1 num_forks: 0 @@ -632,20 +684,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 22 + group_id: 0 + group_sort_order: 0 +- id: 22 owner_id: 16 owner_name: user16 lower_name: big_test_private_3 name: big_test_private_3 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -662,20 +717,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 23 + group_id: 0 + group_sort_order: 0 +- id: 23 owner_id: 17 owner_name: org17 lower_name: big_test_public_4 name: big_test_public_4 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -692,20 +750,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 24 + group_id: 313 + group_sort_order: 1 +- id: 24 owner_id: 17 owner_name: org17 lower_name: big_test_private_4 name: big_test_private_4 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -722,20 +783,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 25 + group_id: 318 + group_sort_order: 1 +- id: 25 owner_id: 20 owner_name: user20 lower_name: big_test_public_mirror_5 name: big_test_public_mirror_5 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -752,20 +816,23 @@ is_archived: false is_mirror: true status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 26 + group_id: 0 + group_sort_order: 0 +- id: 26 owner_id: 20 owner_name: user20 lower_name: big_test_private_mirror_5 name: big_test_private_mirror_5 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -782,20 +849,23 @@ is_archived: false is_mirror: true status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 27 + group_id: 0 + group_sort_order: 0 +- id: 27 owner_id: 19 owner_name: org19 lower_name: big_test_public_mirror_6 name: big_test_public_mirror_6 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 1 @@ -812,20 +882,23 @@ is_archived: false is_mirror: true status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 28 + group_id: 201 + group_sort_order: 1 +- id: 28 owner_id: 19 owner_name: org19 lower_name: big_test_private_mirror_6 name: big_test_private_mirror_6 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 1 @@ -842,20 +915,23 @@ is_archived: false is_mirror: true status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 29 + group_id: 188 + group_sort_order: 1 +- id: 29 owner_id: 20 owner_name: user20 lower_name: big_test_public_fork_7 name: big_test_public_fork_7 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -872,20 +948,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: true fork_id: 27 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 30 + group_id: 0 + group_sort_order: 0 +- id: 30 owner_id: 20 owner_name: user20 lower_name: big_test_private_fork_7 name: big_test_private_fork_7 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -902,20 +981,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: true fork_id: 28 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 31 + group_id: 0 + group_sort_order: 0 +- id: 31 owner_id: 2 owner_name: user2 lower_name: repo20 name: repo20 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -933,20 +1014,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 32 # org public repo + group_id: 0 + group_sort_order: 0 +- id: 32 owner_id: 3 owner_name: org3 lower_name: repo21 name: repo21 + description: "" + website: "" + default_branch: "" num_watches: 1 num_stars: 1 num_forks: 0 @@ -963,20 +1047,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 33 + group_id: 144 + group_sort_order: 1 +- id: 33 owner_id: 2 owner_name: user2 lower_name: utf8 name: utf8 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -994,20 +1080,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 34 + group_id: 0 + group_sort_order: 0 +- id: 34 owner_id: 21 owner_name: user21 lower_name: golang name: golang + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1024,20 +1113,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 35 + group_id: 0 + group_sort_order: 0 +- id: 35 owner_id: 21 owner_name: user21 lower_name: graphql name: graphql + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1054,20 +1146,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 36 + group_id: 0 + group_sort_order: 0 +- id: 36 owner_id: 2 owner_name: user2 lower_name: commits_search_test name: commits_search_test + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1085,20 +1179,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 37 + group_id: 0 + group_sort_order: 0 +- id: 37 owner_id: 2 owner_name: user2 lower_name: git_hooks_test name: git_hooks_test + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1116,20 +1212,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 38 + group_id: 0 + group_sort_order: 0 +- id: 38 owner_id: 22 owner_name: limited_org lower_name: public_repo_on_limited_org name: public_repo_on_limited_org + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1147,20 +1245,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 39 + group_id: 231 + group_sort_order: 1 +- id: 39 owner_id: 22 owner_name: limited_org lower_name: private_repo_on_limited_org name: private_repo_on_limited_org + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1178,20 +1278,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 40 + group_id: 221 + group_sort_order: 1 +- id: 40 owner_id: 23 owner_name: privated_org lower_name: public_repo_on_private_org name: public_repo_on_private_org + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1209,20 +1311,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 41 + group_id: 340 + group_sort_order: 1 +- id: 41 owner_id: 23 owner_name: privated_org lower_name: private_repo_on_private_org name: private_repo_on_private_org + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1240,20 +1344,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 42 + group_id: 352 + group_sort_order: 1 +- id: 42 owner_id: 2 owner_name: user2 lower_name: glob name: glob + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1271,20 +1377,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 43 + group_id: 0 + group_sort_order: 0 +- id: 43 owner_id: 26 owner_name: org26 lower_name: repo26 name: repo26 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1301,20 +1410,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 44 + group_id: 55 + group_sort_order: 1 +- id: 44 owner_id: 27 owner_name: user27 lower_name: template1 name: template1 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1332,20 +1443,23 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: true template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 45 + group_id: 0 + group_sort_order: 0 +- id: 45 owner_id: 27 owner_name: user27 lower_name: template2 name: template2 + description: "" + website: "" + default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1362,20 +1476,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: true template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 46 + group_id: 0 + group_sort_order: 0 +- id: 46 owner_id: 26 owner_name: org26 lower_name: repo_external_tracker name: repo_external_tracker + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1393,20 +1509,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 47 + group_id: 49 + group_sort_order: 1 +- id: 47 owner_id: 26 owner_name: org26 lower_name: repo_external_tracker_numeric name: repo_external_tracker_numeric + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1424,20 +1542,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 48 + group_id: 53 + group_sort_order: 1 +- id: 48 owner_id: 26 owner_name: org26 lower_name: repo_external_tracker_alpha name: repo_external_tracker_alpha + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1455,20 +1575,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 49 + group_id: 41 + group_sort_order: 1 +- id: 49 owner_id: 27 owner_name: user27 lower_name: repo49 name: repo49 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1486,20 +1608,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 50 + group_id: 0 + group_sort_order: 0 +- id: 50 owner_id: 30 owner_name: user30 lower_name: repo50 name: repo50 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1517,20 +1641,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 51 + group_id: 0 + group_sort_order: 0 +- id: 51 owner_id: 30 owner_name: user30 lower_name: repo51 name: repo51 + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1548,20 +1674,22 @@ is_archived: true is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 52 + group_id: 0 + group_sort_order: 0 +- id: 52 owner_id: 30 owner_name: user30 lower_name: empty name: empty + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1579,98 +1707,187 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 53 + group_id: 0 + group_sort_order: 0 +- id: 53 owner_id: 30 owner_name: user30 lower_name: renderer name: renderer + description: "" + website: "" default_branch: master - is_archived: false - is_empty: false - is_private: false + num_watches: 0 + num_stars: 0 + num_forks: 0 num_issues: 0 num_closed_issues: 0 num_pulls: 0 num_closed_pulls: 0 num_milestones: 0 num_closed_milestones: 0 - num_watches: 0 num_projects: 0 num_closed_projects: 0 + is_private: false + is_empty: false + is_archived: false + is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 54 + group_id: 0 + group_sort_order: 0 +- id: 54 owner_id: 2 owner_name: user2 lower_name: lfs name: lfs + description: "" + website: "" default_branch: master + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + is_private: true is_empty: false is_archived: false - is_private: true + is_mirror: false status: 0 - -- - id: 55 + is_fsck_enabled: false + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 + close_issues_via_commit_in_any_branch: false + group_id: 0 + group_sort_order: 0 +- id: 55 owner_id: 2 owner_name: user2 lower_name: scoped_label name: scoped_label + description: "" + website: "" + default_branch: "" + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 1 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + is_private: true is_empty: false is_archived: false - is_private: true - num_issues: 1 + is_mirror: false status: 0 - -- - id: 56 + is_fsck_enabled: false + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 + close_issues_via_commit_in_any_branch: false + group_id: 0 + group_sort_order: 0 +- id: 56 owner_id: 2 owner_name: user2 lower_name: readme-test name: readme-test + description: "" + website: "" default_branch: master + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + is_private: true is_empty: false is_archived: false - is_private: true + is_mirror: false status: 0 - num_issues: 0 - -- - id: 57 + is_fsck_enabled: false + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 + close_issues_via_commit_in_any_branch: false + group_id: 0 + group_sort_order: 0 +- id: 57 owner_id: 2 owner_name: user2 lower_name: repo-release name: repo-release + description: "" + website: "" default_branch: main + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + is_private: false is_empty: false is_archived: false - is_private: false + is_mirror: false status: 0 - num_issues: 0 - -- - id: 58 # org public repo + is_fsck_enabled: false + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 + close_issues_via_commit_in_any_branch: false + group_id: 0 + group_sort_order: 0 +- id: 58 owner_id: 2 owner_name: user2 lower_name: commitsonpr name: commitsonpr + description: "" + website: "" default_branch: main num_watches: 0 num_stars: 0 @@ -1688,20 +1905,55 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 60 + group_id: 0 + group_sort_order: 0 +- id: 59 + owner_id: 2 + owner_name: user2 + lower_name: test_commit_revert + name: test_commit_revert + description: "" + website: "" + default_branch: main + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + is_private: true + is_empty: false + is_archived: false + is_mirror: false + status: 0 + is_fsck_enabled: false + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 + close_issues_via_commit_in_any_branch: false + group_id: 0 + group_sort_order: 0 +- id: 60 owner_id: 40 owner_name: user40 lower_name: repo60 name: repo60 + description: "" + website: "" default_branch: main num_watches: 0 num_stars: 0 @@ -1719,20 +1971,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 61 + group_id: 0 + group_sort_order: 0 +- id: 61 owner_id: 41 owner_name: org41 lower_name: repo61 name: repo61 + description: "" + website: "" default_branch: main num_watches: 0 num_stars: 0 @@ -1750,20 +2004,22 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 62 + group_id: 90 + group_sort_order: 1 +- id: 62 owner_id: 42 owner_name: org42 lower_name: search-by-path name: search-by-path + description: "" + website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1781,12 +2037,14 @@ is_archived: false is_mirror: false status: 0 + is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + group_id: 106 + group_sort_order: 1 # DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly From 93c9998da777853445588d8c54102e7c231ba2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 12 Aug 2025 22:16:21 -0400 Subject: [PATCH 044/218] fix `no columns found to update` error when recalculating group access --- services/group/team.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/group/team.go b/services/group/team.go index 3cf690e25e..7fe48ba30a 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -135,7 +135,7 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo "type": u.Type, "team_id": t.ID, "group_id": g.ID, - }).Update(&group_model.GroupUnit{ + }).Cols("access_mode").Update(&group_model.GroupUnit{ AccessMode: newAccessMode, }); err != nil { return err From c160fe8ee52f2b165df0e2eab2713160e0de6915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 12 Aug 2025 22:16:52 -0400 Subject: [PATCH 045/218] add some unit tests for group service --- services/group/group_test.go | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 services/group/group_test.go diff --git a/services/group/group_test.go b/services/group/group_test.go new file mode 100644 index 0000000000..99b7e7c176 --- /dev/null +++ b/services/group/group_test.go @@ -0,0 +1,56 @@ +package group + +import ( + "code.gitea.io/gitea/models/db" + group_model "code.gitea.io/gitea/models/group" + repo_model "code.gitea.io/gitea/models/repo" + "code.gitea.io/gitea/models/unittest" + "github.com/stretchr/testify/assert" + "golang.org/x/net/context" + "testing" +) + +// group 12 is private +// team 23 are owners + +func TestMain(m *testing.M) { + unittest.MainTest(m) +} + +func TestNewGroup(t *testing.T) { + assert.NoError(t, unittest.PrepareTestDatabase()) + const groupName = "group x" + group := &group_model.Group{ + Name: groupName, + OwnerID: 3, + } + assert.NoError(t, NewGroup(db.DefaultContext, group)) + unittest.AssertExistsAndLoadBean(t, &group_model.Group{Name: groupName}) +} + +func TestMoveGroup(t *testing.T) { + assert.NoError(t, unittest.PrepareTestDatabase()) + testfn := func(gid int64) { + cond := &group_model.FindGroupsOptions{ + ParentGroupID: 123, + OwnerID: 3, + } + origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) + + assert.NoError(t, MoveGroupItem(context.TODO(), gid, 123, true, -1)) + unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1) + } + testfn(124) + testfn(132) + testfn(150) +} +func TestMoveRepo(t *testing.T) { + assert.NoError(t, unittest.PrepareTestDatabase()) + cond := repo_model.SearchRepositoryCondition(&repo_model.SearchRepoOptions{ + GroupID: 123, + }) + origCount := unittest.GetCount(t, new(repo_model.Repository), cond) + + assert.NoError(t, MoveGroupItem(db.DefaultContext, 32, 123, false, -1)) + unittest.AssertCountByCond(t, "repository", cond, origCount+1) +} From 5e69c93f600de07d1c2d3668bc50235beec4310b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 12 Aug 2025 23:55:46 -0400 Subject: [PATCH 046/218] fix deadlock caused by differing contexts when retrieving group ancestry with `ParentGroupCond`/`GetParentGroupChain` when using a sqlite db --- models/group/group.go | 8 ++--- models/organization/team_group.go | 4 +-- models/shared/group/org_group.go | 52 +++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 models/shared/group/org_group.go diff --git a/models/group/group.go b/models/group/group.go index 95219c6e77..38108f3495 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -195,7 +195,7 @@ func ParentGroupCondByRepoID(ctx context.Context, repoID int64, idStr string) bu if err != nil { return builder.In(idStr) } - return ParentGroupCond(idStr, g.ID) + return ParentGroupCond(ctx, idStr, g.ID) } type FindGroupsOptions struct { @@ -313,8 +313,8 @@ func GetParentGroupIDChain(ctx context.Context, groupID int64) (ids []int64, err } // ParentGroupCond returns a condition matching a group and its ancestors -func ParentGroupCond(idStr string, groupID int64) builder.Cond { - groupList, err := GetParentGroupIDChain(db.DefaultContext, groupID) +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) @@ -331,7 +331,7 @@ func UpdateGroup(ctx context.Context, group *Group) error { 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) { + if !IsErrGroupNotExist(err) { return err } if ng != nil { diff --git a/models/organization/team_group.go b/models/organization/team_group.go index 0cdaa742e6..72a8c9790f 100644 --- a/models/organization/team_group.go +++ b/models/organization/team_group.go @@ -10,7 +10,7 @@ import ( func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode perm.AccessMode) ([]*Team, error) { teams := make([]*Team, 0) - inCond := group_model.ParentGroupCond("group_team.group_id", groupID) + inCond := group_model.ParentGroupCond(ctx, "group_team.group_id", groupID) return teams, db.GetEngine(ctx).Distinct("team.*").Where("group_team.access_mode >= ?", mode). Join("INNER", "group_team", "group_team.team_id = team.id and group_team.org_id = ?", orgID). And("group_team.org_id = ?", orgID). @@ -21,7 +21,7 @@ func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode p func GetTeamsWithAccessToGroupUnit(ctx context.Context, orgID, groupID int64, mode perm.AccessMode, unitType unit.Type) ([]*Team, error) { teams := make([]*Team, 0) - inCond := group_model.ParentGroupCond("group_team.group_id", groupID) + inCond := group_model.ParentGroupCond(ctx, "group_team.group_id", groupID) return teams, db.GetEngine(ctx).Where("group_team.access_mode >= ?", mode). Join("INNER", "group_team", "group_team.team_id = team.id"). Join("INNER", "group_unit", "group_unit.team_id = team.id"). diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go new file mode 100644 index 0000000000..5ae4eeacda --- /dev/null +++ b/models/shared/group/org_group.go @@ -0,0 +1,52 @@ +package group + +import ( + "code.gitea.io/gitea/models/db" + group_model "code.gitea.io/gitea/models/group" + organization_model "code.gitea.io/gitea/models/organization" + user_model "code.gitea.io/gitea/models/user" + "context" + "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("group_team", "`group_team`.team_id = team_user.team_id"). + Where(builder.Eq{"`org_user`.org_id": opts.OrgID}). + And(group_model.ParentGroupCond(context.TODO(), "`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) (teams []*organization_model.Team, err error) { + err = db.GetEngine(ctx). + Where("`group_team`.group_id = ?", groupID). + Join("INNER", "group_team", "`group_team`.team_id = `team`.id"). + Asc("`team`.name"). + Find(&teams) + return +} + +func IsGroupMember(ctx context.Context, groupID, userID int64) (bool, error) { + return db.GetEngine(ctx). + Where("`group_team`.group_id = ?", groupID). + Join("INNER", "group_team", "`group_team`.team_id = `team_user`.team_id"). + And("`team_user`.uid = ?", userID). + Table("team_user"). + Exist() +} From fb46b59a8ea34e2eae0e2c48bc4638970490545b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 00:13:17 -0400 Subject: [PATCH 047/218] add `GroupID` field to `CreateRepoOptions` --- services/repository/create.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/repository/create.go b/services/repository/create.go index 25ea827476..77ed3de5e4 100644 --- a/services/repository/create.go +++ b/services/repository/create.go @@ -54,6 +54,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 { @@ -257,6 +258,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 From c986da2a46f798c8e81ec282cb66f652decf3a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 02:29:59 -0400 Subject: [PATCH 048/218] fix build error caused by changed function name --- services/context/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/context/repo.go b/services/context/repo.go index 4c31b07b34..81b4f3d273 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -429,7 +429,7 @@ func repoAssignmentLegacy(ctx *Context, data *repoAssignmentPrepareDataStruct) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() && !canWriteAsMaintainer(ctx) { + if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() && !canWriteAsMaintainer(ctx) { if ctx.FormString("go-get") == "1" { EarlyResponseForGoGetMeta(ctx) return From 2159d0ede6f177486bfff2dd631cd7446422c712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 02:50:56 -0400 Subject: [PATCH 049/218] add `GroupID` and `GroupSortOrder` fields to `Repository` api struct --- modules/structs/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 0c3a0ab44e..2de3ce331a 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 From 5f3c500637db64e0d71b4c2f027b714d081e2649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 03:13:10 -0400 Subject: [PATCH 050/218] fix more build errors --- services/convert/repo_group.go | 2 +- services/group/delete.go | 4 ++-- services/group/group.go | 2 +- services/group/search.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/convert/repo_group.go b/services/convert/repo_group.go index 31f1158411..75f94c2708 100644 --- a/services/convert/repo_group.go +++ b/services/convert/repo_group.go @@ -29,7 +29,7 @@ func ToAPIGroup(ctx context.Context, g *group_model.Group, actor *user_model.Use }); err != nil { return nil, err } - if _, apiGroup.NumRepos, err = repo_model.SearchRepositoryByCondition(ctx, &repo_model.SearchRepoOptions{ + if _, apiGroup.NumRepos, err = repo_model.SearchRepositoryByCondition(ctx, repo_model.SearchRepoOptions{ GroupID: g.ID, Actor: actor, OwnerID: g.OwnerID, diff --git a/services/group/delete.go b/services/group/delete.go index 0dc19c2560..a2f8a0ccf8 100644 --- a/services/group/delete.go +++ b/services/group/delete.go @@ -31,13 +31,13 @@ func DeleteGroup(ctx context.Context, gid int64) error { } // move all repos in the deleted group to its immediate parent - repos, cnt, err := repo_model.SearchRepository(ctx, &repo_model.SearchRepoOptions{ + 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{ + _, inParent, err := repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{ GroupID: toDelete.ParentGroupID, }) if err != nil { diff --git a/services/group/group.go b/services/group/group.go index 463c349a78..e26a86f7ed 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -96,7 +96,7 @@ func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, n } if newPos < 0 { var repoCount int64 - repoCount, err = repo_model.CountRepository(ctx, &repo_model.SearchRepoOptions{ + repoCount, err = repo_model.CountRepository(ctx, repo_model.SearchRepoOptions{ GroupID: newParent, }) if err != nil { diff --git a/services/group/search.go b/services/group/search.go index afe30576be..7a77fdb963 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -35,7 +35,7 @@ type GroupWebSearchOptions struct { Locale translation.Locale Recurse bool Actor *user_model.User - RepoOpts *repo_model.SearchRepoOptions + RepoOpts repo_model.SearchRepoOptions GroupOpts *group_model.FindGroupsOptions OrgID int64 } From 0e292f2100209a84cea5a75afb59d010ee04d75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 03:16:40 -0400 Subject: [PATCH 051/218] add api types for groups --- modules/structs/repo_group.go | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 modules/structs/repo_group.go diff --git a/modules/structs/repo_group.go b/modules/structs/repo_group.go new file mode 100644 index 0000000000..c4d4904e9a --- /dev/null +++ b/modules/structs/repo_group.go @@ -0,0 +1,50 @@ +package structs + +// Group represents a group of repositories and subgroups in an organization +// swagger:model +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"` +} + +// NewGroupOption - 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 - options for changing a group'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" binding:"Required"` + // the position of this group in its new parent + NewPos *int `json:"newPos,omitempty"` +} + +// EditGroupOption - 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"` +} From 24f5179d33808be0b58ea53321d37107091477b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 03:20:26 -0400 Subject: [PATCH 052/218] fix a few more build errors --- routers/api/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index a8bfa0965e..1f3294fcea 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -208,7 +208,7 @@ func repoAssignment() func(ctx *context.APIContext) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() { + if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() { ctx.APIErrorNotFound() return } From 8db609a265d1bf5e1a97101c22976ec61f6a4afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 03:29:27 -0400 Subject: [PATCH 053/218] regenerate swagger definitions --- templates/swagger/v1_json.tmpl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 26d45940f2..c10d2b443e 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -28960,6 +28960,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" From 057df87eeff73f2253657811c6ed903c38d0f9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 14:19:49 -0400 Subject: [PATCH 054/218] format files --- models/group/avatar.go | 2 ++ models/group/group.go | 7 ++++++- models/group/group_list.go | 1 + models/group/group_team.go | 3 ++- models/group/group_unit.go | 3 ++- models/organization/team_group.go | 3 ++- models/perm/access/repo_permission.go | 2 +- models/shared/group/org_group.go | 4 +++- modules/templates/util_avatar.go | 2 +- modules/util/slice.go | 2 +- services/group/avatar.go | 11 ++++++----- services/group/group_test.go | 7 +++++-- services/group/team.go | 1 + services/group/update.go | 5 +++-- services/user/user.go | 2 +- 15 files changed, 37 insertions(+), 18 deletions(-) diff --git a/models/group/avatar.go b/models/group/avatar.go index 1af58a9fca..dbecd0b27e 100644 --- a/models/group/avatar.go +++ b/models/group/avatar.go @@ -12,6 +12,7 @@ import ( func (g *Group) CustomAvatarRelativePath() string { return g.Avatar } + func (g *Group) relAvatarLink() string { // If no avatar - path is empty avatarPath := g.CustomAvatarRelativePath() @@ -28,6 +29,7 @@ func (g *Group) AvatarLink(ctx context.Context) string { } return "" } + func (g *Group) AvatarLinkWithSize(size int) string { if g.Avatar == "" { return avatars.DefaultAvatarLink() diff --git a/models/group/group.go b/models/group/group.go index 38108f3495..a4b0be3cdb 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "xorm.io/builder" ) @@ -129,8 +130,12 @@ func (g *Group) LoadOwner(ctx context.Context) error { } func (g *Group) CanAccess(ctx context.Context, userID int64) (bool, error) { + return g.CanAccessAtLevel(ctx, userID, perm.AccessModeRead) +} + +func (g *Group) CanAccessAtLevel(ctx context.Context, userID int64, level perm.AccessMode) (bool, error) { return db.GetEngine(ctx). - Where(UserOrgTeamPermCond("id", userID, perm.AccessModeRead)).Table("repo_group").Exist() + Where(UserOrgTeamPermCond("id", userID, level)).Table("repo_group").Exist() } func (g *Group) IsOwnedBy(ctx context.Context, userID int64) (bool, error) { diff --git a/models/group/group_list.go b/models/group/group_list.go index bb20b04af9..5086a3fc21 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -7,6 +7,7 @@ import ( "code.gitea.io/gitea/models/unit" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/structs" + "xorm.io/builder" ) diff --git a/models/group/group_team.go b/models/group/group_team.go index 392123cbdd..85992acdb5 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -1,12 +1,13 @@ 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" - "context" ) // GroupTeam represents a relation for a team's access to a group diff --git a/models/group/group_unit.go b/models/group/group_unit.go index 30c968b978..2715aecf79 100644 --- a/models/group/group_unit.go +++ b/models/group/group_unit.go @@ -1,10 +1,11 @@ package group import ( + "context" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/perm" "code.gitea.io/gitea/models/unit" - "context" ) // GroupUnit describes all units of a repository group diff --git a/models/organization/team_group.go b/models/organization/team_group.go index 72a8c9790f..da7931291a 100644 --- a/models/organization/team_group.go +++ b/models/organization/team_group.go @@ -1,11 +1,12 @@ 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" - "context" ) func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode perm.AccessMode) ([]*Team, error) { diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index ecb2472b6b..df0440f893 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -4,7 +4,6 @@ package access import ( - group_model "code.gitea.io/gitea/models/group" "context" "errors" "fmt" @@ -14,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" diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go index 5ae4eeacda..509ffedf53 100644 --- a/models/shared/group/org_group.go +++ b/models/shared/group/org_group.go @@ -1,11 +1,13 @@ 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" user_model "code.gitea.io/gitea/models/user" - "context" + "xorm.io/builder" ) diff --git a/modules/templates/util_avatar.go b/modules/templates/util_avatar.go index f2c3e8502b..13de803b82 100644 --- a/modules/templates/util_avatar.go +++ b/modules/templates/util_avatar.go @@ -4,7 +4,6 @@ package templates import ( - group_model "code.gitea.io/gitea/models/group" "context" "html" "html/template" @@ -12,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" diff --git a/modules/util/slice.go b/modules/util/slice.go index 97857e0f47..a1ebd89b99 100644 --- a/modules/util/slice.go +++ b/modules/util/slice.go @@ -78,7 +78,7 @@ func SliceNilAsEmpty[T any](a []T) []T { return a } -func SliceMap[T any, R any](slice []T, mapper func(it T) R) []R { +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)) diff --git a/services/group/avatar.go b/services/group/avatar.go index f38096c6c6..f9d395afbc 100644 --- a/services/group/avatar.go +++ b/services/group/avatar.go @@ -1,16 +1,17 @@ package group import ( - "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" "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. diff --git a/services/group/group_test.go b/services/group/group_test.go index 99b7e7c176..9013f44608 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -1,13 +1,15 @@ package group import ( + "testing" + "code.gitea.io/gitea/models/db" group_model "code.gitea.io/gitea/models/group" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" + "github.com/stretchr/testify/assert" "golang.org/x/net/context" - "testing" ) // group 12 is private @@ -44,9 +46,10 @@ func TestMoveGroup(t *testing.T) { testfn(132) testfn(150) } + func TestMoveRepo(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) - cond := repo_model.SearchRepositoryCondition(&repo_model.SearchRepoOptions{ + cond := repo_model.SearchRepositoryCondition(repo_model.SearchRepoOptions{ GroupID: 123, }) origCount := unittest.GetCount(t, new(repo_model.Repository), cond) diff --git a/services/group/team.go b/services/group/team.go index 7fe48ba30a..b22cc3471d 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -8,6 +8,7 @@ import ( group_model "code.gitea.io/gitea/models/group" org_model "code.gitea.io/gitea/models/organization" "code.gitea.io/gitea/models/perm" + "xorm.io/builder" ) diff --git a/services/group/update.go b/services/group/update.go index 63e131243f..b9394fecd1 100644 --- a/services/group/update.go +++ b/services/group/update.go @@ -1,12 +1,13 @@ package group import ( + "context" + "strings" + "code.gitea.io/gitea/models/db" group_model "code.gitea.io/gitea/models/group" "code.gitea.io/gitea/modules/optional" "code.gitea.io/gitea/modules/structs" - "context" - "strings" ) type UpdateOptions struct { diff --git a/services/user/user.go b/services/user/user.go index 539c848ced..2e31ca858a 100644 --- a/services/user/user.go +++ b/services/user/user.go @@ -4,7 +4,6 @@ package user import ( - group_model "code.gitea.io/gitea/models/group" "context" "fmt" "os" @@ -12,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" From f2758da1cffa36d24cc8ff8cfb9ea13958851920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 15:36:41 -0400 Subject: [PATCH 055/218] reapply changes wiped out by conflict resolution --- models/perm/access/repo_permission.go | 3 +-- routers/api/v1/api.go | 3 ++- services/context/repo.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index df0440f893..7de40e88c2 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -32,8 +32,7 @@ type Permission struct { units []*repo_model.RepoUnit unitsMode map[unit.Type]perm_model.AccessMode - everyoneAccessMode map[unit.Type]perm_model.AccessMode // the unit's minimal access mode for every signed-in user - anonymousAccessMode map[unit.Type]perm_model.AccessMode // the unit's minimal access mode for anonymous (non-signed-in) user + everyoneAccessMode map[unit.Type]perm_model.AccessMode } // IsOwner returns true if current user is the owner of repository. diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 1f3294fcea..1004bcefc9 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -82,6 +82,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" @@ -208,7 +209,7 @@ func repoAssignment() func(ctx *context.APIContext) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() { + if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() { ctx.APIErrorNotFound() return } diff --git a/services/context/repo.go b/services/context/repo.go index 81b4f3d273..4c31b07b34 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -429,7 +429,7 @@ func repoAssignmentLegacy(ctx *Context, data *repoAssignmentPrepareDataStruct) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() && !canWriteAsMaintainer(ctx) { + if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() && !canWriteAsMaintainer(ctx) { if ctx.FormString("go-get") == "1" { EarlyResponseForGoGetMeta(ctx) return From bfaf513d1302e19cecb1558b568a17149b43fbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 16:17:12 -0400 Subject: [PATCH 056/218] add ownership check when moving repository to a new group --- services/group/group.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/group/group.go b/services/group/group.go index e26a86f7ed..128c208a31 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -44,6 +44,15 @@ func NewGroup(ctx context.Context, g *group_model.Group) (err error) { 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. From 5fcd1e17d48badd86cd00c19798bae73c036621a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 16:21:41 -0400 Subject: [PATCH 057/218] apply simple linting changes --- services/group/group.go | 4 +++- services/group/team.go | 18 +++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/services/group/group.go b/services/group/group.go index 128c208a31..8c9382b016 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -2,6 +2,7 @@ package group import ( "context" + "fmt" "strings" "code.gitea.io/gitea/models/db" @@ -13,7 +14,8 @@ import ( "code.gitea.io/gitea/modules/util" ) -func NewGroup(ctx context.Context, g *group_model.Group) (err error) { +func NewGroup(ctx context.Context, g *group_model.Group) error { + var err error if len(g.Name) == 0 { return util.NewInvalidArgumentErrorf("empty group name") } diff --git a/services/group/team.go b/services/group/team.go index b22cc3471d..633d1c3a1e 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -79,38 +79,38 @@ func UpdateGroupTeam(ctx context.Context, gt *group_model.GroupTeam) (err error) // 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) (err error) { +func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew bool) error { + var err error sess := db.GetEngine(ctx) if err = g.LoadParentGroup(ctx); err != nil { - return + return err } var teams []*org_model.Team if g.ParentGroup == nil { teams, err = org_model.FindOrgTeams(ctx, g.OwnerID) if err != nil { - return + return err } } else { teams, err = org_model.GetTeamsWithAccessToGroup(ctx, g.OwnerID, g.ParentGroupID, perm.AccessModeRead) } for _, t := range teams { - var gt *group_model.GroupTeam = nil if gt, err = group_model.FindGroupTeamByTeamID(ctx, g.ParentGroupID, t.ID); err != nil { return } if gt != nil { if err = group_model.UpdateTeamGroup(ctx, g.OwnerID, t.ID, g.ID, gt.AccessMode, gt.CanCreateIn, isNew); err != nil { - return + 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 + return err } } if err = t.LoadUnits(ctx); err != nil { - return + return err } for _, u := range t.Units { @@ -129,7 +129,7 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo GroupID: g.ID, AccessMode: newAccessMode, }); err != nil { - return + return err } } else { if _, err = sess.Table("group_unit").Where(builder.Eq{ @@ -144,5 +144,5 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo } } } - return + return err } From 114dcb5d7b0c78a9f68c9ac3bf622ea5610448f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 16:32:17 -0400 Subject: [PATCH 058/218] apply simple linting changes --- models/group/group.go | 53 ++++++++++++++++---------------- models/group/group_list.go | 4 +-- models/group/group_team.go | 41 ++++++++++++------------ models/group/group_unit.go | 16 +++++----- models/shared/group/org_group.go | 6 ++-- modules/container/filter.go | 6 ++-- services/group/delete.go | 4 +-- services/group/group.go | 2 +- services/group/group_test.go | 3 +- services/group/search.go | 45 +++++---------------------- services/group/team.go | 53 +++++++++++++++----------------- 11 files changed, 101 insertions(+), 132 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index a4b0be3cdb..97ca825b21 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -32,9 +32,9 @@ type Group struct { Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"` Avatar string `xorm:"VARCHAR(64)"` - ParentGroupID int64 `xorm:"DEFAULT NULL"` - ParentGroup *Group `xorm:"-"` - Subgroups GroupList `xorm:"-"` + ParentGroupID int64 `xorm:"DEFAULT NULL"` + ParentGroup *Group `xorm:"-"` + Subgroups RepoGroupList `xorm:"-"` SortOrder int `xorm:"INDEX"` } @@ -52,8 +52,8 @@ func (Group) TableName() string { return "repo_group" } func init() { db.RegisterModel(new(Group)) - db.RegisterModel(new(GroupTeam)) - db.RegisterModel(new(GroupUnit)) + db.RegisterModel(new(RepoGroupTeam)) + db.RegisterModel(new(RepoGroupUnit)) } func (g *Group) doLoadSubgroups(ctx context.Context, recursive bool, cond builder.Cond, currentLevel int) error { @@ -141,30 +141,30 @@ func (g *Group) CanAccessAtLevel(ctx context.Context, userID int64, level perm.A func (g *Group) IsOwnedBy(ctx context.Context, userID int64) (bool, error) { return db.GetEngine(ctx). Where("team_user.uid = ?", userID). - Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). - And("group_team.access_mode = ?", perm.AccessModeOwner). - And("group_team.group_id = ?", g.ID). - Table("group_team"). + Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id"). + And("repo_group_team.access_mode = ?", perm.AccessModeOwner). + And("repo_group_team.group_id = ?", g.ID). + Table("repo_group_team"). Exist() } func (g *Group) CanCreateIn(ctx context.Context, userID int64) (bool, error) { return db.GetEngine(ctx). Where("team_user.uid = ?", userID). - Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). - And("group_team.group_id = ?", g.ID). - And("group_team.can_create_in = ?", true). - Table("group_team"). + Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id"). + And("repo_group_team.group_id = ?", g.ID). + And("repo_group_team.can_create_in = ?", true). + Table("repo_group_team"). Exist() } func (g *Group) IsAdminOf(ctx context.Context, userID int64) (bool, error) { return db.GetEngine(ctx). Where("team_user.uid = ?", userID). - Join("INNER", "team_user", "team_user.team_id = group_team.team_id"). - And("group_team.group_id = ?", g.ID). - And("group_team.access_mode >= ?", perm.AccessModeAdmin). - Table("group_team"). + Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id"). + And("repo_group_team.group_id = ?", g.ID). + And("repo_group_team.access_mode >= ?", perm.AccessModeAdmin). + Table("repo_group_team"). Exist() } @@ -224,11 +224,11 @@ func (opts FindGroupsOptions) ToConds() builder.Cond { } if opts.CanCreateIn.Has() && opts.ActorID > 0 { cond = cond.And(builder.In("id", - builder.Select("group_team.group_id"). - From("group_team"). + 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 = group_team.team_id"). - And(builder.Eq{"group_team.can_create_in": true}))) + 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}) @@ -236,7 +236,7 @@ func (opts FindGroupsOptions) ToConds() builder.Cond { return cond } -func FindGroups(ctx context.Context, opts *FindGroupsOptions) (GroupList, error) { +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) @@ -260,7 +260,7 @@ func findGroupsByCond(ctx context.Context, opts *FindGroupsOptions, cond builder return sess.Asc("sort_order") } -func FindGroupsByCond(ctx context.Context, opts *FindGroupsOptions, cond builder.Cond) (GroupList, error) { +func FindGroupsByCond(ctx context.Context, opts *FindGroupsOptions, cond builder.Cond) (RepoGroupList, error) { defaultSize := 50 if opts.PageSize > 0 { defaultSize = opts.PageSize @@ -285,7 +285,7 @@ func UpdateGroupOwnerName(ctx context.Context, oldUser, newUser string) error { } // GetParentGroupChain returns a slice containing a group and its ancestors -func GetParentGroupChain(ctx context.Context, groupID int64) (GroupList, error) { +func GetParentGroupChain(ctx context.Context, groupID int64) (RepoGroupList, error) { groupList := make([]*Group, 0, 20) currentGroupID := groupID for { @@ -306,7 +306,8 @@ func GetParentGroupChain(ctx context.Context, groupID int64) (GroupList, error) return groupList, nil } -func GetParentGroupIDChain(ctx context.Context, groupID int64) (ids []int64, err error) { +func GetParentGroupIDChain(ctx context.Context, groupID int64) ([]int64, error) { + var ids []int64 groupList, err := GetParentGroupChain(ctx, groupID) if err != nil { return nil, err @@ -314,7 +315,7 @@ func GetParentGroupIDChain(ctx context.Context, groupID int64) (ids []int64, err ids = util.SliceMap(groupList, func(g *Group) int64 { return g.ID }) - return + return ids, err } // ParentGroupCond returns a condition matching a group and its ancestors diff --git a/models/group/group_list.go b/models/group/group_list.go index 5086a3fc21..dd823fff40 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -11,9 +11,9 @@ import ( "xorm.io/builder" ) -type GroupList []*Group +type RepoGroupList []*Group -func (groups GroupList) LoadOwners(ctx context.Context) error { +func (groups RepoGroupList) LoadOwners(ctx context.Context) error { for _, g := range groups { if g.Owner == nil { err := g.LoadOwner(ctx) diff --git a/models/group/group_team.go b/models/group/group_team.go index 85992acdb5..243d2b6ad3 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -10,23 +10,24 @@ import ( "code.gitea.io/gitea/modules/util" ) -// GroupTeam represents a relation for a team's access to a group -type GroupTeam struct { +// 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 []*GroupUnit `xorm:"-"` + Units []*RepoGroupUnit `xorm:"-"` } -func (g *GroupTeam) LoadGroupUnits(ctx context.Context) (err error) { +func (g *RepoGroupTeam) LoadGroupUnits(ctx context.Context) error { + var err error g.Units, err = GetUnitsByGroupID(ctx, g.GroupID) - return + return err } -func (g *GroupTeam) UnitAccessModeEx(ctx context.Context, tp unit.Type) (accessMode perm.AccessMode, exist bool) { +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()) @@ -38,7 +39,7 @@ func (g *GroupTeam) UnitAccessModeEx(ctx context.Context, tp unit.Type) (accessM break } } - return + return accessMode, exist } // HasTeamGroup returns true if the given group belongs to a team. @@ -48,7 +49,7 @@ func HasTeamGroup(ctx context.Context, orgID, teamID, groupID int64) bool { And("team_id=?", teamID). And("group_id=?", groupID). And("access_mode >= ?", perm.AccessModeRead). - Get(new(GroupTeam)) + Get(new(RepoGroupTeam)) return has } @@ -57,7 +58,7 @@ func AddTeamGroup(ctx context.Context, orgID, teamID, groupID int64, access perm if access <= perm.AccessModeWrite { canCreateIn = false } - _, err := db.GetEngine(ctx).Insert(&GroupTeam{ + _, err := db.GetEngine(ctx).Insert(&RepoGroupTeam{ OrgID: orgID, GroupID: groupID, TeamID: teamID, @@ -75,11 +76,11 @@ func UpdateTeamGroup(ctx context.Context, orgID, teamID, groupID int64, access p err = AddTeamGroup(ctx, orgID, teamID, groupID, access, canCreateIn) } else { _, err = db.GetEngine(ctx). - Table("group_team"). + Table("repo_group_team"). Where("org_id=?", orgID). And("team_id=?", teamID). And("group_id =?", groupID). - Update(&GroupTeam{ + Update(&RepoGroupTeam{ OrgID: orgID, TeamID: teamID, GroupID: groupID, @@ -93,7 +94,7 @@ func UpdateTeamGroup(ctx context.Context, orgID, teamID, groupID int64, access p // RemoveTeamGroup removes a group from a team func RemoveTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error { - _, err := db.DeleteByBean(ctx, &GroupTeam{ + _, err := db.DeleteByBean(ctx, &RepoGroupTeam{ TeamID: teamID, GroupID: groupID, OrgID: orgID, @@ -101,24 +102,24 @@ func RemoveTeamGroup(ctx context.Context, orgID, teamID, groupID int64) error { return err } -func FindGroupTeams(ctx context.Context, groupID int64) (gteams []*GroupTeam, err error) { +func FindGroupTeams(ctx context.Context, groupID int64) (gteams []*RepoGroupTeam, err error) { return gteams, db.GetEngine(ctx). Where("group_id=?", groupID). - Table("group_team"). + Table("repo_group_team"). Find(>eams) } -func FindGroupTeamByTeamID(ctx context.Context, groupID, teamID int64) (gteam *GroupTeam, err error) { - gteam = new(GroupTeam) +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("group_team"). + Table("repo_group_team"). Get(gteam) if !has { gteam = nil } - return + return gteam, err } func GetAncestorPermissions(ctx context.Context, groupID, teamID int64) (perm.AccessMode, error) { @@ -127,12 +128,12 @@ func GetAncestorPermissions(ctx context.Context, groupID, teamID int64) (perm.Ac if err != nil { return perm.AccessModeNone, err } - gteams := make([]*GroupTeam, 0) + 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 *GroupTeam) perm.AccessMode { + mapped := util.SliceMap(gteams, func(g *RepoGroupTeam) perm.AccessMode { return g.AccessMode }) maxMode := max(mapped[0]) diff --git a/models/group/group_unit.go b/models/group/group_unit.go index 2715aecf79..b024d082ef 100644 --- a/models/group/group_unit.go +++ b/models/group/group_unit.go @@ -8,8 +8,8 @@ import ( "code.gitea.io/gitea/models/unit" ) -// GroupUnit describes all units of a repository group -type GroupUnit struct { +// 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)"` @@ -17,16 +17,16 @@ type GroupUnit struct { AccessMode perm.AccessMode } -func (g *GroupUnit) Unit() unit.Unit { +func (g *RepoGroupUnit) Unit() unit.Unit { return unit.Units[g.Type] } -func GetUnitsByGroupID(ctx context.Context, groupID int64) (units []*GroupUnit, err error) { +func GetUnitsByGroupID(ctx context.Context, groupID int64) (units []*RepoGroupUnit, err error) { return units, db.GetEngine(ctx).Where("group_id = ?", groupID).Find(&units) } -func GetGroupUnit(ctx context.Context, groupID, teamID int64, unitType unit.Type) (unit *GroupUnit, err error) { - unit = new(GroupUnit) +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). @@ -35,8 +35,8 @@ func GetGroupUnit(ctx context.Context, groupID, teamID int64, unitType unit.Type return } -func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (unit *GroupUnit, err error) { - units := make([]*GroupUnit, 0) +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). diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go index 509ffedf53..53bb930618 100644 --- a/models/shared/group/org_group.go +++ b/models/shared/group/org_group.go @@ -35,13 +35,13 @@ func FindGroupMembers(ctx context.Context, groupID int64, opts *organization_mod return users, err } -func GetGroupTeams(ctx context.Context, groupID int64) (teams []*organization_model.Team, err error) { - err = db.GetEngine(ctx). +func GetGroupTeams(ctx context.Context, groupID int64) ([]*organization_model.Team, error) { + var teams []*organization_model.Team + return teams, db.GetEngine(ctx). Where("`group_team`.group_id = ?", groupID). Join("INNER", "group_team", "`group_team`.team_id = `team`.id"). Asc("`team`.name"). Find(&teams) - return } func IsGroupMember(ctx context.Context, groupID, userID int64) (bool, error) { diff --git a/modules/container/filter.go b/modules/container/filter.go index 9f1237e626..3e27552f1e 100644 --- a/modules/container/filter.go +++ b/modules/container/filter.go @@ -24,10 +24,10 @@ 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 { + itemID := id(s[i]) + if _, ok := seen[itemID]; !ok { filtered = append(filtered, s[i]) - seen[itemId] = true + seen[itemID] = true } } return slices.Clip(filtered) diff --git a/services/group/delete.go b/services/group/delete.go index a2f8a0ccf8..0b86956378 100644 --- a/services/group/delete.go +++ b/services/group/delete.go @@ -23,10 +23,10 @@ func DeleteGroup(ctx context.Context, gid int64) error { } // remove team permissions and units for deleted group - if _, err = sess.Where("group_id = ?", gid).Delete(new(group_model.GroupTeam)); err != nil { + 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.GroupUnit)); err != nil { + if _, err = sess.Where("group_id = ?", gid).Delete(new(group_model.RepoGroupUnit)); err != nil { return err } diff --git a/services/group/group.go b/services/group/group.go index 8c9382b016..fbb4cf122f 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -34,7 +34,7 @@ func NewGroup(ctx context.Context, g *group_model.Group) error { defer committer.Close() if err = db.Insert(ctx, g); err != nil { - return + return err } if err = RecalculateGroupAccess(ctx, g, true); err != nil { diff --git a/services/group/group_test.go b/services/group/group_test.go index 9013f44608..282898314e 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -9,7 +9,6 @@ import ( "code.gitea.io/gitea/models/unittest" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" ) // group 12 is private @@ -39,7 +38,7 @@ func TestMoveGroup(t *testing.T) { } origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) - assert.NoError(t, MoveGroupItem(context.TODO(), gid, 123, true, -1)) + assert.NoError(t, MoveGroupItem(t.Context(), gid, 123, true, -1)) unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1) } testfn(124) diff --git a/services/group/search.go b/services/group/search.go index 7a77fdb963..5ca3a2eac4 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -25,12 +25,12 @@ type WebSearchGroup struct { Repos []*repo_service.WebSearchRepository `json:"repos"` } -type GroupWebSearchResult struct { +type WebSearchResult struct { OK bool `json:"ok"` Data *WebSearchGroup `json:"data"` } -type GroupWebSearchOptions struct { +type WebSearchOptions struct { Ctx context.Context Locale translation.Locale Recurse bool @@ -47,7 +47,7 @@ type WebSearchGroupRoot struct { Repos []*repo_service.WebSearchRepository } -type GroupWebSearchRootResult struct { +type WebSearchGroupRootResult struct { OK bool `json:"ok"` Data *WebSearchGroupRoot `json:"data"` } @@ -71,7 +71,7 @@ func ToWebSearchRepo(ctx context.Context, repo *repo_model.Repository) *repo_ser } } -func (w *WebSearchGroup) doLoadChildren(opts *GroupWebSearchOptions) error { +func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error { opts.RepoOpts.OwnerID = opts.OrgID opts.RepoOpts.GroupID = 0 opts.GroupOpts.OwnerID = opts.OrgID @@ -138,7 +138,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *GroupWebSearchOptions) error { return nil } -func ToWebSearchGroup(group *group_model.Group, opts *GroupWebSearchOptions) (*WebSearchGroup, error) { +func ToWebSearchGroup(group *group_model.Group, opts *WebSearchOptions) (*WebSearchGroup, error) { res := new(WebSearchGroup) res.Repos = make([]*repo_service.WebSearchRepository, 0) @@ -152,8 +152,8 @@ func ToWebSearchGroup(group *group_model.Group, opts *GroupWebSearchOptions) (*W return res, nil } -func SearchRepoGroupWeb(group *group_model.Group, opts *GroupWebSearchOptions) (*GroupWebSearchResult, error) { - res := new(WebSearchGroup) +func SearchRepoGroupWeb(group *group_model.Group, opts *WebSearchOptions) (*WebSearchResult, error) { + var res *WebSearchGroup var err error res, err = ToWebSearchGroup(group, opts) if err != nil { @@ -163,37 +163,8 @@ func SearchRepoGroupWeb(group *group_model.Group, opts *GroupWebSearchOptions) ( if err != nil { return nil, err } - return &GroupWebSearchResult{ + return &WebSearchResult{ Data: res, OK: true, }, nil } - -/* func SearchRootItems(ctx context.Context, oid int64, groupSearchOptions *group_model.FindGroupsOptions, repoSearchOptions *repo_model.SearchRepoOptions, actor *user_model.User, recursive bool) (*WebSearchGroupRoot, error) { - root := &WebSearchGroupRoot{ - Repos: make([]*repo_service.WebSearchRepository, 0), - Groups: make([]*WebSearchGroup, 0), - } - groupSearchOptions.ParentGroupID = 0 - groups, err := group_model.FindGroupsByCond(ctx, groupSearchOptions, group_model.AccessibleGroupCondition(actor, unit.TypeInvalid)) - if err != nil { - return nil, err - } - for _, g := range groups { - toAppend, err := ToWebSearchGroup(ctx, g, actor, oid) - if err != nil { - return nil, err - } - root.Groups = append(root.Groups, toAppend) - } - repos, _, err := repo_model.SearchRepositoryByCondition(ctx, repoSearchOptions, repo_model.AccessibleRepositoryCondition(actor, unit.TypeInvalid), true) - if err != nil { - return nil, err - } - for _, r := range repos { - root.Repos = append(root.Repos, ToWebSearchRepo(ctx, r)) - } - - return root, nil -} -*/ diff --git a/services/group/team.go b/services/group/team.go index 633d1c3a1e..add4c074de 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -20,25 +20,25 @@ func AddTeamToGroup(ctx context.Context, group *group_model.Group, tname string) 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) - } else { - parentGroup, err := group_model.FindGroupTeamByTeamID(ctx, group.ID, t.ID) - if err != nil { - return err - } - mode := t.AccessMode - canCreateIn := t.CanCreateOrgRepo - if parentGroup != nil { - mode = max(t.AccessMode, parentGroup.AccessMode) - canCreateIn = parentGroup.CanCreateIn || t.CanCreateOrgRepo - } - if err = group.LoadParentGroup(ctx); err != nil { - return err - } - err = group_model.AddTeamGroup(ctx, group.ID, t.ID, group.ID, mode, canCreateIn) - if err != nil { - return err - } } + parentGroup, err := group_model.FindGroupTeamByTeamID(ctx, group.ID, t.ID) + if err != nil { + return err + } + mode := t.AccessMode + canCreateIn := t.CanCreateOrgRepo + if parentGroup != nil { + mode = max(t.AccessMode, parentGroup.AccessMode) + canCreateIn = parentGroup.CanCreateIn || t.CanCreateOrgRepo + } + if err = group.LoadParentGroup(ctx); err != nil { + return err + } + err = group_model.AddTeamGroup(ctx, group.ID, t.ID, group.ID, mode, canCreateIn) + if err != nil { + return err + } + return nil } @@ -47,13 +47,10 @@ func DeleteTeamFromGroup(ctx context.Context, group *group_model.Group, org int6 if err != nil { return err } - if err = group_model.RemoveTeamGroup(ctx, org, team.ID, group.ID); err != nil { - return err - } - return nil + return group_model.RemoveTeamGroup(ctx, org, team.ID, group.ID) } -func UpdateGroupTeam(ctx context.Context, gt *group_model.GroupTeam) (err error) { +func UpdateGroupTeam(ctx context.Context, gt *group_model.RepoGroupTeam) (err error) { ctx, committer, err := db.TxContext(ctx) if err != nil { return err @@ -95,9 +92,9 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo teams, err = org_model.GetTeamsWithAccessToGroup(ctx, g.OwnerID, g.ParentGroupID, perm.AccessModeRead) } for _, t := range teams { - var gt *group_model.GroupTeam = nil + var gt *group_model.RepoGroupTeam = nil if gt, err = group_model.FindGroupTeamByTeamID(ctx, g.ParentGroupID, t.ID); err != nil { - return + return err } if gt != nil { if err = group_model.UpdateTeamGroup(ctx, g.OwnerID, t.ID, g.ID, gt.AccessMode, gt.CanCreateIn, isNew); err != nil { @@ -123,7 +120,7 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo newAccessMode = min(newAccessMode, gu.AccessMode) } if isNew { - if _, err = sess.Table("group_unit").Insert(&group_model.GroupUnit{ + if _, err = sess.Table("repo_group_unit").Insert(&group_model.RepoGroupUnit{ Type: u.Type, TeamID: t.ID, GroupID: g.ID, @@ -132,11 +129,11 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo return err } } else { - if _, err = sess.Table("group_unit").Where(builder.Eq{ + if _, err = sess.Table("repo_group_unit").Where(builder.Eq{ "type": u.Type, "team_id": t.ID, "group_id": g.ID, - }).Cols("access_mode").Update(&group_model.GroupUnit{ + }).Cols("access_mode").Update(&group_model.RepoGroupUnit{ AccessMode: newAccessMode, }); err != nil { return err From d77110a1a8d9b98c70bbc867dd17800a492849ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 20:46:30 -0400 Subject: [PATCH 059/218] update repo service to check that `GroupID` is owned by the repo owner when creating a new repository --- services/repository/create.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/services/repository/create.go b/services/repository/create.go index 77ed3de5e4..eaa7350a1d 100644 --- a/services/repository/create.go +++ b/services/repository/create.go @@ -5,6 +5,7 @@ package repository import ( "bytes" + group_model "code.gitea.io/gitea/models/group" "context" "fmt" "os" @@ -236,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, From 81095daa62f55157fce7e79df41f4a056a25b70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 20:47:59 -0400 Subject: [PATCH 060/218] move parameters of the `MoveGroup` function into a struct, `MoveGroupOptions` --- services/group/group.go | 42 ++++++++++++++++++++++++------------ services/group/group_test.go | 4 ++-- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/services/group/group.go b/services/group/group.go index fbb4cf122f..3fa3b01fd1 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -66,7 +66,13 @@ func MoveRepositoryToGroup(ctx context.Context, repo *repo_model.Repository, new return err } -func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, newPos int) (err error) { +type MoveGroupOptions struct { + NewParent, ItemID int64 + IsGroup bool + NewPos int +} + +func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doerID int64) (err error) { var committer db.Committer ctx, committer, err = db.TxContext(ctx) if err != nil { @@ -74,25 +80,33 @@ func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, n } defer committer.Close() var parentGroup *group_model.Group - parentGroup, err = group_model.GetGroupByID(ctx, newParent) + parentGroup, err = group_model.GetGroupByID(ctx, opts.NewParent) if err != nil { return err } + canAccessNewParent, err := parentGroup.CanAccess(ctx, doerID) + if err != nil { + return err + } + if !canAccessNewParent { + return fmt.Errorf("cannot access new parent group") + } + err = parentGroup.LoadSubgroups(ctx, false) if err != nil { return err } - if isGroup { + if opts.IsGroup { var group *group_model.Group - group, err = group_model.GetGroupByID(ctx, itemID) + group, err = group_model.GetGroupByID(ctx, opts.ItemID) if err != nil { return err } - if newPos < 0 { - newPos = len(parentGroup.Subgroups) + if opts.NewPos < 0 { + opts.NewPos = len(parentGroup.Subgroups) } - if group.ParentGroupID != newParent || group.SortOrder != newPos { - if err = group_model.MoveGroup(ctx, group, newParent, newPos); err != nil { + 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 { @@ -101,22 +115,22 @@ func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, n } } else { var repo *repo_model.Repository - repo, err = repo_model.GetRepositoryByID(ctx, itemID) + repo, err = repo_model.GetRepositoryByID(ctx, opts.ItemID) if err != nil { return err } - if newPos < 0 { + if opts.NewPos < 0 { var repoCount int64 repoCount, err = repo_model.CountRepository(ctx, repo_model.SearchRepoOptions{ - GroupID: newParent, + GroupID: opts.NewParent, }) if err != nil { return err } - newPos = int(repoCount) + opts.NewPos = int(repoCount) } - if repo.GroupID != newParent || repo.GroupSortOrder != newPos { - if err = MoveRepositoryToGroup(ctx, repo, newParent, newPos); err != nil { + if repo.GroupID != opts.NewParent || repo.GroupSortOrder != opts.NewPos { + if err = MoveRepositoryToGroup(ctx, repo, opts.NewParent, opts.NewPos); err != nil { return err } } diff --git a/services/group/group_test.go b/services/group/group_test.go index 282898314e..cbf4b1fe53 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -38,7 +38,7 @@ func TestMoveGroup(t *testing.T) { } origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) - assert.NoError(t, MoveGroupItem(t.Context(), gid, 123, true, -1)) + assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{123, gid, true, -1}, 3)) unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1) } testfn(124) @@ -53,6 +53,6 @@ func TestMoveRepo(t *testing.T) { }) origCount := unittest.GetCount(t, new(repo_model.Repository), cond) - assert.NoError(t, MoveGroupItem(db.DefaultContext, 32, 123, false, -1)) + assert.NoError(t, MoveGroupItem(db.DefaultContext, MoveGroupOptions{123, 32, false, -1}, 3)) unittest.AssertCountByCond(t, "repository", cond, origCount+1) } From 87f26cd99bf3a60f86afb9825acd888241ffe663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 20:50:23 -0400 Subject: [PATCH 061/218] rename tables in group-related query conditions --- models/group/group_list.go | 10 +++++----- models/organization/team_group.go | 20 ++++++++++---------- models/organization/team_list.go | 4 ++-- models/repo/repo_list.go | 6 +++--- models/shared/group/org_group.go | 19 +++++++++++-------- 5 files changed, 31 insertions(+), 28 deletions(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index dd823fff40..133f8dbd64 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -27,16 +27,16 @@ func (groups RepoGroupList) LoadOwners(ctx context.Context) error { // userOrgTeamGroupBuilder returns group ids where user's teams can access. func userOrgTeamGroupBuilder(userID int64) *builder.Builder { - return builder.Select("`group_team`.group_id"). - From("group_team"). - Join("INNER", "team_user", "`team_user`.team_id = `group_team`.team_id"). + 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.Eq{"`team_user`.uid": userID}) } func UserOrgTeamPermCond(idStr string, userID int64, level perm.AccessMode) builder.Cond { selCond := userOrgTeamGroupBuilder(userID) - selCond = selCond.InnerJoin("team", "`team`.id = `group_team`.team_id"). - And(builder.Or(builder.Gte{"`team`.authorize": level}, builder.Gte{"`group_team`.access_mode": level})) + 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) } diff --git a/models/organization/team_group.go b/models/organization/team_group.go index da7931291a..8886fa5fef 100644 --- a/models/organization/team_group.go +++ b/models/organization/team_group.go @@ -11,10 +11,10 @@ import ( func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode perm.AccessMode) ([]*Team, error) { teams := make([]*Team, 0) - inCond := group_model.ParentGroupCond(ctx, "group_team.group_id", groupID) - return teams, db.GetEngine(ctx).Distinct("team.*").Where("group_team.access_mode >= ?", mode). - Join("INNER", "group_team", "group_team.team_id = team.id and group_team.org_id = ?", orgID). - And("group_team.org_id = ?", orgID). + 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) @@ -22,13 +22,13 @@ func GetTeamsWithAccessToGroup(ctx context.Context, orgID, groupID int64, mode p 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, "group_team.group_id", groupID) - return teams, db.GetEngine(ctx).Where("group_team.access_mode >= ?", mode). - Join("INNER", "group_team", "group_team.team_id = team.id"). - Join("INNER", "group_unit", "group_unit.team_id = team.id"). - And("group_team.org_id = ?", orgID). + 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("group_unit.type = ?", unitType). + 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 cc471f0e67..f742875ee4 100644 --- a/models/organization/team_list.go +++ b/models/organization/team_list.go @@ -129,8 +129,8 @@ func GetUserRepoTeams(ctx context.Context, orgID, userID, repoID int64) (teams T // GetUserGroupTeams returns teams in a group that a user has access to func GetUserGroupTeams(ctx context.Context, groupID, userID int64) (teams TeamList, err error) { err = db.GetEngine(ctx). - Where("`group_team`.group_id = ?", groupID). - Join("INNER", "group_team", "`group_team`.team_id = `team`.id"). + 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"). diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index 6a54cd19c8..f17a5f0f7c 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -306,7 +306,7 @@ func userOrgTeamRepoBuilder(userID int64) *builder.Builder { // 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", "group_team", "`group_team`.team_id=`team_repo`.team_id") + 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. @@ -343,8 +343,8 @@ func UserOrgUnitRepoCond(idStr string, userID, orgID int64, unitType unit.Type) func ReposAccessibleByGroupTeamBuilder(teamID int64) *builder.Builder { innerGroupCond := builder.Select("`repo_group`.id"). From("repo_group"). - InnerJoin("group_team", "`group_team`.group_id = `repo_group`.id"). - Where(builder.Eq{"`group_team`.team_id": teamID}) + 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)) diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go index 53bb930618..bdb326a32e 100644 --- a/models/shared/group/org_group.go +++ b/models/shared/group/org_group.go @@ -17,9 +17,9 @@ func FindGroupMembers(ctx context.Context, groupID int64, opts *organization_mod Select("`team_user`.uid"). From("team_user"). InnerJoin("org_user", "`org_user`.uid = team_user.uid"). - InnerJoin("group_team", "`group_team`.team_id = team_user.team_id"). + 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(), "`group_team`.group_id", groupID)) + 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}) } @@ -38,17 +38,20 @@ func FindGroupMembers(ctx context.Context, groupID int64, opts *organization_mod func GetGroupTeams(ctx context.Context, groupID int64) ([]*organization_model.Team, error) { var teams []*organization_model.Team return teams, db.GetEngine(ctx). - Where("`group_team`.group_id = ?", groupID). - Join("INNER", "group_team", "`group_team`.team_id = `team`.id"). + 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, userID int64) (bool, error) { +func IsGroupMember(ctx context.Context, groupID int64, user *user_model.User) (bool, error) { + if user == nil { + return false, nil + } return db.GetEngine(ctx). - Where("`group_team`.group_id = ?", groupID). - Join("INNER", "group_team", "`group_team`.team_id = `team_user`.team_id"). - And("`team_user`.uid = ?", userID). + 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() } From 0eab7d042997618341a13ddcd62cc3be6a0c3628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 20:54:32 -0400 Subject: [PATCH 062/218] add api routes and functions for repository groups --- modules/structs/repo.go | 2 + modules/structs/repo_group.go | 2 +- routers/api/v1/api.go | 73 +++++++- routers/api/v1/group/group.go | 329 ++++++++++++++++++++++++++++++++++ routers/api/v1/repo/repo.go | 50 ++++++ 5 files changed, 454 insertions(+), 2 deletions(-) create mode 100644 routers/api/v1/group/group.go diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 2de3ce331a..528231b57c 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -165,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 index c4d4904e9a..0bc64fd253 100644 --- a/modules/structs/repo_group.go +++ b/modules/structs/repo_group.go @@ -27,7 +27,7 @@ type NewGroupOption struct { Visibility VisibleType `json:"visibility"` } -// MoveGroupOption - options for changing a group's parent and sort order +// MoveGroupOption - 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 diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 1004bcefc9..d728d26e99 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -68,11 +68,15 @@ import ( "net/http" "strings" + actions_model "code.gitea.io/gitea/models/actions" auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/organization" "code.gitea.io/gitea/models/perm" access_model "code.gitea.io/gitea/models/perm/access" repo_model "code.gitea.io/gitea/models/repo" + group_model "code.gitea.io/gitea/models/group" + shared_group_model "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" @@ -485,6 +489,60 @@ 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 + } + gid := ctx.PathParamInt64("group_id") + g, err := group_model.GetGroupByID(ctx, gid) + if err != nil { + ctx.APIErrorInternal(err) + return + } + err = g.LoadOwner(ctx) + if err != nil { + ctx.APIErrorInternal(err) + return + } + var canAccess bool + if ctx.IsSigned { + canAccess, err = g.CanAccessAtLevel(ctx, ctx.Doer.ID, mode) + } else { + canAccess, err = g.CanAccessAtLevel(ctx, 0, mode) + } + if err != nil { + ctx.APIErrorInternal(err) + return + } + igm, err := shared_group_model.IsGroupMember(ctx, gid, ctx.Doer) + if err != nil { + ctx.APIErrorInternal(err) + return + } + if !igm && !canAccess { + ctx.APIErrorNotFound() + return + } + if needsCreatePerm { + canCreateIn := false + if ctx.IsSigned { + canCreateIn, err = g.CanCreateIn(ctx, ctx.Doer.ID) + if err != nil { + ctx.APIErrorInternal(err) + return + } + } + if !canCreateIn { + ctx.APIError(http.StatusForbidden, fmt.Sprintf("User[%d] does not have permission to create new items in group[%d]", ctx.Doer.ID, gid)) + return + } + } + } +} + // reqTeamMembership user should be an team member, or a site admin func reqTeamMembership() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { @@ -1153,6 +1211,7 @@ func Routes() *web.Router { 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.EditGroupOption{}), 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) @@ -1667,6 +1726,10 @@ func Routes() *web.Router { m.Delete("", org.UnblockUser) }) }, reqToken(), reqOrgOwnership()) + m.Group("/groups", func() { + m.Post("/new", reqToken(), reqGroupMembership(perm.AccessModeWrite, true), group.NewGroup) + m.Post("/{group_id}/move", reqToken(), reqGroupMembership(perm.AccessModeWrite, false), group.MoveGroup) + }) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization), orgAssignment(true), checkTokenPublicOnly()) m.Group("/teams/{teamid}", func() { m.Combo("").Get(reqToken(), org.GetTeam). @@ -1747,6 +1810,14 @@ 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("/new", reqToken(), reqGroupMembership(perm.AccessModeWrite, true), bind(api.NewGroupOption{}), group.NewSubGroup) + }) + }) return m } diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go new file mode 100644 index 0000000000..6f6638eb8e --- /dev/null +++ b/routers/api/v1/group/group.go @@ -0,0 +1,329 @@ +package group + +import ( + "net/http" + "strings" + + group_model "code.gitea.io/gitea/models/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" +) + +func createCommonGroup(ctx *context.APIContext, parentGroupID int64) (*api.Group, error) { + form := web.GetForm(ctx).(*api.NewGroupOption) + group := &group_model.Group{ + Name: form.Name, + Description: form.Description, + OwnerID: ctx.Org.Organization.ID, + LowerName: strings.ToLower(form.Name), + Visibility: form.Visibility, + ParentGroupID: parentGroupID, + } + if err := group_service.NewGroup(ctx, group); err != nil { + return nil, err + } + return convert.ToAPIGroup(ctx, group, ctx.Doer) +} + +// 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 + // schema: + // "$ref": "#/definitions/CreateGroupOption" + // responses: + // "201": + // "$ref": "#/responses/Group" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + ag, err := createCommonGroup(ctx, 0) + if err != nil { + ctx.APIErrorInternal(err) + return + } + 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 + // schema: + // "$ref": "#/definitions/CreateGroupOption" + // responses: + // "201": + // "$ref": "#/responses/Group" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + var ( + group *api.Group + err error + ) + gid := ctx.PathParamInt64("group_id") + group, err = createCommonGroup(ctx, gid) + if err != nil { + ctx.APIErrorInternal(err) + return + } + 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 /orgs/{org}/groups/{group_id}/move repository-group groupMove + // --- + // summary: move a group to a different parent group + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: group_id + // in: path + // description: id of the group to move + // type: integer + // format: int64 + // required: true + // - name: body + // in: body + // 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{ + form.NewParent, id, true, npos, + }, 3) + if group_model.IsErrGroupNotExist(err) { + ctx.APIErrorNotFound() + 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 /orgs/{org}/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: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: group_id + // in: path + // description: id of the group to edit + // type: integer + // format: int64 + // required: true + // - name: body + // in: body + // 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) + gid := ctx.PathParamInt64("group_id") + group, err = group_model.GetGroupByID(ctx, gid) + if group_model.IsErrGroupNotExist(err) { + ctx.APIErrorNotFound() + return + } + if err != nil { + ctx.APIErrorInternal(err) + return + } + if form.Visibility != nil { + group.Visibility = *form.Visibility + } + if form.Description != nil { + group.Description = *form.Description + } + if form.Name != nil { + group.Name = *form.Name + } + err = group_model.UpdateGroup(ctx, group) + 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 /orgs/{org}/groups/{group_id} repository-group groupGet + // --- + // summary: gets a group in an organization + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: group_id + // in: path + // description: id of the group to retrieve + // type: integer + // format: int64 + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/EditGroupOption" + // responses: + // "200": + // "$ref": "#/responses/Group" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + 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 group.OwnerID != ctx.Org.Organization.ID { + ctx.APIErrorNotFound() + return + } + if err != nil { + ctx.APIErrorInternal(err) + return + } + apiGroup, err := convert.ToAPIGroup(ctx, group, ctx.Doer) + if err != nil { + ctx.APIErrorInternal(err) + return + } + ctx.JSON(http.StatusOK, apiGroup) +} + +func DeleteGroup(ctx *context.APIContext) { + // swagger:operation DELETE /orgs/{org}/groups/{group_id} repositoryGroup groupDelete + // --- + // summary: Delete a repository group + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the group to delete + // type: string + // required: true + // - 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) +} diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 8b0dc7c863..675281f1ea 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -37,6 +37,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 +267,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 +1324,51 @@ 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.ID) + if err != nil { + ctx.APIErrorInternal(err) + return + } + ctx.Status(http.StatusNoContent) +} From bdb88fd7f0098af749ff2952f0d1232c610bd142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 21:56:31 -0400 Subject: [PATCH 063/218] add `doer` parameter to `MoveGroupItem` describing the user trying to move a group --- routers/api/v1/group/group.go | 2 +- routers/api/v1/repo/repo.go | 2 +- services/group/group.go | 4 ++-- services/group/group_test.go | 11 +++++++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index 6f6638eb8e..16364f792b 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -143,7 +143,7 @@ func MoveGroup(ctx *context.APIContext) { } err = group_service.MoveGroupItem(ctx, group_service.MoveGroupOptions{ form.NewParent, id, true, npos, - }, 3) + }, ctx.Doer) if group_model.IsErrGroupNotExist(err) { ctx.APIErrorNotFound() return diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 675281f1ea..49e1e4ac94 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -1365,7 +1365,7 @@ func MoveRepoToGroup(ctx *context.APIContext) { IsGroup: false, NewPos: npos, ItemID: ctx.Repo.Repository.ID, NewParent: form.NewParent, - }, ctx.Doer.ID) + }, ctx.Doer) if err != nil { ctx.APIErrorInternal(err) return diff --git a/services/group/group.go b/services/group/group.go index 3fa3b01fd1..65320bf304 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -72,7 +72,7 @@ type MoveGroupOptions struct { NewPos int } -func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doerID int64) (err error) { +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 { @@ -84,7 +84,7 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doerID int64) (er if err != nil { return err } - canAccessNewParent, err := parentGroup.CanAccess(ctx, doerID) + canAccessNewParent, err := parentGroup.CanAccess(ctx, doer) if err != nil { return err } diff --git a/services/group/group_test.go b/services/group/group_test.go index cbf4b1fe53..e23e82e098 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -1,6 +1,7 @@ package group import ( + user_model "code.gitea.io/gitea/models/user" "testing" "code.gitea.io/gitea/models/db" @@ -31,6 +32,9 @@ func TestNewGroup(t *testing.T) { func TestMoveGroup(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) + doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ + ID: 3, + }) testfn := func(gid int64) { cond := &group_model.FindGroupsOptions{ ParentGroupID: 123, @@ -38,7 +42,7 @@ func TestMoveGroup(t *testing.T) { } origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) - assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{123, gid, true, -1}, 3)) + assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{123, gid, true, -1}, doer)) unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1) } testfn(124) @@ -48,11 +52,14 @@ func TestMoveGroup(t *testing.T) { func TestMoveRepo(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) + doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ + ID: 3, + }) cond := repo_model.SearchRepositoryCondition(repo_model.SearchRepoOptions{ GroupID: 123, }) origCount := unittest.GetCount(t, new(repo_model.Repository), cond) - assert.NoError(t, MoveGroupItem(db.DefaultContext, MoveGroupOptions{123, 32, false, -1}, 3)) + assert.NoError(t, MoveGroupItem(db.DefaultContext, MoveGroupOptions{123, 32, false, -1}, doer)) unittest.AssertCountByCond(t, "repository", cond, origCount+1) } From 21d499d42e6999a89d21bb4790a080e113285741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 21:59:19 -0400 Subject: [PATCH 064/218] update `AccessibleGroupCondition` function to take a minimum `perm.AccessMode` as a parameter --- models/group/group.go | 14 +++++++------- models/group/group_list.go | 6 ++++-- routers/api/v1/api.go | 8 ++------ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index 97ca825b21..9130d3628c 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -94,7 +94,7 @@ func (g *Group) LoadSubgroups(ctx context.Context, recursive bool) error { } func (g *Group) LoadAccessibleSubgroups(ctx context.Context, recursive bool, doer *user_model.User) error { - return g.doLoadSubgroups(ctx, recursive, AccessibleGroupCondition(doer, unit.TypeInvalid), 0) + return g.doLoadSubgroups(ctx, recursive, AccessibleGroupCondition(doer, unit.TypeInvalid, perm.AccessModeRead), 0) } func (g *Group) LoadAttributes(ctx context.Context) error { @@ -129,13 +129,12 @@ func (g *Group) LoadOwner(ctx context.Context) error { return err } -func (g *Group) CanAccess(ctx context.Context, userID int64) (bool, error) { - return g.CanAccessAtLevel(ctx, userID, perm.AccessModeRead) +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, userID int64, level perm.AccessMode) (bool, error) { - return db.GetEngine(ctx). - Where(UserOrgTeamPermCond("id", userID, level)).Table("repo_group").Exist() +func (g *Group) CanAccessAtLevel(ctx context.Context, user *user_model.User, level perm.AccessMode) (bool, error) { + return db.GetEngine(ctx).Where(AccessibleGroupCondition(user, unit.TypeInvalid, level).And(builder.Eq{"`repo_group`.id": g.ID})).Exist(&Group{}) } func (g *Group) IsOwnedBy(ctx context.Context, userID int64) (bool, error) { @@ -337,9 +336,10 @@ func UpdateGroup(ctx context.Context, group *Group) error { func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error { sess := db.GetEngine(ctx) ng, err := GetGroupByID(ctx, newParent) - if !IsErrGroupNotExist(err) { + if err != nil && !IsErrGroupNotExist(err) { return err } + 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) diff --git a/models/group/group_list.go b/models/group/group_list.go index 133f8dbd64..81387ba091 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -33,6 +33,7 @@ func userOrgTeamGroupBuilder(userID int64) *builder.Builder { Where(builder.Eq{"`team_user`.uid": userID}) } +// 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 int64, level perm.AccessMode) builder.Cond { selCond := userOrgTeamGroupBuilder(userID) selCond = selCond.InnerJoin("team", "`team`.id = `repo_group_team`.team_id"). @@ -60,7 +61,7 @@ func userOrgTeamUnitGroupBuilder(userID int64, unitType unit.Type) *builder.Buil } // AccessibleGroupCondition returns a condition that matches groups which a user can access via the specified unit -func AccessibleGroupCondition(user *user_model.User, unitType unit.Type) builder.Cond { +func AccessibleGroupCondition(user *user_model.User, unitType unit.Type, minMode perm.AccessMode) builder.Cond { cond := builder.NewCond() if user == nil || !user.IsRestricted || user.ID <= 0 { orgVisibilityLimit := []structs.VisibleType{structs.VisibleTypePrivate} @@ -68,7 +69,7 @@ func AccessibleGroupCondition(user *user_model.User, unitType unit.Type) builder orgVisibilityLimit = append(orgVisibilityLimit, structs.VisibleTypeLimited) } cond = cond.Or(builder.And( - builder.Eq{"`repo_group`.is_private": false}, + builder.Eq{"`repo_group`.visibility": structs.VisibleTypePublic}, builder.NotIn("`repo_group`.owner_id", builder.Select("id").From("`user`").Where( builder.And( builder.Eq{"type": user_model.UserTypeOrganization}, @@ -76,6 +77,7 @@ func AccessibleGroupCondition(user *user_model.User, unitType unit.Type) builder )))) } if user != nil { + cond = cond.Or(UserOrgTeamPermCond("`repo_group`.id", user.ID, minMode)) if unitType == unit.TypeInvalid { cond = cond.Or( UserOrgTeamGroupCond("`repo_group`.id", user.ID), diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index d728d26e99..68f77af48c 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -507,12 +507,8 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co ctx.APIErrorInternal(err) return } - var canAccess bool - if ctx.IsSigned { - canAccess, err = g.CanAccessAtLevel(ctx, ctx.Doer.ID, mode) - } else { - canAccess, err = g.CanAccessAtLevel(ctx, 0, mode) - } + canAccess, err := g.CanAccessAtLevel(ctx, ctx.Doer, mode) + if err != nil { ctx.APIErrorInternal(err) return From 1c7ccfc31adc05bf4dd8e88eded322cca5892526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 22:00:35 -0400 Subject: [PATCH 065/218] remove bare return --- models/organization/team_list.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/organization/team_list.go b/models/organization/team_list.go index f742875ee4..6b24da0dd1 100644 --- a/models/organization/team_list.go +++ b/models/organization/team_list.go @@ -128,14 +128,13 @@ func GetUserRepoTeams(ctx context.Context, orgID, userID, repoID int64) (teams T // GetUserGroupTeams returns teams in a group that a user has access to func GetUserGroupTeams(ctx context.Context, groupID, userID int64) (teams TeamList, err error) { - err = db.GetEngine(ctx). + 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) - return } func GetTeamsByOrgIDs(ctx context.Context, orgIDs []int64) (TeamList, error) { From 466caf7d2acb6e07bb897f3c8f23379466dea08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 15:30:43 -0400 Subject: [PATCH 066/218] run formatter --- services/group/group.go | 2 +- services/group/group_test.go | 2 +- services/repository/create.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/group/group.go b/services/group/group.go index 65320bf304..e2e4168c93 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -38,7 +38,7 @@ func NewGroup(ctx context.Context, g *group_model.Group) error { } if err = RecalculateGroupAccess(ctx, g, true); err != nil { - return + return err } return committer.Commit() diff --git a/services/group/group_test.go b/services/group/group_test.go index e23e82e098..419a18b65c 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -1,13 +1,13 @@ package group import ( - user_model "code.gitea.io/gitea/models/user" "testing" "code.gitea.io/gitea/models/db" group_model "code.gitea.io/gitea/models/group" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" + user_model "code.gitea.io/gitea/models/user" "github.com/stretchr/testify/assert" ) diff --git a/services/repository/create.go b/services/repository/create.go index eaa7350a1d..eb39429b01 100644 --- a/services/repository/create.go +++ b/services/repository/create.go @@ -5,7 +5,6 @@ package repository import ( "bytes" - group_model "code.gitea.io/gitea/models/group" "context" "fmt" "os" @@ -14,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" From 0c1d339082e9708bd1b3534f4489bcea48164618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 15:36:43 -0400 Subject: [PATCH 067/218] move group routes that don't depend on the `org` path parameter out of the `/orgs/{org}` route group --- routers/api/v1/api.go | 7 +++---- routers/api/v1/group/group.go | 23 ++++------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 68f77af48c..a62e9bf9b5 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -508,7 +508,6 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co return } canAccess, err := g.CanAccessAtLevel(ctx, ctx.Doer, mode) - if err != nil { ctx.APIErrorInternal(err) return @@ -1207,7 +1206,7 @@ func Routes() *web.Router { 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.EditGroupOption{}), reqOrgMembership(), reqGroupMembership(perm.AccessModeWrite, false), repo.MoveRepoToGroup) + 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) @@ -1724,7 +1723,6 @@ func Routes() *web.Router { }, reqToken(), reqOrgOwnership()) m.Group("/groups", func() { m.Post("/new", reqToken(), reqGroupMembership(perm.AccessModeWrite, true), group.NewGroup) - m.Post("/{group_id}/move", reqToken(), reqGroupMembership(perm.AccessModeWrite, false), group.MoveGroup) }) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization), orgAssignment(true), checkTokenPublicOnly()) m.Group("/teams/{teamid}", func() { @@ -1812,8 +1810,9 @@ func Routes() *web.Router { 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) - }) + }, checkTokenPublicOnly()) }) return m } diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index 16364f792b..b663e5e1ff 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -104,7 +104,7 @@ func NewSubGroup(ctx *context.APIContext) { // 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 /orgs/{org}/groups/{group_id}/move repository-group groupMove + // swagger:operation POST /groups/{group_id}/move repository-group groupMove // --- // summary: move a group to a different parent group // consumes: @@ -112,11 +112,6 @@ func MoveGroup(ctx *context.APIContext) { // produces: // - application/json // parameters: - // - name: org - // in: path - // description: name of the organization - // type: string - // required: true // - name: group_id // in: path // description: id of the group to move @@ -174,7 +169,7 @@ func MoveGroup(ctx *context.APIContext) { // EditGroup - update a group in an organization func EditGroup(ctx *context.APIContext) { - // swagger:operation PATCH /orgs/{org}/groups/{group_id} repository-group groupEdit + // 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: @@ -182,11 +177,6 @@ func EditGroup(ctx *context.APIContext) { // produces: // - application/json // parameters: - // - name: org - // in: path - // description: name of the organization - // type: string - // required: true // - name: group_id // in: path // description: id of the group to edit @@ -243,17 +233,12 @@ func EditGroup(ctx *context.APIContext) { } func GetGroup(ctx *context.APIContext) { - // swagger:operation GET /orgs/{org}/groups/{group_id} repository-group groupGet + // swagger:operation GET /groups/{group_id} repository-group groupGet // --- // summary: gets a group in an organization // produces: // - application/json // parameters: - // - name: org - // in: path - // description: name of the organization - // type: string - // required: true // - name: group_id // in: path // description: id of the group to retrieve @@ -297,7 +282,7 @@ func GetGroup(ctx *context.APIContext) { } func DeleteGroup(ctx *context.APIContext) { - // swagger:operation DELETE /orgs/{org}/groups/{group_id} repositoryGroup groupDelete + // swagger:operation DELETE /groups/{group_id} repositoryGroup groupDelete // --- // summary: Delete a repository group // produces: From 313a518f58f3902c7c5683ffad93f49c198bcf4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 16:23:42 -0400 Subject: [PATCH 068/218] add appropriate swagger definitions --- modules/structs/repo_group.go | 7 +- routers/api/v1/swagger/options.go | 9 + routers/api/v1/swagger/repo_group.go | 17 ++ templates/swagger/v1_json.tmpl | 377 ++++++++++++++++++++++++++- 4 files changed, 405 insertions(+), 5 deletions(-) create mode 100644 routers/api/v1/swagger/repo_group.go diff --git a/modules/structs/repo_group.go b/modules/structs/repo_group.go index 0bc64fd253..0565ce3fbf 100644 --- a/modules/structs/repo_group.go +++ b/modules/structs/repo_group.go @@ -1,7 +1,6 @@ package structs // Group represents a group of repositories and subgroups in an organization -// swagger:model type Group struct { ID int64 `json:"id"` Owner *User `json:"owner"` @@ -14,7 +13,7 @@ type Group struct { SortOrder int `json:"sort_order"` } -// NewGroupOption - options for creating a new group in an organization +// NewGroupOption represents options for creating a new group in an organization // swagger:model type NewGroupOption struct { // the name for the newly created group @@ -27,7 +26,7 @@ type NewGroupOption struct { Visibility VisibleType `json:"visibility"` } -// MoveGroupOption - options for changing a group or repo's parent and sort order +// 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 @@ -38,7 +37,7 @@ type MoveGroupOption struct { NewPos *int `json:"newPos,omitempty"` } -// EditGroupOption - options for editing a repository group +// EditGroupOption represents options for editing a repository group // swagger:model type EditGroupOption struct { // the new name of the group diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go index 1a442d1146..fc786573f2 100644 --- a/routers/api/v1/swagger/options.go +++ b/routers/api/v1/swagger/options.go @@ -233,4 +233,13 @@ type swaggerParameterBodies struct { // in:body LockIssueOption api.LockIssueOption + + // in:body + NewGroupOption api.NewGroupOption + + // in:body + EditGroupOption api.EditGroupOption + + // in:body + MoveGroupOption api.MoveGroupOption } diff --git a/routers/api/v1/swagger/repo_group.go b/routers/api/v1/swagger/repo_group.go new file mode 100644 index 0000000000..b9a0766f34 --- /dev/null +++ b/routers/api/v1/swagger/repo_group.go @@ -0,0 +1,17 @@ +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/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index c10d2b443e..5f88490db4 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1316,6 +1316,199 @@ } } }, + "/groups/{group_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository-group" + ], + "summary": "gets the repos contained within a group", + "operationId": "groupRepos", + "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" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repositoryGroup" + ], + "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/CreateGroupOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Group" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/label/templates": { "get": { "produces": [ @@ -2858,6 +3051,49 @@ } } }, + "/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/CreateGroupOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Group" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/orgs/{org}/hooks": { "get": { "produces": [ @@ -24317,6 +24553,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 +25256,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 +26721,53 @@ }, "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": { + "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", @@ -27334,6 +27643,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", @@ -30125,6 +30479,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", @@ -30670,6 +31030,21 @@ } } }, + "Group": { + "description": "Group", + "schema": { + "$ref": "#/definitions/Group" + } + }, + "GroupList": { + "description": "GroupList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Group" + } + } + }, "Hook": { "description": "Hook", "schema": { @@ -31381,7 +31756,7 @@ "parameterBodies": { "description": "parameterBodies", "schema": { - "$ref": "#/definitions/LockIssueOption" + "$ref": "#/definitions/MoveGroupOption" } }, "redirect": { From 4647c138fe3202ed0dbe4f958cba1666ff57e3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 16:26:48 -0400 Subject: [PATCH 069/218] refactor group creation such that we know the owner ID ahead of time, bailing out if both ownerID and parentGroupID are < 1 --- routers/api/v1/group/group.go | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index b663e5e1ff..c223666056 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -1,6 +1,7 @@ package group import ( + "fmt" "net/http" "strings" @@ -12,12 +13,22 @@ import ( group_service "code.gitea.io/gitea/services/group" ) -func createCommonGroup(ctx *context.APIContext, parentGroupID int64) (*api.Group, error) { +func createCommonGroup(ctx *context.APIContext, parentGroupID, ownerID int64) (*api.Group, error) { + if ownerID < 1 { + if parentGroupID < 1 { + return nil, fmt.Errorf("cannot determine new group's owner") + } + npg, err := group_model.GetGroupByID(ctx, parentGroupID) + if err != nil { + return nil, err + } + ownerID = npg.OwnerID + } form := web.GetForm(ctx).(*api.NewGroupOption) group := &group_model.Group{ Name: form.Name, Description: form.Description, - OwnerID: ctx.Org.Organization.ID, + OwnerID: ownerID, LowerName: strings.ToLower(form.Name), Visibility: form.Visibility, ParentGroupID: parentGroupID, @@ -45,6 +56,7 @@ func NewGroup(ctx *context.APIContext) { // required: true // - name: body // in: body + // required: true // schema: // "$ref": "#/definitions/CreateGroupOption" // responses: @@ -54,7 +66,7 @@ func NewGroup(ctx *context.APIContext) { // "$ref": "#/responses/notFound" // "422": // "$ref": "#/responses/validationError" - ag, err := createCommonGroup(ctx, 0) + ag, err := createCommonGroup(ctx, 0, ctx.Org.Organization.ID) if err != nil { ctx.APIErrorInternal(err) return @@ -80,6 +92,7 @@ func NewSubGroup(ctx *context.APIContext) { // required: true // - name: body // in: body + // required: true // schema: // "$ref": "#/definitions/CreateGroupOption" // responses: @@ -94,7 +107,7 @@ func NewSubGroup(ctx *context.APIContext) { err error ) gid := ctx.PathParamInt64("group_id") - group, err = createCommonGroup(ctx, gid) + group, err = createCommonGroup(ctx, gid, 0) if err != nil { ctx.APIErrorInternal(err) return @@ -120,6 +133,7 @@ func MoveGroup(ctx *context.APIContext) { // required: true // - name: body // in: body + // required: true // schema: // "$ref": "#/definitions/MoveGroupOption" // responses: @@ -185,6 +199,7 @@ func EditGroup(ctx *context.APIContext) { // required: true // - name: body // in: body + // required: true // schema: // "$ref": "#/definitions/EditGroupOption" // responses: @@ -245,10 +260,6 @@ func GetGroup(ctx *context.APIContext) { // type: integer // format: int64 // required: true - // - name: body - // in: body - // schema: - // "$ref": "#/definitions/EditGroupOption" // responses: // "200": // "$ref": "#/responses/Group" @@ -288,11 +299,6 @@ func DeleteGroup(ctx *context.APIContext) { // produces: // - application/json // parameters: - // - name: owner - // in: path - // description: owner of the group to delete - // type: string - // required: true // - name: group_id // in: path // description: id of the group to delete From 595754f2a6858fefe881cdccfbc9f9764651368c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 16:28:49 -0400 Subject: [PATCH 070/218] fix swagger definition references to nonexistent `CreateGroupOption` --- routers/api/v1/group/group.go | 4 ++-- templates/swagger/v1_json.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index c223666056..af41784aea 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -58,7 +58,7 @@ func NewGroup(ctx *context.APIContext) { // in: body // required: true // schema: - // "$ref": "#/definitions/CreateGroupOption" + // "$ref": "#/definitions/NewGroupOption" // responses: // "201": // "$ref": "#/responses/Group" @@ -94,7 +94,7 @@ func NewSubGroup(ctx *context.APIContext) { // in: body // required: true // schema: - // "$ref": "#/definitions/CreateGroupOption" + // "$ref": "#/definitions/NewGroupOption" // responses: // "201": // "$ref": "#/responses/Group" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 5f88490db4..2dbe107a46 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1492,7 +1492,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateGroupOption" + "$ref": "#/definitions/NewGroupOption" } } ], @@ -3077,7 +3077,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateGroupOption" + "$ref": "#/definitions/NewGroupOption" } } ], From 08fe91c6bc793e52a04884214e966403ba9c9251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 17:13:40 -0400 Subject: [PATCH 071/218] add api routes and functions to get a repository group's subgroups and repos --- models/shared/group/org_group.go | 11 ++++ routers/api/v1/api.go | 2 + routers/api/v1/group/group.go | 95 +++++++++++++++++++++++++++++++- templates/swagger/v1_json.tmpl | 67 ++++++++++++++++++++-- 4 files changed, 168 insertions(+), 7 deletions(-) diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go index bdb326a32e..4ff39b1b53 100644 --- a/models/shared/group/org_group.go +++ b/models/shared/group/org_group.go @@ -1,6 +1,7 @@ package group import ( + repo_model "code.gitea.io/gitea/models/repo" "context" "code.gitea.io/gitea/models/db" @@ -55,3 +56,13 @@ func IsGroupMember(ctx context.Context, groupID int64, user *user_model.User) (b 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/routers/api/v1/api.go b/routers/api/v1/api.go index a62e9bf9b5..33771a0a2c 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1812,6 +1812,8 @@ func Routes() *web.Router { 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) }, checkTokenPublicOnly()) }) return m diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index af41784aea..cfe267813d 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -1,6 +1,8 @@ package group import ( + access_model "code.gitea.io/gitea/models/perm/access" + shared_group_model "code.gitea.io/gitea/models/shared/group" "fmt" "net/http" "strings" @@ -265,8 +267,6 @@ func GetGroup(ctx *context.APIContext) { // "$ref": "#/responses/Group" // "404": // "$ref": "#/responses/notFound" - // "422": - // "$ref": "#/responses/validationError" var ( err error group *group_model.Group @@ -318,3 +318,94 @@ func DeleteGroup(ctx *context.APIContext) { } 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.GetUserRepoPermission(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, err := group_model.GetGroupByID(ctx, ctx.PathParamInt64("group_id")) + if err != nil { + if group_model.IsErrGroupNotExist(err) { + ctx.APIErrorNotFound() + } else { + ctx.APIErrorInternal(err) + } + return + } + 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/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 2dbe107a46..0a7883f71b 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1324,8 +1324,8 @@ "tags": [ "repository-group" ], - "summary": "gets the repos contained within a group", - "operationId": "groupRepos", + "summary": "gets a group in an organization", + "operationId": "groupGet", "parameters": [ { "type": "integer", @@ -1342,9 +1342,6 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } }, @@ -1509,6 +1506,66 @@ } } }, + "/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" + } + } + } + }, "/label/templates": { "get": { "produces": [ From 12b134e000af286549aea2a60caad0376162d8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 17:20:45 -0400 Subject: [PATCH 072/218] fix build errors --- services/group/search.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/group/search.go b/services/group/search.go index 5ca3a2eac4..f11f1275be 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -1,6 +1,7 @@ package group import ( + "code.gitea.io/gitea/models/perm" "context" "slices" @@ -115,7 +116,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error { w.LatestCommitStatus = latestCommitStatuses[latestIdx] } w.Subgroups = make([]*WebSearchGroup, 0) - groups, err := group_model.FindGroupsByCond(opts.Ctx, opts.GroupOpts, group_model.AccessibleGroupCondition(opts.Actor, unit.TypeInvalid)) + groups, err := group_model.FindGroupsByCond(opts.Ctx, opts.GroupOpts, group_model.AccessibleGroupCondition(opts.Actor, unit.TypeInvalid, perm.AccessModeRead)) if err != nil { return err } From 19d37123b4474db402b93eebcf5e7e3a68794bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 18:01:52 -0400 Subject: [PATCH 073/218] fix build and lint errors --- models/group/avatar.go | 3 +++ models/group/errors.go | 3 +++ models/group/group.go | 3 +++ models/group/group_list.go | 3 +++ models/group/group_team.go | 3 +++ models/group/group_unit.go | 9 ++++++--- models/organization/team_group.go | 3 +++ models/shared/group/org_group.go | 5 ++++- modules/structs/repo_group.go | 3 +++ routers/api/v1/group/group.go | 16 +++++++++++----- routers/api/v1/repo/repo.go | 3 ++- routers/api/v1/swagger/repo_group.go | 3 +++ services/convert/repo_group.go | 3 +++ services/group/avatar.go | 3 +++ services/group/delete.go | 3 +++ services/group/group.go | 6 +++++- services/group/group_test.go | 17 +++++++++++++++-- services/group/search.go | 7 +++++-- services/group/team.go | 8 +++++--- services/group/update.go | 3 +++ 20 files changed, 89 insertions(+), 18 deletions(-) diff --git a/models/group/avatar.go b/models/group/avatar.go index dbecd0b27e..04f507279c 100644 --- a/models/group/avatar.go +++ b/models/group/avatar.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/models/group/errors.go b/models/group/errors.go index a578c92933..812fc6ddc9 100644 --- a/models/group/errors.go +++ b/models/group/errors.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/models/group/group.go b/models/group/group.go index 9130d3628c..cc2ab4a04c 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/models/group/group_list.go b/models/group/group_list.go index 81387ba091..e502b33be7 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/models/group/group_team.go b/models/group/group_team.go index 243d2b6ad3..d4e5bc19c8 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/models/group/group_unit.go b/models/group/group_unit.go index b024d082ef..716770f85e 100644 --- a/models/group/group_unit.go +++ b/models/group/group_unit.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( @@ -32,7 +35,7 @@ func GetGroupUnit(ctx context.Context, groupID, teamID int64, unitType unit.Type And("team_id = ?", teamID). And("type = ?", unitType). Get(unit) - return + return unit, err } func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (unit *RepoGroupUnit, err error) { @@ -42,12 +45,12 @@ func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (un And("type = ?", unitType). Find(&units) if err != nil { - return + return nil, err } for _, u := range units { if unit == nil || u.AccessMode > unit.AccessMode { unit = u } } - return + return unit, err } diff --git a/models/organization/team_group.go b/models/organization/team_group.go index 8886fa5fef..e81a4e0aa2 100644 --- a/models/organization/team_group.go +++ b/models/organization/team_group.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package organization import ( diff --git a/models/shared/group/org_group.go b/models/shared/group/org_group.go index 4ff39b1b53..5fb4fe3561 100644 --- a/models/shared/group/org_group.go +++ b/models/shared/group/org_group.go @@ -1,12 +1,15 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( - repo_model "code.gitea.io/gitea/models/repo" "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" diff --git a/modules/structs/repo_group.go b/modules/structs/repo_group.go index 0565ce3fbf..ce37bb3980 100644 --- a/modules/structs/repo_group.go +++ b/modules/structs/repo_group.go @@ -1,3 +1,6 @@ +// 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 diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index cfe267813d..bb361a19f0 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -1,13 +1,16 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( - access_model "code.gitea.io/gitea/models/perm/access" - shared_group_model "code.gitea.io/gitea/models/shared/group" - "fmt" + "errors" "net/http" "strings" group_model "code.gitea.io/gitea/models/group" + access_model "code.gitea.io/gitea/models/perm/access" + shared_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" @@ -18,7 +21,7 @@ import ( func createCommonGroup(ctx *context.APIContext, parentGroupID, ownerID int64) (*api.Group, error) { if ownerID < 1 { if parentGroupID < 1 { - return nil, fmt.Errorf("cannot determine new group's owner") + return nil, errors.New("cannot determine new group's owner") } npg, err := group_model.GetGroupByID(ctx, parentGroupID) if err != nil { @@ -153,7 +156,10 @@ func MoveGroup(ctx *context.APIContext) { npos = *form.NewPos } err = group_service.MoveGroupItem(ctx, group_service.MoveGroupOptions{ - form.NewParent, id, true, npos, + NewParent: form.NewParent, + ItemID: id, + IsGroup: true, + NewPos: npos, }, ctx.Doer) if group_model.IsErrGroupNotExist(err) { ctx.APIErrorNotFound() diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 49e1e4ac94..f92e3dce78 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -1362,7 +1362,8 @@ func MoveRepoToGroup(ctx *context.APIContext) { npos = *form.NewPos } err := group_service.MoveGroupItem(ctx, group_service.MoveGroupOptions{ - IsGroup: false, NewPos: npos, + IsGroup: false, + NewPos: npos, ItemID: ctx.Repo.Repository.ID, NewParent: form.NewParent, }, ctx.Doer) diff --git a/routers/api/v1/swagger/repo_group.go b/routers/api/v1/swagger/repo_group.go index b9a0766f34..65d0fb452b 100644 --- a/routers/api/v1/swagger/repo_group.go +++ b/routers/api/v1/swagger/repo_group.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package swagger import api "code.gitea.io/gitea/modules/structs" diff --git a/services/convert/repo_group.go b/services/convert/repo_group.go index 75f94c2708..82b849318b 100644 --- a/services/convert/repo_group.go +++ b/services/convert/repo_group.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package convert import ( diff --git a/services/group/avatar.go b/services/group/avatar.go index f9d395afbc..0d5eaf3595 100644 --- a/services/group/avatar.go +++ b/services/group/avatar.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/services/group/delete.go b/services/group/delete.go index 0b86956378..1a8b133bcb 100644 --- a/services/group/delete.go +++ b/services/group/delete.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( diff --git a/services/group/group.go b/services/group/group.go index e2e4168c93..b4d5daddb7 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -1,7 +1,11 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( "context" + "errors" "fmt" "strings" @@ -89,7 +93,7 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model. return err } if !canAccessNewParent { - return fmt.Errorf("cannot access new parent group") + return errors.New("cannot access new parent group") } err = parentGroup.LoadSubgroups(ctx, false) diff --git a/services/group/group_test.go b/services/group/group_test.go index 419a18b65c..25c47dafc9 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( @@ -42,7 +45,12 @@ func TestMoveGroup(t *testing.T) { } origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) - assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{123, gid, true, -1}, doer)) + assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{ + NewParent: 123, + ItemID: gid, + IsGroup: true, + NewPos: -1, + }, doer)) unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1) } testfn(124) @@ -60,6 +68,11 @@ func TestMoveRepo(t *testing.T) { }) origCount := unittest.GetCount(t, new(repo_model.Repository), cond) - assert.NoError(t, MoveGroupItem(db.DefaultContext, MoveGroupOptions{123, 32, false, -1}, doer)) + assert.NoError(t, MoveGroupItem(db.DefaultContext, MoveGroupOptions{ + NewParent: 123, + ItemID: 32, + IsGroup: false, + NewPos: -1, + }, doer)) unittest.AssertCountByCond(t, "repository", cond, origCount+1) } diff --git a/services/group/search.go b/services/group/search.go index f11f1275be..5194c7394c 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -1,12 +1,15 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( - "code.gitea.io/gitea/models/perm" "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" @@ -103,7 +106,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error { wsr.LatestCommitStatus = latestCommitStatuses[i] wsr.LocaleLatestCommitStatus = latestCommitStatuses[i].LocaleString(opts.Locale) if latestIdx > -1 { - if latestCommitStatuses[i].UpdatedUnix.AsLocalTime().Unix() > int64(latestCommitStatuses[latestIdx].UpdatedUnix.AsLocalTime().Unix()) { + if latestCommitStatuses[i].UpdatedUnix.AsLocalTime().Unix() > latestCommitStatuses[latestIdx].UpdatedUnix.AsLocalTime().Unix() { latestIdx = i } } else { diff --git a/services/group/team.go b/services/group/team.go index add4c074de..691752a0e2 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( @@ -68,7 +71,7 @@ func UpdateGroupTeam(ctx context.Context, gt *group_model.RepoGroupTeam) (err er And("group_id=?", gt.GroupID). And("type = ?", unit.Type). Update(unit); err != nil { - return + return err } } return committer.Commit() @@ -92,7 +95,7 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo teams, err = org_model.GetTeamsWithAccessToGroup(ctx, g.OwnerID, g.ParentGroupID, perm.AccessModeRead) } for _, t := range teams { - var gt *group_model.RepoGroupTeam = nil + var gt *group_model.RepoGroupTeam if gt, err = group_model.FindGroupTeamByTeamID(ctx, g.ParentGroupID, t.ID); err != nil { return err } @@ -110,7 +113,6 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo 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) diff --git a/services/group/update.go b/services/group/update.go index b9394fecd1..9e64d48dbd 100644 --- a/services/group/update.go +++ b/services/group/update.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package group import ( From 7257ab058558c832e9630a2d3b903133bee59ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 14 Aug 2025 19:39:24 -0400 Subject: [PATCH 074/218] fix failing tests ? i think they're caused by group permissions causing more repos to be returned than before --- models/fixtures/user.yml | 2 +- tests/integration/oauth_test.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml index 1a33947e04..1a7d1928df 100644 --- a/models/fixtures/user.yml +++ b/models/fixtures/user.yml @@ -67,7 +67,7 @@ num_followers: 2 num_following: 1 num_stars: 2 - num_repos: 14 + num_repos: 15 num_teams: 0 num_members: 0 visibility: 0 diff --git a/tests/integration/oauth_test.go b/tests/integration/oauth_test.go index 5ec5fa7dcd..230757a454 100644 --- a/tests/integration/oauth_test.go +++ b/tests/integration/oauth_test.go @@ -810,6 +810,10 @@ func testOAuthGrantScopesReadRepositoryFailOrganization(t *testing.T) { FullRepoName: "user2/commitsonpr", Private: false, }, + { + FullRepoName: "user2/test_commit_revert", + Private: true, + }, } assert.Equal(t, reposExpected, reposCaptured) From 79d8cacf00f70cc451dc7a76ad7135289cbf5cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 17:05:33 -0400 Subject: [PATCH 075/218] ensure we return early if there was an error loading group units --- models/group/group_team.go | 1 + 1 file changed, 1 insertion(+) diff --git a/models/group/group_team.go b/models/group/group_team.go index d4e5bc19c8..102e567b3b 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -34,6 +34,7 @@ func (g *RepoGroupTeam) UnitAccessModeEx(ctx context.Context, tp unit.Type) (acc 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 { From b6f3c1623b1a0415ecee601bd9dac7536f3d0ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 18:59:10 -0400 Subject: [PATCH 076/218] fix bug where `builder.In` cond for groups and teams was not placed into the `builder.Or` cond --- models/repo/org_repo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/repo/org_repo.go b/models/repo/org_repo.go index 46ae097c7c..40be7c69b5 100644 --- a/models/repo/org_repo.go +++ b/models/repo/org_repo.go @@ -42,8 +42,9 @@ func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) (Repo builder.In("id", builder.Select("repo_id"). From("team_repo"). Where(builder.Eq{"team_id": opts.TeamID}), - )), - builder.In("id", ReposAccessibleByGroupTeamBuilder(opts.TeamID)), + ), + builder.In("id", ReposAccessibleByGroupTeamBuilder(opts.TeamID)), + ), ) } if opts.PageSize > 0 { From c2db9ec0900aec964ce69fefbe4a346cb5f8cb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 19:06:03 -0400 Subject: [PATCH 077/218] remove `UNIQUE` constraint on `Group.LowerName` --- models/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index cc2ab4a04c..412821696f 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -29,7 +29,7 @@ type Group struct { OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` OwnerName string Owner *user_model.User `xorm:"-"` - LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + LowerName string `xorm:"INDEX NOT NULL"` Name string `xorm:"TEXT INDEX NOT NULL"` Description string `xorm:"TEXT"` Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"` From 209dbcdc460320b58bd692d3718994f7f534ae6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 19:11:57 -0400 Subject: [PATCH 078/218] add explicit `TEXT` type to `Group.LowerName` tag --- models/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index 412821696f..46678a8f62 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -29,7 +29,7 @@ type Group struct { OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` OwnerName string Owner *user_model.User `xorm:"-"` - LowerName string `xorm:"INDEX NOT NULL"` + LowerName string `xorm:"TEXT INDEX NOT NULL"` Name string `xorm:"TEXT INDEX NOT NULL"` Description string `xorm:"TEXT"` Visibility structs.VisibleType `xorm:"NOT NULL DEFAULT 0"` From cd884d58d4a869ff5c946870d58d4166a0fc9c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 19:19:35 -0400 Subject: [PATCH 079/218] add/remove more constraints for mssql/mysql compatibility --- models/group/group.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index 46678a8f62..de87cdf3c0 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -26,16 +26,16 @@ import ( // Group represents a group of repositories for a user or organization type Group struct { ID int64 `xorm:"pk autoincr"` - OwnerID int64 `xorm:"UNIQUE(s) index NOT NULL"` + OwnerID int64 `xorm:"INDEX NOT NULL"` OwnerName string Owner *user_model.User `xorm:"-"` - LowerName string `xorm:"TEXT INDEX NOT NULL"` - Name string `xorm:"TEXT INDEX NOT NULL"` + 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:"DEFAULT NULL"` + ParentGroupID int64 `xorm:"INDEX DEFAULT NULL"` ParentGroup *Group `xorm:"-"` Subgroups RepoGroupList `xorm:"-"` From a4d1cc217923001a6d8104e506f91661a642aef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 19:34:29 -0400 Subject: [PATCH 080/218] rename test fixture files for group units and teams --- models/fixtures/{group_team.yml => repo_group_team.yml} | 0 models/fixtures/{group_unit.yml => repo_group_unit.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename models/fixtures/{group_team.yml => repo_group_team.yml} (100%) rename models/fixtures/{group_unit.yml => repo_group_unit.yml} (100%) diff --git a/models/fixtures/group_team.yml b/models/fixtures/repo_group_team.yml similarity index 100% rename from models/fixtures/group_team.yml rename to models/fixtures/repo_group_team.yml diff --git a/models/fixtures/group_unit.yml b/models/fixtures/repo_group_unit.yml similarity index 100% rename from models/fixtures/group_unit.yml rename to models/fixtures/repo_group_unit.yml From 3a79b777ce9a780452ea49e1e7fade35d0feb6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 19:45:56 -0400 Subject: [PATCH 081/218] fix more failing tests --- models/fixtures/repo_group_team.yml | 6 ++++++ services/group/group_test.go | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/models/fixtures/repo_group_team.yml b/models/fixtures/repo_group_team.yml index df408d5592..803529a474 100644 --- a/models/fixtures/repo_group_team.yml +++ b/models/fixtures/repo_group_team.yml @@ -142,3 +142,9 @@ group_id: 376 access_mode: 1 can_create_in: false +- id: 25 + org_id: 3 + team_id: 12 + group_id: 123 + access_mode: 4 + can_create_in: true diff --git a/services/group/group_test.go b/services/group/group_test.go index 25c47dafc9..d98ee68f39 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -36,7 +36,7 @@ func TestNewGroup(t *testing.T) { func TestMoveGroup(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ - ID: 3, + ID: 28, }) testfn := func(gid int64) { cond := &group_model.FindGroupsOptions{ @@ -61,7 +61,7 @@ func TestMoveGroup(t *testing.T) { func TestMoveRepo(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ - ID: 3, + ID: 28, }) cond := repo_model.SearchRepositoryCondition(repo_model.SearchRepoOptions{ GroupID: 123, From 3f5d64246ea1b9249c72575112984a5bd875da6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 16:13:28 -0400 Subject: [PATCH 082/218] add indices to group_id and group_sort_order column add migration for repository table --- models/migrations/migrations.go | 1 + models/repo/repo.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index c3a8f08b5d..f14dfe68db 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_26.AddGroupColumnsToRepositoryTable), } return preparedMigrations } diff --git a/models/repo/repo.go b/models/repo/repo.go index 52fc116134..06959f5412 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -220,8 +220,8 @@ type Repository struct { UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"` - GroupID int64 `xorm:"DEFAULT NULL"` - GroupSortOrder int + GroupID int64 `xorm:"INDEX DEFAULT NULL"` + GroupSortOrder int `xorm:"INDEX"` } func init() { From 296131c63cf86c897c013ade23296a514c9f2b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Aug 2025 16:20:46 -0400 Subject: [PATCH 083/218] add `AvatarURL` field to api groups (in `modules/structs` package) --- modules/structs/repo_group.go | 1 + services/convert/repo_group.go | 1 + templates/swagger/v1_json.tmpl | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/modules/structs/repo_group.go b/modules/structs/repo_group.go index ce37bb3980..3e0f8fdbc0 100644 --- a/modules/structs/repo_group.go +++ b/modules/structs/repo_group.go @@ -14,6 +14,7 @@ type Group struct { 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 diff --git a/services/convert/repo_group.go b/services/convert/repo_group.go index 82b849318b..25d39ffbec 100644 --- a/services/convert/repo_group.go +++ b/services/convert/repo_group.go @@ -26,6 +26,7 @@ func ToAPIGroup(ctx context.Context, g *group_model.Group, actor *user_model.Use 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, diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 0a7883f71b..8fc77a8a6a 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -26782,6 +26782,10 @@ "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" From e602134b3e41ab849bf6d00171cd81cdd3cec46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 19:36:48 -0400 Subject: [PATCH 084/218] update repository storage layout as per https://github.com/go-gitea/gitea/issues/1872#issuecomment-3194681583 --- models/repo/repo.go | 65 ++++++++++---- models/repo/transfer.go | 2 +- models/repo/wiki.go | 16 ++-- routers/api/v1/admin/adopt.go | 144 +++++++++++++++++++++--------- routers/api/v1/api.go | 25 +++++- routers/web/admin/repos.go | 11 ++- routers/web/githttp.go | 2 +- routers/web/goget.go | 19 ++-- routers/web/user/setting/adopt.go | 15 +++- routers/web/web.go | 1 + services/context/repo.go | 25 +++++- services/repository/adopt.go | 6 +- services/repository/create.go | 2 +- services/repository/transfer.go | 24 ++--- 14 files changed, 252 insertions(+), 105 deletions(-) diff --git a/models/repo/repo.go b/models/repo/repo.go index 06959f5412..421214ca6f 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -228,13 +228,21 @@ 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 @@ -583,13 +591,19 @@ 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 @@ -659,13 +673,25 @@ type CloneLink struct { Tea string } +func getGroupSegment(gid int64) string { + var groupSegment string + if gid > 0 { + groupSegment = fmt.Sprintf("%d", gid) + } + return groupSegment +} + +func groupSegmentWithTrailingSlash(gid int64) string { + 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 @@ -684,7 +710,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) @@ -699,25 +725,25 @@ func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string) strin } // 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 @@ -855,10 +881,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/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..487cc953be 100644 --- a/models/repo/wiki.go +++ b/models/repo/wiki.go @@ -5,12 +5,10 @@ package repo import ( - "context" - "fmt" - "strings" - user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/util" + "context" + "fmt" ) // ErrWikiAlreadyExist represents a "WikiAlreadyExist" kind of error. @@ -72,15 +70,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/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go index 9f1175a1ff..0399a1107f 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,40 @@ 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_id}/{repo} admin adminAdoptRepository + // --- + // 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 + // 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 +167,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 +181,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 +213,30 @@ 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_id}/{repo} admin adminDeleteUnadoptedRepository + // --- + // 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 + // 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 33771a0a2c..cb89d06017 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -66,6 +66,7 @@ import ( "errors" "fmt" "net/http" + "strconv" "strings" actions_model "code.gitea.io/gitea/models/actions" @@ -140,7 +141,16 @@ func repoAssignment() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { userName := ctx.PathParam("username") repoName := ctx.PathParam("reponame") - + var gid int64 + group := ctx.PathParam("group_id") + if group != "" { + gid, _ = strconv.ParseInt(group, 10, 64) + if gid == 0 { + ctx.Redirect(strings.Replace(ctx.Req.URL.RequestURI(), "/0/", "/", 1)) + return + } + group += "/" + } var ( owner *user_model.User err error @@ -186,6 +196,10 @@ func repoAssignment() func(ctx *context.APIContext) { } return } + if repo.GroupID != gid { + ctx.APIErrorNotFound() + return + } repo.Owner = owner ctx.Repo.Repository = repo @@ -1777,8 +1791,13 @@ 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_id}/{reponame}", admin.AdoptGroupRepository) + m.Delete("/{group_id}/{reponame}", admin.DeleteUnadoptedRepositoryInGroup) + }) + }) m.Group("/hooks", func() { m.Combo("").Get(admin.ListHooks). 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..24af5e534d 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() { + m.Group("/{username}/{group_id}?/{reponame}", 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) diff --git a/routers/web/goget.go b/routers/web/goget.go index 67e0bee866..6a769f973c 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,17 @@ func goGet(ctx *context.Context) { return } - parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 4) + parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 5) if len(parts) < 3 { return } - + var group string ownerName := parts[1] repoName := parts[2] + if len(parts) > 3 { + group = parts[3] + } // Quick responses appropriate go-get meta with status 200 // regardless of if user have access to the repository, @@ -56,7 +60,11 @@ func goGet(ctx *context.Context) { 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 = path.Join(prefix, group) + } + prefix = path.Join(prefix, url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName)) appURL, _ := url.Parse(setting.AppURL) @@ -68,10 +76,11 @@ func goGet(ctx *context.Context) { goGetImport := context.ComposeGoGetImport(ctx, ownerName, trimmedRepoName) var cloneURL string + gid, _ := strconv.ParseInt(group, 10, 64) 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/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..0323edff41 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -8,6 +8,7 @@ import ( "strings" auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/perm" "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/git" diff --git a/services/context/repo.go b/services/context/repo.go index 4c31b07b34..c3ae7d29ff 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -12,6 +12,7 @@ import ( "net/http" "net/url" "path" + "strconv" "strings" asymkey_model "code.gitea.io/gitea/models/asymkey" @@ -369,6 +370,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,9 +378,9 @@ 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)) @@ -481,6 +483,20 @@ 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") + var gid int64 + if group != "" { + gid, _ = strconv.ParseInt(group, 10, 64) + if gid == 0 { + q := ctx.Req.URL.RawQuery + if q != "" { + q = "?" + q + } + ctx.Redirect(strings.Replace(ctx.Link, "/0/", "/", 1) + q) + return + } + group += "/" + } repoName = strings.TrimSuffix(repoName, ".git") if setting.Other.EnableFeed { ctx.Data["EnableFeed"] = true @@ -535,7 +551,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, ) @@ -570,6 +586,9 @@ func repoAssignmentPrepareRepo(ctx *Context, data *repoAssignmentPrepareDataStru } return } + if repo.GroupID != gid { + ctx.NotFound(nil) + } repo.Owner = ctx.Repo.Owner data.repo = repo } 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/create.go b/services/repository/create.go index eb39429b01..70b76e5448 100644 --- a/services/repository/create.go +++ b/services/repository/create.go @@ -369,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/transfer.go b/services/repository/transfer.go index 217ecb0124..76cae7ded3 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.Critical("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.Critical("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, repo.GroupID) 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, repo.GroupID))); 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, 0))); 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) } } From bd233af6bdbbca6d99411f53357eef0fffbaf492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 19:56:16 -0400 Subject: [PATCH 085/218] update API routes as well --- routers/api/v1/api.go | 10 +++++----- tests/integration/pull_merge_test.go | 2 +- tests/integration/repo_test.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index cb89d06017..7c152e6d94 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1162,7 +1162,7 @@ func Routes() *web.Router { // (repo scope) m.Group("/starred", func() { m.Get("", user.GetMyStarredRepos) - m.Group("/{username}/{reponame}", func() { + m.Group("/{username}/{group_id}?/{reponame}", func() { m.Get("", user.IsStarring) m.Put("", user.Star) m.Delete("", user.Unstar) @@ -1214,7 +1214,7 @@ func Routes() *web.Router { // (repo scope) m.Post("/migrate", reqToken(), bind(api.MigrateRepoOptions{}), repo.Migrate) - m.Group("/{username}/{reponame}", func() { + m.Group("/{username}/{group_id}?/{reponame}", func() { m.Get("/compare/*", reqRepoReader(unit.TypeCode), repo.CompareDiff) m.Combo("").Get(reqAnyRepoReader(), repo.Get). @@ -1517,11 +1517,11 @@ func Routes() *web.Router { // 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_id}?/{reponame}/actions/artifacts/{artifact_id}/zip/raw", repo.DownloadArtifactRaw) // Notifications (requires notifications scope) m.Group("/repos", func() { - m.Group("/{username}/{reponame}", func() { + m.Group("/{username}/{group_id}?/{reponame}", func() { m.Combo("/notifications", reqToken()). Get(notify.ListRepoNotifications). Put(notify.ReadRepoNotifications) @@ -1532,7 +1532,7 @@ func Routes() *web.Router { m.Group("/repos", func() { m.Get("/issues/search", repo.SearchIssues) - m.Group("/{username}/{reponame}", func() { + m.Group("/{username}/{group_id}?/{reponame}", func() { m.Group("/issues", func() { m.Combo("").Get(repo.ListIssues). Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueOption{}), reqRepoReader(unit.TypeIssues), repo.CreateIssue) diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index 83cf1d7605..7641fb187a 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -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_test.go b/tests/integration/repo_test.go index b036ffff35..d88f44873a 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", generatedRepo.GroupID), 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) } From 8ffa81c677922e8ba2048906c37b462e99324664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 21:20:39 -0400 Subject: [PATCH 086/218] fix optional path segments not working out as planned --- routers/api/v1/api.go | 33 ++--- routers/common/lfs.go | 6 +- routers/web/githttp.go | 6 +- routers/web/web.go | 173 +++++++++++++++++--------- tests/integration/mirror_pull_test.go | 2 +- tests/integration/pull_merge_test.go | 1 + 6 files changed, 141 insertions(+), 80 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 7c152e6d94..3ec7a9d8f9 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -69,14 +69,12 @@ import ( "strconv" "strings" - actions_model "code.gitea.io/gitea/models/actions" auth_model "code.gitea.io/gitea/models/auth" - "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" repo_model "code.gitea.io/gitea/models/repo" - group_model "code.gitea.io/gitea/models/group" shared_group_model "code.gitea.io/gitea/models/shared/group" "code.gitea.io/gitea/models/unit" user_model "code.gitea.io/gitea/models/user" @@ -1162,11 +1160,13 @@ func Routes() *web.Router { // (repo scope) m.Group("/starred", func() { m.Get("", user.GetMyStarredRepos) - m.Group("/{username}/{group_id}?/{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_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) }, reqStarsEnabled(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository)) m.Get("/times", repo.ListMyTrackedTimes) m.Get("/stopwatches", repo.GetStopwatches) @@ -1213,8 +1213,7 @@ func Routes() *web.Router { // (repo scope) m.Post("/migrate", reqToken(), bind(api.MigrateRepoOptions{}), repo.Migrate) - - m.Group("/{username}/{group_id}?/{reponame}", func() { + fn := func() { m.Get("/compare/*", reqRepoReader(unit.TypeCode), repo.CompareDiff) m.Combo("").Get(reqAnyRepoReader(), repo.Get). @@ -1512,27 +1511,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_id}/{reponame}", fn, 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}/{group_id}?/{reponame}/actions/artifacts/{artifact_id}/zip/raw", repo.DownloadArtifactRaw) + m.Get("/repos/{username}/{reponame}/actions/artifacts/{artifact_id}/zip/raw", repo.DownloadArtifactRaw) + m.Get("/repos/{username}/{group_id}/{reponame}/actions/artifacts/{artifact_id}/zip/raw", repo.DownloadArtifactRaw) // Notifications (requires notifications scope) m.Group("/repos", func() { - m.Group("/{username}/{group_id}?/{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_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryNotification)) // Issue (requires issue scope) m.Group("/repos", func() { m.Get("/issues/search", repo.SearchIssues) - - m.Group("/{username}/{group_id}?/{reponame}", func() { + fn := func() { m.Group("/issues", func() { m.Combo("").Get(repo.ListIssues). Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueOption{}), reqRepoReader(unit.TypeIssues), repo.CreateIssue) @@ -1644,7 +1647,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_id}/{reponame}", fn, 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 diff --git a/routers/common/lfs.go b/routers/common/lfs.go index 1d2b71394b..b2438a54e0 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_id}/{reponame}/info/lfs", fn, append([]any{web.RouterMockPoint(RouterMockPointCommonLFS)}, middlewares...)...) } diff --git a/routers/web/githttp.go b/routers/web/githttp.go index 24af5e534d..841c42d9c2 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}/{group_id}?/{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_id}/{reponame}", fn, middlewares...) } diff --git a/routers/web/web.go b/routers/web/web.go index 0323edff41..bf3a297858 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -8,7 +8,6 @@ import ( "strings" auth_model "code.gitea.io/gitea/models/auth" - "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/perm" "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/git" @@ -1135,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_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) @@ -1246,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_id}/{reponame}/settings", settingsFn, reqSignIn, context.RepoAssignment, reqRepoAdmin, ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer), ) @@ -1256,8 +1264,9 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/{username}/{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.Post("/{username}/{group_id}/{reponame}/markup", optSignIn, context.RepoAssignment, reqUnitsWithMarkdown, web.Bind(structs.MarkupOption{}), misc.Markup) - m.Group("/{username}/{reponame}", func() { + 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) @@ -1273,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_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) @@ -1292,25 +1303,31 @@ 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}/{reponame}/{type:issues}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests)) - m.Group("/{username}/{reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) + m.Group("/{username}/{group_id}/reponame}/{type:issues}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests)) + m.Group("/{username}/reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) + m.Group("/{username}/{group_id}/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}/{reponame}", repoIssueAttachmentFn, optSignIn, context.RepoAssignment, reqRepoIssuesOrPullsReader) // issue/pull attachments, labels, milestones + m.Group("/{username}/{group_id}/{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}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) + m.Group("/{username}/{group_id}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, 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). @@ -1321,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) @@ -1398,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}/{reponame}", editIssueFn, reqSignIn, context.RepoAssignment, context.RepoMustNotBeArchived()) + m.Group("/{username}/{group_id}/{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. @@ -1449,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}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader) + m.Group("/{username}/{group_id}/{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) @@ -1460,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}/{reponame}", repoTagFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqUnitCodeReader) + m.Group("/{username}/{group_id}/{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) @@ -1485,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}/{reponame}", repoReleaseFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoReleaseReader) + m.Group("/{username}/{group_id}/{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}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment) + m.Group("/{username}/{group_id}/{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}/{reponame}", repoTopicFn, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived()) + m.Group("/{username}/{group_id}/{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}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) + m.Group("/{username}/{group_id}/{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 @@ -1527,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}/{reponame}/projects", repoProjectsFn, optSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects) + m.Group("/{username}/{group_id}/{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) @@ -1566,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}/{reponame}/actions", repoActionsFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoActionsReader, actions.MustEnableActions) + m.Group("/{username}/{group_id}/{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) @@ -1580,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}/{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}/{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}/{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) @@ -1605,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}/{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}/{group_id}/{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) @@ -1638,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}/{reponame}", repoPullFn, optSignIn, context.RepoAssignment, repo.MustAllowPulls, reqUnitPullsReader) + m.Group("/{username}/{group_id}/{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) @@ -1720,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}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) + m.Group("/{username}/{group_id}/{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}/{reponame}", fn, optSignIn, context.RepoAssignment) + m.Group("/{username}/{group_id}/{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/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 7641fb187a..96d17c6131 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -11,6 +11,7 @@ import ( "net/url" "os" "path" + "path/filepath" "strconv" "strings" "testing" From 89a77b04ecf5f45dbe38ce41a06ff6c96b6a208a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 21:48:29 -0400 Subject: [PATCH 087/218] update `FullName` method to show group id if it's non-zero --- models/repo/repo.go | 2 +- modules/csv/csv_test.go | 24 ++--- .../code/elasticsearch/elasticsearch.go | 2 +- modules/issue/template/template_test.go | 4 +- routers/api/v1/api.go | 2 +- routers/api/v1/repo/action.go | 2 +- services/context/repo.go | 2 +- tests/integration/actions_delete_run_test.go | 2 +- tests/integration/actions_job_test.go | 14 +-- tests/integration/actions_log_test.go | 4 +- tests/integration/actions_trigger_test.go | 4 +- .../api_comment_attachment_test.go | 14 +-- tests/integration/api_comment_test.go | 20 ++-- .../integration/api_issue_attachment_test.go | 12 +-- tests/integration/api_issue_config_test.go | 2 +- tests/integration/api_issue_label_test.go | 6 +- tests/integration/api_issue_lock_test.go | 4 +- tests/integration/api_issue_milestone_test.go | 12 +-- tests/integration/api_issue_pin_test.go | 32 +++---- tests/integration/api_issue_reaction_test.go | 2 +- .../api_issue_subscription_test.go | 6 +- tests/integration/api_issue_test.go | 12 +-- tests/integration/api_keys_test.go | 6 +- tests/integration/api_notification_test.go | 6 +- tests/integration/api_pull_commits_test.go | 2 +- tests/integration/api_pull_review_test.go | 76 +++++++-------- tests/integration/api_pull_test.go | 36 ++++---- .../api_releases_attachment_test.go | 2 +- tests/integration/api_releases_test.go | 24 ++--- tests/integration/api_repo_archive_test.go | 14 +-- tests/integration/api_repo_avatar_test.go | 8 +- .../integration/api_repo_collaborator_test.go | 18 ++-- .../integration/api_repo_file_create_test.go | 20 ++-- .../integration/api_repo_file_delete_test.go | 20 ++-- .../integration/api_repo_file_update_test.go | 22 ++--- .../integration/api_repo_files_change_test.go | 16 ++-- tests/integration/api_repo_files_get_test.go | 6 +- .../api_repo_get_contents_list_test.go | 18 ++-- .../integration/api_repo_get_contents_test.go | 20 ++-- tests/integration/api_repo_git_blobs_test.go | 16 ++-- tests/integration/api_repo_git_hook_test.go | 20 ++-- tests/integration/api_repo_git_tags_test.go | 8 +- tests/integration/api_repo_git_trees_test.go | 12 +-- tests/integration/api_repo_hook_test.go | 2 +- tests/integration/api_repo_tags_test.go | 4 +- tests/integration/api_repo_test.go | 92 +++++++++---------- tests/integration/api_repo_topic_test.go | 18 ++-- tests/integration/eventsource_test.go | 2 +- tests/integration/privateactivity_test.go | 2 +- tests/integration/repo_merge_upstream_test.go | 2 +- tests/integration/repo_webhook_test.go | 8 +- 51 files changed, 342 insertions(+), 342 deletions(-) diff --git a/models/repo/repo.go b/models/repo/repo.go index 421214ca6f..46fa842c1f 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -365,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 diff --git a/modules/csv/csv_test.go b/modules/csv/csv_test.go index 5ea9718466..403c91cacf 100644 --- a/modules/csv/csv_test.go +++ b/modules/csv/csv_test.go @@ -259,7 +259,7 @@ a,"quoted ""text"" with new lines in second column",c`, expectedText: `col1,col2,col3 -a,,c`, +a,c`, }, // case 2 - quoted text with escaped quotes in last column { @@ -279,9 +279,9 @@ a,bb,c,d,ee ,"f f" a,b,"c "" c",d,e,f`, - expectedText: `a,,c,d,,f + expectedText: `a,c,d,f a,bb,c,d,ee , -a,b,,d,e,f`, +a,b,d,e,f`, }, // case 4 - csv with pipes and quotes { @@ -394,17 +394,17 @@ f" | 4.56 | 789`, // In the previous bestScore algorithm, this would have picked comma as the delimiter, but now it should guess tab { csv: `c1 c2 c3 c4 c5 c6 -v,k,x,v ym,f,oa,qn,uqijh,n,s,wvygpo uj,kt,j,w,i,fvv,tm,f,ddt,b,mwt,e,t,teq,rd,p,a e,wfuae,t,h,q,im,ix,y h,mrlu,l,dz,ff,zi,af,emh ,gov,bmfelvb,axp,f,u,i,cni,x,z,v,sh,w,jo,,m,h -k,ohf,pgr,tde,m,s te,ek,,v,,ic,kqc,dv,w,oi,j,w,gojjr,ug,,l,j,zl g,qziq,bcajx,zfow,ka,j,re,ohbc k,nzm,qm,ts,auf th,elb,lx,l,q,e,qf asbr,z,k,y,tltobga -g,m,bu,el h,l,jwi,o,wge,fy,rure,c,g,lcxu,fxte,uns,cl,s,o,t,h,rsoy,f bq,s,uov,z,ikkhgyg,,sabs,c,hzue mc,b,,j,t,n sp,mn,,m,t,dysi,eq,pigb,rfa,z w,rfli,sg,,o,wjjjf,f,wxdzfk,x,t,p,zy,p,mg,r,l,h -e,ewbkc,nugd,jj,sf,ih,i,n,jo,b,poem,kw,q,i,x,t,e,uug,k j,xm,sch,ux,h,,fb,f,pq,,mh,,f,v,,oba,w,h,v,eiz,yzd,o,a,c,e,dhp,q a,pbef,epc,k,rdpuw,cw k,j,e,d xf,dz,sviv,w,sqnzew,t,b v,yg,f,cq,ti,g,m,ta,hm,ym,ii,hxy,p,z,r,e,ga,sfs,r,p,l,aar,w,kox,j +v,k,x,v ym,f,oa,qn,uqijh,n,s,wvygpo uj,kt,j,w,i,fvv,tm,f,ddt,b,mwt,e,t,teq,rd,p,a e,wfuae,t,h,q,im,ix,y h,mrlu,l,dz,ff,zi,af,emh ,gov,bmfelvb,axp,f,u,i,cni,x,z,v,sh,w,jo,m,h +k,ohf,pgr,tde,m,s te,ek,v,ic,kqc,dv,w,oi,j,w,gojjr,ug,l,j,zl g,qziq,bcajx,zfow,ka,j,re,ohbc k,nzm,qm,ts,auf th,elb,lx,l,q,e,qf asbr,z,k,y,tltobga +g,m,bu,el h,l,jwi,o,wge,fy,rure,c,g,lcxu,fxte,uns,cl,s,o,t,h,rsoy,f bq,s,uov,z,ikkhgyg,sabs,c,hzue mc,b,j,t,n sp,mn,m,t,dysi,eq,pigb,rfa,z w,rfli,sg,o,wjjjf,f,wxdzfk,x,t,p,zy,p,mg,r,l,h +e,ewbkc,nugd,jj,sf,ih,i,n,jo,b,poem,kw,q,i,x,t,e,uug,k j,xm,sch,ux,h,fb,f,pq,mh,f,v,oba,w,h,v,eiz,yzd,o,a,c,e,dhp,q a,pbef,epc,k,rdpuw,cw k,j,e,d xf,dz,sviv,w,sqnzew,t,b v,yg,f,cq,ti,g,m,ta,hm,ym,ii,hxy,p,z,r,e,ga,sfs,r,p,l,aar,w,kox,j l,d,v,pp,q,j,bxip,w,i,im,qa,o e,o h,w,a,a,qzj,nt,qfn,ut,fvhu,ts hu,q,g,p,q,ofpje,fsqa,frp,p,vih,j,w,k,jx, ln,th,ka,l,b,vgk,rv,hkx rj,v,y,cwm,rao,e,l,wvr,ptc,lm,yg,u,k,i,b,zk,b,gv,fls velxtnhlyuysbnlchosqlhkozkdapjaueexjwrndwb nglvnv kqiv pbshwlmcexdzipopxjyrxhvjalwp pydvipwlkkpdvbtepahskwuornbsb qwbacgq -l,y,u,bf,y,m,eals,n,cop,h,g,vs,jga,opt x,b,zwmn,hh,b,n,pdj,t,d px yn,vtd,u,y,b,ps,yo,qqnem,mxg,m,al,rd,c,k,d,q,f ilxdxa,m,y,,p,p,y,prgmg,q,n,etj,k,ns b,pl,z,jq,hk -p,gc jn,mzr,bw sb,e,r,dy,ur,wzy,r,c,n,yglr,jbdu,r,pqk,k q,d,,,p,l,euhl,dc,rwh,t,tq,z,h,p,s,t,x,fugr,h wi,zxb,jcig,o,t,k mfh,ym,h,e,p,cnvx,uv,zx,x,pq,blt,v,r,u,tr,g,g,xt -nri,p,,t,if,,y,ptlqq a,i w,ovli,um,w,f,re,k,sb,w,jy,zf i,g,p,q,mii,nr,jm,cc i,szl,k,eg,l,d ,ah,w,b,vh -,,sh,wx,mn,xm,u,d,yy,u,t,m,j,s,b ogadq,g,y,y,i,h,ln,jda,g,cz,s,rv,r,s,s,le,r, y,nu,f,nagj o,h,,adfy,o,nf,ns,gvsvnub,k,b,xyz v,h,g,ef,y,gb c,x,cw,x,go,h,t,x,cu,u,qgrqzrcmn,kq,cd,g,rejp,zcq -skxg,t,vay,d,wug,d,xg,sexc rt g,ag,mjq,fjnyji,iwa,m,ml,b,ua,b,qjxeoc be,s,sh,n,jbzxs,g,n,i,h,y,r,be,mfo,u,p cw,r,,u,zn,eg,r,yac,m,l,edkr,ha,x,g,b,c,tg,c j,ye,u,ejd,maj,ea,bm,u,iy`, +l,y,u,bf,y,m,eals,n,cop,h,g,vs,jga,opt x,b,zwmn,hh,b,n,pdj,t,d px yn,vtd,u,y,b,ps,yo,qqnem,mxg,m,al,rd,c,k,d,q,f ilxdxa,m,y,p,p,y,prgmg,q,n,etj,k,ns b,pl,z,jq,hk +p,gc jn,mzr,bw sb,e,r,dy,ur,wzy,r,c,n,yglr,jbdu,r,pqk,k q,d,,p,l,euhl,dc,rwh,t,tq,z,h,p,s,t,x,fugr,h wi,zxb,jcig,o,t,k mfh,ym,h,e,p,cnvx,uv,zx,x,pq,blt,v,r,u,tr,g,g,xt +nri,p,t,if,y,ptlqq a,i w,ovli,um,w,f,re,k,sb,w,jy,zf i,g,p,q,mii,nr,jm,cc i,szl,k,eg,l,d ,ah,w,b,vh +,sh,wx,mn,xm,u,d,yy,u,t,m,j,s,b ogadq,g,y,y,i,h,ln,jda,g,cz,s,rv,r,s,s,le,r, y,nu,f,nagj o,h,adfy,o,nf,ns,gvsvnub,k,b,xyz v,h,g,ef,y,gb c,x,cw,x,go,h,t,x,cu,u,qgrqzrcmn,kq,cd,g,rejp,zcq +skxg,t,vay,d,wug,d,xg,sexc rt g,ag,mjq,fjnyji,iwa,m,ml,b,ua,b,qjxeoc be,s,sh,n,jbzxs,g,n,i,h,y,r,be,mfo,u,p cw,r,u,zn,eg,r,yac,m,l,edkr,ha,x,g,b,c,tg,c j,ye,u,ejd,maj,ea,bm,u,iy`, expectedDelimiter: '\t', }, // case 13 - a CSV with more than 10 lines and since we only use the first 10 lines, it should still get the delimiter as semicolon 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/routers/api/v1/api.go b/routers/api/v1/api.go index 3ec7a9d8f9..c89663a232 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -144,7 +144,7 @@ func repoAssignment() func(ctx *context.APIContext) { if group != "" { gid, _ = strconv.ParseInt(group, 10, 64) if gid == 0 { - ctx.Redirect(strings.Replace(ctx.Req.URL.RequestURI(), "/0/", "/", 1)) + ctx.Redirect(strings.Replace(ctx.Req.URL.RequestURI(), "/0/", "/", 1), 307) return } group += "/" diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index 09b0cc5b2d..7b7104ef84 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -1947,7 +1947,7 @@ 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) + return fmt.Sprintf("api/v1/repos/%s/%d/%s/actions/artifacts/%d/zip/raw", url.PathEscape(repo.OwnerName), repo.GroupID, url.PathEscape(repo.Name), artifactID) } func buildSigURL(ctx go_context.Context, endPoint string, artifactID int64) string { diff --git a/services/context/repo.go b/services/context/repo.go index c3ae7d29ff..44cf02595c 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -492,7 +492,7 @@ func repoAssignmentPrepareData(ctx *Context) *repoAssignmentPrepareDataStruct { if q != "" { q = "?" + q } - ctx.Redirect(strings.Replace(ctx.Link, "/0/", "/", 1) + q) + ctx.Redirect(strings.Replace(ctx.Link, "/0/", "/", 1)+q, 307) return } group += "/" diff --git a/tests/integration/actions_delete_run_test.go b/tests/integration/actions_delete_run_test.go index 096921faac..3242c68301 100644 --- a/tests/integration/actions_delete_run_test.go +++ b/tests/integration/actions_delete_run_test.go @@ -120,7 +120,7 @@ jobs: runner.registerAsRepoRunner(t, user2.Name, apiRepo.Name, "mock-runner", []string{"ubuntu-latest"}, false) opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+testCase.treePath, testCase.fileContent) - createWorkflowFile(t, token, user2.Name, apiRepo.Name, testCase.treePath, opts) + createWorkflowFile(t, token, user2.Name, apiRepo.Name, testCase.treePath, apiRepo.GroupID, opts) var runID int64 for i := 0; i < len(testCase.outcomes); i++ { diff --git a/tests/integration/actions_job_test.go b/tests/integration/actions_job_test.go index 3e1fd50eb5..b8bef76904 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -144,7 +144,7 @@ jobs: t.Run("test "+tc.treePath, func(t *testing.T) { // create the workflow file opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - fileResp := createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, opts) + fileResp := createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, apiRepo.GroupID, opts) // fetch and execute task for i := 0; i < len(tc.outcomes); i++ { @@ -156,7 +156,7 @@ jobs: } // check result - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/actions/tasks", user2.Name, apiRepo.Name)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/actions/tasks", user2.Name, apiRepo.GroupID, apiRepo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) actionTaskRespAfter := DecodeJSON(t, resp, &api.ActionTaskResponse{}) @@ -325,7 +325,7 @@ jobs: for _, tc := range testCases { t.Run("test "+tc.treePath, func(t *testing.T) { opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, opts) + createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, apiRepo.GroupID, opts) for i := 0; i < len(tc.outcomes); i++ { task := runner.fetchTask(t) @@ -490,7 +490,7 @@ jobs: - run: echo 'test the pull' ` opts := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, baseRepo.GroupID, opts) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-patch.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -582,7 +582,7 @@ jobs: - run: echo 'test the pull' ` opts := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, baseRepo.GroupID, opts) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-patch.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -733,8 +733,8 @@ func getWorkflowCreateFileOptions(u *user_model.User, branch, msg, content strin } } -func createWorkflowFile(t *testing.T, authToken, ownerName, repoName, treePath string, opts *api.CreateFileOptions) *api.FileResponse { - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", ownerName, repoName, treePath), opts). +func createWorkflowFile(t *testing.T, authToken, ownerName, repoName, treePath string, groupID int64, opts *api.CreateFileOptions) *api.FileResponse { + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", ownerName, groupID, repoName, treePath), opts). AddTokenAuth(authToken) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index 4a48f865bc..c52ac6620e 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -167,7 +167,7 @@ jobs: // create the workflow file opts := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, tc.treePath, opts) + createWorkflowFile(t, token, user2.Name, repo.Name, tc.treePath, repo.GroupID, opts) // fetch and execute tasks for _, outcome := range tc.outcome { @@ -199,7 +199,7 @@ jobs: } // download task logs from API and check content - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/actions/jobs/%d/logs", user2.Name, repo.Name, job.ID)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/actions/jobs/%d/logs", user2.Name, repo.GroupID, repo.Name, job.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) logTextLines = strings.Split(strings.TrimSpace(resp.Body.String()), "\n") diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index e7a3cd7b4f..7beaced78c 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1560,10 +1560,10 @@ jobs: - run: echo 'Hello World' ` opts1 := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts1) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, baseRepo.GroupID, opts1) // user4 forks the repo - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks", baseRepo.OwnerName, baseRepo.Name), + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/forks", baseRepo.OwnerName, baseRepo.GroupID, baseRepo.Name), &api.CreateForkOption{ Name: new("close-pull-request-with-path-fork"), }).AddTokenAuth(user4Token) diff --git a/tests/integration/api_comment_attachment_test.go b/tests/integration/api_comment_attachment_test.go index 657b1637ac..9ccc572ddf 100644 --- a/tests/integration/api_comment_attachment_test.go +++ b/tests/integration/api_comment_attachment_test.go @@ -36,17 +36,17 @@ func TestAPIGetCommentAttachment(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) }) session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusOK) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) @@ -70,7 +70,7 @@ func TestAPIListCommentAttachments(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets", repoOwner.Name, repo.Name, comment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) @@ -103,7 +103,7 @@ func TestAPICreateCommentAttachment(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/assets", repoOwner.Name, repo.Name, comment.ID), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, comment.ID), body). AddTokenAuth(token). SetHeader("Content-Type", writer.FormDataContentType()) resp := session.MakeRequest(t, req, http.StatusCreated) @@ -133,7 +133,7 @@ func TestAPICreateCommentAttachmentWithUnallowedFile(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/assets", repoOwner.Name, repo.Name, comment.ID), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, comment.ID), body). AddTokenAuth(token). SetHeader("Content-Type", writer.FormDataContentType()) @@ -196,7 +196,7 @@ func TestAPIDeleteCommentAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusNoContent) diff --git a/tests/integration/api_comment_test.go b/tests/integration/api_comment_test.go index 138d1d2e9b..d7120691f9 100644 --- a/tests/integration/api_comment_test.go +++ b/tests/integration/api_comment_test.go @@ -30,7 +30,7 @@ func TestAPIListRepoComments(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments", repoOwner.Name, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments", repoOwner.Name, repo.GroupID, repo.Name)) req := NewRequest(t, "GET", link.String()) resp := MakeRequest(t, req, http.StatusOK) @@ -75,7 +75,7 @@ func TestAPIListIssueComments(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/%d/comments", repoOwner.Name, repo.Name, issue.Index). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/%d/comments", repoOwner.Name, repo.GroupID, repo.Name, issue.Index). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -112,7 +112,7 @@ func TestAPICreateComment(t *testing.T) { issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/comments", repo.OwnerName, repo.Name, issue.Index), map[string]string{ + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/comments", repo.OwnerName, repo.GroupID, repo.Name, issue.Index), map[string]string{ "body": commentBody, }).AddTokenAuth(getUserToken(t, user34.Name, auth_model.AccessTokenScopeWriteRepository)) MakeRequest(t, req, http.StatusForbidden) @@ -125,7 +125,7 @@ func TestAPICreateComment(t *testing.T) { issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 13}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/comments", repo.OwnerName, repo.Name, issue.Index), map[string]string{ + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/comments", repo.OwnerName, repo.GroupID, repo.Name, issue.Index), map[string]string{ "body": commentBody, }).AddTokenAuth(getUserToken(t, user34.Name, auth_model.AccessTokenScopeWriteRepository)) MakeRequest(t, req, http.StatusForbidden) @@ -141,9 +141,9 @@ func TestAPIGetComment(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID) MakeRequest(t, req, http.StatusOK) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -179,7 +179,7 @@ func TestAPIGetSystemUserComment(t *testing.T) { }) assert.NoError(t, err) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID) resp := MakeRequest(t, req, http.StatusOK) apiComment := DecodeJSON(t, resp, &api.Comment{}) @@ -245,13 +245,13 @@ func TestAPIDeleteComment(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) }) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -267,7 +267,7 @@ func TestAPIListIssueTimeline(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) // make request - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/%d/timeline", repoOwner.Name, repo.Name, issue.Index) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/%d/timeline", repoOwner.Name, repo.GroupID, repo.Name, issue.Index) resp := MakeRequest(t, req, http.StatusOK) // check if lens of list returned by API and diff --git a/tests/integration/api_issue_attachment_test.go b/tests/integration/api_issue_attachment_test.go index 3475c37ee4..d0830f94a4 100644 --- a/tests/integration/api_issue_attachment_test.go +++ b/tests/integration/api_issue_attachment_test.go @@ -32,7 +32,7 @@ func TestAPIGetIssueAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets/%d", repoOwner.Name, repo.Name, issue.Index, attachment.ID)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, issue.Index, attachment.ID)). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) apiAttachment := DecodeJSON(t, resp, &api.Attachment{}) @@ -51,7 +51,7 @@ func TestAPIListIssueAttachments(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets", repoOwner.Name, repo.Name, issue.Index)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) apiAttachment := DecodeJSON(t, resp, []api.Attachment{}) @@ -80,7 +80,7 @@ func TestAPICreateIssueAttachment(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets", repoOwner.Name, repo.Name, issue.Index), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, issue.Index), body). AddTokenAuth(token) req.Header.Add("Content-Type", writer.FormDataContentType()) resp := session.MakeRequest(t, req, http.StatusCreated) @@ -110,7 +110,7 @@ func TestAPICreateIssueAttachmentWithUnallowedFile(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets", repoOwner.Name, repo.Name, issue.Index), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, issue.Index), body). AddTokenAuth(token) req.Header.Add("Content-Type", writer.FormDataContentType()) @@ -152,7 +152,7 @@ func TestAPIEditIssueAttachmentWithUnallowedFile(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) filename := "file.bad" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets/%d", repoOwner.Name, repo.Name, issue.Index, attachment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, issue.Index, attachment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "name": filename, }).AddTokenAuth(token) @@ -171,7 +171,7 @@ func TestAPIDeleteIssueAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets/%d", repoOwner.Name, repo.Name, issue.Index, attachment.ID)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, issue.Index, attachment.ID)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusNoContent) diff --git a/tests/integration/api_issue_config_test.go b/tests/integration/api_issue_config_test.go index 31dfa9ce92..60d1c4f10e 100644 --- a/tests/integration/api_issue_config_test.go +++ b/tests/integration/api_issue_config_test.go @@ -149,7 +149,7 @@ func TestAPIRepoValidateIssueConfig(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 49}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issue_config/validate", owner.Name, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issue_config/validate", owner.Name, repo.GroupID, repo.Name) t.Run("Valid", func(t *testing.T) { req := NewRequest(t, "GET", urlStr) diff --git a/tests/integration/api_issue_label_test.go b/tests/integration/api_issue_label_test.go index 0e522d3e83..cdfc05e74a 100644 --- a/tests/integration/api_issue_label_test.go +++ b/tests/integration/api_issue_label_test.go @@ -26,7 +26,7 @@ func TestAPIModifyLabels(t *testing.T) { owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/labels", owner.Name, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/labels", owner.Name, repo.GroupID, repo.Name) // CreateLabel req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateLabelOption{ @@ -60,7 +60,7 @@ func TestAPIModifyLabels(t *testing.T) { assert.Len(t, apiLabels, 2) // GetLabel - singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%s/labels/%d", owner.Name, repo.Name, dbLabel.ID) + singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/labels/%d", owner.Name, repo.GroupID, repo.Name, dbLabel.ID) req = NewRequest(t, "GET", singleURLStr). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -124,7 +124,7 @@ func TestAPIAddIssueLabelsWithLabelNames(t *testing.T) { token := getTokenForLoggedInUser(t, user1Session, auth_model.AccessTokenScopeWriteIssue) // add the org label and the repo label to the issue - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/labels", owner.Name, repo.Name, issue.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/labels", owner.Name, repo.GroupID, repo.Name, issue.Index) req := NewRequestWithJSON(t, "POST", urlStr, &api.IssueLabelsOption{ Labels: []any{repoLabel.Name, orgLabel.Name}, }).AddTokenAuth(token) diff --git a/tests/integration/api_issue_lock_test.go b/tests/integration/api_issue_lock_test.go index 47b1f2cf0d..6f8ddbf7af 100644 --- a/tests/integration/api_issue_lock_test.go +++ b/tests/integration/api_issue_lock_test.go @@ -27,7 +27,7 @@ func TestAPILockIssue(t *testing.T) { assert.False(t, issueBefore.IsLocked) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/lock", owner.Name, repo.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/lock", owner.Name, repo.GroupID, repo.Name, issueBefore.Index) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) @@ -50,7 +50,7 @@ func TestAPILockIssue(t *testing.T) { issueBefore := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/lock", owner.Name, repo.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/lock", owner.Name, repo.GroupID, repo.Name, issueBefore.Index) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) diff --git a/tests/integration/api_issue_milestone_test.go b/tests/integration/api_issue_milestone_test.go index 7f16db163d..4836e8215e 100644 --- a/tests/integration/api_issue_milestone_test.go +++ b/tests/integration/api_issue_milestone_test.go @@ -34,7 +34,7 @@ func TestAPIIssuesMilestone(t *testing.T) { // update values of issue milestoneState := "closed" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%d", owner.Name, repo.Name, milestone.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones/%d", owner.Name, repo.GroupID, repo.Name, milestone.ID) req := NewRequestWithJSON(t, "PATCH", urlStr, structs.EditMilestoneOption{ State: &milestoneState, }).AddTokenAuth(token) @@ -48,7 +48,7 @@ func TestAPIIssuesMilestone(t *testing.T) { apiMilestone2 := DecodeJSON(t, resp, &structs.Milestone{}) assert.EqualValues(t, "closed", apiMilestone2.State) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/milestones", owner.Name, repo.Name), structs.CreateMilestoneOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones", owner.Name, repo.GroupID, repo.Name), structs.CreateMilestoneOption{ Title: "wow", Description: "closed one", State: "closed", @@ -59,27 +59,27 @@ func TestAPIIssuesMilestone(t *testing.T) { assert.Equal(t, structs.StateClosed, apiMilestone.State) assert.Nil(t, apiMilestone.Deadline) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones?state=%s", owner.Name, repo.Name, "all")). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones?state=%s", owner.Name, repo.GroupID, repo.Name, "all")). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestones := DecodeJSON(t, resp, []structs.Milestone{}) assert.Len(t, apiMilestones, 4) assert.Nil(t, apiMilestones[0].Deadline) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%s", owner.Name, repo.Name, apiMilestones[2].Title)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones/%s", owner.Name, repo.GroupID, repo.Name, apiMilestones[2].Title)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestone = DecodeJSON(t, resp, &structs.Milestone{}) assert.Equal(t, apiMilestones[2], *apiMilestone) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones?state=%s&name=%s", owner.Name, repo.Name, "all", "milestone2")). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones?state=%s&name=%s", owner.Name, repo.GroupID, repo.Name, "all", "milestone2")). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestones = DecodeJSON(t, resp, []structs.Milestone{}) assert.Len(t, apiMilestones, 1) assert.Equal(t, int64(2), apiMilestones[0].ID) - req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%d", owner.Name, repo.Name, apiMilestone.ID)). + req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones/%d", owner.Name, repo.GroupID, repo.Name, apiMilestone.ID)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } diff --git a/tests/integration/api_issue_pin_test.go b/tests/integration/api_issue_pin_test.go index 47026449d7..987dac9130 100644 --- a/tests/integration/api_issue_pin_test.go +++ b/tests/integration/api_issue_pin_test.go @@ -32,12 +32,12 @@ func TestAPIPinIssue(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) @@ -56,23 +56,23 @@ func TestAPIUnpinIssue(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) // Unpin the Issue - req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). + req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is no longer pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI = DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 0, issueAPI.PinOrder) @@ -92,34 +92,34 @@ func TestAPIMoveIssuePin(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the first Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the first Issue is pinned at position 1 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) // Pin the second Issue - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue2.Index)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue2.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Move the first Issue to position 2 - req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin/2", repo.OwnerName, repo.Name, issue.Index)). + req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin/2", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the first Issue is pinned at position 2 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI3 := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 2, issueAPI3.PinOrder) // Check if the second Issue is pinned at position 1 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue2.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue2.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI4 := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI4.PinOrder) @@ -138,12 +138,12 @@ func TestAPIListPinnedIssues(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is in the List - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/pinned", repo.OwnerName, repo.Name)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/pinned", repo.OwnerName, repo.GroupID, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) issueList := DecodeJSON(t, resp, []api.Issue{}) @@ -158,7 +158,7 @@ func TestAPIListPinnedPullrequests(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/pulls/pinned", repo.OwnerName, repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/pinned", repo.OwnerName, repo.GroupID, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) prList := DecodeJSON(t, resp, []api.PullRequest{}) @@ -171,7 +171,7 @@ func TestAPINewPinAllowed(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/new_pin_allowed", owner.Name, repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/new_pin_allowed", owner.Name, repo.GroupID, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) newPinsAllowed := DecodeJSON(t, resp, &api.NewIssuePinsAllowed{}) diff --git a/tests/integration/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go index 503caf8a72..b4dc3b858b 100644 --- a/tests/integration/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -119,7 +119,7 @@ func TestAPICommentReactions(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/reactions", repoOwner.Name, repo.Name, comment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/reactions", repoOwner.Name, repo.GroupID, repo.Name, comment.ID) req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{ Reaction: "+1", }).AddTokenAuth(token) diff --git a/tests/integration/api_issue_subscription_test.go b/tests/integration/api_issue_subscription_test.go index 3862a13894..90085d8961 100644 --- a/tests/integration/api_issue_subscription_test.go +++ b/tests/integration/api_issue_subscription_test.go @@ -36,7 +36,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription := func(issue *issues_model.Issue, isWatching bool) { issueRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/check", issueRepo.OwnerName, issueRepo.Name, issue.Index)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/subscriptions/check", issueRepo.OwnerName, issueRepo.GroupID, issueRepo.Name, issue.Index)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) wi := new(api.WatchInfo) @@ -56,7 +56,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription(issue5, false) issue1Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue1.RepoID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s", issue1Repo.OwnerName, issue1Repo.Name, issue1.Index, owner.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/subscriptions/%s", issue1Repo.OwnerName, issue1Repo.GroupID, issue1Repo.Name, issue1.Index, owner.Name) req := NewRequest(t, "DELETE", urlStr). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) @@ -68,7 +68,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription(issue1, false) issue5Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue5.RepoID}) - urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s", issue5Repo.OwnerName, issue5Repo.Name, issue5.Index, owner.Name) + urlStr = fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/subscriptions/%s", issue5Repo.OwnerName, issue5Repo.GroupID, issue5Repo.Name, issue5.Index, owner.Name) req = NewRequest(t, "PUT", urlStr). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go index e1708e90aa..f4d77b7eda 100644 --- a/tests/integration/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -44,7 +44,7 @@ func testAPIListIssues(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner.Name, repo.GroupID, repo.Name)) link.RawQuery = url.Values{"token": {token}, "state": {"all"}}.Encode() resp := MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) @@ -91,7 +91,7 @@ func testAPIListIssuesPublicOnly(t *testing.T) { session := loginUser(t, owner1.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner1.Name, repo1.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner1.Name, repo1.GroupID, repo1.Name)) link.RawQuery = url.Values{"state": {"all"}}.Encode() req := NewRequest(t, "GET", link.String()).AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -101,7 +101,7 @@ func testAPIListIssuesPublicOnly(t *testing.T) { session = loginUser(t, owner2.Name) token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner2.Name, repo2.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner2.Name, repo2.GroupID, repo2.Name)) link.RawQuery = url.Values{"state": {"all"}}.Encode() req = NewRequest(t, "GET", link.String()).AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -119,7 +119,7 @@ func testAPICreateIssue(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner.Name, repoBefore.GroupID, repoBefore.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateIssueOption{ Body: body, Title: title, @@ -167,7 +167,7 @@ func testAPICreateIssueParallel(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner.Name, repoBefore.GroupID, repoBefore.Name) var wg sync.WaitGroup for i := range 10 { @@ -218,7 +218,7 @@ func testAPIEditIssue(t *testing.T) { body := "new content!" title := "new title from api set" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", owner.Name, repoBefore.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", owner.Name, repoBefore.GroupID, repoBefore.Name, issueBefore.Index) req := NewRequestWithJSON(t, "PATCH", urlStr, api.EditIssueOption{ State: &issueState, RemoveDeadline: &removeDeadline, diff --git a/tests/integration/api_keys_test.go b/tests/integration/api_keys_test.go index 7ea273ac16..9e94d71817 100644 --- a/tests/integration/api_keys_test.go +++ b/tests/integration/api_keys_test.go @@ -55,7 +55,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - keysURL := fmt.Sprintf("/api/v1/repos/%s/%s/keys", repoOwner.Name, repo.Name) + keysURL := fmt.Sprintf("/api/v1/repos/%s/%d/%s/keys", repoOwner.Name, repo.GroupID, repo.Name) rawKeyBody := api.CreateKeyOption{ Title: "read-only", Key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", @@ -75,7 +75,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { // Using the ID of a key that does not belong to the repository must fail { - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/keys/%d", repoOwner.Name, repo.Name, newDeployKey.ID)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/keys/%d", repoOwner.Name, repo.GroupID, repo.Name, newDeployKey.ID)). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -94,7 +94,7 @@ func TestCreateReadWriteDeployKey(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - keysURL := fmt.Sprintf("/api/v1/repos/%s/%s/keys", repoOwner.Name, repo.Name) + keysURL := fmt.Sprintf("/api/v1/repos/%s/%d/%s/keys", repoOwner.Name, repo.GroupID, repo.Name) rawKeyBody := api.CreateKeyOption{ Title: "read-write", Key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", diff --git a/tests/integration/api_notification_test.go b/tests/integration/api_notification_test.go index 275521572d..d4655b8b0d 100644 --- a/tests/integration/api_notification_test.go +++ b/tests/integration/api_notification_test.go @@ -62,7 +62,7 @@ func TestAPINotification(t *testing.T) { assert.False(t, apiNL[2].Pinned) // -- GET /repos/{owner}/{repo}/notifications -- - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?status-types=unread", user2.Name, repo1.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?status-types=unread", user2.Name, repo1.GroupID, repo1.Name)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiNL = DecodeJSON(t, resp, []api.NotificationThread{}) @@ -71,7 +71,7 @@ func TestAPINotification(t *testing.T) { assert.EqualValues(t, 4, apiNL[0].ID) // -- GET /repos/{owner}/{repo}/notifications -- multiple status-types - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?status-types=unread&status-types=pinned", user2.Name, repo1.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?status-types=unread&status-types=pinned", user2.Name, repo1.GroupID, repo1.Name)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiNL = DecodeJSON(t, resp, []api.NotificationThread{}) @@ -125,7 +125,7 @@ func TestAPINotification(t *testing.T) { assert.Len(t, apiNL, 2) lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 <- only Notification 4 is in this filter ... - req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?last_read_at=%s", user2.Name, repo1.Name, lastReadAt)). + req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?last_read_at=%s", user2.Name, repo1.GroupID, repo1.Name, lastReadAt)). AddTokenAuth(token) MakeRequest(t, req, http.StatusResetContent) diff --git a/tests/integration/api_pull_commits_test.go b/tests/integration/api_pull_commits_test.go index fd077b1e7c..aad51da1da 100644 --- a/tests/integration/api_pull_commits_test.go +++ b/tests/integration/api_pull_commits_test.go @@ -23,7 +23,7 @@ func TestAPIPullCommits(t *testing.T) { assert.NoError(t, pr.LoadIssue(t.Context())) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pr.HeadRepoID}) - req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/commits", repo.OwnerName, repo.Name, pr.Index) + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/commits", repo.OwnerName, repo.GroupID, repo.Name, pr.Index) resp := MakeRequest(t, req, http.StatusOK) commits := DecodeJSON(t, resp, []*api.Commit{}) diff --git a/tests/integration/api_pull_review_test.go b/tests/integration/api_pull_review_test.go index c1ab87405b..c6f6f53c82 100644 --- a/tests/integration/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -41,7 +41,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test ListPullReviews session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index). + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -65,13 +65,13 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.True(t, reviews[5].Official) // test GetPullReview - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, reviews[3].ID). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, reviews[3].ID). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review := DecodeJSON(t, resp, &api.PullReview{}) assert.Equal(t, reviews[3], review) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, reviews[5].ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, reviews[5].ID). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review = DecodeJSON(t, resp, &api.PullReview{}) @@ -79,7 +79,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test GetPullReviewComments comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: 7}) - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d/comments", repo.OwnerName, repo.Name, pullIssue.Index, 10). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d/comments", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, 10). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) reviewComments := DecodeJSON(t, resp, []*api.PullReviewComment{}) @@ -91,7 +91,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, comment.HTMLURL(t.Context()), reviewComments[0].HTMLURL) // test CreatePullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "body1", // Event: "" # will result in PENDING Comments: []api.CreatePullReviewComment{ @@ -120,7 +120,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, 3, review.CodeCommentsCount) // test SubmitPullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, review.ID), &api.SubmitPullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID), &api.SubmitPullReviewOptions{ Event: "APPROVED", Body: "just two nits", }).AddTokenAuth(token) @@ -131,7 +131,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, 3, review.CodeCommentsCount) // test dismiss review - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/dismissals", repo.OwnerName, repo.Name, pullIssue.Index, review.ID), &api.DismissPullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d/dismissals", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID), &api.DismissPullReviewOptions{ Message: "test", }).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -140,7 +140,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.True(t, review.Dismissed) // test dismiss review - req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/undismissals", repo.OwnerName, repo.Name, pullIssue.Index, review.ID)). + req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d/undismissals", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review = DecodeJSON(t, resp, &api.PullReview{}) @@ -148,7 +148,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.False(t, review.Dismissed) // test DeletePullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "just a comment", Event: "COMMENT", }).AddTokenAuth(token) @@ -156,12 +156,12 @@ func testAPIPullReviewGeneral(t *testing.T) { review = DecodeJSON(t, resp, &api.PullReview{}) assert.EqualValues(t, "COMMENT", review.State) assert.Equal(t, 0, review.CodeCommentsCount) - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, review.ID). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // test CreatePullReview Comment without body but with comments - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ // Body: "", Event: "COMMENT", Comments: []api.CreatePullReviewComment{ @@ -188,7 +188,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test CreatePullReview Comment with body but without comments commentBody := "This is a body of the comment." - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: commentBody, Event: "COMMENT", Comments: []api.CreatePullReviewComment{}, @@ -202,7 +202,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.False(t, commentReview.Dismissed) // test CreatePullReview Comment without body and no comments - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "", Event: "COMMENT", Comments: []api.CreatePullReviewComment{}, @@ -218,7 +218,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.NoError(t, pullIssue12.LoadAttributes(t.Context())) repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue12.RepoID}) - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews", repo3.OwnerName, repo3.Name, pullIssue12.Index). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) reviews = DecodeJSON(t, resp, []*api.PullReview{}) @@ -246,19 +246,19 @@ func TestAPIPullReviewRequest(t *testing.T) { // Test add Review Request session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com", "user8"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // poster of pr can't be reviewer - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user1"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) // test user not exist - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"testOther"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) @@ -267,18 +267,18 @@ func TestAPIPullReviewRequest(t *testing.T) { session2 := loginUser(t, "user4") token2 := getTokenForLoggedInUser(t, session2, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4"}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // doer is not admin - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -289,12 +289,12 @@ func TestAPIPullReviewRequest(t *testing.T) { pull21Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue21.RepoID}) // repo60 user38Session := loginUser(t, "user38") user38Token := getTokenForLoggedInUser(t, user38Session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com"}, }).AddTokenAuth(user38Token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com"}, }).AddTokenAuth(user38Token) MakeRequest(t, req, http.StatusNoContent) @@ -302,12 +302,12 @@ func TestAPIPullReviewRequest(t *testing.T) { // the poster of the PR can add/remove a review request user39Session := loginUser(t, "user39") user39Token := getTokenForLoggedInUser(t, user39Session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(user39Token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(user39Token) MakeRequest(t, req, http.StatusNoContent) @@ -316,12 +316,12 @@ func TestAPIPullReviewRequest(t *testing.T) { pullIssue22 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 22}) assert.NoError(t, pullIssue22.LoadAttributes(t.Context())) pull22Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue22.RepoID}) // repo61 - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.GroupID, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user38"}, }).AddTokenAuth(user39Token) // user39 is from a team with read permission on pull requests unit MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.GroupID, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user38"}, }).AddTokenAuth(user39Token) // user39 is from a team with read permission on pull requests unit MakeRequest(t, req, http.StatusNoContent) @@ -332,35 +332,35 @@ func TestAPIPullReviewRequest(t *testing.T) { repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue12.RepoID}) // Test add Team Review Request - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"team1", "owners"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // Test add Team Review Request to not allowned - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"test_team"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) // Test add Team Review Request to not exist - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"not_exist_team"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) // Test Remove team Review Request - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"team1"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // empty request test - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } @@ -453,7 +453,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { token8 := getTokenForLoggedInUser(t, session8, auth_model.AccessTokenScopeWriteRepository) // user2 request user8 - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -463,7 +463,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 0, 1, 1, false) // user2 request user8 again, it is expected to be ignored - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -473,7 +473,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 0, 1, 1, false) // user8 reviews it as accept - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "APPROVED", Body: "lgtm", }).AddTokenAuth(token8) @@ -489,7 +489,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { assert.NoError(t, err) // user2 request user8 again - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -509,7 +509,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 1, 0, 1, false) // add a new valid approval - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "APPROVED", Body: "lgtm", }).AddTokenAuth(token8) @@ -520,7 +520,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 1, 0, 2, true) // now add a change request witch should dismiss the approval - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "REQUEST_CHANGES", Body: "please change XYZ", }).AddTokenAuth(token8) diff --git a/tests/integration/api_pull_test.go b/tests/integration/api_pull_test.go index 4bc419e5e4..5c6421c29b 100644 --- a/tests/integration/api_pull_test.go +++ b/tests/integration/api_pull_test.go @@ -43,7 +43,7 @@ func TestAPIViewPulls(t *testing.T) { ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls?state=all", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls?state=all", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(ctx.Token) resp := ctx.Session.MakeRequest(t, req, http.StatusOK) @@ -151,7 +151,7 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/master/branch2", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/master/branch2", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(ctx.Token) resp := ctx.Session.MakeRequest(t, req, http.StatusOK) @@ -160,7 +160,7 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { assert.EqualValues(t, 3, pull.Index) assert.EqualValues(t, 2, pull.ID) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/master/branch-not-exist", owner.Name, repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/master/branch-not-exist", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusNotFound) } @@ -181,7 +181,7 @@ func TestAPIMergePullWIP(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge", owner.Name, repo.Name, pr.Index), &forms.MergePullRequestForm{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/merge", owner.Name, repo.GroupID, repo.Name, pr.Index), &forms.MergePullRequestForm{ MergeMessageField: pr.Issue.Title, Do: string(repo_model.MergeStyleMerge), }).AddTokenAuth(token) @@ -271,7 +271,7 @@ func TestAPICreatePullSuccess(t *testing.T) { session := loginUser(t, owner11.Name) prTitle := "test pull request title " + time.Now().String() token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &api.CreatePullRequestOption{ Head: owner11.Name + ":master", Base: "master", Title: prTitle, @@ -305,7 +305,7 @@ func TestAPICreatePullBasePermission(t *testing.T) { AllowMaintainerEdit: new(false), } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to base repo @@ -313,7 +313,7 @@ func TestAPICreatePullBasePermission(t *testing.T) { t.Run("AddUser4AsCollaborator", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) // create again - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // Also test that AllowMaintainerEdit is set to false, the default "true" case is covered by TestAPICreatePullSuccess @@ -338,18 +338,18 @@ func TestAPICreatePullHeadPermission(t *testing.T) { Base: "master", Title: "create a failure pr", } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with read permission ctx := NewAPITestContext(t, repo11.OwnerName, repo11.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithRead", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with write permission t.Run("AddUser4AsCollaboratorWithWrite", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeWrite)) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) } @@ -361,7 +361,7 @@ func TestAPICreatePullSameRepoSuccess(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner.Name, repo.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner.Name, repo.GroupID, repo.Name), &api.CreatePullRequestOption{ Head: owner.Name + ":pr-to-update", Base: "master", Title: "successfully create a PR between branches of the same repository", @@ -392,7 +392,7 @@ func TestAPICreatePullWithFieldsSuccess(t *testing.T) { Labels: []int64{5}, } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), opts). + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), opts). AddTokenAuth(token) res := MakeRequest(t, req, http.StatusCreated) @@ -425,7 +425,7 @@ func TestAPICreatePullWithFieldsFailure(t *testing.T) { Base: "master", } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), opts). + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) opts.Title = "is required" @@ -451,7 +451,7 @@ func TestAPIEditPull(t *testing.T) { session := loginUser(t, owner10.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) title := "create a success pr" - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &api.CreatePullRequestOption{ Head: "develop", Base: "master", Title: title, @@ -462,7 +462,7 @@ func TestAPIEditPull(t *testing.T) { newTitle := "edit a this pr" newBody := "edited body" - req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, apiPull.Index), &api.EditPullRequestOption{ + req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d", owner10.Name, repo10.GroupID, repo10.Name, apiPull.Index), &api.EditPullRequestOption{ Base: "feature/1", Title: newTitle, Body: &newBody, @@ -478,7 +478,7 @@ func TestAPIEditPull(t *testing.T) { unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: pull.Issue.ID, OldTitle: title, NewTitle: newTitle}) unittest.AssertExistsAndLoadBean(t, &issues_model.ContentHistory{IssueID: pull.Issue.ID, ContentText: newBody, IsFirstCreated: false}) - req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, pull.Index), &api.EditPullRequestOption{ + req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d", owner10.Name, repo10.GroupID, repo10.Name, pull.Index), &api.EditPullRequestOption{ Base: "not-exist", }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) @@ -565,11 +565,11 @@ func TestAPICommitPullRequest(t *testing.T) { ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) mergedCommitSHA := "1a8823cd1a9549fde083f992f6b9b87a7ab74fb3" - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/commits/%s/pull", owner.Name, repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/commits/%s/pull", owner.Name, repo.GroupID, repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusOK) invalidCommitSHA := "abcd1234abcd1234abcd1234abcd1234abcd1234" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/commits/%s/pull", owner.Name, repo.Name, invalidCommitSHA).AddTokenAuth(ctx.Token) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/commits/%s/pull", owner.Name, repo.GroupID, repo.Name, invalidCommitSHA).AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_releases_attachment_test.go b/tests/integration/api_releases_attachment_test.go index f6698fbb5e..09bcaf5981 100644 --- a/tests/integration/api_releases_attachment_test.go +++ b/tests/integration/api_releases_attachment_test.go @@ -31,7 +31,7 @@ func testAPIEditReleaseAttachmentWithUnallowedFile(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) filename := "file.bad" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/%d/assets/%d", repoOwner.Name, repo.Name, release.ID, attachment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, release.ID, attachment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "name": filename, }).AddTokenAuth(token) diff --git a/tests/integration/api_releases_test.go b/tests/integration/api_releases_test.go index 7135f2ca36..e128b21dff 100644 --- a/tests/integration/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -46,7 +46,7 @@ func testAPIListReleasesWithWriteToken(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/releases", user2.Name, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", user2.Name, repo.GroupID, repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) apiReleases := DecodeJSON(t, resp, []*api.Release{}) if assert.Len(t, apiReleases, 3) { @@ -155,7 +155,7 @@ func testAPIGetDraftRelease(t *testing.T) { } func createNewReleaseUsingAPI(t *testing.T, token string, owner *user_model.User, repo *repo_model.Repository, name, target, title, desc string) *api.Release { - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases", owner.Name, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", owner.Name, repo.GroupID, repo.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateReleaseOption{ TagName: name, Title: title, @@ -198,7 +198,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) { newRelease := createNewReleaseUsingAPI(t, token, owner, repo, "v0.0.1", target, "v0.0.1", "test") - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/%d", owner.Name, repo.Name, newRelease.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/%d", owner.Name, repo.GroupID, repo.Name, newRelease.ID) req := NewRequest(t, "GET", urlStr). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -244,7 +244,7 @@ func TestAPICreateProtectedTagRelease(t *testing.T) { commit, err := gitRepo.GetBranchCommit("master") assert.NoError(t, err) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/releases", repo.OwnerName, repo.Name), &api.CreateReleaseOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", repo.OwnerName, repo.GroupID, repo.Name), &api.CreateReleaseOption{ TagName: "v0.0.1", Title: "v0.0.1", IsDraft: false, @@ -291,7 +291,7 @@ func TestAPICreateReleaseGivenInvalidTarget(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases", owner.Name, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", owner.Name, repo.GroupID, repo.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateReleaseOption{ TagName: "i-point-to-an-invalid-target", Title: "Invalid Target", @@ -305,7 +305,7 @@ func testAPIGetLatestRelease(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/releases/latest", owner.Name, repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/latest", owner.Name, repo.GroupID, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) release := DecodeJSON(t, resp, &api.Release{}) @@ -319,7 +319,7 @@ func testAPIGetReleaseByTag(t *testing.T) { tag := "v1.1" - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s", owner.Name, repo.Name, tag)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/tags/%s", owner.Name, repo.GroupID, repo.Name, tag)) resp := MakeRequest(t, req, http.StatusOK) release := DecodeJSON(t, resp, &api.Release{}) @@ -328,7 +328,7 @@ func testAPIGetReleaseByTag(t *testing.T) { nonexistingtag := "nonexistingtag" - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s", owner.Name, repo.Name, nonexistingtag)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/tags/%s", owner.Name, repo.GroupID, repo.Name, nonexistingtag)) resp = MakeRequest(t, req, http.StatusNotFound) err := DecodeJSON(t, resp, &api.APIError{}) @@ -378,17 +378,17 @@ func TestAPIDeleteReleaseByTagName(t *testing.T) { createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") // delete release - req := NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/releases/tags/release-tag", owner.Name, repo.Name). + req := NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/releases/tags/release-tag", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) // make sure release is deleted - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/releases/tags/release-tag", owner.Name, repo.Name). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/releases/tags/release-tag", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNotFound) // delete release tag too - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/tags/release-tag", owner.Name, repo.Name). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/tags/release-tag", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) } @@ -406,7 +406,7 @@ func TestAPIUploadAssetRelease(t *testing.T) { bufLargeBytes := bytes.Repeat([]byte{' '}, 2*1024*1024) release := createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") - assetURL := fmt.Sprintf("/api/v1/repos/%s/%s/releases/%d/assets", owner.Name, repo.Name, release.ID) + assetURL := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/%d/assets", owner.Name, repo.GroupID, repo.Name, release.ID) t.Run("multipart/form-data", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/api_repo_archive_test.go b/tests/integration/api_repo_archive_test.go index 97c2c0d54b..cb6382687a 100644 --- a/tests/integration/api_repo_archive_test.go +++ b/tests/integration/api_repo_archive_test.go @@ -30,13 +30,13 @@ func TestAPIDownloadArchive(t *testing.T) { session := loginUser(t, user2.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master.zip", user2.Name, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master.zip", user2.Name, repo.GroupID, repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 320) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master.tar.gz", user2.Name, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master.tar.gz", user2.Name, repo.GroupID, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) @@ -52,13 +52,13 @@ func TestAPIDownloadArchive(t *testing.T) { // The locked URL should give the same bytes as the non-locked one assert.Equal(t, bs, bs2) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master.bundle", user2.Name, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master.bundle", user2.Name, repo.GroupID, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 382) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master", user2.Name, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master", user2.Name, repo.GroupID, repo.Name)) MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusBadRequest) t.Run("GitHubStyle", testAPIDownloadArchiveGitHubStyle) @@ -73,13 +73,13 @@ func testAPIDownloadArchiveGitHubStyle(t *testing.T) { session := loginUser(t, user2.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/zipball/master", user2.Name, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/zipball/master", user2.Name, repo.GroupID, repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 320) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/tarball/master", user2.Name, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/tarball/master", user2.Name, repo.GroupID, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) @@ -95,7 +95,7 @@ func testAPIDownloadArchiveGitHubStyle(t *testing.T) { // The locked URL should give the same bytes as the non-locked one assert.Equal(t, bs, bs2) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/bundle/master", user2.Name, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/bundle/master", user2.Name, repo.GroupID, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) diff --git a/tests/integration/api_repo_avatar_test.go b/tests/integration/api_repo_avatar_test.go index e4d0e06d00..6db35b349d 100644 --- a/tests/integration/api_repo_avatar_test.go +++ b/tests/integration/api_repo_avatar_test.go @@ -40,7 +40,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: base64.StdEncoding.EncodeToString(avatar), } - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name), &opts). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -49,7 +49,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: "Invalid", } - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name), &opts). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusBadRequest) @@ -64,7 +64,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: base64.StdEncoding.EncodeToString(text), } - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name), &opts). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusInternalServerError) } @@ -76,7 +76,7 @@ func TestAPIDeleteRepoAvatar(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } diff --git a/tests/integration/api_repo_collaborator_test.go b/tests/integration/api_repo_collaborator_test.go index f5474b1ed8..4775504bce 100644 --- a/tests/integration/api_repo_collaborator_test.go +++ b/tests/integration/api_repo_collaborator_test.go @@ -32,7 +32,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { testCtx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("RepoOwnerShouldBeOwner", func(t *testing.T) { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, repo2Owner.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, repo2Owner.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -44,7 +44,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithReadAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeRead)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -56,7 +56,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithWriteAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithWriteAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeWrite)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -68,7 +68,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithAdminAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithAdminAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeAdmin)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -78,7 +78,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { }) t.Run("CollaboratorNotFound", func(t *testing.T) { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, "non-existent-user"). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, "non-existent-user"). AddTokenAuth(testCtx.Token) MakeRequest(t, req, http.StatusNotFound) }) @@ -95,7 +95,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { _session := loginUser(t, user5.Name) _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user5.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) @@ -107,7 +107,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { session := loginUser(t, user5.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user5.Name).AddTokenAuth(token) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) repoCollPerm := DecodeJSON(t, resp, &api.RepoCollaboratorPermission{}) @@ -122,7 +122,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { _session := loginUser(t, user5.Name) _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user5.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) @@ -138,7 +138,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { _session := loginUser(t, user10.Name) _testCtx := NewAPITestContext(t, user10.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user11.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user11.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go index 26cc0aad0e..e5a053a199 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -150,7 +150,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.BranchName = branch fileID++ treePath := fmt.Sprintf("new/file%d.txt", fileID) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -184,7 +184,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.NewBranchName = "new_branch" fileID++ treePath := fmt.Sprintf("new/file%d.txt", fileID) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -201,7 +201,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.Message = "" fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusCreated) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -211,7 +211,7 @@ func TestAPICreateFile(t *testing.T) { // Test trying to create a file that already exists, should fail createFileOptions = getCreateFileOptions() treePath = "README.md" - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := &context.APIError{ @@ -225,7 +225,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &createFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -233,14 +233,14 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &createFileOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &createFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &createFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -248,7 +248,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &createFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -256,14 +256,14 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &createFileOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &createFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) diff --git a/tests/integration/api_repo_file_delete_test.go b/tests/integration/api_repo_file_delete_test.go index 96ca39dab9..45bdb9ee31 100644 --- a/tests/integration/api_repo_file_delete_test.go +++ b/tests/integration/api_repo_file_delete_test.go @@ -64,7 +64,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions := getDeleteFileOptions() deleteFileOptions.BranchName = branch - req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). + req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -79,7 +79,7 @@ func TestAPIDeleteFile(t *testing.T) { deleteFileOptions := getDeleteFileOptions() deleteFileOptions.BranchName = repo1.DefaultBranch deleteFileOptions.NewBranchName = "new_branch" - req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). + req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -93,7 +93,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() deleteFileOptions.Message = "" - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -106,7 +106,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() deleteFileOptions.SHA = "badsha" - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) @@ -115,7 +115,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &deleteFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -124,7 +124,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &deleteFileOptions) + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &deleteFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -132,7 +132,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -141,7 +141,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(org3, repo3, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -150,7 +150,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(org3, repo3, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &deleteFileOptions) + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &deleteFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -158,7 +158,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_file_update_test.go b/tests/integration/api_repo_file_update_test.go index 4098beeefd..02274c8c34 100644 --- a/tests/integration/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -133,7 +133,7 @@ func TestAPIUpdateFile(t *testing.T) { createFile(user2, repo1, treePath) updateFileOptions := getUpdateFileOptions() updateFileOptions.BranchName = branch - req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). + req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -163,7 +163,7 @@ func TestAPIUpdateFile(t *testing.T) { fileID++ treePath := fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) - req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). + req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -192,7 +192,7 @@ func TestAPIUpdateFile(t *testing.T) { createFile(user2, repo1, treePath) updateFileOptions.FromPath = treePath treePath = "rename/" + treePath - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -210,7 +210,7 @@ func TestAPIUpdateFile(t *testing.T) { fileID++ treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -224,7 +224,7 @@ func TestAPIUpdateFile(t *testing.T) { updateFileOptions = getUpdateFileOptions() correctSHA := updateFileOptions.SHA updateFileOptions.SHA = "badsha" - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := &context.APIError{ @@ -239,7 +239,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &updateFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -248,7 +248,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &updateFileOptions) + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &updateFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -256,7 +256,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &updateFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -265,7 +265,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(org3, repo3, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &updateFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -274,7 +274,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(org3, repo3, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &updateFileOptions) + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &updateFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -282,7 +282,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_files_change_test.go b/tests/integration/api_repo_files_change_test.go index d518944083..5e3de83357 100644 --- a/tests/integration/api_repo_files_change_test.go +++ b/tests/integration/api_repo_files_change_test.go @@ -90,7 +90,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo1.Name), &changeFilesOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo1.GroupID, repo1.Name), &changeFilesOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -141,7 +141,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[2].Path = deleteTreePath createFile(user2, repo1, updateTreePath) createFile(user2, repo1, deleteTreePath) - url := fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo1.Name) + url := fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo1.GroupID, repo1.Name) req := NewRequestWithJSON(t, "POST", url, &changeFilesOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) @@ -311,7 +311,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo16.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo16.GroupID, repo16.Name), &changeFilesOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -326,7 +326,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo16.Name), &changeFilesOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo16.GroupID, repo16.Name), &changeFilesOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -340,7 +340,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo16.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo16.GroupID, repo16.Name), &changeFilesOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -355,7 +355,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", org3.Name, repo3.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", org3.Name, repo3.GroupID, repo3.Name), &changeFilesOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -370,7 +370,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", org3.Name, repo3.Name), &changeFilesOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", org3.Name, repo3.GroupID, repo3.Name), &changeFilesOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -384,7 +384,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo1.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo1.GroupID, repo1.Name), &changeFilesOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_files_get_test.go b/tests/integration/api_repo_files_get_test.go index 3d299cd655..4320b130a8 100644 --- a/tests/integration/api_repo_files_get_test.go +++ b/tests/integration/api_repo_files_get_test.go @@ -94,13 +94,13 @@ func TestAPIGetRequestedFiles(t *testing.T) { t.Run("PermissionCheck", func(t *testing.T) { filesOptions := &api.GetFilesOptions{Files: []string{"README.md"}} // Test accessing private ref with user token that does not have access - should fail - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/file-contents", user2.Name, repo16.Name), &filesOptions).AddTokenAuth(token4) + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/file-contents", user2.Name, repo16.GroupID, repo16.Name), &filesOptions).AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/file-contents", user2.Name, repo16.Name), &filesOptions).AddTokenAuth(token2) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/file-contents", user2.Name, repo16.GroupID, repo16.Name), &filesOptions).AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/file-contents", org3.Name, repo3.Name), &filesOptions).AddTokenAuth(token2) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/file-contents", org3.Name, repo3.GroupID, repo3.Name), &filesOptions).AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) }) diff --git a/tests/integration/api_repo_get_contents_list_test.go b/tests/integration/api_repo_get_contents_list_test.go index 0b8bc5a8dc..57e51b20ce 100644 --- a/tests/integration/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -92,7 +92,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is default ref ref := repo1.DefaultBranch refType := "branch" - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents?ref=%s", user2.Name, repo1.Name, ref) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) resp := MakeRequest(t, req, http.StatusOK) contentsListResponse := DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -103,7 +103,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // No ref refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", user2.Name, repo1.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", user2.Name, repo1.GroupID, repo1.Name) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -114,7 +114,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is the branch we created above in setup ref = newBranch refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents?ref=%s", user2.Name, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -128,7 +128,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is the new tag we created above in setup ref = newTag refType = "tag" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/?ref=%s", user2.Name, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -142,7 +142,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is a commit ref = commitID refType = "commit" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/?ref=%s", user2.Name, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -151,21 +151,21 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // Test file contents a file with a bad ref ref = "badref" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/?ref=%s", user2.Name, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) MakeRequest(t, req, http.StatusNotFound) // Test accessing private ref with user token that does not have access - should fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", user2.Name, repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", user2.Name, repo16.GroupID, repo16.Name). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", user2.Name, repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", user2.Name, repo16.GroupID, repo16.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", org3.Name, repo3.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", org3.Name, repo3.GroupID, repo3.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/api_repo_get_contents_test.go b/tests/integration/api_repo_get_contents_test.go index bc9a17ff8d..f69e8d7359 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -96,14 +96,14 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { /*** END SETUP ***/ // not found - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/no-such/file.md", user2.Name, repo1.Name) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/no-such/file.md", user2.Name, repo1.GroupID, repo1.Name) resp := MakeRequest(t, req, http.StatusNotFound) assert.Contains(t, resp.Body.String(), "object does not exist [id: , rel_path: no-such]") // ref is default ref ref := repo1.DefaultBranch refType := "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse := DecodeJSON(t, resp, &api.ContentsResponse{}) lastCommit, _ := gitRepo.GetCommitByPath("README.md") @@ -112,7 +112,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // No ref refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) expectedContentsResponse = getExpectedContentsResponseForContents(repo1.DefaultBranch, refType, lastCommit.ID.String()) @@ -121,7 +121,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is the branch we created above in setup ref = newBranch refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) branchCommit, _ := gitRepo.GetBranchCommit(ref) @@ -132,7 +132,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is the new tag we created above in setup ref = newTag refType = "tag" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) tagCommit, _ := gitRepo.GetTagCommit(ref) @@ -143,7 +143,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is a commit ref = commitID refType = "commit" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) expectedContentsResponse = getExpectedContentsResponseForContents(ref, refType, commitID) @@ -151,21 +151,21 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // Test file contents a file with a bad ref ref = "badref" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) MakeRequest(t, req, http.StatusNotFound) // Test accessing private ref with user token that does not have access - should fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/readme.md", user2.Name, repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/readme.md", user2.Name, repo16.GroupID, repo16.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/api_repo_git_blobs_test.go b/tests/integration/api_repo_git_blobs_test.go index d8270ad9f3..7887489a54 100644 --- a/tests/integration/api_repo_git_blobs_test.go +++ b/tests/integration/api_repo_git_blobs_test.go @@ -35,7 +35,7 @@ func TestAPIReposGitBlobs(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) // Test a public repo that anyone can GET the blob of - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo1.Name, repo1ReadmeSHA) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo1.GroupID, repo1.Name, repo1ReadmeSHA) resp := MakeRequest(t, req, http.StatusOK) gitBlobResponse := DecodeJSON(t, resp, &api.GitBlobResponse{}) assert.NotNil(t, gitBlobResponse) @@ -43,30 +43,30 @@ func TestAPIReposGitBlobs(t *testing.T) { assert.Equal(t, expectedContent, *gitBlobResponse.Content) // Tests a private repo with no token so will fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo16.Name, repo16ReadmeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo16.GroupID, repo16.Name, repo16ReadmeSHA) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo16.Name, repo16ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo16.GroupID, repo16.Name, repo16ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using bad sha - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo1.Name, badSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo1.GroupID, repo1.Name, badSHA) MakeRequest(t, req, http.StatusBadRequest) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", org3.Name, repo3.Name, repo3ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3.GroupID, repo3.Name, repo3ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", org3.Name, repo3.Name, repo3ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3.GroupID, repo3.Name, repo3ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", org3.Name, repo3ReadmeSHA, repo3.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3ReadmeSHA, repo3.GroupID, repo3.Name) MakeRequest(t, req, http.StatusNotFound) // Login as User4. @@ -74,6 +74,6 @@ func TestAPIReposGitBlobs(t *testing.T) { token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) // Test using org repo "org3/repo3" where user4 is a NOT collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.Name, token4) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.GroupID, repo3.Name, token4) MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_repo_git_hook_test.go b/tests/integration/api_repo_git_hook_test.go index d8254c6c61..811b2dc835 100644 --- a/tests/integration/api_repo_git_hook_test.go +++ b/tests/integration/api_repo_git_hook_test.go @@ -37,7 +37,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHooks := DecodeJSON(t, resp, []*api.GitHook{}) @@ -62,7 +62,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHooks := DecodeJSON(t, resp, []*api.GitHook{}) @@ -81,7 +81,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) @@ -95,7 +95,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHook := DecodeJSON(t, resp, &api.GitHook{}) @@ -110,7 +110,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) @@ -135,7 +135,7 @@ echo "TestGitHookScript" assert.True(t, apiGitHook.IsActive) assert.Equal(t, testHookContent, apiGitHook.Content) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiGitHook2 := DecodeJSON(t, resp, &api.GitHook{}) @@ -151,7 +151,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name) req := NewRequestWithJSON(t, "PATCH", urlStr, &api.EditGitHookOption{ Content: testHookContent, }).AddTokenAuth(token) @@ -168,11 +168,11 @@ echo "TestGitHookScript" session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHook2 := DecodeJSON(t, resp, &api.GitHook{}) @@ -188,7 +188,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_git_tags_test.go b/tests/integration/api_repo_git_tags_test.go index 9ce1fb6fc1..c72a9df8a4 100644 --- a/tests/integration/api_repo_git_tags_test.go +++ b/tests/integration/api_repo_git_tags_test.go @@ -44,7 +44,7 @@ func TestAPIGitTags(t *testing.T) { aTag, _ := gitRepo.GetTag(aTagName) // SHOULD work for annotated tags - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/tags/%s", user.Name, repo.Name, aTag.ID.String()). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/tags/%s", user.Name, repo.GroupID, repo.Name, aTag.ID.String()). AddTokenAuth(token) res := MakeRequest(t, req, http.StatusOK) @@ -59,7 +59,7 @@ func TestAPIGitTags(t *testing.T) { assert.Equal(t, repo.APIURL()+"/git/tags/"+aTag.ID.String(), tag.URL) // Should NOT work for lightweight tags - badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/tags/%s", user.Name, repo.Name, commit.ID.String()). + badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/tags/%s", user.Name, repo.GroupID, repo.Name, commit.ID.String()). AddTokenAuth(token) MakeRequest(t, badReq, http.StatusBadRequest) } @@ -72,14 +72,14 @@ func TestAPIDeleteTagByName(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/tags/delete-tag", owner.Name, repo.Name)). + req := NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/tags/delete-tag", owner.Name, repo.GroupID, repo.Name)). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) // Make sure that actual releases can't be deleted outright createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") - req = NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/tags/release-tag", owner.Name, repo.Name)). + req = NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/tags/release-tag", owner.Name, repo.GroupID, repo.Name)). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusConflict) } diff --git a/tests/integration/api_repo_git_trees_test.go b/tests/integration/api_repo_git_trees_test.go index 5cfce1044d..21905de63a 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -55,26 +55,26 @@ func TestAPIReposGitTrees(t *testing.T) { "master", // Branch repo1TreeSHA, // Tag } { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", user2.Name, repo16.Name, ref) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", user2.Name, repo16.GroupID, repo16.Name, ref) MakeRequest(t, req, http.StatusNotFound) } // Test using access token for a private repo that the user of the token owns - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", user2.Name, repo16.Name, repo16TreeSHA). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", user2.Name, repo16.GroupID, repo16.Name, repo16TreeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using bad sha - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", user2.Name, repo1.Name, badSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", user2.Name, repo1.GroupID, repo1.Name, badSHA) MakeRequest(t, req, http.StatusBadRequest) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", org3.Name, repo3.Name, repo3TreeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", org3.Name, repo3.GroupID, repo3.Name, repo3TreeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", org3.Name, repo3TreeSHA, repo3.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", org3.Name, repo3TreeSHA, repo3.GroupID, repo3.Name) MakeRequest(t, req, http.StatusNotFound) // Login as User4. @@ -82,6 +82,6 @@ func TestAPIReposGitTrees(t *testing.T) { token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) // Test using org repo "org3/repo3" where user4 is a NOT collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.Name, token4) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.GroupID, repo3.Name, token4) MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_repo_hook_test.go b/tests/integration/api_repo_hook_test.go index e34b3f80f9..c53f9ad939 100644 --- a/tests/integration/api_repo_hook_test.go +++ b/tests/integration/api_repo_hook_test.go @@ -27,7 +27,7 @@ func TestAPICreateHook(t *testing.T) { // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/%s", owner.Name, repo.Name, "hooks"), api.CreateHookOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/%s", owner.Name, repo.GroupID, repo.Name, "hooks"), api.CreateHookOption{ Type: "gitea", Config: api.CreateHookOptionConfig{ "content_type": "json", diff --git a/tests/integration/api_repo_tags_test.go b/tests/integration/api_repo_tags_test.go index 13718040ce..d363ba9242 100644 --- a/tests/integration/api_repo_tags_test.go +++ b/tests/integration/api_repo_tags_test.go @@ -54,14 +54,14 @@ func TestAPIRepoTags(t *testing.T) { assert.Equal(t, newTag.Commit.SHA, respTag.Commit.SHA) // get created tag - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/tags/%s", user.Name, repoName, newTag.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/tags/%s", user.Name, repoName, newTag.GroupID, newTag.Name). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) tag := DecodeJSON(t, resp, &api.Tag{}) assert.Equal(t, newTag, tag) // delete tag - delReq := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/tags/%s", user.Name, repoName, newTag.Name). + delReq := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/tags/%s", user.Name, repoName, newTag.GroupID, newTag.Name). AddTokenAuth(token) MakeRequest(t, delReq, http.StatusNoContent) diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 6b9cef58ae..3bae128e44 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -80,66 +80,66 @@ func TestAPISearchRepo(t *testing.T) { }{ { name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{ - nil: {count: 36}, - user: {count: 36}, - user2: {count: 36}, - }, + nil: {count: 36}, + user: {count: 36}, + user2: {count: 36}, + }, }, { name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesDefault", requestURL: "/api/v1/repos/search?default&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "big_test_"), expectedResults: expectedResults{ - nil: {count: 7, repoName: "big_test_"}, - user: {count: 7, repoName: "big_test_"}, - user2: {count: 7, repoName: "big_test_"}, - }, + nil: {count: 7, repoName: "big_test_"}, + user: {count: 7, repoName: "big_test_"}, + user2: {count: 7, repoName: "big_test_"}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "user2/big_test_"), expectedResults: expectedResults{ - user2: {count: 2, repoName: "big_test_"}, - }, + user2: {count: 2, repoName: "big_test_"}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user.ID), expectedResults: expectedResults{ - nil: {count: 5}, - user: {count: 9, includesPrivate: true}, - user2: {count: 6, includesPrivate: true}, - }, + nil: {count: 5}, + user: {count: 9, includesPrivate: true}, + user2: {count: 6, includesPrivate: true}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser2", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user2.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 2, includesPrivate: true}, - user2: {count: 2, includesPrivate: true}, - user4: {count: 1}, - }, + nil: {count: 1}, + user: {count: 2, includesPrivate: true}, + user2: {count: 2, includesPrivate: true}, + user4: {count: 1}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser3", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", org3.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 4, includesPrivate: true}, - user2: {count: 3, includesPrivate: true}, - org3: {count: 4, includesPrivate: true}, - }, + nil: {count: 1}, + user: {count: 4, includesPrivate: true}, + user2: {count: 3, includesPrivate: true}, + org3: {count: 4, includesPrivate: true}, + }, }, { name: "RepositoriesOwnedByOrganization", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", orgUser.ID), expectedResults: expectedResults{ - nil: {count: 1, repoOwnerID: orgUser.ID}, - user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, - user2: {count: 1, repoOwnerID: orgUser.ID}, - }, + nil: {count: 1, repoOwnerID: orgUser.ID}, + user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, + user2: {count: 1, repoOwnerID: orgUser.ID}, + }, }, {name: "RepositoriesAccessibleAndRelatedToUser4", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user4.ID), expectedResults: expectedResults{ nil: {count: 3}, @@ -553,7 +553,7 @@ func TestAPIRepoTransfer(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) session = loginUser(t, user.Name) token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer", repo.OwnerName, repo.Name), &api.TransferRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer", repo.OwnerName, repo.GroupID, repo.Name), &api.TransferRepoOption{ NewOwner: testCase.newOwner, TeamIDs: testCase.teams, }).AddTokenAuth(token) @@ -584,7 +584,7 @@ func transfer(t *testing.T) *repo_model.Repository { DecodeJSON(t, resp, apiRepo) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer", repo.OwnerName, repo.Name), &api.TransferRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer", repo.OwnerName, repo.GroupID, repo.Name), &api.TransferRepoOption{ NewOwner: "user4", }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) @@ -600,7 +600,7 @@ func TestAPIAcceptTransfer(t *testing.T) { // try to accept with not authorized user session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/reject", repo.OwnerName, repo.Name)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/reject", repo.OwnerName, repo.GroupID, repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -613,7 +613,7 @@ func TestAPIAcceptTransfer(t *testing.T) { session = loginUser(t, "user4") token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/accept", repo.OwnerName, repo.Name)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/accept", repo.OwnerName, repo.GroupID, repo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusAccepted) apiRepo := new(api.Repository) @@ -629,7 +629,7 @@ func TestAPIRejectTransfer(t *testing.T) { // try to reject with not authorized user session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/reject", repo.OwnerName, repo.Name)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/reject", repo.OwnerName, repo.GroupID, repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -642,7 +642,7 @@ func TestAPIRejectTransfer(t *testing.T) { session = loginUser(t, "user4") token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/reject", repo.OwnerName, repo.Name)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/reject", repo.OwnerName, repo.GroupID, repo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiRepo := new(api.Repository) @@ -661,7 +661,7 @@ func TestAPIGenerateRepo(t *testing.T) { // user repo := new(api.Repository) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/generate", templateRepo.OwnerName, templateRepo.Name), &api.GenerateRepoOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/generate", templateRepo.OwnerName, templateRepo.GroupID, templateRepo.Name), &api.GenerateRepoOption{ Owner: user.Name, Name: "new-repo", Description: "test generate repo", @@ -674,7 +674,7 @@ func TestAPIGenerateRepo(t *testing.T) { assert.Equal(t, "new-repo", repo.Name) // org - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/generate", templateRepo.OwnerName, templateRepo.Name), &api.GenerateRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/generate", templateRepo.OwnerName, templateRepo.GroupID, templateRepo.Name), &api.GenerateRepoOption{ Owner: "org3", Name: "new-repo", Description: "test generate repo", @@ -694,7 +694,7 @@ func TestAPIRepoGetReviewers(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/reviewers", user.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/reviewers", user.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) reviewers := DecodeJSON(t, resp, []*api.User{}) @@ -710,7 +710,7 @@ func TestAPIRepoGetAssignees(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/assignees", user.Name, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/assignees", user.Name, repo.GroupID, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) assignees := DecodeJSON(t, resp, []*api.User{}) diff --git a/tests/integration/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go index d0e490d0c9..ae50566d84 100644 --- a/tests/integration/api_repo_topic_test.go +++ b/tests/integration/api_repo_topic_test.go @@ -88,28 +88,28 @@ func TestAPIRepoTopic(t *testing.T) { token2 := getUserToken(t, user2.Name, auth_model.AccessTokenScopeWriteRepository) // Test read topics using login - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/topics", user2.Name, repo2.Name)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/topics", user2.Name, repo2.GroupID, repo2.Name)). AddTokenAuth(token2) res := MakeRequest(t, req, http.StatusOK) topics := DecodeJSON(t, res, &api.TopicName{}) assert.ElementsMatch(t, []string{"topicname1", "topicname2"}, topics.TopicNames) // Test delete a topic - req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "Topicname1"). + req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "Topicname1"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // Test add an existing topic - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "Golang"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "Golang"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // Test add a topic - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "topicName3"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "topicName3"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) - url := fmt.Sprintf("/api/v1/repos/%s/%s/topics", user2.Name, repo2.Name) + url := fmt.Sprintf("/api/v1/repos/%s/%d/%s/topics", user2.Name, repo2.GroupID, repo2.Name) // Test read topics using token req = NewRequest(t, "GET", url). @@ -162,12 +162,12 @@ func TestAPIRepoTopic(t *testing.T) { MakeRequest(t, req, http.StatusUnprocessableEntity) // Test add a topic when there is already maximum - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "t26"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "t26"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) // Test delete a topic that repo doesn't have - req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "Topicname1"). + req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "Topicname1"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNotFound) @@ -175,14 +175,14 @@ func TestAPIRepoTopic(t *testing.T) { token4 := getUserToken(t, user4.Name, auth_model.AccessTokenScopeWriteRepository) // Test read topics with write access - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/topics", org3.Name, repo3.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/topics", org3.Name, repo3.GroupID, repo3.Name)). AddTokenAuth(token4) res = MakeRequest(t, req, http.StatusOK) topics = DecodeJSON(t, res, &api.TopicName{}) assert.Empty(t, topics.TopicNames) // Test add a topic to repo with write access (requires repo admin access) - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", org3.Name, repo3.Name, "topicName"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", org3.Name, repo3.GroupID, repo3.Name, "topicName"). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) } diff --git a/tests/integration/eventsource_test.go b/tests/integration/eventsource_test.go index e0dbd0b23f..3aaa941958 100644 --- a/tests/integration/eventsource_test.go +++ b/tests/integration/eventsource_test.go @@ -70,7 +70,7 @@ func TestEventSourceManagerRun(t *testing.T) { assert.Len(t, apiNL, 2) lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 <- only Notification 4 is in this filter ... - req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?last_read_at=%s", user2.Name, repo1.Name, lastReadAt)). + req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?last_read_at=%s", user2.Name, repo1.GroupID, repo1.Name, lastReadAt)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusResetContent) diff --git a/tests/integration/privateactivity_test.go b/tests/integration/privateactivity_test.go index 4db483a074..d67e1ff04f 100644 --- a/tests/integration/privateactivity_test.go +++ b/tests/integration/privateactivity_test.go @@ -35,7 +35,7 @@ func testPrivateActivityDoSomethingForActionEntries(t *testing.T) { session := loginUser(t, privateActivityTestUser) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues?state=all", owner.Name, repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues?state=all", owner.Name, repoBefore.GroupID, repoBefore.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateIssueOption{ Body: "test", Title: "test", diff --git a/tests/integration/repo_merge_upstream_test.go b/tests/integration/repo_merge_upstream_test.go index e0e47e1a03..efeff817f6 100644 --- a/tests/integration/repo_merge_upstream_test.go +++ b/tests/integration/repo_merge_upstream_test.go @@ -40,7 +40,7 @@ func TestRepoMergeUpstream(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) // create a fork - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks", baseUser.Name, baseRepo.Name), &api.CreateForkOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/forks", baseUser.Name, baseRepo.GroupID, baseRepo.Name), &api.CreateForkOption{ Name: new("test-repo-fork"), }).AddTokenAuth(token) MakeRequest(t, req, http.StatusAccepted) diff --git a/tests/integration/repo_webhook_test.go b/tests/integration/repo_webhook_test.go index 12a11d45bd..88eccff303 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -1025,7 +1025,7 @@ jobs: - run: echo 'cmd 2' ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, repo1.GroupID, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1724,7 +1724,7 @@ jobs: steps: - run: echo 'test the webhook' `) - createWorkflowFile(t, token, "user2", "repo1", ".gitea/workflows/dispatch.yml", opts) + createWorkflowFile(t, token, "user2", "repo1", ".gitea/workflows/dispatch.yml", repo1.GroupID, opts) // 2.2 trigger the webhooks @@ -1746,7 +1746,7 @@ jobs: - run: echo 'cmd 2' ` opts = getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, repo1.GroupID, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1826,7 +1826,7 @@ jobs: - run: echo 'test the webhook' ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, repo1.GroupID, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) From 88c0bf45307db74f8e65cc13ae7076a0f678bd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 21:57:33 -0400 Subject: [PATCH 088/218] add group ID column to repository table's unique constraint --- models/migrations/v1_26/v324.go | 29 ++++++++++------------------- models/repo/repo.go | 2 +- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index 5d96bfa3ca..b70de1901b 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -1,24 +1,15 @@ -// Copyright 2025 The Gitea Authors. All rights reserved. -// SPDX-License-Identifier: MIT - package v1_26 -import ( - "fmt" +import "xorm.io/xorm" - "xorm.io/xorm" -) - -func FixClosedMilestoneCompleteness(x *xorm.Engine) error { - // Update all milestones to recalculate completeness with the new logic: - // - Closed milestones with 0 issues should show 100% - // - All other milestones should calculate based on closed/total ratio - _, err := x.Exec("UPDATE `milestone` SET completeness=(CASE WHEN is_closed = ? AND num_issues = 0 THEN 100 ELSE 100*num_closed_issues/(CASE WHEN num_issues > 0 THEN num_issues ELSE 1 END) END)", - true, - ) - if err != nil { - return fmt.Errorf("error updating milestone completeness: %w", err) +func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error { + type Repository struct { + GroupID int64 `xorm:"UNIQUE(s) INDEX DEFAULT NULL"` + GroupSortOrder int } - - return nil + _, err := x.SyncWithOptions(xorm.SyncOptions{ + IgnoreConstrains: false, + IgnoreIndices: false, + }, new(Repository)) + return err } diff --git a/models/repo/repo.go b/models/repo/repo.go index 46fa842c1f..c1cc129f49 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -220,7 +220,7 @@ type Repository struct { UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"` - GroupID int64 `xorm:"INDEX DEFAULT NULL"` + GroupID int64 `xorm:"UNIQUE(s) INDEX DEFAULT NULL"` GroupSortOrder int `xorm:"INDEX"` } From cd40705a89b7ae658788fe35726984098c8b472d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 17 Aug 2025 22:05:22 -0400 Subject: [PATCH 089/218] add group id segment to repository's `Link` method --- models/repo/repo.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/repo/repo.go b/models/repo/repo.go index c1cc129f49..80fc35a5af 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -608,7 +608,7 @@ func (repo *Repository) RepoPath() string { // 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 @@ -676,7 +676,7 @@ type CloneLink struct { func getGroupSegment(gid int64) string { var groupSegment string if gid > 0 { - groupSegment = fmt.Sprintf("%d", gid) + groupSegment = fmt.Sprintf("group/%d", gid) } return groupSegment } @@ -710,7 +710,7 @@ func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string, group // 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/%s.git", sshUser, sshHost, url.PathEscape(ownerName), groupSegmentWithTrailingSlash(groupID), 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) @@ -719,9 +719,9 @@ func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string, group 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. From c7ae860ae6556aad5fb0065d709a28ca43d2d262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 18 Aug 2025 15:44:08 -0400 Subject: [PATCH 090/218] fix broken hooks --- cmd/hook.go | 17 ++--- models/issues/issue_xref.go | 2 +- models/repo/repo.go | 8 ++- modules/git/url/url.go | 33 +++++++--- modules/markup/html.go | 10 +-- modules/markup/html_codepreview.go | 11 +++- modules/markup/html_issue.go | 1 + modules/private/hook.go | 29 ++++++--- modules/references/references.go | 20 +++++- modules/repository/env.go | 1 + modules/repository/push.go | 1 + routers/api/v1/api.go | 2 +- routers/api/v1/org/team.go | 2 +- routers/api/v1/packages/package.go | 2 +- routers/api/v1/repo/action.go | 2 +- routers/api/v1/repo/issue_dependency.go | 2 +- routers/api/v1/repo/pull.go | 14 ++++- routers/private/actions.go | 2 +- routers/private/hook_post_receive.go | 10 +-- routers/private/internal.go | 4 ++ routers/private/internal_repo.go | 7 ++- routers/private/serv.go | 2 +- routers/web/goget.go | 5 +- routers/web/org/teams.go | 2 +- routers/web/repo/branch.go | 1 + routers/web/repo/editor_fork.go | 2 +- routers/web/repo/editor_util.go | 4 +- routers/web/repo/githttp.go | 2 +- routers/web/repo/star.go | 2 +- routers/web/repo/watch.go | 2 +- routers/web/shared/user/header.go | 2 +- routers/web/web.go | 44 ++++++------- services/context/repo.go | 7 ++- services/issue/commit.go | 2 +- services/lfs/locks.go | 11 ++-- services/lfs/server.go | 9 ++- services/markup/renderhelper_codepreview.go | 2 +- .../markup/renderhelper_issueicontitle.go | 2 +- services/packages/cargo/index.go | 4 +- services/repository/branch.go | 1 + services/repository/lfs_test.go | 2 +- services/repository/push.go | 2 +- tests/integration/actions_job_test.go | 4 +- tests/integration/actions_trigger_test.go | 8 +-- tests/integration/api_branch_test.go | 18 +++--- .../api_helper_for_declarative_test.go | 5 +- tests/integration/api_packages_cargo_test.go | 2 +- tests/integration/api_repo_lfs_test.go | 4 +- tests/integration/editor_test.go | 26 ++++---- tests/integration/git_general_test.go | 18 +++--- tests/integration/lfs_getobject_test.go | 4 +- tests/integration/repo_search_test.go | 4 +- tests/integration/repo_webhook_test.go | 62 +++++++++---------- 53 files changed, 270 insertions(+), 175 deletions(-) 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/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/repo/repo.go b/models/repo/repo.go index 80fc35a5af..e24dee8fbd 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -808,11 +808,12 @@ 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 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 { @@ -824,10 +825,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) @@ -845,7 +847,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 diff --git a/modules/git/url/url.go b/modules/git/url/url.go index aa6fa31c5e..d137de8f5b 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 } @@ -121,16 +123,25 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er ret := &RepositoryURL{} ret.GitURL = parsed - fillPathParts := func(s string) { + fillPathParts := func(s string) error { 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 { + if len(fields) >= 3 { + ret.GroupID, pathErr = strconv.ParseInt(fields[1], 10, 64) + if pathErr != nil { + return pathErr + } + ret.RepoName = strings.TrimSuffix(fields[2], ".git") + ret.RemainingPath = "/" + fields[3] + } else { + ret.RepoName = strings.TrimSuffix(fields[1], ".git") ret.RemainingPath = "/" + fields[2] } } + return nil } switch parsed.URL.Scheme { @@ -138,7 +149,9 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er if !httplib.IsCurrentGiteaSiteURL(ctx, repoURL) { return ret, nil } - fillPathParts(strings.TrimPrefix(parsed.URL.Path, setting.AppSubURL)) + if err = fillPathParts(strings.TrimPrefix(parsed.URL.Path, setting.AppSubURL)); err != nil { + return nil, err + } case "ssh", "git+ssh": domainSSH := setting.SSH.Domain domainCur := httplib.GuessCurrentHostDomain(ctx) @@ -152,7 +165,9 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er // check whether URL domain is current domain from context domainMatches = domainMatches || (domainCur != "" && domainCur == urlDomain) if domainMatches { - fillPathParts(parsed.URL.Path) + if err = fillPathParts(parsed.URL.Path); err != nil { + return nil, err + } } } return ret, nil @@ -161,7 +176,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/markup/html.go b/modules/markup/html.go index 0fe37ae305..4c3a43c511 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..b8884d396e 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("%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/references/references.go b/modules/references/references.go index ef3568ebea..79f977137d 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-_\.]+/(?:\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, @@ -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) > 3 { return nil } - owner, name := parts[0], parts[1] + if len(parts) == 3 { + owner, rawGroup, name = parts[0], parts[1], parts[2] + } 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..a232d3a727 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" 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/routers/api/v1/api.go b/routers/api/v1/api.go index c89663a232..3c307d405c 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -178,7 +178,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) 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 7b7104ef84..de912258ad 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -2019,7 +2019,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..2bbe947e8c 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, ctx.PathParamInt64("group_id")) 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..d506cec232 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -256,15 +256,23 @@ 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/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..dc965c6003 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -64,9 +64,13 @@ 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_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_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_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_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}/{repo}", ServCommand) 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/goget.go b/routers/web/goget.go index 6a769f973c..9321375c00 100644 --- a/routers/web/goget.go +++ b/routers/web/goget.go @@ -55,8 +55,8 @@ 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 } @@ -76,7 +76,6 @@ func goGet(ctx *context.Context) { goGetImport := context.ComposeGoGetImport(ctx, ownerName, trimmedRepoName) var cloneURL string - gid, _ := strconv.ParseInt(group, 10, 64) if setting.Repository.GoGetCloneURLProtocol == "ssh" { cloneURL = repo_model.ComposeSSHCloneURL(ctx.Doer, ownerName, repoName, gid) } else { 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/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/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/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/web.go b/routers/web/web.go index bf3a297858..81f48dd7d2 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1284,7 +1284,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/pulls/new/*", repo.PullsNewRedirect) } m.Group("/{username}/{reponame}", rootRepoFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) - m.Group("/{username}/{group_id}{reponame}", rootRepoFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) + m.Group("/{username}/{group_id}/{reponame}", rootRepoFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) // end "/{username}/{group_id}/{reponame}": repo code: find, compare, list addIssuesPullsViewRoutes := func() { @@ -1302,10 +1302,10 @@ 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_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_id}/reponame}/{type:issues}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests)) - m.Group("/{username}/reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) - m.Group("/{username}/{group_id}/reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) + m.Group("/{username}/{group_id}/{reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) + m.Group("/{username}/{reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) repoIssueAttachmentFn := func() { m.Get("/comments/{id}/attachments", repo.GetCommentAttachments) @@ -1315,16 +1315,16 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/issues/suggestions", repo.IssueSuggestions) } - m.Group("/{username}/{reponame}", repoIssueAttachmentFn, optSignIn, context.RepoAssignment, reqRepoIssuesOrPullsReader) // issue/pull attachments, labels, milestones m.Group("/{username}/{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) } - m.Group("/{username}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) m.Group("/{username}/{group_id}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) + m.Group("/{username}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) // end "/{username}/{group_id}/{reponame}": issue/pull list, issue/pull view, external tracker editIssueFn := func() { // edit issues, pulls, labels, milestones, etc @@ -1416,8 +1416,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }, reqUnitPullsReader) m.Post("/pull/{index}/target_branch", reqUnitPullsReader, repo.UpdatePullRequestTarget) } - m.Group("/{username}/{reponame}", editIssueFn, reqSignIn, context.RepoAssignment, context.RepoMustNotBeArchived()) m.Group("/{username}/{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 codeFn := func() { // repo code (at least "code reader") @@ -1469,8 +1469,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Combo("/fork").Get(repo.Fork).Post(web.Bind(forms.CreateRepoForm{}), repo.ForkPost) } - m.Group("/{username}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader) m.Group("/{username}/{group_id}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader) + m.Group("/{username}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader) // end "/{username}/{group_id}/{reponame}": repo code repoTagFn := func() { // repo tags @@ -1482,8 +1482,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }, ctxDataSet("EnableFeed", setting.Other.EnableFeed)) m.Post("/tags/delete", reqSignIn, reqRepoCodeWriter, context.RepoMustNotBeArchived(), repo.DeleteTag) } - m.Group("/{username}/{reponame}", repoTagFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqUnitCodeReader) m.Group("/{username}/{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 repoReleaseFn := func() { // repo releases @@ -1509,30 +1509,30 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Post("/edit/*", web.Bind(forms.EditReleaseForm{}), repo.EditReleasePost) }, reqSignIn, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, repo.CommitInfoCache) } - m.Group("/{username}/{reponame}", repoReleaseFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoReleaseReader) m.Group("/{username}/{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 repoAttachmentsFn := func() { // to maintain compatibility with old attachments m.Get("/attachments/{uuid}", webAuth.AllowBasic, webAuth.AllowOAuth2, repo.GetAttachment) } - m.Group("/{username}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment) m.Group("/{username}/{group_id}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment) + m.Group("/{username}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment) // end "/{username}/{group_id}/{reponame}": compatibility with old attachments repoTopicFn := func() { m.Post("/topics", repo.TopicsPost) } - m.Group("/{username}/{reponame}", repoTopicFn, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived()) m.Group("/{username}/{group_id}/{reponame}", repoTopicFn, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived()) + m.Group("/{username}/{reponame}", repoTopicFn, context.RepoAssignment, reqRepoAdmin, context.RepoMustNotBeArchived()) repoPackageFn := func() { if setting.Packages.Enabled { m.Get("/packages", repo.Packages) } } - m.Group("/{username}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) m.Group("/{username}/{group_id}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) + m.Group("/{username}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) repoProjectsFn := func() { m.Get("", repo.Projects) @@ -1559,8 +1559,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) }, reqRepoProjectsWriter, context.RepoMustNotBeArchived()) } - m.Group("/{username}/{reponame}/projects", repoProjectsFn, optSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects) m.Group("/{username}/{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" repoActionsFn := func() { @@ -1600,8 +1600,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/badge.svg", webAuth.AllowBasic, webAuth.AllowOAuth2, actions.GetWorkflowBadge) }) } - m.Group("/{username}/{reponame}/actions", repoActionsFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoActionsReader, actions.MustEnableActions) m.Group("/{username}/{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" repoWikiFn := func() { @@ -1616,11 +1616,11 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/commit/{sha:[a-f0-9]{7,64}}.{ext:patch|diff}", repo.RawDiff) m.Get("/raw/*", repo.WikiRaw) } - m.Group("/{username}/{reponame}/wiki", repoWikiFn, optSignIn, context.RepoAssignment, repo.MustEnableWiki, reqUnitWikiReader, func(ctx *context.Context) { + m.Group("/{username}/{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) }) - m.Group("/{username}/{group_id}/{reponame}/wiki", repoWikiFn, optSignIn, context.RepoAssignment, repo.MustEnableWiki, reqUnitWikiReader, func(ctx *context.Context) { + 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) }) @@ -1646,11 +1646,11 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) }, reqUnitCodeReader) } - m.Group("/{username}/{reponame}/activity", activityFn, + m.Group("/{username}/{group_id}/{reponame}/activity", activityFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, context.RequireUnitReader(unit.TypeCode, unit.TypeIssues, unit.TypePullRequests, unit.TypeReleases), ) - m.Group("/{username}/{group_id}/{reponame}/activity", activityFn, + m.Group("/{username}/{reponame}/activity", activityFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, context.RequireUnitReader(unit.TypeCode, unit.TypeIssues, unit.TypePullRequests, unit.TypeReleases), ) @@ -1684,8 +1684,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) }) } - m.Group("/{username}/{reponame}", repoPullFn, optSignIn, context.RepoAssignment, repo.MustAllowPulls, reqUnitPullsReader) m.Group("/{username}/{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 repoCodeFn := func() { @@ -1768,8 +1768,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { 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) } - m.Group("/{username}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) m.Group("/{username}/{group_id}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) + m.Group("/{username}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) // end "/{username}/{group_id}/{reponame}": repo code fn := func() { @@ -1780,8 +1780,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Post("/action/{action:watch|unwatch}", reqSignIn, repo.ActionWatch) m.Post("/action/{action:accept_transfer|reject_transfer}", reqSignIn, repo.ActionTransfer) } - m.Group("/{username}/{reponame}", fn, optSignIn, context.RepoAssignment) m.Group("/{username}/{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/repo.go b/services/context/repo.go index 44cf02595c..295c371ae7 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -12,6 +12,7 @@ import ( "net/http" "net/url" "path" + "regexp" "strconv" "strings" @@ -387,6 +388,8 @@ func EarlyResponseForGoGetMeta(ctx *Context) { 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") @@ -398,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(), @@ -566,7 +571,7 @@ 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) + 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) 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/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/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/tests/integration/actions_job_test.go b/tests/integration/actions_job_test.go index b8bef76904..1b374d21f5 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -474,7 +474,7 @@ func TestActionsGiteaContext(t *testing.T) { apiBaseRepo := createActionsTestRepo(t, user2Token, "actions-gitea-context", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) runner := newMockRunner() runner.registerAsRepoRunner(t, baseRepo.OwnerName, baseRepo.Name, "mock-runner", []string{"ubuntu-latest"}, false) @@ -558,7 +558,7 @@ func TestActionsGiteaContextEphemeral(t *testing.T) { apiBaseRepo := createActionsTestRepo(t, user2Token, "actions-gitea-context", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) runner := newMockRunner() runner.registerAsRepoRunner(t, baseRepo.OwnerName, baseRepo.Name, "mock-runner", []string{"ubuntu-latest"}, true) diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 7beaced78c..9c077eed7d 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -61,7 +61,7 @@ func TestPullRequestTargetEvent(t *testing.T) { assert.NotEmpty(t, baseRepo) // add user4 as the collaborator - ctx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithReadAccess", doAPIAddCollaborator(ctx, "user4", perm.AccessModeRead)) // create the forked repo @@ -487,7 +487,7 @@ func TestPullRequestCommitStatusEvent(t *testing.T) { assert.NotEmpty(t, repo) // add user4 as the collaborator - ctx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithReadAccess", doAPIAddCollaborator(ctx, "user4", perm.AccessModeRead)) // add the workflow file to the repo @@ -1542,7 +1542,7 @@ func TestClosePullRequestWithPath(t *testing.T) { // create the base repo apiBaseRepo := createActionsTestRepo(t, user2Token, "close-pull-request-with-path", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) // init the workflow wfTreePath := ".gitea/workflows/pull.yml" @@ -1570,7 +1570,7 @@ jobs: resp := MakeRequest(t, req, http.StatusAccepted) apiForkRepo := DecodeJSON(t, resp, &api.Repository{}) forkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiForkRepo.ID}) - user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, forkRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) // user4 creates a pull request to add file "app/main.go" doAPICreateFile(user4APICtx, "app/main.go", &api.CreateFileOptions{ diff --git a/tests/integration/api_branch_test.go b/tests/integration/api_branch_test.go index d67ba98f7c..ad555c6c55 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -111,7 +111,7 @@ func TestAPICreateBranch(t *testing.T) { func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { username := "user2" - ctx := NewAPITestContext(t, username, "my-noo-repo", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, username, "my-noo-repo", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) giteaURL.Path = ctx.GitPath() t.Run("CreateRepo", doAPICreateRepository(ctx, false)) @@ -162,14 +162,18 @@ func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { for _, test := range testCases { session := ctx.Session t.Run(test.NewBranch, func(t *testing.T) { - testAPICreateBranch(t, session, "user2", "my-noo-repo", test.OldBranch, test.NewBranch, test.ExpectedHTTPStatus) + testAPICreateBranch(t, session, 0, "user2", "my-noo-repo", test.OldBranch, test.NewBranch, test.ExpectedHTTPStatus) }) } } -func testAPICreateBranch(t testing.TB, session *TestSession, user, repo, oldBranch, newBranch string, status int) bool { +func testAPICreateBranch(t testing.TB, session *TestSession, groupID int64, user, repo, oldBranch, newBranch string, status int) bool { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+repo+"/branches", &api.CreateBranchRepoOption{ + var groupSegment string + if groupID > 0 { + groupSegment = fmt.Sprintf("%d/", groupID) + } + req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+groupSegment+repo+"/branches", &api.CreateBranchRepoOption{ BranchName: newBranch, OldBranchName: oldBranch, }).AddTokenAuth(token) @@ -277,7 +281,7 @@ func TestAPIUpdateBranchReference(t *testing.T) { defer tests.PrepareTestEnv(t)() onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { - ctx := NewAPITestContext(t, "user2", "update-branch", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", "update-branch", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) giteaURL.Path = ctx.GitPath() var defaultBranch string @@ -420,10 +424,10 @@ func TestAPICreateBranchWithSyncBranches(t *testing.T) { assert.NoError(t, err) onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { - ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) giteaURL.Path = ctx.GitPath() - testAPICreateBranch(t, ctx.Session, "user2", "repo1", "", "new_branch", http.StatusCreated) + testAPICreateBranch(t, ctx.Session, 0, "user2", "repo1", "", "new_branch", http.StatusCreated) }) branches, err = db.Find[git_model.Branch](t.Context(), git_model.FindBranchOptions{ diff --git a/tests/integration/api_helper_for_declarative_test.go b/tests/integration/api_helper_for_declarative_test.go index 77ce392b4b..0911d55da5 100644 --- a/tests/integration/api_helper_for_declarative_test.go +++ b/tests/integration/api_helper_for_declarative_test.go @@ -29,9 +29,10 @@ type APITestContext struct { Token string Username string ExpectedCode int + GroupID int64 } -func NewAPITestContext(t *testing.T, username, reponame string, scope ...auth.AccessTokenScope) APITestContext { +func NewAPITestContext(t *testing.T, username, reponame string, groupID int64, scope ...auth.AccessTokenScope) APITestContext { session := loginUser(t, username) if len(scope) == 0 { // FIXME: legacy logic: no scope means all @@ -41,6 +42,7 @@ func NewAPITestContext(t *testing.T, username, reponame string, scope ...auth.Ac return APITestContext{ Session: session, Token: token, + GroupID: groupID, Username: username, Reponame: reponame, } @@ -60,6 +62,7 @@ func doAPICreateRepository(ctx APITestContext, empty bool, callback ...func(*tes Template: true, Gitignores: "", License: "WTFPL", + GroupID: ctx.GroupID, Readme: "Default", } req := NewRequestWithJSON(t, "POST", "/api/v1/user/repos", createRepoOption). 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_repo_lfs_test.go b/tests/integration/api_repo_lfs_test.go index 47bf244ee6..1cc1ab2d1a 100644 --- a/tests/integration/api_repo_lfs_test.go +++ b/tests/integration/api_repo_lfs_test.go @@ -61,10 +61,10 @@ func TestAPILFSMediaType(t *testing.T) { } func createLFSTestRepository(t *testing.T, repoName string) *repo_model.Repository { - ctx := NewAPITestContext(t, "user2", repoName, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", repoName, 0, 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/editor_test.go b/tests/integration/editor_test.go index 4a06159690..fc120270bc 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -37,8 +37,8 @@ func TestEditor(t *testing.T) { t.Run("DiffPreview", testEditorDiffPreview) t.Run("CreateFile", testEditorCreateFile) t.Run("EditFile", func(t *testing.T) { - testEditFile(t, sessionUser2, "user2", "repo1", "master", "README.md", "Hello, World (direct)\n") - testEditFileToNewBranch(t, sessionUser2, "user2", "repo1", "master", "feature/test", "README.md", "Hello, World (commit-to-new-branch)\n") + testEditFile(t, sessionUser2, 0, "user2", "repo1", "master", "README.md", "Hello, World (direct)\n") + testEditFileToNewBranch(t, sessionUser2, 0, "user2", "repo1", "master", "feature/test", "README.md", "Hello, World (commit-to-new-branch)\n") }) t.Run("PatchFile", testEditorPatchFile) t.Run("DeleteFile", func(t *testing.T) { @@ -57,7 +57,7 @@ func TestEditor(t *testing.T) { func testEditorCreateFile(t *testing.T) { session := loginUser(t, "user2") - testCreateFile(t, session, "user2", "repo1", "master", "", "test.txt", "Content") + testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test.txt", "Content") testEditorActionPostRequestError(t, session, "/user2/repo1/_new/master/", map[string]string{ "tree_path": "test.txt", "commit_choice": "direct", @@ -70,12 +70,12 @@ func testEditorCreateFile(t *testing.T) { }, `Branch "master" already exists in this repository.`) } -func testCreateFile(t *testing.T, session *TestSession, user, repo, baseBranchName, newBranchName, filePath, content string) { +func testCreateFile(t *testing.T, session *TestSession, groupID int64, user, repo, baseBranchName, newBranchName, filePath, content string) { commitChoice := "direct" if newBranchName != "" && newBranchName != baseBranchName { commitChoice = "commit-to-new-branch" } - testEditorActionEdit(t, session, user, repo, "_new", baseBranchName, "", map[string]string{ + testEditorActionEdit(t, session, groupID, user, repo, "_new", baseBranchName, "", map[string]string{ "tree_path": filePath, "content": content, "commit_choice": commitChoice, @@ -118,10 +118,14 @@ func testEditorActionPostRequestError(t *testing.T, session *TestSession, reques assert.Equal(t, errorMessage, test.ParseJSONError(resp.Body.Bytes()).ErrorMessage) } -func testEditorActionEdit(t *testing.T, session *TestSession, user, repo, editorAction, branch, filePath string, params map[string]string) *httptest.ResponseRecorder { +func testEditorActionEdit(t *testing.T, session *TestSession, groupID int64, user, repo, editorAction, branch, filePath string, params map[string]string) *httptest.ResponseRecorder { params["tree_path"] = util.IfZero(params["tree_path"], filePath) newBranchName := util.Iif(params["commit_choice"] == "direct", branch, params["new_branch_name"]) - resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s/%s/%s/%s", user, repo, editorAction, branch, filePath), params) + var groupSegment string + if groupID > 0 { + groupSegment = fmt.Sprintf("%d/", groupID) + } + resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s%s/%s/%s/%s", user, groupSegment, repo, editorAction, branch, filePath), params) assert.Equal(t, http.StatusOK, resp.Code) assert.NotEmpty(t, test.RedirectURL(resp)) req := NewRequest(t, "GET", "/"+path.Join(user, repo, "raw/branch", newBranchName, params["tree_path"])) @@ -130,15 +134,15 @@ func testEditorActionEdit(t *testing.T, session *TestSession, user, repo, editor return resp } -func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePath, newContent string) { - testEditorActionEdit(t, session, user, repo, "_edit", branch, filePath, map[string]string{ +func testEditFile(t *testing.T, session *TestSession, groupID int64, user, repo, branch, filePath, newContent string) { + testEditorActionEdit(t, session, groupID, user, repo, "_edit", branch, filePath, map[string]string{ "content": newContent, "commit_choice": "direct", }) } -func testEditFileToNewBranch(t *testing.T, session *TestSession, user, repo, branch, targetBranch, filePath, newContent string) { - testEditorActionEdit(t, session, user, repo, "_edit", branch, filePath, map[string]string{ +func testEditFileToNewBranch(t *testing.T, session *TestSession, groupID int64, user, repo, branch, targetBranch, filePath, newContent string) { + testEditorActionEdit(t, session, groupID, user, repo, "_edit", branch, filePath, map[string]string{ "content": newContent, "commit_choice": "commit-to-new-branch", "new_branch_name": targetBranch, diff --git a/tests/integration/git_general_test.go b/tests/integration/git_general_test.go index b82dd60021..e249e0173d 100644 --- a/tests/integration/git_general_test.go +++ b/tests/integration/git_general_test.go @@ -51,11 +51,11 @@ func TestGitGeneral(t *testing.T) { func testGitGeneral(t *testing.T, u *url.URL) { username := "user2" - baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() - forkedUserCtx := NewAPITestContext(t, "user4", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + forkedUserCtx := NewAPITestContext(t, "user4", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("HTTP", func(t *testing.T) { defer tests.PrintCurrentTest(t)() @@ -370,7 +370,7 @@ func generateCommitWithNewData(ctx context.Context, size int, repoPath, email, f func doCreateProtectedBranch(baseCtx *APITestContext, dstPath string) func(t *testing.T) { return func(t *testing.T) { defer tests.PrintCurrentTest(t)() - ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) t.Run("ProtectBranchWithFilePatterns", doProtectBranch(ctx, "release-*", baseCtx.Username, "", "", "config*")) @@ -401,7 +401,7 @@ func doBranchProtectPRMerge(baseCtx *APITestContext, dstPath string) func(t *tes t.Run("CreateBranchProtected", doGitCreateBranch(dstPath, "protected")) t.Run("PushProtectedBranch", doGitPushTestRepository(dstPath, "origin", "protected")) - ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) // Protect branch without any whitelisting t.Run("ProtectBranchNoWhitelist", doProtectBranch(ctx, "protected", "", "", "", "")) @@ -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, ctx.GroupID) assert.NoError(t, err) assert.False(t, repo.IsEmpty) assert.True(t, repo.IsPrivate) @@ -700,9 +700,9 @@ func doAutoPRMerge(baseCtx *APITestContext, dstPath string) func(t *testing.T) { return func(t *testing.T) { defer tests.PrintCurrentTest(t)() - ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) - collaboratorCtx := NewAPITestContext(t, "user5", baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) - readOnlyCtx := NewAPITestContext(t, "user4", baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) + collaboratorCtx := NewAPITestContext(t, "user5", baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) + readOnlyCtx := NewAPITestContext(t, "user4", baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) t.Run("AddAutoMergeCollaborator", doAPIAddCollaborator(*baseCtx, collaboratorCtx.Username, perm.AccessModeWrite)) t.Run("AddReadOnlyAutoMergeCollaborator", doAPIAddCollaborator(*baseCtx, readOnlyCtx.Username, perm.AccessModeRead)) @@ -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, ctx.GroupID) 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/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_webhook_test.go b/tests/integration/repo_webhook_test.go index 88eccff303..c940fe3893 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -68,7 +68,7 @@ func TestNewWebHookLink(t *testing.T) { } } -func testAPICreateWebhookForRepo(t *testing.T, session *TestSession, userName, repoName, url, event string, branchFilter ...string) { +func testAPICreateWebhookForRepo(t *testing.T, session *TestSession, groupID int64, userName, repoName, url, event string, branchFilter ...string) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) var branchFilterString string if len(branchFilter) > 0 { @@ -157,10 +157,10 @@ func Test_WebhookCreate(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "create") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "create") // 2. trigger the webhook - testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) // 3. validate the webhook is triggered assert.Len(t, payloads, 1) @@ -189,10 +189,10 @@ func Test_WebhookDelete(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "delete") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "delete") // 2. trigger the webhook - testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) testAPIDeleteBranch(t, "master2", http.StatusNoContent) // 3. validate the webhook is triggered @@ -222,7 +222,7 @@ func Test_WebhookFork(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user1") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "fork") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "fork") // 2. trigger the webhook testRepoFork(t, session, "user2", "repo1", "user1", "repo1-fork", "master") @@ -254,7 +254,7 @@ func Test_WebhookIssueComment(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issue_comment") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issue_comment") t.Run("create comment", func(t *testing.T) { // 2. trigger the webhook @@ -336,7 +336,7 @@ func Test_WebhookRelease(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "release") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "release") // 2. trigger the webhook createNewRelease(t, session, "/user2/repo1", "v0.0.99", "v0.0.99", false, false) @@ -369,10 +369,10 @@ func Test_WebhookPush(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "push") // 2. trigger the webhook - testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") // 3. validate the webhook is triggered assert.Equal(t, "push", triggeredEvent) @@ -402,10 +402,10 @@ func Test_WebhookPushDevBranch(t *testing.T) { session := loginUser(t, "user2") // only for dev branch - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push", "develop") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "push", "develop") // 2. this should not trigger the webhook - testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") assert.Empty(t, triggeredEvent) assert.Empty(t, payloads) @@ -418,7 +418,7 @@ func Test_WebhookPushDevBranch(t *testing.T) { assert.NoError(t, err) // 3. trigger the webhook - testCreateFile(t, session, "user2", "repo1", "develop", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, 0, "user2", "repo1", "develop", "", "test_webhook_push.md", "# a test file for webhook push") afterCommitID, err := gitRepo.GetBranchCommitID("develop") assert.NoError(t, err) @@ -458,7 +458,7 @@ func Test_WebhookPushToNewBranch(t *testing.T) { session := loginUser(t, "user2") // only for dev branch - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push", "new_branch") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "push", "new_branch") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) gitRepo, err := gitrepo.OpenRepository(t.Context(), repo1) @@ -469,7 +469,7 @@ func Test_WebhookPushToNewBranch(t *testing.T) { assert.NoError(t, err) // 2. trigger the webhook - testCreateFile(t, session, "user2", "repo1", "master", "new_branch", "test_webhook_push.md", "# a new push from new branch") + testCreateFile(t, session, 0, "user2", "repo1", "master", "new_branch", "test_webhook_push.md", "# a new push from new branch") afterCommitID, err := gitRepo.GetBranchCommitID("new_branch") assert.NoError(t, err) @@ -509,7 +509,7 @@ func Test_WebhookIssue(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issues") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issues") // 2. trigger the webhook testNewIssue(t, session, "user2", "repo1", "Title1", "Description1") @@ -543,7 +543,7 @@ func Test_WebhookIssueDelete(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issues") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issues") issueURL := testNewIssue(t, session, "user2", "repo1", "Title1", "Description1") // 2. trigger the webhook @@ -580,7 +580,7 @@ func Test_WebhookIssueAssign(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "pull_request_assign") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "pull_request_assign") // 2. trigger the webhook, issue 2 is a pull request testIssueAssign(t, session, repo1.Link(), 2, user2.ID) @@ -614,7 +614,7 @@ func Test_WebhookIssueMilestone(t *testing.T) { // create a new webhook with special webhook for repo1 session := loginUser(t, "user2") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issue_milestone") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issue_milestone") t.Run("assign a milestone", func(t *testing.T) { // trigger the webhook @@ -692,9 +692,9 @@ func Test_WebhookPullRequest(t *testing.T) { sessionUser4 := loginUser(t, "user4") // ignore the possible review_requested event to keep the test deterministic - testAPICreateWebhookForRepo(t, sessionUser2, "user2", "repo1", provider.URL(), "pull_request_only") + testAPICreateWebhookForRepo(t, sessionUser2, 0, "user2", "repo1", provider.URL(), "pull_request_only") - testAPICreateBranch(t, sessionUser2, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, sessionUser2, 0, "user2", "repo1", "master", "master2", http.StatusCreated) // 2. trigger the webhook repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) testPullCreateDirectly(t, sessionUser4, createPullRequestOptions{ @@ -739,9 +739,9 @@ func Test_WebhookPullRequestDelete(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "pull_request") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "pull_request") - testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) issueURL := testCreatePullToDefaultBranch(t, session, repo1, repo1, "master2", "first pull request") @@ -778,10 +778,10 @@ func Test_WebhookPullRequestComment(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "pull_request_comment") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "pull_request_comment") // 2. trigger the webhook - testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) prID := testCreatePullToDefaultBranch(t, session, repo1, repo1, "master2", "first pull request") @@ -816,7 +816,7 @@ func Test_WebhookWiki(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "wiki") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "wiki") // 2. trigger the webhook testAPICreateWikiPage(t, session, "user2", "repo1", "Test Wiki Page", http.StatusCreated) @@ -922,7 +922,7 @@ func Test_WebhookStatus(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "status") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "status") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -966,7 +966,7 @@ func Test_WebhookStatus_NoWrongTrigger(t *testing.T) { testCreateWebhookForRepo(t, session, "gitea", "user2", "repo1", provider.URL(), "push_only") // 2. trigger the webhook with a push action - testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") // 3. validate the webhook is triggered with right event assert.Equal(t, "push", trigger) @@ -995,7 +995,7 @@ func Test_WebhookWorkflowJob(t *testing.T) { session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "workflow_job") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "workflow_job") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1700,7 +1700,7 @@ func testWebhookWorkflowRun(t *testing.T, webhookData *workflowRunWebhook) { session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1801,7 +1801,7 @@ func testWebhookWorkflowRunDepthLimit(t *testing.T, webhookData *workflowRunWebh session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) From fcaf2c72231ca92ca1087d72235f399159a85826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 18 Aug 2025 15:55:09 -0400 Subject: [PATCH 091/218] make it more apparent in URLs that a repo is part of a group --- routers/api/v1/api.go | 14 +++++------ routers/common/lfs.go | 2 +- routers/private/internal.go | 8 +++---- routers/web/githttp.go | 2 +- routers/web/web.go | 48 ++++++++++++++++++------------------- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 3c307d405c..8ec1c195f8 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1166,7 +1166,7 @@ func Routes() *web.Router { m.Delete("", user.Unstar) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/{group_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) + m.Group("/{username}/group/{group_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) }, reqStarsEnabled(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository)) m.Get("/times", repo.ListMyTrackedTimes) m.Get("/stopwatches", repo.GetStopwatches) @@ -1513,13 +1513,13 @@ func Routes() *web.Router { m.Methods("HEAD,GET", "/{ball_type:tarball|zipball|bundle}/*", reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(true), repo.DownloadArchive) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/{group_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) + m.Group("/{username}/group/{group_id}/{reponame}", fn, 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_id}/{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() { @@ -1529,7 +1529,7 @@ func Routes() *web.Router { Put(notify.ReadRepoNotifications) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/{group_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) + m.Group("/{username}/group/{group_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryNotification)) // Issue (requires issue scope) @@ -1649,7 +1649,7 @@ func Routes() *web.Router { }) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/{group_id}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) + m.Group("/{username}/group/{group_id}/{reponame}", fn, 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 @@ -1799,8 +1799,8 @@ func Routes() *web.Router { m.Group("/{username}", func() { m.Post("/{reponame}", admin.AdoptRepository) m.Delete("/{reponame}", admin.DeleteUnadoptedRepository) - m.Post("/{group_id}/{reponame}", admin.AdoptGroupRepository) - m.Delete("/{group_id}/{reponame}", admin.DeleteUnadoptedRepositoryInGroup) + m.Post("/group/{group_id}/{reponame}", admin.AdoptGroupRepository) + m.Delete("/group/{group_id}/{reponame}", admin.DeleteUnadoptedRepositoryInGroup) }) }) diff --git a/routers/common/lfs.go b/routers/common/lfs.go index b2438a54e0..5a6b8456e7 100644 --- a/routers/common/lfs.go +++ b/routers/common/lfs.go @@ -29,5 +29,5 @@ func AddOwnerRepoGitLFSRoutes(m *web.Router, middlewares ...any) { m.Any("/*", http.NotFound) } m.Group("/{username}/{reponame}/info/lfs", fn, append([]any{web.RouterMockPoint(RouterMockPointCommonLFS)}, middlewares...)...) - m.Group("/{username}/{group_id}/{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/internal.go b/routers/private/internal.go index dc965c6003..9af8d62dee 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -64,13 +64,13 @@ 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_id}/{repo}", RepoAssignment, bind(private.HookOptions{}), HookPreReceive) + 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_id}/{repo}", context.OverrideContext(), bind(private.HookOptions{}), HookPostReceive) + 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_id}/{repo}", context.OverrideContext(), RepoAssignment, bind(private.HookOptions{}), HookProcReceive) + 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_id}/{repo}/{branch}", RepoAssignment, SetDefaultBranch) + 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}/{repo}", ServCommand) diff --git a/routers/web/githttp.go b/routers/web/githttp.go index 841c42d9c2..e23aeb3b06 100644 --- a/routers/web/githttp.go +++ b/routers/web/githttp.go @@ -24,5 +24,5 @@ func addOwnerRepoGitHTTPRouters(m *web.Router, middlewares ...any) { m.Methods("GET,OPTIONS", "/objects/pack/pack-{file:[0-9a-f]{40,64}}.idx", repo.GetIdxFile) } m.Group("/{username}/{reponame}", fn, middlewares...) - m.Group("/{username}/{group_id}/{reponame}", fn, middlewares...) + m.Group("/{username}/group/{group_id}/{reponame}", fn, middlewares...) } diff --git a/routers/web/web.go b/routers/web/web.go index 81f48dd7d2..6253c48c3b 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1140,7 +1140,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) } m.Group("/{username}/{reponame}/-", repoDashFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) - m.Group("/{username}/{group_id}/{reponame}/-", repoDashFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) + m.Group("/{username}/group/{group_id}/{reponame}/-", repoDashFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) // end "/{username}/{group_id}/{reponame}/-": migrate mentionsFn := func() { @@ -1254,7 +1254,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { reqSignIn, context.RepoAssignment, reqRepoAdmin, ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer), ) - m.Group("/{username}/{group_id}/{reponame}/settings", settingsFn, + m.Group("/{username}/group/{group_id}/{reponame}/settings", settingsFn, reqSignIn, context.RepoAssignment, reqRepoAdmin, ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer), ) @@ -1262,10 +1262,10 @@ 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.Post("/{username}/{group_id}/{reponame}/markup", optSignIn, context.RepoAssignment, reqUnitsWithMarkdown, web.Bind(structs.MarkupOption{}), misc.Markup) - + 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) @@ -1284,7 +1284,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/pulls/new/*", repo.PullsNewRedirect) } m.Group("/{username}/{reponame}", rootRepoFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) - m.Group("/{username}/{group_id}/{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() { @@ -1302,9 +1302,9 @@ 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_id}/{reponame}/{type:issues}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypePullRequests)) + 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_id}/{reponame}/{type:pulls}", addIssuesPullsViewRoutes, optSignIn, context.RepoAssignment, reqUnitPullsReader) + 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) repoIssueAttachmentFn := func() { @@ -1315,15 +1315,15 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/issues/suggestions", repo.IssueSuggestions) } - m.Group("/{username}/{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 + 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) } - m.Group("/{username}/{group_id}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) + m.Group("/{username}/group/{group_id}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) m.Group("/{username}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) // end "/{username}/{group_id}/{reponame}": issue/pull list, issue/pull view, external tracker @@ -1416,7 +1416,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }, reqUnitPullsReader) m.Post("/pull/{index}/target_branch", reqUnitPullsReader, repo.UpdatePullRequestTarget) } - m.Group("/{username}/{group_id}/{reponame}", editIssueFn, reqSignIn, context.RepoAssignment, context.RepoMustNotBeArchived()) + 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 @@ -1469,7 +1469,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Combo("/fork").Get(repo.Fork).Post(web.Bind(forms.CreateRepoForm{}), repo.ForkPost) } - m.Group("/{username}/{group_id}/{reponame}", codeFn, reqSignIn, context.RepoAssignment, reqUnitCodeReader) + 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 @@ -1482,7 +1482,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }, ctxDataSet("EnableFeed", setting.Other.EnableFeed)) m.Post("/tags/delete", reqSignIn, reqRepoCodeWriter, context.RepoMustNotBeArchived(), repo.DeleteTag) } - m.Group("/{username}/{group_id}/{reponame}", repoTagFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqUnitCodeReader) + 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 @@ -1509,21 +1509,21 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Post("/edit/*", web.Bind(forms.EditReleaseForm{}), repo.EditReleasePost) }, reqSignIn, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, repo.CommitInfoCache) } - m.Group("/{username}/{group_id}/{reponame}", repoReleaseFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoReleaseReader) + 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 repoAttachmentsFn := func() { // to maintain compatibility with old attachments m.Get("/attachments/{uuid}", webAuth.AllowBasic, webAuth.AllowOAuth2, repo.GetAttachment) } - m.Group("/{username}/{group_id}/{reponame}", repoAttachmentsFn, optSignIn, context.RepoAssignment) + 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 repoTopicFn := func() { m.Post("/topics", repo.TopicsPost) } - m.Group("/{username}/{group_id}/{reponame}", repoTopicFn, 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()) repoPackageFn := func() { @@ -1531,7 +1531,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/packages", repo.Packages) } } - m.Group("/{username}/{group_id}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) + m.Group("/{username}/group/{group_id}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) m.Group("/{username}/{reponame}", repoPackageFn, optSignIn, context.RepoAssignment) repoProjectsFn := func() { @@ -1559,7 +1559,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) }, reqRepoProjectsWriter, context.RepoMustNotBeArchived()) } - m.Group("/{username}/{group_id}/{reponame}/projects", repoProjectsFn, optSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects) + 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" @@ -1600,7 +1600,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/badge.svg", webAuth.AllowBasic, webAuth.AllowOAuth2, actions.GetWorkflowBadge) }) } - m.Group("/{username}/{group_id}/{reponame}/actions", repoActionsFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, reqRepoActionsReader, actions.MustEnableActions) + 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" @@ -1616,7 +1616,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/commit/{sha:[a-f0-9]{7,64}}.{ext:patch|diff}", repo.RawDiff) m.Get("/raw/*", repo.WikiRaw) } - m.Group("/{username}/{group_id}/{reponame}/wiki", repoWikiFn, 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) }) @@ -1646,7 +1646,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) }, reqUnitCodeReader) } - m.Group("/{username}/{group_id}/{reponame}/activity", activityFn, + m.Group("/{username}/group/{group_id}/{reponame}/activity", activityFn, optSignIn, context.RepoAssignment, repo.MustBeNotEmpty, context.RequireUnitReader(unit.TypeCode, unit.TypeIssues, unit.TypePullRequests, unit.TypeReleases), ) @@ -1684,7 +1684,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { }) }) } - m.Group("/{username}/{group_id}/{reponame}", repoPullFn, optSignIn, context.RepoAssignment, repo.MustAllowPulls, reqUnitPullsReader) + 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 @@ -1768,7 +1768,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { 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) } - m.Group("/{username}/{group_id}/{reponame}", repoCodeFn, optSignIn, context.RepoAssignment, reqUnitCodeReader) + 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 @@ -1780,7 +1780,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Post("/action/{action:watch|unwatch}", reqSignIn, repo.ActionWatch) m.Post("/action/{action:accept_transfer|reject_transfer}", reqSignIn, repo.ActionTransfer) } - m.Group("/{username}/{group_id}/{reponame}", fn, 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 From ff76f730cc30e676be10cf8d0bca9e9f88900d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 18 Aug 2025 16:13:23 -0400 Subject: [PATCH 092/218] fix broken hooks (again) --- modules/private/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/private/hook.go b/modules/private/hook.go index b8884d396e..0a65e0adf3 100644 --- a/modules/private/hook.go +++ b/modules/private/hook.go @@ -85,7 +85,7 @@ type HookProcReceiveRefResult struct { func genGroupSegment(groupID int64) string { var groupSegment string if groupID > 0 { - groupSegment = fmt.Sprintf("%d/", groupID) + groupSegment = fmt.Sprintf("group/%d/", groupID) } return groupSegment } From d94702c07131e03c8fbe3bb57436fcb9ab018498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 18 Aug 2025 17:12:41 -0400 Subject: [PATCH 093/218] ensure that repository is moved on disk in `MoveGroupItem` function --- services/group/group.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/group/group.go b/services/group/group.go index b4d5daddb7..37e93df3f8 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -4,6 +4,7 @@ package group import ( + "code.gitea.io/gitea/modules/gitrepo" "context" "errors" "fmt" @@ -134,6 +135,9 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model. opts.NewPos = int(repoCount) } if repo.GroupID != opts.NewParent || repo.GroupSortOrder != opts.NewPos { + 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 } From 2db2b09e9030101b11731d1db38b06002a44fb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 18 Aug 2025 18:15:29 -0400 Subject: [PATCH 094/218] fix moving items to the root-level (`GroupID` <= 0) --- services/group/group.go | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/services/group/group.go b/services/group/group.go index 37e93df3f8..0f2e9d7ce9 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -85,21 +85,23 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model. } defer committer.Close() var parentGroup *group_model.Group - 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 errors.New("cannot access new parent 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 errors.New("cannot access new parent group") + } - err = parentGroup.LoadSubgroups(ctx, false) - if err != nil { - return err + err = parentGroup.LoadSubgroups(ctx, false) + if err != nil { + return err + } } if opts.IsGroup { var group *group_model.Group @@ -107,7 +109,7 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model. if err != nil { return err } - if opts.NewPos < 0 { + if opts.NewPos < 0 && parentGroup != nil { opts.NewPos = len(parentGroup.Subgroups) } if group.ParentGroupID != opts.NewParent || group.SortOrder != opts.NewPos { From dcd881888dac89a9adcacddf5f3262cac2505e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 21 Aug 2025 20:04:09 -0400 Subject: [PATCH 095/218] fix bug where a repo's group id and group sort order are zero in API output --- services/convert/repository.go | 2 ++ 1 file changed, 2 insertions(+) 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, } } From 22b80b50c57f72c3444445d9c0a686c64bbc0fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 21 Aug 2025 20:08:20 -0400 Subject: [PATCH 096/218] ensure visited repo's group owner is the same as the repo's owner, otherwise return 404 --- routers/api/v1/group/group.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index bb361a19f0..abcb33d53c 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -282,10 +282,6 @@ func GetGroup(ctx *context.APIContext) { ctx.APIErrorNotFound() return } - if group.OwnerID != ctx.Org.Organization.ID { - ctx.APIErrorNotFound() - return - } if err != nil { ctx.APIErrorInternal(err) return @@ -299,7 +295,7 @@ func GetGroup(ctx *context.APIContext) { } func DeleteGroup(ctx *context.APIContext) { - // swagger:operation DELETE /groups/{group_id} repositoryGroup groupDelete + // swagger:operation DELETE /groups/{group_id} repository-group groupDelete // --- // summary: Delete a repository group // produces: From 4b6914aa31676babebd3d5ebd9ad37492a1ea911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 21 Nov 2025 15:50:23 -0500 Subject: [PATCH 097/218] chore: update makefile and add new tool this tool will generate group-related swagger schemas without repeating the same comments twice in different places --- Makefile | 3 + build_tools/swagger/main.go | 87 + templates/swagger/v1_json.tmpl | 15119 ++++++++++++++++++++++++++++++- 3 files changed, 15204 insertions(+), 5 deletions(-) create mode 100644 build_tools/swagger/main.go 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..caf3b562ae --- /dev/null +++ b/build_tools/swagger/main.go @@ -0,0 +1,87 @@ +//go:generate go run main.go ../../ + +package main + +import ( + "encoding/json" + "log" + "os" + "path/filepath" + "regexp" +) + +var rxPath = regexp.MustCompile("(?m)^(/repos/\\{owner})/(\\{repo})") + +func generatePaths(root string) map[string]any { + pathData := make(map[string]any) + endpoints := make(map[string]any) + 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 := make(map[string]any) + err = json.Unmarshal(swaggerBytes, &raw) + if err != nil { + log.Fatal(err) + } + paths := raw["paths"].(map[string]any) + for k, v := range paths { + 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.(map[string]any) + + for method, methodSpec := range methodMap { + specMap := methodSpec.(map[string]any) + params := specMap["parameters"].([]any) + params = append(params, map[string]any{ + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + }) + // 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 + (methodMap[method].(map[string]any))["parameters"] = params + } + endpoints[nk] = methodMap + } + pathData["paths"] = endpoints + return pathData +} + +func writeMapToFile(filename string, data map[string]any) { + bytes, err := json.MarshalIndent(data, "", "\t") + if err != nil { + log.Fatal(err) + } + err = os.WriteFile(filename, bytes, 0666) + 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/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 8fc77a8a6a..7d539f83d9 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -653,6 +653,79 @@ } } }, + "/admin/unadopted/{owner}/{group_id}/{repo}": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Adopt unadopted files as a repository", + "operationId": "adminAdoptRepository", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "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": "adminDeleteUnadoptedRepository", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, "/admin/unadopted/{owner}/{repo}": { "post": { "produces": [ @@ -1350,7 +1423,7 @@ "application/json" ], "tags": [ - "repositoryGroup" + "repository-group" ], "summary": "Delete a repository group", "operationId": "groupDelete", @@ -4867,6 +4940,15042 @@ } } }, + "/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": "integer", + "format": "int64", + "description": "group ID of the repo", + "name": "group_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationTokenMixin0", + "parameters": [ + { + "type": "string", + "description": "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" + } + } + }, + "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 an 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": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete an 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" + } + } + } + }, + "/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": "string", + "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}/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/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": "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}/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": "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" + } + } + }, + "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": "Update a branch", + "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" + }, + "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", + "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" + }, + "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/UpdateFileOptions" + } + }, + { + "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 labels. Fetch only issues that have any of this labels. 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" + }, + "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": { + "200": { + "$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": { + "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" + }, + "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": { + "200": { + "$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/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}/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" + }, + "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 an 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 an 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 dont 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" + } + } + } + }, + "/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": [ @@ -30927,13 +46036,13 @@ } }, "Compare": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/Compare" } }, "ContentsExtResponse": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/ContentsExtResponse" } @@ -31231,13 +46340,13 @@ } }, "MergeUpstreamRequest": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/MergeUpstreamRequest" } }, "MergeUpstreamResponse": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/MergeUpstreamResponse" } From 21883660be72278db7d89cc05843c4d3da0e947f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 21 Nov 2025 22:36:27 -0500 Subject: [PATCH 098/218] sync with main --- models/perm/access/repo_permission.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index 7de40e88c2..df0440f893 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -32,7 +32,8 @@ type Permission struct { units []*repo_model.RepoUnit unitsMode map[unit.Type]perm_model.AccessMode - everyoneAccessMode map[unit.Type]perm_model.AccessMode + everyoneAccessMode map[unit.Type]perm_model.AccessMode // the unit's minimal access mode for every signed-in user + anonymousAccessMode map[unit.Type]perm_model.AccessMode // the unit's minimal access mode for anonymous (non-signed-in) user } // IsOwner returns true if current user is the owner of repository. From 79b11ac4e4b0d94ff704bd6e5366a595df784383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 21 Nov 2025 22:39:50 -0500 Subject: [PATCH 099/218] fix compile errors in migrations --- models/migrations/v1_12/v136.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From c43e34cb855e8339bf190719f9107676a0e77413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 21 Nov 2025 23:57:26 -0500 Subject: [PATCH 100/218] update `serv` command to recognize group ids in urls --- cmd/serv.go | 17 +++++++++++++---- modules/private/serv.go | 9 +++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/cmd/serv.go b/cmd/serv.go index a35d476c86..9a078cc0c7 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 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, ) From 94dc9de95dd81d76e76c01d4fec936847e640ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 21 Nov 2025 23:58:05 -0500 Subject: [PATCH 101/218] update integration test utilities to tage group id as argument --- tests/integration/actions_approve_test.go | 8 +- tests/integration/actions_concurrency_test.go | 89 +++++++++---------- tests/integration/actions_delete_run_test.go | 2 +- tests/integration/actions_inputs_test.go | 4 +- tests/integration/actions_job_test.go | 26 ++++-- tests/integration/actions_job_token_test.go | 2 +- tests/integration/actions_log_test.go | 8 +- tests/integration/actions_rerun_test.go | 4 +- tests/integration/actions_schedule_test.go | 8 +- tests/integration/actions_trigger_test.go | 2 +- tests/integration/api_private_serv_test.go | 24 ++--- tests/integration/api_pull_test.go | 18 ++-- .../integration/api_repo_collaborator_test.go | 10 +-- .../integration/api_repo_file_create_test.go | 2 +- tests/integration/api_repo_file_get_test.go | 2 +- tests/integration/api_repo_git_blobs_test.go | 2 +- tests/integration/api_repo_git_trees_test.go | 2 +- tests/integration/api_repo_tags_test.go | 4 +- tests/integration/api_repo_test.go | 4 +- tests/integration/compare_test.go | 4 +- tests/integration/git_lfs_ssh_test.go | 2 +- tests/integration/git_misc_test.go | 4 +- tests/integration/git_push_test.go | 2 +- tests/integration/git_ssh_redirect_test.go | 8 +- tests/integration/gpg_ssh_git_test.go | 26 +++--- tests/integration/org_count_test.go | 2 +- tests/integration/org_profile_test.go | 2 +- tests/integration/pull_comment_test.go | 8 +- tests/integration/pull_compare_test.go | 4 +- tests/integration/pull_create_test.go | 10 +-- tests/integration/pull_merge_test.go | 89 ++++++++++--------- tests/integration/pull_review_test.go | 6 +- tests/integration/pull_status_test.go | 14 +-- tests/integration/repo_activity_test.go | 8 +- tests/integration/repo_branch_test.go | 4 +- tests/integration/repo_commits_test.go | 6 +- tests/integration/repo_tag_test.go | 6 +- tests/integration/repo_watch_test.go | 2 +- tests/integration/repo_webhook_test.go | 24 ++--- tests/integration/ssh_key_test.go | 8 +- tests/integration/wiki_test.go | 2 +- 41 files changed, 238 insertions(+), 224 deletions(-) diff --git a/tests/integration/actions_approve_test.go b/tests/integration/actions_approve_test.go index 1964ff44d5..e37b36f9c4 100644 --- a/tests/integration/actions_approve_test.go +++ b/tests/integration/actions_approve_test.go @@ -34,7 +34,7 @@ func TestApproveAllRunsOnPullRequestPage(t *testing.T) { apiBaseRepo := createActionsTestRepo(t, user2Token, "approve-all-runs", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user2APICtx)(t) runner := newMockRunner() @@ -51,7 +51,7 @@ jobs: - run: echo unit-test ` opts1 := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wf1TreePath, opts1) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wf1TreePath, opts1) wf2TreePath := ".gitea/workflows/pull_2.yml" wf2FileContent := `name: Pull 2 on: pull_request @@ -62,7 +62,7 @@ jobs: - run: echo integration-test ` opts2 := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wf2TreePath, opts2) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wf2TreePath, opts2) // user4 forks the repo req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks", baseRepo.OwnerName, baseRepo.Name), @@ -72,7 +72,7 @@ jobs: resp := MakeRequest(t, req, http.StatusAccepted) apiForkRepo := DecodeJSON(t, resp, &api.Repository{}) forkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiForkRepo.ID}) - user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, forkRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user4APICtx)(t) // user4 creates a pull request from branch "bugfix/user4" diff --git a/tests/integration/actions_concurrency_test.go b/tests/integration/actions_concurrency_test.go index 6460af0fd2..ec81e78f32 100644 --- a/tests/integration/actions_concurrency_test.go +++ b/tests/integration/actions_concurrency_test.go @@ -37,12 +37,11 @@ func TestWorkflowConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() runner.registerAsRepoRunner(t, user2.Name, repo.Name, "mock-runner", []string{"ubuntu-latest"}, false) - // add a variable for test req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/actions/variables/myvar", user2.Name, repo.Name), &api.CreateVariableOption{ @@ -95,7 +94,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch and exec workflow1 task := runner.fetchTask(t) _, _, run := getTaskAndJobAndRunByTaskID(t, task.Id) @@ -108,7 +107,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) // fetch workflow2 task = runner.fetchTask(t) _, _, run = getTaskAndJobAndRunByTaskID(t, task.Id) @@ -117,7 +116,7 @@ jobs: // push workflow3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) runner.fetchNoTask(t) // exec workflow2 @@ -145,7 +144,7 @@ func TestWorkflowConcurrencyShort(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -200,7 +199,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch and exec workflow1 task := runner.fetchTask(t) _, _, run := getTaskAndJobAndRunByTaskID(t, task.Id) @@ -213,7 +212,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) // fetch workflow2 task = runner.fetchTask(t) _, _, run = getTaskAndJobAndRunByTaskID(t, task.Id) @@ -222,7 +221,7 @@ jobs: // push workflow3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) runner.fetchNoTask(t) // exec workflow2 @@ -250,7 +249,7 @@ func TestWorkflowConcurrencyShortJson(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -317,7 +316,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch and exec workflow1 task := runner.fetchTask(t) _, _, run := getTaskAndJobAndRunByTaskID(t, task.Id) @@ -330,7 +329,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) // fetch workflow2 task = runner.fetchTask(t) _, _, run = getTaskAndJobAndRunByTaskID(t, task.Id) @@ -339,7 +338,7 @@ jobs: // push workflow3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) runner.fetchNoTask(t) // exec workflow2 @@ -371,7 +370,7 @@ func TestPullRequestWorkflowConcurrency(t *testing.T) { apiBaseRepo := createActionsTestRepo(t, user2Token, "actions-concurrency", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user2APICtx)(t) runner := newMockRunner() @@ -391,7 +390,7 @@ jobs: - run: echo 'test the pull' ` opts1 := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create %s"+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts1) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts1) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-fix.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -427,7 +426,7 @@ jobs: resp := MakeRequest(t, req, http.StatusAccepted) apiForkRepo := DecodeJSON(t, resp, &api.Repository{}) forkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiForkRepo.ID}) - user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, auth_model.AccessTokenScopeWriteRepository) + user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, forkRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user4APICtx)(t) // user4 creates a pull request from branch "bugfix/bbb" @@ -511,7 +510,7 @@ func TestJobConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner1 := newMockRunner() @@ -580,9 +579,9 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) // fetch wf1-job1 wf1Job1Task := runner1.fetchTask(t) @@ -610,7 +609,7 @@ jobs: assert.Equal(t, actions_model.StatusRunning, wf2Job2ActionJob.Status) // push workflow3 to trigger wf3-job1 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) // fetch wf3-job1 wf3Job1Task := runner1.fetchTask(t) _, wf3Job1ActionJob, _ := getTaskAndJobAndRunByTaskID(t, wf3Job1Task.Id) @@ -666,7 +665,7 @@ func TestMatrixConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) linuxRunner := newMockRunner() @@ -713,7 +712,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) job1WinTask := windowsRunner.fetchTask(t) job1LinuxTask := linuxRunner.fetchTask(t) @@ -727,7 +726,7 @@ jobs: assert.Equal(t, "job-os-linux", job1LinuxJob.ConcurrencyGroup) opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) job2DarwinTask := darwinRunner.fetchTask(t) _, job2DarwinJob, _ := getTaskAndJobAndRunByTaskID(t, job2DarwinTask.Id) assert.Equal(t, "wf2-job (darwin)", job2DarwinJob.Name) @@ -759,7 +758,7 @@ func TestWorkflowDispatchConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -795,7 +794,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // run the workflow with appVersion=v1.21 and cancel=false urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "workflow-dispatch-concurrency.yml") @@ -849,7 +848,7 @@ func TestWorkflowDispatchRerunAllJobsConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -885,7 +884,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // run the workflow with appVersion=v1.21 and cancel=false urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "workflow-dispatch-concurrency.yml") @@ -987,7 +986,7 @@ func TestWorkflowDispatchRerunSingleJobConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -1023,7 +1022,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // run the workflow with appVersion=v1.21 and cancel=false urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "workflow-dispatch-concurrency.yml") @@ -1126,7 +1125,7 @@ func TestScheduleConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -1149,7 +1148,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch the task triggered by push task1 := runner.fetchTask(t) @@ -1228,7 +1227,7 @@ func TestWorkflowAndJobConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner1 := newMockRunner() @@ -1317,7 +1316,7 @@ jobs: // push workflow 1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch wf1-job1 and wf1-job2 w1j1Task := runner1.fetchTask(t) @@ -1333,7 +1332,7 @@ jobs: // push workflow 2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) // cannot fetch wf2-job1 and wf2-job2 because workflow-2 is blocked by workflow-1's concurrency group "workflow-group-1" runner1.fetchNoTask(t) runner2.fetchNoTask(t) @@ -1344,7 +1343,7 @@ jobs: // push workflow 3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) // cannot fetch wf3-job1 because it is blocked by wf1-job1's concurrency group "job-group-1" runner1.fetchNoTask(t) // query wf3-job1 from db and check its status @@ -1383,7 +1382,7 @@ jobs: // push workflow-4 opts4 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf4TreePath, wf4FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf4TreePath, opts4) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf4TreePath, opts4) // cannot fetch wf4-job1 because it is blocked by workflow-3's concurrency group "workflow-group-2" runner2.fetchNoTask(t) @@ -1417,7 +1416,7 @@ func TestCancelConcurrentRun(t *testing.T) { apiRepo := createActionsTestRepo(t, user2Token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user2APICtx)(t) runner := newMockRunner() @@ -1437,7 +1436,7 @@ jobs: - run: echo 'test' ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, wfTreePath, opts1) + createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, repo.GroupID, wfTreePath, opts1) // fetch and check the first task task1 := runner.fetchTask(t) @@ -1494,7 +1493,7 @@ func TestAbandonConcurrentRun(t *testing.T) { apiRepo := createActionsTestRepo(t, user2Token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user2APICtx)(t) runner := newMockRunner() @@ -1535,7 +1534,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch wf1-job1 w1j1Task := runner.fetchTask(t) @@ -1553,7 +1552,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, repo.GroupID, wf2TreePath, opts2) // query run2 from db and check its status run2 := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{RepoID: repo.ID, WorkflowID: "workflow-2.yml"}) @@ -1593,7 +1592,7 @@ func TestRunAndJobWithSameConcurrencyGroup(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -1644,7 +1643,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // fetch run1 task := runner.fetchTask(t) _, job1, run1 := getTaskAndJobAndRunByTaskID(t, task.Id) @@ -1653,7 +1652,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) // cannot fetch run2 because run1 is still running runner.fetchNoTask(t) run2 := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{RepoID: repo.ID, WorkflowID: "concurrent-workflow-2.yml"}) @@ -1672,7 +1671,7 @@ jobs: // push workflow3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) // fetch run3 task3 := runner.fetchTask(t) _, job3, run3 := getTaskAndJobAndRunByTaskID(t, task3.Id) diff --git a/tests/integration/actions_delete_run_test.go b/tests/integration/actions_delete_run_test.go index 3242c68301..1f52b9b0cf 100644 --- a/tests/integration/actions_delete_run_test.go +++ b/tests/integration/actions_delete_run_test.go @@ -120,7 +120,7 @@ jobs: runner.registerAsRepoRunner(t, user2.Name, apiRepo.Name, "mock-runner", []string{"ubuntu-latest"}, false) opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+testCase.treePath, testCase.fileContent) - createWorkflowFile(t, token, user2.Name, apiRepo.Name, testCase.treePath, apiRepo.GroupID, opts) + createWorkflowFile(t, token, user2.Name, apiRepo.Name, apiRepo.GroupID, testCase.treePath, opts) var runID int64 for i := 0; i < len(testCase.outcomes); i++ { diff --git a/tests/integration/actions_inputs_test.go b/tests/integration/actions_inputs_test.go index 9e29be3432..88fd4ff696 100644 --- a/tests/integration/actions_inputs_test.go +++ b/tests/integration/actions_inputs_test.go @@ -26,7 +26,7 @@ func TestWorkflowWithInputsContext(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-inputs-context", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) wRunner := newMockRunner() @@ -57,7 +57,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) // run the workflow with os=windows urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "test-inputs-context.yml") diff --git a/tests/integration/actions_job_test.go b/tests/integration/actions_job_test.go index 1b374d21f5..c746167cec 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -144,7 +144,7 @@ jobs: t.Run("test "+tc.treePath, func(t *testing.T) { // create the workflow file opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - fileResp := createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, apiRepo.GroupID, opts) + fileResp := createWorkflowFile(t, token, user2.Name, apiRepo.Name, apiRepo.GroupID, tc.treePath, opts) // fetch and execute task for i := 0; i < len(tc.outcomes); i++ { @@ -156,7 +156,11 @@ jobs: } // check result - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/actions/tasks", user2.Name, apiRepo.GroupID, apiRepo.Name)). + var groupSegment string + if apiRepo.GroupID > 0 { + groupSegment = fmt.Sprintf("%d/", apiRepo.GroupID) + } + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/tasks", user2.Name, groupSegment, apiRepo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) actionTaskRespAfter := DecodeJSON(t, resp, &api.ActionTaskResponse{}) @@ -325,7 +329,7 @@ jobs: for _, tc := range testCases { t.Run("test "+tc.treePath, func(t *testing.T) { opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, apiRepo.GroupID, opts) + createWorkflowFile(t, token, user2.Name, apiRepo.Name, apiRepo.GroupID, tc.treePath, opts) for i := 0; i < len(tc.outcomes); i++ { task := runner.fetchTask(t) @@ -442,7 +446,7 @@ jobs: - run: echo %s `, workflowName, workflowName) opts := getWorkflowCreateFileOptions(user, apiRepo.DefaultBranch, "create workflow", wfContent) - createWorkflowFile(t, authToken, user.Name, apiRepo.Name, wfTreePath, opts) + createWorkflowFile(t, authToken, user.Name, apiRepo.Name, apiRepo.GroupID, wfTreePath, opts) return &runnerDisableEnableTestData{ repo: apiRepo, @@ -454,7 +458,7 @@ jobs: func triggerRunnerDisableEnableRun(t *testing.T, user *user_model.User, authToken string, repo *api.Repository, treePath string) { t.Helper() opts := getWorkflowCreateFileOptions(user, repo.DefaultBranch, "second push", "second run") - createWorkflowFile(t, authToken, user.Name, repo.Name, treePath, opts) + createWorkflowFile(t, authToken, user.Name, repo.Name, repo.GroupID, treePath, opts) } func getRepoRunnerID(t *testing.T, authToken, ownerName, repoName string) int64 { @@ -490,7 +494,7 @@ jobs: - run: echo 'test the pull' ` opts := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, baseRepo.GroupID, opts) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-patch.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -582,7 +586,7 @@ jobs: - run: echo 'test the pull' ` opts := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, baseRepo.GroupID, opts) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-patch.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -733,8 +737,12 @@ func getWorkflowCreateFileOptions(u *user_model.User, branch, msg, content strin } } -func createWorkflowFile(t *testing.T, authToken, ownerName, repoName, treePath string, groupID int64, opts *api.CreateFileOptions) *api.FileResponse { - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", ownerName, groupID, repoName, treePath), opts). +func createWorkflowFile(t *testing.T, authToken, ownerName, repoName string, groupID int64, treePath string, opts *api.CreateFileOptions) *api.FileResponse { + var groupSegment string + if groupID > 0 { + groupSegment = fmt.Sprintf("%d/", groupID) + } + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", ownerName, groupSegment, repoName, treePath), opts). AddTokenAuth(authToken) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) diff --git a/tests/integration/actions_job_token_test.go b/tests/integration/actions_job_token_test.go index 421dec17d9..1bb0a1bd20 100644 --- a/tests/integration/actions_job_token_test.go +++ b/tests/integration/actions_job_token_test.go @@ -417,7 +417,7 @@ jobs: - run: echo "test perms" ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, user2.Name, repo1.Name, wfTreePath, opts) + createWorkflowFile(t, token, user2.Name, repo1.Name, repo1.GroupID, wfTreePath, opts) task1 := runner1.fetchTask(t) task1Token := task1.Secrets["GITEA_TOKEN"] diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index c52ac6620e..78c30ebf41 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -167,7 +167,7 @@ jobs: // create the workflow file opts := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, tc.treePath, repo.GroupID, opts) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, tc.treePath, opts) // fetch and execute tasks for _, outcome := range tc.outcome { @@ -199,7 +199,11 @@ jobs: } // download task logs from API and check content - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/actions/jobs/%d/logs", user2.Name, repo.GroupID, repo.Name, job.ID)). + var groupSegment string + if repo.GroupID > 0 { + groupSegment = fmt.Sprintf("%d/", repo.GroupID) + } + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/jobs/%d/logs", user2.Name, groupSegment, repo.Name, job.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) logTextLines = strings.Split(strings.TrimSpace(resp.Body.String()), "\n") diff --git a/tests/integration/actions_rerun_test.go b/tests/integration/actions_rerun_test.go index 24c2d726eb..3612e1e35a 100644 --- a/tests/integration/actions_rerun_test.go +++ b/tests/integration/actions_rerun_test.go @@ -40,7 +40,7 @@ func TestActionsRerun(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-rerun", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -65,7 +65,7 @@ jobs: ` opts := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create"+wfTreePath, wfFileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, wfTreePath, opts) + createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wfTreePath, opts) // fetch and exec job1 job1Task := runner.fetchTask(t) diff --git a/tests/integration/actions_schedule_test.go b/tests/integration/actions_schedule_test.go index 43c44ede55..6609819328 100644 --- a/tests/integration/actions_schedule_test.go +++ b/tests/integration/actions_schedule_test.go @@ -88,7 +88,7 @@ jobs: assert.NoError(t, err) // merge pull request - testPullMerge(t, testContext.Session, repo.OwnerName, repo.Name, strconv.FormatInt(apiPull.Index, 10), MergeOptions{ + testPullMerge(t, testContext.Session, repo.OwnerName, repo.Name, repo.GroupID, strconv.FormatInt(apiPull.Index, 10), MergeOptions{ Style: mergeStyle, }) @@ -164,7 +164,7 @@ func testScheduleUpdateMirrorSync(t *testing.T) { assert.True(t, mirrorRepo.IsMirror) mirrorRepo, err = repo_service.MigrateRepositoryGitData(t.Context(), user, mirrorRepo, opts, nil) assert.NoError(t, err) - mirrorContext := NewAPITestContext(t, user.Name, mirrorRepo.Name, auth_model.AccessTokenScopeWriteRepository) + mirrorContext := NewAPITestContext(t, user.Name, mirrorRepo.Name, mirrorRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) // enable actions unit for mirror repo assert.False(t, mirrorRepo.UnitEnabled(t.Context(), unit_model.TypeActions)) @@ -238,7 +238,7 @@ func doTestScheduleUpdate(t *testing.T, updateTrigger scheduleUpdateTrigger) { apiRepo := createActionsTestRepo(t, token, "actions-schedule", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) assert.NoError(t, repo.LoadAttributes(t.Context())) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) wfTreePath := ".gitea/workflows/actions-schedule.yml" @@ -254,7 +254,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wfTreePath, wfFileContent) - apiFileResp := createWorkflowFile(t, token, user2.Name, repo.Name, wfTreePath, opts1) + apiFileResp := createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wfTreePath, opts1) actionSchedule := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionSchedule{RepoID: repo.ID, CommitSHA: apiFileResp.Commit.SHA}) scheduleSpec := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionScheduleSpec{RepoID: repo.ID, ScheduleID: actionSchedule.ID}) diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 9c077eed7d..09a36eb7e9 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1560,7 +1560,7 @@ jobs: - run: echo 'Hello World' ` opts1 := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, baseRepo.GroupID, opts1) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts1) // user4 forks the repo req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/forks", baseRepo.OwnerName, baseRepo.GroupID, baseRepo.Name), 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_pull_test.go b/tests/integration/api_pull_test.go index 5c6421c29b..180154ba63 100644 --- a/tests/integration/api_pull_test.go +++ b/tests/integration/api_pull_test.go @@ -41,7 +41,7 @@ func TestAPIViewPulls(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) + ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls?state=all", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(ctx.Token) @@ -149,7 +149,7 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) + ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/master/branch2", owner.Name, repo.GroupID, repo.Name). AddTokenAuth(ctx.Token) @@ -193,7 +193,7 @@ func TestAPIMergePull(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - apiCtx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) + apiCtx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) checkBranchExists := func(t *testing.T, branchName string, status int) { req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/branches/%s", owner.Name, repo.Name, branchName)).AddTokenAuth(apiCtx.Token) @@ -309,7 +309,7 @@ func TestAPICreatePullBasePermission(t *testing.T) { MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to base repo - ctx := NewAPITestContext(t, repo10.OwnerName, repo10.Name, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo10.OwnerName, repo10.Name, repo10.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaborator", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) // create again @@ -342,7 +342,7 @@ func TestAPICreatePullHeadPermission(t *testing.T) { MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with read permission - ctx := NewAPITestContext(t, repo11.OwnerName, repo11.Name, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo11.OwnerName, repo11.Name, repo11.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithRead", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -562,7 +562,7 @@ func TestAPICommitPullRequest(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) + ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) mergedCommitSHA := "1a8823cd1a9549fde083f992f6b9b87a7ab74fb3" req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/commits/%s/pull", owner.Name, repo.GroupID, repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) @@ -578,7 +578,7 @@ func TestAPIViewPullFilesWithHeadRepoDeleted(t *testing.T) { baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) - ctx := NewAPITestContext(t, "user1", baseRepo.Name, auth_model.AccessTokenScopeAll) + ctx := NewAPITestContext(t, "user1", baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeAll) doAPIForkRepository(ctx, "user2")(t) @@ -635,7 +635,7 @@ func TestAPIViewPullFilesWithHeadRepoDeleted(t *testing.T) { assert.NoError(t, err) pr := convert.ToAPIPullRequest(t.Context(), pullRequest, user1) - ctx = NewAPITestContext(t, "user2", baseRepo.Name, auth_model.AccessTokenScopeAll) + ctx = NewAPITestContext(t, "user2", baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeAll) doAPIGetPullFiles(ctx, pr, func(t *testing.T, files []*api.ChangedFile) { if assert.Len(t, files, 1) { assert.Equal(t, "file_1.txt", files[0].Filename) @@ -648,7 +648,7 @@ func TestAPIViewPullFilesWithHeadRepoDeleted(t *testing.T) { })(t) // delete the head repository of the pull request - forkCtx := NewAPITestContext(t, "user1", forkedRepo.Name, auth_model.AccessTokenScopeAll) + forkCtx := NewAPITestContext(t, "user1", forkedRepo.Name, forkedRepo.GroupID, auth_model.AccessTokenScopeAll) doAPIDeleteRepository(forkCtx)(t) doAPIGetPullFiles(ctx, pr, func(t *testing.T, files []*api.ChangedFile) { diff --git a/tests/integration/api_repo_collaborator_test.go b/tests/integration/api_repo_collaborator_test.go index 4775504bce..ac6f4b245a 100644 --- a/tests/integration/api_repo_collaborator_test.go +++ b/tests/integration/api_repo_collaborator_test.go @@ -29,7 +29,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { user11 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 11}) user34 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 34}) - testCtx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, auth_model.AccessTokenScopeWriteRepository) + testCtx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("RepoOwnerShouldBeOwner", func(t *testing.T) { req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, repo2Owner.Name). @@ -84,7 +84,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { }) t.Run("CollaboratorBlocked", func(t *testing.T) { - ctx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeWriteRepository) ctx.ExpectedCode = http.StatusForbidden doAPIAddCollaborator(ctx, user34.Name, perm.AccessModeAdmin)(t) }) @@ -93,7 +93,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user5.Name, perm.AccessModeRead)) _session := loginUser(t, user5.Name) - _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) + _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) @@ -120,7 +120,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user5.Name, perm.AccessModeRead)) _session := loginUser(t, user5.Name) - _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) + _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) @@ -136,7 +136,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user11.Name, perm.AccessModeRead)) _session := loginUser(t, user10.Name) - _testCtx := NewAPITestContext(t, user10.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) + _testCtx := NewAPITestContext(t, user10.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user11.Name). AddTokenAuth(_testCtx.Token) diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go index e5a053a199..362e4ddab4 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -268,7 +268,7 @@ func TestAPICreateFile(t *testing.T) { MakeRequest(t, req, http.StatusForbidden) // Test creating a file in an empty repository - doAPICreateRepository(NewAPITestContext(t, "user2", "empty-repo", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser), true)(t) + doAPICreateRepository(NewAPITestContext(t, "user2", "empty-repo", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser), true)(t) createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) diff --git a/tests/integration/api_repo_file_get_test.go b/tests/integration/api_repo_file_get_test.go index ec50cf52f4..62c7b8c775 100644 --- a/tests/integration/api_repo_file_get_test.go +++ b/tests/integration/api_repo_file_get_test.go @@ -25,7 +25,7 @@ func TestAPIGetRawFileOrLFS(t *testing.T) { // Test with LFS onGiteaRun(t, func(t *testing.T, u *url.URL) { createLFSTestRepository(t, "repo-lfs-test") - httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", 0, auth_model.AccessTokenScopeWriteRepository) t.Run("repo-lfs-test", func(t *testing.T) { u.Path = httpContext.GitPath() dstPath := t.TempDir() diff --git a/tests/integration/api_repo_git_blobs_test.go b/tests/integration/api_repo_git_blobs_test.go index 7887489a54..1bf14ba468 100644 --- a/tests/integration/api_repo_git_blobs_test.go +++ b/tests/integration/api_repo_git_blobs_test.go @@ -66,7 +66,7 @@ func TestAPIReposGitBlobs(t *testing.T) { MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3ReadmeSHA, repo3.GroupID, repo3.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3.GroupID, repo3.Name, repo3ReadmeSHA) MakeRequest(t, req, http.StatusNotFound) // Login as User4. diff --git a/tests/integration/api_repo_git_trees_test.go b/tests/integration/api_repo_git_trees_test.go index 21905de63a..8f0cd9d773 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -74,7 +74,7 @@ func TestAPIReposGitTrees(t *testing.T) { MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", org3.Name, repo3TreeSHA, repo3.GroupID, repo3.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", org3.Name, repo3.GroupID, repo3.Name, repo3TreeSHA) MakeRequest(t, req, http.StatusNotFound) // Login as User4. diff --git a/tests/integration/api_repo_tags_test.go b/tests/integration/api_repo_tags_test.go index d363ba9242..13718040ce 100644 --- a/tests/integration/api_repo_tags_test.go +++ b/tests/integration/api_repo_tags_test.go @@ -54,14 +54,14 @@ func TestAPIRepoTags(t *testing.T) { assert.Equal(t, newTag.Commit.SHA, respTag.Commit.SHA) // get created tag - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/tags/%s", user.Name, repoName, newTag.GroupID, newTag.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/tags/%s", user.Name, repoName, newTag.Name). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) tag := DecodeJSON(t, resp, &api.Tag{}) assert.Equal(t, newTag, tag) // delete tag - delReq := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/tags/%s", user.Name, repoName, newTag.GroupID, newTag.Name). + delReq := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/tags/%s", user.Name, repoName, newTag.Name). AddTokenAuth(token) MakeRequest(t, delReq, http.StatusNoContent) diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 3bae128e44..d02aeba667 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -399,7 +399,7 @@ func TestAPIRepoMigrateConflict(t *testing.T) { func testAPIRepoMigrateConflict(t *testing.T, u *url.URL) { username := "user2" - baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() @@ -484,7 +484,7 @@ func TestAPIRepoCreateConflict(t *testing.T) { func testAPIRepoCreateConflict(t *testing.T, u *url.URL) { username := "user2" - baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go index 5e50fcf043..c2cc3b43f6 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -171,13 +171,13 @@ func TestCompareCodeExpand(t *testing.T) { assert.NoError(t, err) session := loginUser(t, user1.Name) - testEditFile(t, session, user1.Name, repo.Name, "main", "README.md", strings.Repeat("a\n", 30)) + testEditFile(t, session, repo.GroupID, user1.Name, repo.Name, "main", "README.md", strings.Repeat("a\n", 30)) user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session = loginUser(t, user2.Name) testRepoFork(t, session, user1.Name, repo.Name, user2.Name, "test_blob_excerpt-fork", "") testCreateBranch(t, session, user2.Name, "test_blob_excerpt-fork", "branch/main", "forked-branch", http.StatusSeeOther) - testEditFile(t, session, user2.Name, "test_blob_excerpt-fork", "forked-branch", "README.md", strings.Repeat("a\n", 15)+"CHANGED\n"+strings.Repeat("a\n", 15)) + testEditFile(t, session, repo.GroupID, user2.Name, "test_blob_excerpt-fork", "forked-branch", "README.md", strings.Repeat("a\n", 15)+"CHANGED\n"+strings.Repeat("a\n", 15)) req := NewRequest(t, "GET", "/user1/test_blob_excerpt/compare/main...user2/test_blob_excerpt-fork:forked-branch") resp := session.MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/git_lfs_ssh_test.go b/tests/integration/git_lfs_ssh_test.go index d2f34ef10b..27cf72fd90 100644 --- a/tests/integration/git_lfs_ssh_test.go +++ b/tests/integration/git_lfs_ssh_test.go @@ -27,7 +27,7 @@ func TestGitLFSSSH(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { localRepoForUpload := filepath.Join(t.TempDir(), "test-upload") localRepoForDownload := filepath.Join(t.TempDir(), "test-download") - apiTestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + apiTestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) var mu sync.Mutex var routerCalls []string diff --git a/tests/integration/git_misc_test.go b/tests/integration/git_misc_test.go index c830086e3f..5532b5d19f 100644 --- a/tests/integration/git_misc_test.go +++ b/tests/integration/git_misc_test.go @@ -82,7 +82,7 @@ func TestDataAsyncDoubleRead_Issue29101(t *testing.T) { func TestAgitPullPush(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() u.User = url.UserPassword("user2", userPassword) @@ -145,7 +145,7 @@ func TestAgitPullPush(t *testing.T) { func TestAgitReviewStaleness(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() u.User = url.UserPassword("user2", userPassword) diff --git a/tests/integration/git_push_test.go b/tests/integration/git_push_test.go index 5d54eaed12..408c330ec4 100644 --- a/tests/integration/git_push_test.go +++ b/tests/integration/git_push_test.go @@ -201,7 +201,7 @@ func runTestGitPush(t *testing.T, u *url.URL, gitOperation func(t *testing.T, gi func TestPushPullRefs(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() u.User = url.UserPassword("user2", userPassword) diff --git a/tests/integration/git_ssh_redirect_test.go b/tests/integration/git_ssh_redirect_test.go index 3ae2652412..ee44866b9a 100644 --- a/tests/integration/git_ssh_redirect_test.go +++ b/tests/integration/git_ssh_redirect_test.go @@ -20,7 +20,7 @@ func TestGitSSHRedirect(t *testing.T) { } func testGitSSHRedirect(t *testing.T, u *url.URL) { - apiTestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) + apiTestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) session := loginUser(t, "user2") withKeyFile(t, "my-testing-key", func(keyFile string) { @@ -56,7 +56,7 @@ func testGitSSHRedirect(t *testing.T, u *url.URL) { Name: "repo1", AutoInit: true, })(t) - testEditFile(t, session, "olduser2", "repo1", "master", "README.md", "This is olduser2's repo1\n") + testEditFile(t, session, 0, "olduser2", "repo1", "master", "README.md", "This is olduser2's repo1\n") dstDir := t.TempDir() t.Run("Clone", doGitClone(dstDir, cloneURL)) @@ -64,9 +64,9 @@ func testGitSSHRedirect(t *testing.T, u *url.URL) { assert.NoError(t, err) assert.Equal(t, "This is olduser2's repo1\n", string(readMEContent)) - apiTestContext2 := NewAPITestContext(t, "user2", "oldrepo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) + apiTestContext2 := NewAPITestContext(t, "user2", "oldrepo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) doAPICreateRepository(apiTestContext2, false)(t) - testEditFile(t, session, "user2", "oldrepo1", "master", "README.md", "This is user2's oldrepo1\n") + testEditFile(t, session, 0, "user2", "oldrepo1", "master", "README.md", "This is user2's oldrepo1\n") dstDir = t.TempDir() cloneURL = createSSHUrl("user2/oldrepo1.git", u) diff --git a/tests/integration/gpg_ssh_git_test.go b/tests/integration/gpg_ssh_git_test.go index a8ec79cd9d..589a639aa2 100644 --- a/tests/integration/gpg_ssh_git_test.go +++ b/tests/integration/gpg_ssh_git_test.go @@ -81,14 +81,14 @@ func TestSSHGit(t *testing.T) { func testGitSigning(t *testing.T) { username := "user2" user := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: username}) - baseAPITestContext := NewAPITestContext(t, username, "repo1") + baseAPITestContext := NewAPITestContext(t, username, "repo1", 0) onGiteaRun(t, func(t *testing.T, u *url.URL) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CheckMasterBranchUnsigned", doAPIGetBranch(testCtx, "master", func(t *testing.T, branch api.Branch) { assert.NotNil(t, branch.Commit) @@ -109,7 +109,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"parentsigned"} t.Run("Unsigned-Initial-CRUD-ParentSigned", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile( t, testCtx, user, "master", "parentsigned", "signed-parent.txt", func(t *testing.T, response api.FileResponse) { assert.False(t, response.Verification.Verified) @@ -123,7 +123,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"never"} t.Run("Unsigned-Initial-CRUD-Never", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-Never", crudActionCreateFile( t, testCtx, user, "parentsigned", "parentsigned-never", "unsigned-never2.txt", func(t *testing.T, response api.FileResponse) { assert.False(t, response.Verification.Verified) @@ -133,7 +133,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"always"} t.Run("Unsigned-Initial-CRUD-Always", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-Always", crudActionCreateFile( t, testCtx, user, "master", "always", "signed-always.txt", func(t *testing.T, response api.FileResponse) { require.NotNil(t, response.Verification, "no verification provided with response! %v", response) @@ -151,7 +151,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"parentsigned"} t.Run("Unsigned-Initial-CRUD-ParentSigned", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-Always-ParentSigned", crudActionCreateFile( t, testCtx, user, "always", "always-parentsigned", "signed-always-parentsigned.txt", func(t *testing.T, response api.FileResponse) { require.NotNil(t, response.Verification, "no verification provided with response! %v", response) @@ -163,7 +163,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.InitialCommit = []string{"always"} t.Run("AlwaysSign-Initial", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CheckMasterBranchSigned", doAPIGetBranch(testCtx, "master", func(t *testing.T, branch api.Branch) { require.NotNil(t, branch.Commit, "no commit provided with branch! %v", branch) @@ -176,7 +176,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"never"} t.Run("AlwaysSign-Initial-CRUD-Never", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always-never", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always-never", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-Never", crudActionCreateFile( t, testCtx, user, "master", "never", "unsigned-never.txt", func(t *testing.T, response api.FileResponse) { @@ -187,7 +187,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"parentsigned"} t.Run("AlwaysSign-Initial-CRUD-ParentSigned-On-Always", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always-parent", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always-parent", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile( t, testCtx, user, "master", "parentsigned", "signed-parent.txt", func(t *testing.T, response api.FileResponse) { @@ -199,7 +199,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"always"} t.Run("AlwaysSign-Initial-CRUD-Always", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always-always", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always-always", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-Always", crudActionCreateFile( t, testCtx, user, "master", "always", "signed-always.txt", func(t *testing.T, response api.FileResponse) { @@ -211,7 +211,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.Merges = []string{"commitssigned"} t.Run("UnsignedMerging", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreatePullRequest", func(t *testing.T) { pr, err := doAPICreatePullRequest(testCtx, testCtx.Username, testCtx.Reponame, "master", "never2")(t) assert.NoError(t, err) @@ -228,7 +228,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.Merges = []string{"basesigned"} t.Run("BaseSignedMerging", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreatePullRequest", func(t *testing.T) { pr, err := doAPICreatePullRequest(testCtx, testCtx.Username, testCtx.Reponame, "master", "parentsigned2")(t) assert.NoError(t, err) @@ -245,7 +245,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.Merges = []string{"commitssigned"} t.Run("CommitsSignedMerging", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreatePullRequest", func(t *testing.T) { pr, err := doAPICreatePullRequest(testCtx, testCtx.Username, testCtx.Reponame, "master", "always-parentsigned")(t) assert.NoError(t, err) diff --git a/tests/integration/org_count_test.go b/tests/integration/org_count_test.go index 6a2cf53ed4..e2ff1cdc58 100644 --- a/tests/integration/org_count_test.go +++ b/tests/integration/org_count_test.go @@ -27,7 +27,7 @@ func testOrgCounts(t *testing.T) { orgOwner := "user2" orgName := "testOrg" orgCollaborator := "user4" - ctx := NewAPITestContext(t, orgOwner, "repo1", auth_model.AccessTokenScopeWriteOrganization) + ctx := NewAPITestContext(t, orgOwner, "repo1", 0, auth_model.AccessTokenScopeWriteOrganization) var ownerCountRepos map[string]int var collabCountRepos map[string]int diff --git a/tests/integration/org_profile_test.go b/tests/integration/org_profile_test.go index 69d7999bb9..9bb8bdade2 100644 --- a/tests/integration/org_profile_test.go +++ b/tests/integration/org_profile_test.go @@ -38,7 +38,7 @@ func getCreateProfileReadmeFileOptions(content string) api.CreateFileOptions { func createTestProfile(t *testing.T, orgName, profileRepoName, readmeContent string) { isPrivate := profileRepoName == user.RepoNameProfilePrivate - ctx := NewAPITestContext(t, "user1", profileRepoName, auth_model.AccessTokenScopeAll) + ctx := NewAPITestContext(t, "user1", profileRepoName, 0, auth_model.AccessTokenScopeAll) session := loginUser(t, "user1") tokenAdmin := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) diff --git a/tests/integration/pull_comment_test.go b/tests/integration/pull_comment_test.go index 56ef9972ad..b1beb22b1e 100644 --- a/tests/integration/pull_comment_test.go +++ b/tests/integration/pull_comment_test.go @@ -32,10 +32,10 @@ func testWaitForPullRequestStatus(t *testing.T, prIssue *issues_model.Issue, exp func testPullCommentRebase(t *testing.T, u *url.URL, session *TestSession) { testPRTitle := "Test PR for rebase comment" // make a change on forked branch - testEditFile(t, session, "user1", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "test-branch/rebase", "test-branch/rebase", testPRTitle) // create a conflict on base repo branch - testEditFile(t, session, "user2", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited Conflicted)\n") + testEditFile(t, session, 0, "user2", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited Conflicted)\n") // Now the pull request status should be conflicted testWaitForPullRequestStatus(t, &issues_model.Issue{Title: testPRTitle}, issues_model.PullRequestStatusConflict) @@ -79,10 +79,10 @@ func testPullCommentRetarget(t *testing.T, _ *url.URL, session *TestSession) { // keep a non-conflict branch testCreateBranch(t, session, "user2", "repo1", "branch/test-branch/retarget", "test-branch/retarget-no-conflict", http.StatusSeeOther) // make a change on forked branch - testEditFile(t, session, "user1", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "test-branch/retarget", "test-branch/retarget", testPRTitle) // create a conflict line on user2/repo1 README.md - testEditFile(t, session, "user2", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited Conflicted)\n") + testEditFile(t, session, 0, "user2", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited Conflicted)\n") // Now the pull request status should be conflicted prIssue := testWaitForPullRequestStatus(t, &issues_model.Issue{Title: testPRTitle}, issues_model.PullRequestStatusConflict) diff --git a/tests/integration/pull_compare_test.go b/tests/integration/pull_compare_test.go index da00b3fd56..9f2b947f65 100644 --- a/tests/integration/pull_compare_test.go +++ b/tests/integration/pull_compare_test.go @@ -61,7 +61,7 @@ func TestPullCompare(t *testing.T) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) - testEditFile(t, session, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "master1", "This is a pull title") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -101,7 +101,7 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) { assert.True(t, forkedRepo.IsPrivate) // user4 creates a new branch and a PR - testEditFileToNewBranch(t, user4Session, "user4", forkedRepoName, "master", "user4/update-readme", "README.md", "Hello, World\n(Edited by user4)\n") + testEditFileToNewBranch(t, user4Session, 0, "user4", forkedRepoName, "master", "user4/update-readme", "README.md", "Hello, World\n(Edited by user4)\n") resp := testPullCreateDirectly(t, user4Session, createPullRequestOptions{ BaseRepoOwner: repo3.OwnerName, BaseRepoName: repo3.Name, diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index 48e8c96d38..86a7b4750f 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -138,7 +138,7 @@ func TestPullCreate(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo1.NumPulls) assert.Equal(t, 3, repo1.NumOpenPulls) @@ -200,7 +200,7 @@ func TestPullBranchDelete(t *testing.T) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) - testEditFile(t, session, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master1", "This is a pull title") // check the redirected URL @@ -238,7 +238,7 @@ func TestPullCreatePrFromBaseToFork(t *testing.T) { // Edit base repository sessionBase := loginUser(t, "user2") - testEditFile(t, sessionBase, "user2", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, sessionBase, 0, "user2", "repo1", "master", "README.md", "Hello, World (Edited)\n") // Create a PR resp := testPullCreateDirectly(t, sessionFork, createPullRequestOptions{ @@ -355,7 +355,7 @@ func TestPullCreateParallel(t *testing.T) { for i := range 5 { wg.Go(func() { branchName := fmt.Sprintf("new-branch-%d", i) - testEditFileToNewBranch(t, sessionFork, "user1", "repo1", "master", branchName, "README.md", fmt.Sprintf("Hello, World (Edited) %d\n", i)) + testEditFileToNewBranch(t, sessionFork, 0, "user1", "repo1", "master", branchName, "README.md", fmt.Sprintf("Hello, World (Edited) %d\n", i)) // Create a PR resp := testPullCreateDirectly(t, sessionFork, createPullRequestOptions{ @@ -441,7 +441,7 @@ func TestCreatePullWhenBlocked(t *testing.T) { MakeRequest(t, req, http.StatusNoContent) // 2. User1 adds changes to fork - testEditFile(t, sessionFork, ForkOwner, "forkrepo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, sessionFork, 0, ForkOwner, "forkrepo1", "master", "README.md", "Hello, World (Edited)\n") // 3. User1 attempts to create a pull request testPullCreateFailure(t, sessionFork, RepoOwner, "repo1", "master", ForkOwner, "forkrepo1", "master", "This is a pull title") diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index 96d17c6131..041e2436ba 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -11,14 +11,12 @@ import ( "net/url" "os" "path" - "path/filepath" "strconv" "strings" "testing" "time" auth_model "code.gitea.io/gitea/models/auth" - "code.gitea.io/gitea/models/db" git_model "code.gitea.io/gitea/models/git" issues_model "code.gitea.io/gitea/models/issues" pull_model "code.gitea.io/gitea/models/pull" @@ -53,7 +51,7 @@ type MergeOptions struct { DeleteBranch bool } -func testPullMerge(t *testing.T, session *TestSession, user, repo, pullNum string, mergeOptions MergeOptions) *httptest.ResponseRecorder { +func testPullMerge(t *testing.T, session *TestSession, user, repo string, groupID int64, pullNum string, mergeOptions MergeOptions) *httptest.ResponseRecorder { options := map[string]string{ "do": string(mergeOptions.Style), "head_commit_id": mergeOptions.HeadCommitID, @@ -68,10 +66,15 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo, pullNum strin redirect := test.RedirectURL(resp) assert.Equal(t, fmt.Sprintf("/%s/%s/pulls/%s", user, repo, pullNum), redirect) + var groupSegment string + if groupID > 0 { + groupSegment = fmt.Sprintf("%d/", groupID) + } + assert.Equal(t, fmt.Sprintf("/%s/%s%s/pulls/%s", user, groupSegment, repo, pullNum), redirect) 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, groupID) assert.NoError(t, err) pull, err := issues_model.GetPullRequestByIndex(t.Context(), repository.ID, pullNumInt) assert.NoError(t, err) @@ -115,7 +118,7 @@ func TestPullMerge(t *testing.T) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -129,7 +132,7 @@ func TestPullMerge(t *testing.T) { elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -147,7 +150,7 @@ func TestPullRebase(t *testing.T) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -161,7 +164,7 @@ func TestPullRebase(t *testing.T) { elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleRebase, DeleteBranch: false, }) @@ -179,7 +182,7 @@ func TestPullRebaseMerge(t *testing.T) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -193,7 +196,7 @@ func TestPullRebaseMerge(t *testing.T) { elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleRebaseMerge, DeleteBranch: false, }) @@ -211,14 +214,14 @@ func TestPullSquash(t *testing.T) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleSquash, DeleteBranch: false, }) @@ -232,8 +235,8 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -253,7 +256,7 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { assert.Equal(t, 4, repo.NumPulls) assert.Equal(t, 4, repo.NumOpenPulls) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleSquash, DeleteBranch: false, HeadCommitID: headBranch.CommitID, @@ -270,7 +273,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -285,7 +288,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { assert.Equal(t, 4, repo.NumPulls) assert.Equal(t, 4, repo.NumOpenPulls) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -316,7 +319,7 @@ func TestCantMergeWorkInProgress(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "[wip] This is a pull title") @@ -332,8 +335,8 @@ func TestCantMergeConflict(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") // Use API to create a conflicting pr token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -374,7 +377,7 @@ func TestCantMergeUnrelated(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") // Now we want to create a commit on a branch that is totally unrelated to our current head // Drop down to pure code at this point @@ -437,7 +440,7 @@ func TestCantMergeUnrelated(t *testing.T) { RunStdString(t.Context()) assert.NoError(t, err) - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") // Use API to create a conflicting pr token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -466,7 +469,7 @@ func TestFastForwardOnlyMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "update", "README.md", "Hello, World 2\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "update", "README.md", "Hello, World 2\n") // Use API to create a pr from update to master token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -587,8 +590,8 @@ func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "diverging", "README.md", "Hello, World diverged\n") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World 2\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "diverging", "README.md", "Hello, World diverged\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World 2\n") // Use API to create a pr from diverging to update token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -623,9 +626,9 @@ func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { func TestPullRetargetChildOnBranchDelete(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testEditFileToNewBranch(t, session, "user2", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n") + testEditFileToNewBranch(t, session, 0, "user2", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n") testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n(Edited - TestPullRetargetOnCleanup - child PR)") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n(Edited - TestPullRetargetOnCleanup - child PR)") respBasePR := testPullCreate(t, session, "user2", "repo1", true, "master", "base-pr", "Base Pull Request") elemBasePR := strings.Split(test.RedirectURL(respBasePR), "/") @@ -635,7 +638,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { elemChildPR := strings.Split(test.RedirectURL(respChildPR), "/") assert.Equal(t, "pulls", elemChildPR[3]) - testPullMerge(t, session, elemBasePR[1], elemBasePR[2], elemBasePR[4], MergeOptions{ + testPullMerge(t, session, elemBasePR[1], elemBasePR[2], 0, elemBasePR[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: true, }) @@ -661,8 +664,8 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") - testEditFileToNewBranch(t, session, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n(Edited - TestPullDontRetargetChildOnWrongRepo - child PR)") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n(Edited - TestPullDontRetargetChildOnWrongRepo - child PR)") respBasePR := testPullCreate(t, session, "user1", "repo1", false, "master", "base-pr", "Base Pull Request") elemBasePR := strings.Split(test.RedirectURL(respBasePR), "/") @@ -674,7 +677,7 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { defer test.MockVariableValue(&setting.Repository.PullRequest.RetargetChildrenOnMerge, false)() - testPullMerge(t, session, elemBasePR[1], elemBasePR[2], elemBasePR[4], MergeOptions{ + testPullMerge(t, session, elemBasePR[1], elemBasePR[2], 0, elemBasePR[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: true, }) @@ -701,7 +704,7 @@ func TestPullRequestMergedWithNoPermissionDeleteBranch(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user4") testRepoFork(t, session, "user2", "repo1", "user4", "repo1", "") - testEditFileToNewBranch(t, session, "user4", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") + testEditFileToNewBranch(t, session, 0, "user4", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") respBasePR := testPullCreate(t, session, "user4", "repo1", false, "master", "base-pr", "Base Pull Request") elemBasePR := strings.Split(test.RedirectURL(respBasePR), "/") @@ -709,7 +712,7 @@ func TestPullRequestMergedWithNoPermissionDeleteBranch(t *testing.T) { // user2 has no permission to delete branch of repo user1/repo1 session2 := loginUser(t, "user2") - testPullMerge(t, session2, elemBasePR[1], elemBasePR[2], elemBasePR[4], MergeOptions{ + testPullMerge(t, session2, elemBasePR[1], elemBasePR[2], 0, elemBasePR[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: true, }) @@ -726,7 +729,7 @@ func TestPullMergeIndexerNotifier(t *testing.T) { // create a pull request session := loginUser(t, "user1") // FIXME: don't use admin user for testing testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") createPullResp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "Indexer notifier test pull") assert.NoError(t, queue.GetManager().FlushAll(t.Context(), 0)) @@ -759,7 +762,7 @@ func TestPullMergeIndexerNotifier(t *testing.T) { // merge the pull request elem := strings.Split(test.RedirectURL(createPullResp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -788,7 +791,7 @@ func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) forkedName := "repo1-1" testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") - testEditFile(t, session, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", forkedName, false, "master", "master", "Indexer notifier test pull") baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -871,7 +874,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { forkSession := loginUser(t, "user5") forkedName := "repo1-fork" testRepoFork(t, forkSession, "user2", "repo1", forkUser.Name, forkedName, "") - testEditFile(t, forkSession, forkUser.Name, forkedName, "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, forkSession, 0, forkUser.Name, forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, forkSession, forkUser.Name, forkedName, false, "master", "master", "Indexer notifier test pull") baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -944,7 +947,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { func TestPullAutoMergeAfterCommitStatusSucceedAndApprovalForAgitFlow(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { // create a pull request - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) dstPath := t.TempDir() @@ -1058,7 +1061,7 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing forkedName := "repo1-1" testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") - testEditFile(t, session, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", forkedName, false, "master", "master", "Indexer notifier test pull") baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -1096,13 +1099,13 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { func TestPullSquashMergeEmpty(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testEditFileToNewBranch(t, session, "user2", "repo1", "master", "pr-squash-empty", "README.md", "Hello, World (Edited)\n") + testEditFileToNewBranch(t, session, 0, "user2", "repo1", "master", "pr-squash-empty", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user2", "repo1", false, "master", "pr-squash-empty", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - httpContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) dstPath := t.TempDir() u.Path = httpContext.GitPath() @@ -1118,7 +1121,7 @@ func TestPullSquashMergeEmpty(t *testing.T) { doGitPushTestRepository(dstPath)(t) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleSquash, DeleteBranch: false, }) diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index b38a037870..9579976d8d 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -224,11 +224,11 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { t.Run("Submit approve/reject review on merged PR", func(t *testing.T) { // Create a merged PR (made by user1) in the upstream repo1. - testEditFile(t, user1Session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, user1Session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, user1Session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, user1Session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -242,7 +242,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { t.Run("Submit approve/reject review on closed PR", func(t *testing.T) { // Created a closed PR (made by user1) in the upstream repo1. - testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Edited...again)\n") + testEditFileToNewBranch(t, user1Session, 0, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Edited...again)\n") resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "a-test-branch", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) diff --git a/tests/integration/pull_status_test.go b/tests/integration/pull_status_test.go index 16b415c364..272d21a29b 100644 --- a/tests/integration/pull_status_test.go +++ b/tests/integration/pull_status_test.go @@ -29,7 +29,7 @@ func TestPullCreate_CommitStatus(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "status1", "README.md", "status1") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "status1", "README.md", "status1") req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", map[string]string{ @@ -70,7 +70,7 @@ func TestPullCreate_CommitStatus(t *testing.T) { commitstatus.CommitStatusWarning: "gitea-exclamation", } - testCtx := NewAPITestContext(t, "user1", "repo1", auth_model.AccessTokenScopeWriteRepository) + testCtx := NewAPITestContext(t, "user1", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) // Update commit status, and check if icon is updated as well for _, status := range statusList { @@ -117,8 +117,8 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "status1", "README.md", "status1") - testEditFile(t, session, "user1", "repo1", "status1", "README.md", "# repo1\n\nDescription for repo1") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "status1", "README.md", "status1") + testEditFile(t, session, 0, "user1", "repo1", "status1", "README.md", "# repo1\n\nDescription for repo1") req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", map[string]string{ @@ -197,7 +197,7 @@ func TestPullStatusDelayCheck(t *testing.T) { // when base branch changes, PR status should be updated, but it is inactive for long time, so no real check issue3, checkedPrID = run(t, func(t *testing.T) { - testEditFile(t, session, "user2", "repo1", "master", "README.md", "new content 1") + testEditFile(t, session, 0, "user2", "repo1", "master", "README.md", "new content 1") }) assert.Equal(t, issues.PullRequestStatusChecking, issue3.PullRequest.Status) assert.Zero(t, checkedPrID) @@ -213,7 +213,7 @@ func TestPullStatusDelayCheck(t *testing.T) { // when base branch changes, still so no real check issue3, checkedPrID = run(t, func(t *testing.T) { - testEditFile(t, session, "user2", "repo1", "master", "README.md", "new content 2") + testEditFile(t, session, 0, "user2", "repo1", "master", "README.md", "new content 2") }) assert.Equal(t, issues.PullRequestStatusChecking, issue3.PullRequest.Status) assert.Zero(t, checkedPrID) @@ -221,7 +221,7 @@ func TestPullStatusDelayCheck(t *testing.T) { // then allow to check PRs without delay, when base branch changes, the PRs will be checked setting.Repository.PullRequest.DelayCheckForInactiveDays = -1 issue3, checkedPrID = run(t, func(t *testing.T) { - testEditFile(t, session, "user2", "repo1", "master", "README.md", "new content 3") + testEditFile(t, session, 0, "user2", "repo1", "master", "README.md", "new content 3") }) assert.Equal(t, issues.PullRequestStatusChecking, issue3.PullRequest.Status) assert.Equal(t, issue3.PullRequest.ID, checkedPrID) diff --git a/tests/integration/repo_activity_test.go b/tests/integration/repo_activity_test.go index 7781fd0511..0d2c4a44b7 100644 --- a/tests/integration/repo_activity_test.go +++ b/tests/integration/repo_activity_test.go @@ -23,19 +23,19 @@ func TestRepoActivity(t *testing.T) { // Create PRs (1 merged & 2 proposed) testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feat/better_readme", "README.md", "Hello, World (Edited Again)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feat/better_readme", "README.md", "Hello, World (Edited Again)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "feat/better_readme", "This is a pull title") - testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feat/much_better_readme", "README.md", "Hello, World (Edited More)\n") + testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feat/much_better_readme", "README.md", "Hello, World (Edited More)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "feat/much_better_readme", "This is a pull title") // Create issues (3 new issues) diff --git a/tests/integration/repo_branch_test.go b/tests/integration/repo_branch_test.go index 792ffb6011..5c2b7864b9 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -204,7 +204,7 @@ func prepareRepoPR(t *testing.T, baseSession, headSession *TestSession, baseRepo testCreateBranch(t, headSession, headRepo.OwnerName, headRepo.Name, "branch/new-commit", "merged-pr", http.StatusSeeOther) prID = testCreatePullToDefaultBranch(t, baseSession, baseRepo, headRepo, "merged-pr", "merged pr") testAPINewFile(t, headSession, headRepo.OwnerName, headRepo.Name, "merged-pr", fmt.Sprintf("new-commit-%s.txt", headRepo.Name), "new-commit") - testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, prID, MergeOptions{ + testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, prID, MergeOptions{ Style: repo_model.MergeStyleRebaseMerge, DeleteBranch: false, }) @@ -213,7 +213,7 @@ func prepareRepoPR(t *testing.T, baseSession, headSession *TestSession, baseRepo testCreateBranch(t, headSession, headRepo.OwnerName, headRepo.Name, "branch/new-commit", "merged-pr-deleted", http.StatusSeeOther) prID = testCreatePullToDefaultBranch(t, baseSession, baseRepo, headRepo, "merged-pr-deleted", "merged pr with deleted branch") testAPINewFile(t, headSession, headRepo.OwnerName, headRepo.Name, "merged-pr-deleted", fmt.Sprintf("new-commit-%s-2.txt", headRepo.Name), "new-commit") - testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, prID, MergeOptions{ + testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, prID, MergeOptions{ Style: repo_model.MergeStyleRebaseMerge, DeleteBranch: true, }) diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index 3bcea83f43..c36fa5a276 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -84,7 +84,7 @@ func TestRepoCommitsWithStatus(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") - ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) requestCommitStatuses := func(t *testing.T, linkList, linkCombined string) (statuses []*api.CommitStatus, status api.CombinedStatus) { assert.NoError(t, json.Unmarshal(session.MakeRequest(t, NewRequest(t, "GET", linkList), http.StatusOK).Body.Bytes(), &statuses)) @@ -183,7 +183,7 @@ func TestRepoCommitsStatusParallel(t *testing.T) { wg.Add(1) go func(parentT *testing.T, i int) { parentT.Run(fmt.Sprintf("ParallelCreateStatus_%d", i), func(t *testing.T) { - ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) doAPICreateCommitStatusTest(ctx, path.Base(commitURL), commitstatus.CommitStatusPending, "testci")(t) wg.Done() }) @@ -208,7 +208,7 @@ func TestRepoCommitsStatusMultiple(t *testing.T) { assert.NotEmpty(t, commitURL) // Call API to add status for commit - ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) t.Run("CreateStatus", doAPICreateCommitStatusTest(ctx, path.Base(commitURL), commitstatus.CommitStatusSuccess, "testci")) t.Run("CreateStatus", doAPICreateCommitStatusTest(ctx, path.Base(commitURL), commitstatus.CommitStatusSuccess, "other_context")) req = NewRequest(t, "GET", "/user2/repo1/commits/branch/master") diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index eef83a794e..87c069e873 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -46,7 +46,7 @@ func TestCreateNewTagProtected(t *testing.T) { t.Run("Git", func(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - httpContext := NewAPITestContext(t, owner.Name, repo.Name) + httpContext := NewAPITestContext(t, owner.Name, repo.Name, repo.GroupID) dstPath := t.TempDir() @@ -66,7 +66,7 @@ func TestCreateNewTagProtected(t *testing.T) { t.Run("GitTagForce", func(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - httpContext := NewAPITestContext(t, owner.Name, repo.Name) + httpContext := NewAPITestContext(t, owner.Name, repo.Name, repo.GroupID) dstPath := t.TempDir() @@ -129,7 +129,7 @@ func TestRepushTag(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - httpContext := NewAPITestContext(t, owner.Name, repo.Name) + httpContext := NewAPITestContext(t, owner.Name, repo.Name, repo.GroupID) dstPath := t.TempDir() diff --git a/tests/integration/repo_watch_test.go b/tests/integration/repo_watch_test.go index ef3028f293..48cdaceebf 100644 --- a/tests/integration/repo_watch_test.go +++ b/tests/integration/repo_watch_test.go @@ -18,7 +18,7 @@ func TestRepoWatch(t *testing.T) { setting.Service.AutoWatchOnChanges = true session := loginUser(t, "user2") unittest.AssertNotExistsBean(t, &repo_model.Watch{UserID: 2, RepoID: 3}) - testEditFile(t, session, "org3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n") + testEditFile(t, session, 0, "org3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n") unittest.AssertExistsAndLoadBean(t, &repo_model.Watch{UserID: 2, RepoID: 3, Mode: repo_model.WatchModeAuto}) }) } diff --git a/tests/integration/repo_webhook_test.go b/tests/integration/repo_webhook_test.go index c940fe3893..455da3d610 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -683,7 +683,7 @@ func Test_WebhookPullRequest(t *testing.T) { }, http.StatusOK) defer provider.Close() - testCtx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeAll) + testCtx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeAll) // add user4 as collabrator so that it can be a reviewer doAPIAddCollaborator(testCtx, "user4", perm.AccessModeWrite)(t) @@ -932,7 +932,7 @@ func Test_WebhookStatus(t *testing.T) { assert.NoError(t, err) // 2. trigger the webhook - testCtx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeAll) + testCtx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeAll) // update a status for a commit via API doAPICreateCommitStatusTest(testCtx, commitID, commitstatus.CommitStatusSuccess, "testci")(t) @@ -1025,7 +1025,7 @@ jobs: - run: echo 'cmd 2' ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, repo1.GroupID, opts) + createWorkflowFile(t, token, "user2", "repo1", repo1.GroupID, wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1187,7 +1187,7 @@ func testWorkflowRunEvents(t *testing.T, webhookData *workflowRunWebhook) { session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1266,7 +1266,7 @@ jobs: steps: - run: exit 0` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", 0, wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1312,7 +1312,7 @@ func testWorkflowRunEventsOnRerun(t *testing.T, webhookData *workflowRunWebhook) runners[i].registerAsRepoRunner(t, "user2", "repo1", fmt.Sprintf("mock-runner-%d", i), []string{"ubuntu-latest"}, false) } - testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1391,7 +1391,7 @@ jobs: steps: - run: exit 0` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", 0, wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1483,7 +1483,7 @@ func testWorkflowRunEventsOnCancellingAbandonedRun(t *testing.T, webhookData *wo fmt.Sprintf("mock-runner-%d", i), []string{"ubuntu-latest"}, false) } - testAPICreateWebhookForRepo(t, session, "user2", repoName, webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, 0, "user2", repoName, webhookData.URL, "workflow_run") ctx := t.Context() gitRepo, err := gitrepo.OpenRepository(ctx, testRepo) @@ -1563,7 +1563,7 @@ jobs: - run: exit 0` opts := getWorkflowCreateFileOptions(user2, testRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", repoName, wfTreePath, opts) + createWorkflowFile(t, token, "user2", repoName, 0, wfTreePath, opts) commitID, err := gitRepo.GetBranchCommitID(testRepo.DefaultBranch) assert.NoError(t, err) @@ -1724,7 +1724,7 @@ jobs: steps: - run: echo 'test the webhook' `) - createWorkflowFile(t, token, "user2", "repo1", ".gitea/workflows/dispatch.yml", repo1.GroupID, opts) + createWorkflowFile(t, token, "user2", "repo1", 0, ".gitea/workflows/dispatch.yml", opts) // 2.2 trigger the webhooks @@ -1746,7 +1746,7 @@ jobs: - run: echo 'cmd 2' ` opts = getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, repo1.GroupID, opts) + createWorkflowFile(t, token, "user2", "repo1", repo1.GroupID, wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1826,7 +1826,7 @@ jobs: - run: echo 'test the webhook' ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", wfTreePath, repo1.GroupID, opts) + createWorkflowFile(t, token, "user2", "repo1", repo1.GroupID, wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) diff --git a/tests/integration/ssh_key_test.go b/tests/integration/ssh_key_test.go index 1625dc3756..9679129455 100644 --- a/tests/integration/ssh_key_test.go +++ b/tests/integration/ssh_key_test.go @@ -48,8 +48,8 @@ func TestPushDeployKeyOnEmptyRepo(t *testing.T) { func testPushDeployKeyOnEmptyRepo(t *testing.T, u *url.URL) { // OK login - ctx := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - ctxWithDeleteRepo := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctxWithDeleteRepo := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) keyname := ctx.Reponame + "-push" u.Path = ctx.GitPath() @@ -92,8 +92,8 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { keyname := reponame + "-push" // OK login - ctx := NewAPITestContext(t, username, reponame, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - ctxWithDeleteRepo := NewAPITestContext(t, username, reponame, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, username, reponame, 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctxWithDeleteRepo := NewAPITestContext(t, username, reponame, 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) otherCtx := ctx otherCtx.Reponame = "ssh-key-test-repo-2" diff --git a/tests/integration/wiki_test.go b/tests/integration/wiki_test.go index 5718156ffa..c74560f4e4 100644 --- a/tests/integration/wiki_test.go +++ b/tests/integration/wiki_test.go @@ -80,7 +80,7 @@ func Test_WikiClone(t *testing.T) { reponame := "repo1" wikiPath := username + "/" + reponame + ".wiki.git" keyname := "my-testing-key" - baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = wikiPath From a30e743e0a017e36e0d9c60d8b8c6e0a209e7abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 16:38:52 -0500 Subject: [PATCH 102/218] update calls to `GetRepositoryByName` to use new signature --- routers/web/user/package.go | 2 +- services/forms/user_form.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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/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 From 13aca0264ba5f0be41011b39abf84bb44327788d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 16:55:37 -0500 Subject: [PATCH 103/218] update swagger definitions --- templates/swagger/v1_groups.json | 15141 +++++++++++++++++++++++++++++ templates/swagger/v1_json.tmpl | 113 +- 2 files changed, 15248 insertions(+), 6 deletions(-) create mode 100644 templates/swagger/v1_groups.json diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json new file mode 100644 index 0000000000..ab4fbeba22 --- /dev/null +++ b/templates/swagger/v1_groups.json @@ -0,0 +1,15141 @@ +{ + "paths": { + "/admin/unadopted/{owner}/group/{group_id}/{repo}": { + "delete": { + "operationId": "adminDeleteUnadoptedRepository", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "summary": "Delete unadopted files", + "tags": [ + "admin" + ] + }, + "post": { + "operationId": "adminAdoptRepository", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Adopt unadopted files as a repository", + "tags": [ + "admin" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}": { + "delete": { + "operationId": "repoDelete", + "parameters": [ + { + "description": "owner of the repo to delete", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to delete", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGet", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a repository", + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEdit", + "parameters": [ + { + "description": "owner of the repo to edit", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to edit", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "Properties of a repo that you can edit", + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/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": "getArtifacts", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the artifact", + "in": "query", + "name": "name", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Lists all artifacts for a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { + "delete": { + "operationId": "deleteArtifact", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the artifact", + "in": "path", + "name": "artifact_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Deletes a specific artifact for a workflow run", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "getArtifact", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the artifact", + "in": "path", + "name": "artifact_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Artifact" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/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": "downloadArtifact", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the artifact", + "in": "path", + "name": "artifact_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "302": { + "description": "redirect to the blob download" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/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": "listWorkflowJobs", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "in": "query", + "name": "status", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Lists all jobs for a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { + "get": { + "operationId": "getWorkflowJob", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the job", + "in": "path", + "name": "job_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowJob" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/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": "downloadActionsRunJobLogs", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the job", + "in": "path", + "name": "job_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "output blob content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Downloads the job logs for a workflow run", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { + "get": { + "operationId": "getRepoRunners", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get repo-level runners", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + }, + "summary": "Get a repository's actions runner registration token", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreateRunnerRegistrationToken", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/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": "deleteRepoRunner", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the runner", + "in": "path", + "name": "runner_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "runner has been deleted" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete an repo-level runner", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "getRepoRunner", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the runner", + "in": "path", + "name": "runner_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get an repo-level runner", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "get": { + "operationId": "getWorkflowRuns", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "workflow event name", + "in": "query", + "name": "event", + "type": "string" + }, + { + "description": "workflow branch", + "in": "query", + "name": "branch", + "type": "string" + }, + { + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "in": "query", + "name": "status", + "type": "string" + }, + { + "description": "triggered by user", + "in": "query", + "name": "actor", + "type": "string" + }, + { + "description": "triggering sha of the workflow run", + "in": "query", + "name": "head_sha", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowRunsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Lists all runs for a repository run", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "delete": { + "operationId": "deleteActionRun", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "runid of the workflow run", + "in": "path", + "name": "run", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a workflow run", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "GetWorkflowRun", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the run", + "in": "path", + "name": "run", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Gets a specific workflow run", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { + "get": { + "operationId": "getArtifactsOfRun", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "runid of the workflow run", + "in": "path", + "name": "run", + "required": true, + "type": "integer" + }, + { + "description": "name of the artifact", + "in": "query", + "name": "name", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Lists all artifacts for a repository run", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "get": { + "operationId": "listWorkflowRunJobs", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "runid of the workflow run", + "in": "path", + "name": "run", + "required": true, + "type": "integer" + }, + { + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "in": "query", + "name": "status", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Lists all jobs for a workflow run", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List an repo's actions secrets", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "deleteRepoSecret", + "parameters": [ + { + "description": "owner of the repository", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the secret", + "in": "path", + "name": "secretname", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "delete one secret of the repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a secret in a repository", + "tags": [ + "repository" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "operationId": "updateRepoSecret", + "parameters": [ + { + "description": "owner of the repository", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the secret", + "in": "path", + "name": "secretname", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Create or Update a secret value in a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "get": { + "operationId": "ListActionTasks", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results, default maximum page size is 50", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "List a repository's action tasks", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "get": { + "operationId": "getRepoVariablesList", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get repo-level variables list", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "delete": { + "operationId": "deleteRepoVariable", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the variable", + "in": "path", + "name": "variablename", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Delete a repo-level variable", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "getRepoVariable", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the variable", + "in": "path", + "name": "variablename", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a repo-level variable", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "createRepoVariable", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the variable", + "in": "path", + "name": "variablename", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "description": "response when creating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "409": { + "description": "variable name already exists." + }, + "500": { + "$ref": "#/responses/error" + } + }, + "summary": "Create a repo-level variable", + "tags": [ + "repository" + ] + }, + "put": { + "operationId": "updateRepoVariable", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repository", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the variable", + "in": "path", + "name": "variablename", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Update a repo-level variable", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { + "get": { + "operationId": "ActionsListRepositoryWorkflows", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "List repository workflows", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "get": { + "operationId": "ActionsGetWorkflow", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the workflow", + "in": "path", + "name": "workflow_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Get a workflow", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { + "operationId": "ActionsDisableWorkflow", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the workflow", + "in": "path", + "name": "workflow_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Disable a workflow", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { + "post": { + "operationId": "ActionsDispatchWorkflow", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the workflow", + "in": "path", + "name": "workflow_id", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateActionWorkflowDispatch" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Create a workflow dispatch event", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { + "put": { + "operationId": "ActionsEnableWorkflow", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the workflow", + "in": "path", + "name": "workflow_id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Enable a workflow", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { + "get": { + "operationId": "repoListActivityFeeds", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "the date of the activities to be found", + "format": "date", + "in": "query", + "name": "date", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's activity feeds", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "get": { + "operationId": "repoGetArchive", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "in": "path", + "name": "archive", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get an archive of a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "get": { + "operationId": "repoGetAssignees", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/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": "repoDeleteAvatar", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete avatar", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoUpdateAvatar", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/UpdateRepoAvatarOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Update avatar", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "get": { + "operationId": "repoListBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + }, + "summary": "List branch protections for a repository", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Create a branch protections for a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoUpdateBranchProtectionPriories", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/UpdateBranchProtectionPriories" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/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": "repoDeleteBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of protected branch", + "in": "path", + "name": "name", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a specific branch protection for the repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of protected branch", + "in": "path", + "name": "name", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a specific branch protection for the repository", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoEditBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of protected branch", + "in": "path", + "name": "name", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/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": "repoListBranches", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + }, + "summary": "List a repository's branches", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateBranch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateBranchRepoOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Create a branch", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { + "delete": { + "operationId": "repoDeleteBranch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "branch to delete", + "in": "path", + "name": "branch", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Delete a specific branch from a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetBranch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "branch to get", + "in": "path", + "name": "branch", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoRenameBranch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the branch", + "in": "path", + "name": "branch", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/RenameBranchRepoOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Rename a branch", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators": { + "get": { + "operationId": "repoListCollaborators", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's collaborators", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "delete": { + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "username of the collaborator to delete", + "in": "path", + "name": "collaborator", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Delete a collaborator from a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoCheckCollaborator", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "username of the user to check for being a collaborator", + "in": "path", + "name": "collaborator", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Check if a user is a collaborator of a repository", + "tags": [ + "repository" + ] + }, + "put": { + "operationId": "repoAddCollaborator", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "username of the user to add or update as a collaborator", + "in": "path", + "name": "collaborator", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Add or Update a collaborator to a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "operationId": "repoGetRepoPermissions", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "username of the collaborator whose permissions are to be obtained", + "in": "path", + "name": "collaborator", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get repository permissions for a user", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits": { + "get": { + "operationId": "repoGetAllCommits", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "SHA or branch to start listing commits from (usually 'master')", + "in": "query", + "name": "sha", + "type": "string" + }, + { + "description": "filepath of a file/dir", + "in": "query", + "name": "path", + "type": "string" + }, + { + "description": "Only commits after this date will be returned (ISO 8601 format)", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "Only commits before this date will be returned (ISO 8601 format)", + "format": "date-time", + "in": "query", + "name": "until", + "type": "string" + }, + { + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "stat", + "type": "boolean" + }, + { + "description": "include verification for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "verification", + "type": "boolean" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "files", + "type": "boolean" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results (ignored if used with 'path')", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "commits that match the given specifier will not be listed.", + "in": "query", + "name": "not", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/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": "repoGetCombinedStatusByRef", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of branch/tag/commit", + "in": "path", + "name": "ref", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/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": "repoListStatusesByRef", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of branch/tag/commit", + "in": "path", + "name": "ref", + "required": true, + "type": "string" + }, + { + "description": "type of sort", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "in": "query", + "name": "sort", + "type": "string" + }, + { + "description": "type of state", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "in": "query", + "name": "state", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/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": "repoGetCommitPullRequest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "SHA of the commit to get", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get the merged pull request of the commit", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { + "get": { + "operationId": "repoCompareDiff", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "compare two branches or commits", + "in": "path", + "name": "basehead", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/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": "repoGetContentsList", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Gets the metadata of all the entries of the root dir.", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoChangeFiles", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/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": "repoGetContentsExt", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "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.", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "description": "the name of the commit/branch/tag, default to the repository’s default branch.", + "in": "query", + "name": "ref", + "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", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsExtResponse" + }, + "404": { + "$ref": "#/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": { + "consumes": [ + "application/json" + ], + "operationId": "repoDeleteFile", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "path of the file to delete", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "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": "repoGetContents", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "path of the dir, file, symlink or submodule in the repo", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/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": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateFile", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "path of the file to create", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Create a file in a repository", + "tags": [ + "repository" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "operationId": "repoUpdateFile", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "path of the file to update", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "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": { + "consumes": [ + "application/json" + ], + "operationId": "repoApplyDiffPatch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Apply diff patch to repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { + "get": { + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "filepath of file to get", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/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": "repoGetFileContents", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", + "in": "query", + "name": "body", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/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": "repoGetFileContentsPost", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetFilesOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get the metadata and contents of requested files", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/forks": { + "get": { + "operationId": "listForks", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's forks", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "createFork", + "parameters": [ + { + "description": "owner of the repo to fork", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to fork", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateForkOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Fork a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { + "operationId": "GetBlob", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "sha of the commit", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Gets the blob of a repository.", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { + "get": { + "operationId": "repoGetSingleCommit", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "a git ref or commit sha", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "stat", + "type": "boolean" + }, + { + "description": "include verification for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "verification", + "type": "boolean" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "files", + "type": "boolean" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Get a single commit from a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { + "get": { + "operationId": "repoDownloadCommitDiffOrPatch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "SHA of the commit to get", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "whether the output is diff or patch", + "enum": [ + "diff", + "patch" + ], + "in": "path", + "name": "diffType", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "text/plain" + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a commit's diff or patch", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { + "get": { + "operationId": "repoGetNote", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "a git ref or commit sha", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "include verification for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "verification", + "type": "boolean" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "files", + "type": "boolean" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/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": "repoListAllGitRefs", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get specified ref or filtered repository's refs", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "get": { + "operationId": "repoListGitRefs", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "part or full name of the ref", + "in": "path", + "name": "ref", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get specified ref or filtered repository's refs", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { + "get": { + "operationId": "GetAnnotatedTag", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "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, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/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": "GetTree", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "sha of the commit", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "show all directories and files", + "in": "query", + "name": "recursive", + "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", + "type": "integer" + }, + { + "description": "number of items per page", + "in": "query", + "name": "per_page", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/GitTreeResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Gets the tree of a repository.", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks": { + "get": { + "operationId": "repoListHooks", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List the hooks in a repository", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Create a hook", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { + "get": { + "operationId": "repoListGitHooks", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/GitHookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List the Git hooks in a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { + "delete": { + "operationId": "repoDeleteGitHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the hook to get", + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a Git hook in a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetGitHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the hook to get", + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a Git hook", + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEditGitHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the hook to get", + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditGitHookOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Edit a Git hook in a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "delete": { + "operationId": "repoDeleteHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the hook to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a hook in a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the hook to get", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a hook", + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEditHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the hook", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Edit a hook in a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { + "operationId": "repoTestHook", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the hook to test", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Test a push webhook", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "get": { + "operationId": "repoGetIssueConfig", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Returns the issue config for a repo", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { + "get": { + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Returns the validation information for a issue config", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + "get": { + "operationId": "repoGetIssueTemplates", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/IssueTemplates" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get available issue templates for a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues": { + "get": { + "operationId": "issueListIssues", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "whether issue is open or closed", + "enum": [ + "closed", + "open", + "all" + ], + "in": "query", + "name": "state", + "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", + "type": "string" + }, + { + "description": "search string", + "in": "query", + "name": "q", + "type": "string" + }, + { + "description": "filter by type (issues / pulls) if set", + "enum": [ + "issues", + "pulls" + ], + "in": "query", + "name": "type", + "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", + "type": "string" + }, + { + "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "Only show items which were created by the given user", + "in": "query", + "name": "created_by", + "type": "string" + }, + { + "description": "Only show items for which the given user is assigned", + "in": "query", + "name": "assigned_by", + "type": "string" + }, + { + "description": "Only show items in which the given user was mentioned", + "in": "query", + "name": "mentioned_by", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's issues", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueCreateIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "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": "issueGetRepoComments", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "if provided, only comments updated since the provided time are returned.", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "if provided, only comments updated before the provided time are returned.", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List all comments in a repository", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "delete": { + "operationId": "issueDeleteComment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of comment to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a comment", + "tags": [ + "issue" + ] + }, + "get": { + "consumes": [ + "application/json" + ], + "operationId": "issueGetComment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a comment", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditComment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Edit a comment", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { + "get": { + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "summary": "List comment's attachments", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "operationId": "issueCreateIssueCommentAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "name of the attachment", + "in": "query", + "name": "name", + "type": "string" + }, + { + "description": "attachment to upload", + "in": "formData", + "name": "attachment", + "required": true, + "type": "file" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Create a comment attachment", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "delete": { + "operationId": "issueDeleteIssueCommentAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to delete", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Delete a comment attachment", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueGetIssueCommentAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to get", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "summary": "Get a comment attachment", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditIssueCommentAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to edit", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Edit a comment attachment", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueDeleteCommentReaction", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "content", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Remove a reaction from a comment of an issue", + "tags": [ + "issue" + ] + }, + "get": { + "consumes": [ + "application/json" + ], + "operationId": "issueGetCommentReactions", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a list of reactions from a comment of an issue", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issuePostCommentReaction", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the comment to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "content", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Add a reaction to a comment of an issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "get": { + "operationId": "repoListPinnedIssues", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repo's pinned issues", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "delete": { + "operationId": "issueDelete", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of issue to delete", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete an issue", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueGetIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to get", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get an issue", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to edit", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditIssueOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/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": "issueListIssueAttachments", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "summary": "List issue's attachments", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "name of the attachment", + "in": "query", + "name": "name", + "type": "string" + }, + { + "description": "attachment to upload", + "in": "formData", + "name": "attachment", + "required": true, + "type": "file" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Create an issue attachment", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + "delete": { + "operationId": "issueDeleteIssueAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to delete", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Delete an issue attachment", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueGetIssueAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to get", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "summary": "Get an issue attachment", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditIssueAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to edit", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Edit an issue attachment", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "delete": { + "operationId": "issueRemoveIssueBlocking", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "in": "path", + "name": "index", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Unblock the issue given in the body by the issue in path", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueListBlocks", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "in": "path", + "name": "index", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List issues that are blocked by this issue", + "tags": [ + "issue" + ] + }, + "post": { + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "in": "path", + "name": "index", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/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": "issueGetComments", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "if provided, only comments updated since the specified time are returned.", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "if provided, only comments updated before the provided time are returned.", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List all comments on an issue", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueCreateComment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Comment" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/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": "issueDeleteCommentDeprecated", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "this parameter is ignored", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of comment to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a comment", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "deprecated": true, + "operationId": "issueEditCommentDeprecated", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "this parameter is ignored", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the comment to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Edit a comment", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditIssueDeadline", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to create or update a deadline on", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/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": "issueRemoveIssueDependencies", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "in": "path", + "name": "index", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Remove an issue dependency", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueListIssueDependencies", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "in": "path", + "name": "index", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "tags": [ + "issue" + ] + }, + "post": { + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "in": "path", + "name": "index", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/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": "issueClearLabels", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Remove all labels from an issue", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueGetLabels", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get an issue's labels", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueAddLabel", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Add a label to an issue", + "tags": [ + "issue" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "operationId": "issueReplaceLabels", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Replace an issue's labels", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { + "delete": { + "operationId": "issueRemoveLabel", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the label to remove", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Remove a label from an issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueUnlockIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Unlock an issue", + "tags": [ + "issue" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "operationId": "issueLockIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/LockIssueOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Lock an issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { + "delete": { + "operationId": "unpinIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of issue to unpin", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Unpin an Issue", + "tags": [ + "issue" + ] + }, + "post": { + "operationId": "pinIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of issue to pin", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Pin an Issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "operationId": "moveIssuePin", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "the new position", + "format": "int64", + "in": "path", + "name": "position", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Moves the Pin to the given Position", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueDeleteIssueReaction", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "content", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Remove a reaction from an issue", + "tags": [ + "issue" + ] + }, + "get": { + "consumes": [ + "application/json" + ], + "operationId": "issueGetIssueReactions", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a list reactions of an issue", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issuePostIssueReaction", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "content", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Add a reaction to an issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueDeleteStopWatch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to stop the stopwatch on", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Delete an issue's existing stopwatch.", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueStartStopWatch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to create the stopwatch on", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Start stopwatch on an issue.", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueStopStopWatch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to stop the stopwatch on", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Stop an issue's existing stopwatch.", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { + "get": { + "consumes": [ + "application/json" + ], + "operationId": "issueSubscriptions", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get users who subscribed on an issue.", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "consumes": [ + "application/json" + ], + "operationId": "issueCheckSubscription", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Check if user is subscribed to an issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueDeleteSubscription", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "username of the user to unsubscribe from an issue", + "in": "path", + "name": "user", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Unsubscribe user from issue", + "tags": [ + "issue" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "operationId": "issueAddSubscription", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "username of the user to subscribe the issue to", + "in": "path", + "name": "user", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Subscribe user to issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "get": { + "operationId": "issueGetCommentsAndTimeline", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "if provided, only comments updated since the specified time are returned.", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "if provided, only comments updated before the provided time are returned.", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List all comments and events on an issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueResetTime", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue to add tracked time to", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Reset a tracked time of an issue", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueTrackedTimes", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "optional filter by user (available for issue managers)", + "in": "query", + "name": "user", + "type": "string" + }, + { + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List an issue's tracked times", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueAddTime", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Add tracked time to a issue", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { + "consumes": [ + "application/json" + ], + "operationId": "issueDeleteTime", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the issue", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of time to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete specific tracked time", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys": { + "get": { + "operationId": "repoListKeys", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "the key_id to search for", + "in": "query", + "name": "key_id", + "type": "integer" + }, + { + "description": "fingerprint of the key", + "in": "query", + "name": "fingerprint", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's keys", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateKey", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Add a key to a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "delete": { + "operationId": "repoDeleteKey", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the key to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a key from a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetKey", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the key to get", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a repository's key by id", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "get": { + "operationId": "issueListLabels", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get all of a repository's labels", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueCreateLabel", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Create a label", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "delete": { + "operationId": "issueDeleteLabel", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the label to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a label", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueGetLabel", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the label to get", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a single label", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditLabel", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the label to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Update a label", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/languages": { + "get": { + "operationId": "repoGetLanguages", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get languages and number of bytes of code written", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "get": { + "operationId": "repoGetLicenses", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/LicensesList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get repo licenses", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { + "get": { + "operationId": "repoGetRawFileOrLFS", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "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", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/octet-stream" + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/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": "repoMergeUpstream", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Merge a branch from upstream", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones": { + "get": { + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", + "in": "query", + "name": "state", + "type": "string" + }, + { + "description": "filter by milestone name", + "in": "query", + "name": "name", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get all of a repository's opened milestones", + "tags": [ + "issue" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "issueCreateMilestone", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Create a milestone", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "delete": { + "operationId": "issueDeleteMilestone", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "the milestone to delete, identified by ID and if not available by name", + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a milestone", + "tags": [ + "issue" + ] + }, + "get": { + "operationId": "issueGetMilestone", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "the milestone to get, identified by ID and if not available by name", + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a milestone", + "tags": [ + "issue" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "issueEditMilestone", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "the milestone to edit, identified by ID and if not available by name", + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Update a milestone", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "operationId": "repoMirrorSync", + "parameters": [ + { + "description": "owner of the repo to sync", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to sync", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Sync a mirrored repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { + "operationId": "repoNewPinAllowed", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Returns if new Issue Pins are allowed", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "get": { + "consumes": [ + "application/json" + ], + "operationId": "notifyGetRepoList", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "If true, show notifications marked as read. Default value is false", + "in": "query", + "name": "all", + "type": "boolean" + }, + { + "collectionFormat": "multi", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned", + "in": "query", + "items": { + "type": "string" + }, + "name": "status-types", + "type": "array" + }, + { + "collectionFormat": "multi", + "description": "filter notifications by subject type", + "in": "query", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "name": "subject-type", + "type": "array" + }, + { + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "summary": "List users's notification threads on a specific repo", + "tags": [ + "notification" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "operationId": "notifyReadRepoList", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "If true, mark all notifications on this repo. Default value is false", + "in": "query", + "name": "all", + "type": "string" + }, + { + "collectionFormat": "multi", + "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", + "in": "query", + "items": { + "type": "string" + }, + "name": "status-types", + "type": "array" + }, + { + "description": "Status to mark notifications as. Defaults to read.", + "in": "query", + "name": "to-status", + "type": "string" + }, + { + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", + "format": "date-time", + "in": "query", + "name": "last_read_at", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "205": { + "$ref": "#/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": "repoListPullRequests", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "Name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "Filter by target base branch of the pull request", + "in": "query", + "name": "base_branch", + "type": "string" + }, + { + "default": "open", + "description": "State of pull request", + "enum": [ + "open", + "closed", + "all" + ], + "in": "query", + "name": "state", + "type": "string" + }, + { + "description": "Type of sort", + "enum": [ + "oldest", + "recentupdate", + "recentclose", + "leastupdate", + "mostcomment", + "leastcomment", + "priority" + ], + "in": "query", + "name": "sort", + "type": "string" + }, + { + "description": "ID of the milestone", + "format": "int64", + "in": "query", + "name": "milestone", + "type": "integer" + }, + { + "collectionFormat": "multi", + "description": "Label IDs", + "in": "query", + "items": { + "format": "int64", + "type": "integer" + }, + "name": "labels", + "type": "array" + }, + { + "description": "Filter by pull request author", + "in": "query", + "name": "poster", + "type": "string" + }, + { + "default": 1, + "description": "Page number of results to return (1-based)", + "in": "query", + "minimum": 1, + "name": "page", + "type": "integer" + }, + { + "description": "Page size of results", + "in": "query", + "minimum": 0, + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" + } + }, + "summary": "List a repo's pull requests", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreatePullRequestOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Create a pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { + "operationId": "repoListPinnedPullRequests", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repo's pinned pull requests", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "get": { + "operationId": "repoGetPullRequestByBaseHead", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "base of the pull request to get", + "in": "path", + "name": "base", + "required": true, + "type": "string" + }, + { + "description": "head of the pull request to get", + "in": "path", + "name": "head", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a pull request by base and head", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "get": { + "operationId": "repoGetPullRequest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to get", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a pull request", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoEditPullRequest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to edit", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "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": "repoDownloadPullDiffOrPatch", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to get", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "whether the output is diff or patch", + "enum": [ + "diff", + "patch" + ], + "in": "path", + "name": "diffType", + "required": true, + "type": "string" + }, + { + "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", + "in": "query", + "name": "binary", + "type": "boolean" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "text/plain" + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a pull request diff or patch", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { + "operationId": "repoGetPullRequestCommits", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to get", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "include verification for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "verification", + "type": "boolean" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "in": "query", + "name": "files", + "type": "boolean" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get commits for a pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "get": { + "operationId": "repoGetPullRequestFiles", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to get", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "skip to given file", + "in": "query", + "name": "skip-to", + "type": "string" + }, + { + "description": "whitespace behavior", + "enum": [ + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" + ], + "in": "query", + "name": "whitespace", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ChangedFileList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get changed files for a pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { + "delete": { + "operationId": "repoCancelScheduledAutoMerge", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to merge", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Cancel the scheduled auto merge for the given pull request", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoPullRequestIsMerged", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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": "repoMergePullRequest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to merge", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Merge a pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { + "delete": { + "operationId": "repoDeletePullReviewRequests", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "cancel review requests for a pull request", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreatePullReviewRequests", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "create review requests for a pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { + "get": { + "operationId": "repoListPullReviews", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List all reviews for a pull request", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreatePullReview", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Create a review to an pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { + "delete": { + "operationId": "repoDeletePullReview", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a specific review from a pull request", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetPullReview", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a specific review for a pull request", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoSubmitPullReview", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Submit a pending review to an pull request", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { + "get": { + "operationId": "repoGetPullReviewComments", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/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": "repoDismissPullReview", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/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": "repoUnDismissPullReview", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/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": "repoUpdatePullRequest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request to get", + "format": "int64", + "in": "path", + "name": "index", + "required": true, + "type": "integer" + }, + { + "description": "how to update pull request", + "enum": [ + "merge", + "rebase" + ], + "in": "query", + "name": "style", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Merge PR's baseBranch into headBranch", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "get": { + "operationId": "repoListPushMirrors", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirrorList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get all push mirrors of the repository", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoAddPushMirror", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreatePushMirrorOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "add a push mirror to the repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { + "post": { + "operationId": "repoPushMirrorSync", + "parameters": [ + { + "description": "owner of the repo to sync", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to sync", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Sync all push mirrored repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "delete": { + "operationId": "repoDeletePushMirror", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "remote name of the pushMirror", + "in": "path", + "name": "name", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "deletes a push mirror from a repository by remoteName", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "remote name of push mirror", + "in": "path", + "name": "name", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get push mirror of the repository by remoteName", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { + "get": { + "operationId": "repoGetRawFile", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "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", + "in": "path", + "name": "filepath", + "required": true, + "type": "string" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "in": "query", + "name": "ref", + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/octet-stream" + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a file from a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases": { + "get": { + "operationId": "repoListReleases", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "in": "query", + "name": "draft", + "type": "boolean" + }, + { + "description": "filter (exclude / include) pre-releases", + "in": "query", + "name": "pre-release", + "type": "boolean" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/ReleaseList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repo's releases", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateRelease", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Create a release", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { + "get": { + "operationId": "repoGetLatestRelease", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/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": "repoDeleteReleaseByTag", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "tag name of the release to delete", + "in": "path", + "name": "tag", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Delete a release by tag name", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetReleaseByTag", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "tag name of the release to get", + "in": "path", + "name": "tag", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a release by tag name", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "delete": { + "operationId": "repoDeleteRelease", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release to delete", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Delete a release", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetRelease", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release to get", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a release", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoEditRelease", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release to edit", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Update a release", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { + "get": { + "operationId": "repoListReleaseAttachments", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List release's attachments", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "operationId": "repoCreateReleaseAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "name of the attachment", + "in": "query", + "name": "name", + "type": "string" + }, + { + "description": "attachment to upload", + "in": "formData", + "name": "attachment", + "type": "file" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/error" + } + }, + "summary": "Create a release attachment", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { + "delete": { + "operationId": "repoDeleteReleaseAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to delete", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a release attachment", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetReleaseAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to get", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a release attachment", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the release", + "format": "int64", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to edit", + "format": "int64", + "in": "path", + "name": "attachment_id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Edit a release attachment", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/reviewers": { + "get": { + "operationId": "repoGetReviewers", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/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": "repoSigningKey", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "text/plain" + ], + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + }, + "summary": "Get signing-key.gpg for given repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + "get": { + "operationId": "repoSigningKeySSH", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "text/plain" + ], + "responses": { + "200": { + "description": "ssh public key", + "schema": { + "type": "string" + } + } + }, + "summary": "Get signing-key.pub for given repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { + "operationId": "repoListStargazers", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repo's stargazers", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { + "get": { + "operationId": "repoListStatuses", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "sha of the commit", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "description": "type of sort", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "in": "query", + "name": "sort", + "type": "string" + }, + { + "description": "type of state", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "in": "query", + "name": "state", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a commit's statuses", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreateStatus", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "sha of the commit", + "in": "path", + "name": "sha", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Create a commit status", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "operationId": "repoListSubscribers", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repo's watchers", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "delete": { + "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Unwatch a repo", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/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": "userCurrentPutSubscription", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Watch a repo", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { + "operationId": "repoListTagProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + }, + "summary": "List tag protections for a repository", + "tags": [ + "repository" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateTagProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Create a tag protections for a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "delete": { + "operationId": "repoDeleteTagProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of protected tag", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Delete a specific tag protection for the repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetTagProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of the tag protect to get", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a specific tag protection for the repository", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoEditTagProtection", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "id of protected tag", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/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": "repoListTags", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results, default maximum page size is 50", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's tags", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreateTag", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateTagOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Create a new git tag in a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { + "delete": { + "operationId": "repoDeleteTag", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of tag to delete", + "in": "path", + "name": "tag", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "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" + } + }, + "summary": "Delete a repository's tag by name", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetTag", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of tag", + "in": "path", + "name": "tag", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get the tag of a repository by tag name", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { + "operationId": "repoListTeams", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repository's teams", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { + "delete": { + "operationId": "repoDeleteTeam", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "team name", + "in": "path", + "name": "team", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Delete a team from a repository", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoCheckTeam", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "team name", + "in": "path", + "name": "team", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + } + }, + "summary": "Check if a team is assigned to a repository", + "tags": [ + "repository" + ] + }, + "put": { + "operationId": "repoAddTeam", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "team name", + "in": "path", + "name": "team", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Add a team to a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times": { + "get": { + "operationId": "repoTrackedTimes", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "optional filter by user (available for issue managers)", + "in": "query", + "name": "user", + "type": "string" + }, + { + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "since", + "type": "string" + }, + { + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "format": "date-time", + "in": "query", + "name": "before", + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a repo's tracked times", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { + "get": { + "deprecated": true, + "operationId": "userTrackedTimes", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "username of the user whose tracked times are to be listed", + "in": "path", + "name": "user", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "List a user's tracked times in a repo", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics": { + "get": { + "operationId": "repoListTopics", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get list of topics that a repository has", + "tags": [ + "repository" + ] + }, + "put": { + "operationId": "repoUpdateTopics", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "summary": "Replace list of topics for a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "delete": { + "operationId": "repoDeleteTopic", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the topic to delete", + "in": "path", + "name": "topic", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "summary": "Delete a topic from a repository", + "tags": [ + "repository" + ] + }, + "put": { + "operationId": "repoAddTopic", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the topic to add", + "in": "path", + "name": "topic", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "summary": "Add a topic to a repository", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer": { + "post": { + "operationId": "repoTransfer", + "parameters": [ + { + "description": "owner of the repo to transfer", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to transfer", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "Transfer Options", + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "summary": "Transfer a repo ownership", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "description": "owner of the repo to transfer", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to transfer", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Accept a repo transfer", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "description": "owner of the repo to transfer", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo to transfer", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Reject a repo transfer", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "consumes": [ + "application/json" + ], + "operationId": "repoCreateWikiPage", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "201": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Create a wiki page", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { + "delete": { + "operationId": "repoDeleteWikiPage", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the page", + "in": "path", + "name": "pageName", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Delete a wiki page", + "tags": [ + "repository" + ] + }, + "get": { + "operationId": "repoGetWikiPage", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the page", + "in": "path", + "name": "pageName", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get a wiki page", + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "operationId": "repoEditWikiPage", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the page", + "in": "path", + "name": "pageName", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "summary": "Edit a wiki page", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { + "get": { + "operationId": "repoGetWikiPages", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get all wiki pages", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { + "operationId": "repoGetWikiPageRevisions", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "type": "string" + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "type": "string" + }, + { + "description": "name of the page", + "in": "path", + "name": "pageName", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "group ID of the repo", + "format": "int64", + "in": "path", + "name": "group_id", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "summary": "Get revisions of a wiki page", + "tags": [ + "repository" + ] + } + } + } +} \ No newline at end of file diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 7d539f83d9..74229ebfcd 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": "adminAdoptRepositoryMixin0", + "parameters": [ + { + "type": "string", + "description": "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": "adminDeleteUnadoptedRepositoryMixin0", + "parameters": [ + { + "type": "string", + "description": "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}/{group_id}/{repo}": { "post": { "produces": [ @@ -7688,8 +7777,8 @@ "tags": [ "repository" ], - "summary": "Update a branch", - "operationId": "repoUpdateBranchMixin0", + "summary": "Rename a branch", + "operationId": "repoRenameBranchMixin0", "parameters": [ { "type": "string", @@ -7716,7 +7805,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/UpdateBranchRepoOption" + "$ref": "#/definitions/RenameBranchRepoOption" } }, { @@ -8635,7 +8724,7 @@ "tags": [ "repository" ], - "summary": "Update a file in a repository", + "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set", "operationId": "repoUpdateFileMixin0", "parameters": [ { @@ -8680,6 +8769,9 @@ "200": { "$ref": "#/responses/FileResponse" }, + "201": { + "$ref": "#/responses/FileResponse" + }, "403": { "$ref": "#/responses/error" }, @@ -8869,7 +8961,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateFileOptions" + "$ref": "#/definitions/ApplyDiffPatchFileOptions" } }, { @@ -10350,7 +10442,7 @@ }, { "type": "string", - "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "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" }, @@ -10874,6 +10966,9 @@ "404": { "$ref": "#/responses/error" }, + "413": { + "$ref": "#/responses/error" + }, "422": { "$ref": "#/responses/validationError" }, @@ -11595,6 +11690,9 @@ "404": { "$ref": "#/responses/error" }, + "413": { + "$ref": "#/responses/error" + }, "422": { "$ref": "#/responses/validationError" }, @@ -17711,6 +17809,9 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/error" } } } From c3c6edafd1a4029dc89abe74454a3af5c67fc68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 17:31:57 -0500 Subject: [PATCH 104/218] fix swagger comments in repo adoption routes --- routers/api/v1/admin/adopt.go | 16 +++++- templates/swagger/v1_groups.json | 89 -------------------------------- templates/swagger/v1_json.tmpl | 77 +-------------------------- 3 files changed, 16 insertions(+), 166 deletions(-) diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go index 0399a1107f..57421ecc28 100644 --- a/routers/api/v1/admin/adopt.go +++ b/routers/api/v1/admin/adopt.go @@ -125,7 +125,7 @@ func AdoptRepository(ctx *context.APIContext) { } func AdoptGroupRepository(ctx *context.APIContext) { - // swagger:operation POST /admin/unadopted/{owner}/{group_id}/{repo} admin adminAdoptRepository + // swagger:operation POST /admin/unadopted/{owner}/group/{group_id}/{repo} admin adminAdoptRepositoryInGroup // --- // summary: Adopt unadopted files as a repository // produces: @@ -141,6 +141,12 @@ func AdoptGroupRepository(ctx *context.APIContext) { // 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" @@ -217,7 +223,7 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) { } func DeleteUnadoptedRepositoryInGroup(ctx *context.APIContext) { - // swagger:operation DELETE /admin/unadopted/{owner}/{group_id}/{repo} admin adminDeleteUnadoptedRepository + // swagger:operation DELETE /admin/unadopted/{owner}/group/{group_id}/{repo} admin adminDeleteUnadoptedRepositoryInGroup // --- // summary: Delete unadopted files // produces: @@ -233,6 +239,12 @@ func DeleteUnadoptedRepositoryInGroup(ctx *context.APIContext) { // 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" diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index ab4fbeba22..4895c793dc 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,94 +1,5 @@ { "paths": { - "/admin/unadopted/{owner}/group/{group_id}/{repo}": { - "delete": { - "operationId": "adminDeleteUnadoptedRepository", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "summary": "Delete unadopted files", - "tags": [ - "admin" - ] - }, - "post": { - "operationId": "adminAdoptRepository", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Adopt unadopted files as a repository", - "tags": [ - "admin" - ] - } - }, "/repos/{owner}/group/{group_id}/{repo}": { "delete": { "operationId": "repoDelete", diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 74229ebfcd..83973fec1a 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -662,7 +662,7 @@ "admin" ], "summary": "Adopt unadopted files as a repository", - "operationId": "adminAdoptRepositoryMixin0", + "operationId": "adminAdoptRepositoryInGroup", "parameters": [ { "type": "string", @@ -707,7 +707,7 @@ "admin" ], "summary": "Delete unadopted files", - "operationId": "adminDeleteUnadoptedRepositoryMixin0", + "operationId": "adminDeleteUnadoptedRepositoryInGroup", "parameters": [ { "type": "string", @@ -742,79 +742,6 @@ } } }, - "/admin/unadopted/{owner}/{group_id}/{repo}": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "admin" - ], - "summary": "Adopt unadopted files as a repository", - "operationId": "adminAdoptRepository", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "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": "adminDeleteUnadoptedRepository", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, "/admin/unadopted/{owner}/{repo}": { "post": { "produces": [ From 71e0e273622ac0ba3c22783bbf218e1c53da7f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 17:34:13 -0500 Subject: [PATCH 105/218] add missing group id parameters to test function calls --- models/repo/repo_test.go | 16 ++++++++-------- models/repo/wiki_test.go | 2 +- services/repository/adopt_test.go | 2 +- services/repository/create_test.go | 6 +++--- services/repository/fork_test.go | 6 +++--- services/repository/transfer_test.go | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) 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/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/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/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/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{ From 6216db2ee7e885bd530ce4574caebaaad7a4e2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 17:40:59 -0500 Subject: [PATCH 106/218] run formatter --- build_tools/swagger/main.go | 7 +- models/repo/wiki.go | 5 +- routers/api/v1/api.go | 1 - services/group/group.go | 2 +- templates/swagger/v1_groups.json | 30100 +++++++++++++-------------- tests/integration/api_repo_test.go | 72 +- 6 files changed, 15094 insertions(+), 15093 deletions(-) diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index caf3b562ae..24b4c42dab 100644 --- a/build_tools/swagger/main.go +++ b/build_tools/swagger/main.go @@ -3,14 +3,15 @@ package main import ( - "encoding/json" "log" "os" "path/filepath" "regexp" + + "code.gitea.io/gitea/modules/json" ) -var rxPath = regexp.MustCompile("(?m)^(/repos/\\{owner})/(\\{repo})") +var rxPath = regexp.MustCompile(`(?m)^(/repos/\{owner})/(\{repo})`) func generatePaths(root string) map[string]any { pathData := make(map[string]any) @@ -64,7 +65,7 @@ func writeMapToFile(filename string, data map[string]any) { if err != nil { log.Fatal(err) } - err = os.WriteFile(filename, bytes, 0666) + err = os.WriteFile(filename, bytes, 0o666) if err != nil { log.Fatal(err) } diff --git a/models/repo/wiki.go b/models/repo/wiki.go index 487cc953be..6e71677357 100644 --- a/models/repo/wiki.go +++ b/models/repo/wiki.go @@ -5,10 +5,11 @@ package repo import ( - user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/util" "context" "fmt" + + user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/util" ) // ErrWikiAlreadyExist represents a "WikiAlreadyExist" kind of error. diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 8ec1c195f8..9e14b3f5e7 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1802,7 +1802,6 @@ func Routes() *web.Router { 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). diff --git a/services/group/group.go b/services/group/group.go index 0f2e9d7ce9..1ef3362061 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -4,7 +4,6 @@ package group import ( - "code.gitea.io/gitea/modules/gitrepo" "context" "errors" "fmt" @@ -15,6 +14,7 @@ import ( "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/util" ) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 4895c793dc..c830fd6661 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,15052 +1,15052 @@ { - "paths": { - "/repos/{owner}/group/{group_id}/{repo}": { - "delete": { - "operationId": "repoDelete", - "parameters": [ - { - "description": "owner of the repo to delete", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to delete", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGet", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a repository", - "tags": [ - "repository" - ] - }, - "patch": { - "operationId": "repoEdit", - "parameters": [ - { - "description": "owner of the repo to edit", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to edit", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "Properties of a repo that you can edit", - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditRepoOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/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": "getArtifacts", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the artifact", - "in": "query", - "name": "name", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Lists all artifacts for a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "delete": { - "operationId": "deleteArtifact", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the artifact", - "in": "path", - "name": "artifact_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Deletes a specific artifact for a workflow run", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "getArtifact", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the artifact", - "in": "path", - "name": "artifact_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Artifact" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/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": "downloadArtifact", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the artifact", - "in": "path", - "name": "artifact_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "302": { - "description": "redirect to the blob download" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/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": "listWorkflowJobs", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "in": "query", - "name": "status", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Lists all jobs for a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { - "get": { - "operationId": "getWorkflowJob", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the job", - "in": "path", - "name": "job_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowJob" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/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": "downloadActionsRunJobLogs", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the job", - "in": "path", - "name": "job_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "output blob content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Downloads the job logs for a workflow run", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { - "get": { - "operationId": "getRepoRunners", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get repo-level runners", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "operationId": "repoGetRunnerRegistrationToken", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - }, - "summary": "Get a repository's actions runner registration token", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoCreateRunnerRegistrationToken", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/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": "deleteRepoRunner", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the runner", - "in": "path", - "name": "runner_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "runner has been deleted" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete an repo-level runner", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "getRepoRunner", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the runner", - "in": "path", - "name": "runner_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunner" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get an repo-level runner", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { - "get": { - "operationId": "getWorkflowRuns", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "workflow event name", - "in": "query", - "name": "event", - "type": "string" - }, - { - "description": "workflow branch", - "in": "query", - "name": "branch", - "type": "string" - }, - { - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "in": "query", - "name": "status", - "type": "string" - }, - { - "description": "triggered by user", - "in": "query", - "name": "actor", - "type": "string" - }, - { - "description": "triggering sha of the workflow run", - "in": "query", - "name": "head_sha", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowRunsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Lists all runs for a repository run", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "delete": { - "operationId": "deleteActionRun", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "runid of the workflow run", - "in": "path", - "name": "run", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a workflow run", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "GetWorkflowRun", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the run", - "in": "path", - "name": "run", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowRun" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Gets a specific workflow run", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { - "get": { - "operationId": "getArtifactsOfRun", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "runid of the workflow run", - "in": "path", - "name": "run", - "required": true, - "type": "integer" - }, - { - "description": "name of the artifact", - "in": "query", - "name": "name", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Lists all artifacts for a repository run", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { - "get": { - "operationId": "listWorkflowRunJobs", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "runid of the workflow run", - "in": "path", - "name": "run", - "required": true, - "type": "integer" - }, - { - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "in": "query", - "name": "status", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Lists all jobs for a workflow run", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { - "get": { - "operationId": "repoListActionsSecrets", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List an repo's actions secrets", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "deleteRepoSecret", - "parameters": [ - { - "description": "owner of the repository", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the secret", - "in": "path", - "name": "secretname", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a secret in a repository", - "tags": [ - "repository" - ] - }, - "put": { - "consumes": [ - "application/json" - ], - "operationId": "updateRepoSecret", - "parameters": [ - { - "description": "owner of the repository", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the secret", - "in": "path", - "name": "secretname", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Create or Update a secret value in a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { - "get": { - "operationId": "ListActionTasks", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results, default maximum page size is 50", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "List a repository's action tasks", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { - "get": { - "operationId": "getRepoVariablesList", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get repo-level variables list", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { - "delete": { - "operationId": "deleteRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the variable", - "in": "path", - "name": "variablename", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Delete a repo-level variable", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "getRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the variable", - "in": "path", - "name": "variablename", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ActionVariable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a repo-level variable", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "createRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the variable", - "in": "path", - "name": "variablename", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateVariableOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "response when creating a repo-level variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "409": { - "description": "variable name already exists." - }, - "500": { - "$ref": "#/responses/error" - } - }, - "summary": "Create a repo-level variable", - "tags": [ - "repository" - ] - }, - "put": { - "operationId": "updateRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repository", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the variable", - "in": "path", - "name": "variablename", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Update a repo-level variable", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { - "get": { - "operationId": "ActionsListRepositoryWorkflows", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "List repository workflows", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { - "get": { - "operationId": "ActionsGetWorkflow", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the workflow", - "in": "path", - "name": "workflow_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Get a workflow", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { - "operationId": "ActionsDisableWorkflow", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the workflow", - "in": "path", - "name": "workflow_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Disable a workflow", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { - "post": { - "operationId": "ActionsDispatchWorkflow", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the workflow", - "in": "path", - "name": "workflow_id", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateActionWorkflowDispatch" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Create a workflow dispatch event", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { - "put": { - "operationId": "ActionsEnableWorkflow", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the workflow", - "in": "path", - "name": "workflow_id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Enable a workflow", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { - "get": { - "operationId": "repoListActivityFeeds", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "the date of the activities to be found", - "format": "date", - "in": "query", - "name": "date", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's activity feeds", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { - "operationId": "repoGetArchive", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "in": "path", - "name": "archive", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get an archive of a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { - "operationId": "repoGetAssignees", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/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": "repoDeleteAvatar", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete avatar", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoUpdateAvatar", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Update avatar", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { - "get": { - "operationId": "repoListBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - }, - "summary": "List branch protections for a repository", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Create a branch protections for a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoUpdateBranchProtectionPriories", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchProtectionPriories" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/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": "repoDeleteBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of protected branch", - "in": "path", - "name": "name", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a specific branch protection for the repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of protected branch", - "in": "path", - "name": "name", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a specific branch protection for the repository", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoEditBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of protected branch", - "in": "path", - "name": "name", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/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": "repoListBranches", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, - "summary": "List a repository's branches", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateBranch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateBranchRepoOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Create a branch", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { - "delete": { - "operationId": "repoDeleteBranch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "branch to delete", - "in": "path", - "name": "branch", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Delete a specific branch from a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetBranch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "branch to get", - "in": "path", - "name": "branch", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Branch" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoRenameBranch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the branch", - "in": "path", - "name": "branch", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/RenameBranchRepoOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Rename a branch", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators": { - "get": { - "operationId": "repoListCollaborators", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's collaborators", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { - "delete": { - "operationId": "repoDeleteCollaborator", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "username of the collaborator to delete", - "in": "path", - "name": "collaborator", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Delete a collaborator from a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoCheckCollaborator", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "username of the user to check for being a collaborator", - "in": "path", - "name": "collaborator", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Check if a user is a collaborator of a repository", - "tags": [ - "repository" - ] - }, - "put": { - "operationId": "repoAddCollaborator", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "username of the user to add or update as a collaborator", - "in": "path", - "name": "collaborator", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Add or Update a collaborator to a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "operationId": "repoGetRepoPermissions", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "username of the collaborator whose permissions are to be obtained", - "in": "path", - "name": "collaborator", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/RepoCollaboratorPermission" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get repository permissions for a user", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { - "get": { - "operationId": "repoGetAllCommits", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "SHA or branch to start listing commits from (usually 'master')", - "in": "query", - "name": "sha", - "type": "string" - }, - { - "description": "filepath of a file/dir", - "in": "query", - "name": "path", - "type": "string" - }, - { - "description": "Only commits after this date will be returned (ISO 8601 format)", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "Only commits before this date will be returned (ISO 8601 format)", - "format": "date-time", - "in": "query", - "name": "until", - "type": "string" - }, - { - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "stat", - "type": "boolean" - }, - { - "description": "include verification for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "verification", - "type": "boolean" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "files", - "type": "boolean" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results (ignored if used with 'path')", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "commits that match the given specifier will not be listed.", - "in": "query", - "name": "not", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/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": "repoGetCombinedStatusByRef", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of branch/tag/commit", - "in": "path", - "name": "ref", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CombinedStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/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": "repoListStatusesByRef", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of branch/tag/commit", - "in": "path", - "name": "ref", - "required": true, - "type": "string" - }, - { - "description": "type of sort", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "in": "query", - "name": "sort", - "type": "string" - }, - { - "description": "type of state", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "in": "query", - "name": "state", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/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": "repoGetCommitPullRequest", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "SHA of the commit to get", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get the merged pull request of the commit", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { - "get": { - "operationId": "repoCompareDiff", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "compare two branches or commits", - "in": "path", - "name": "basehead", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Compare" - }, - "404": { - "$ref": "#/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": "repoGetContentsList", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Gets the metadata of all the entries of the root dir.", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoChangeFiles", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/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": "repoGetContentsExt", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "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.", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "description": "the name of the commit/branch/tag, default to the repository’s default branch.", - "in": "query", - "name": "ref", - "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", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsExtResponse" - }, - "404": { - "$ref": "#/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": { - "consumes": [ - "application/json" - ], - "operationId": "repoDeleteFile", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "path of the file to delete", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "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": "repoGetContents", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "path of the dir, file, symlink or submodule in the repo", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsResponse" - }, - "404": { - "$ref": "#/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": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateFile", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "path of the file to create", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateFileOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Create a file in a repository", - "tags": [ - "repository" - ] - }, - "put": { - "consumes": [ - "application/json" - ], - "operationId": "repoUpdateFile", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "path of the file to update", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateFileOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "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": { - "consumes": [ - "application/json" - ], - "operationId": "repoApplyDiffPatch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/FileResponse" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Apply diff patch to repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { - "get": { - "operationId": "repoGetEditorConfig", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "filepath of file to get", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/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": "repoGetFileContents", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "in": "query", - "name": "body", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/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": "repoGetFileContentsPost", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GetFilesOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get the metadata and contents of requested files", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { - "get": { - "operationId": "listForks", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's forks", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "createFork", - "parameters": [ - { - "description": "owner of the repo to fork", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to fork", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateForkOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Fork a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { - "get": { - "operationId": "GetBlob", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "sha of the commit", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/GitBlobResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Gets the blob of a repository.", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { - "get": { - "operationId": "repoGetSingleCommit", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "a git ref or commit sha", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "stat", - "type": "boolean" - }, - { - "description": "include verification for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "verification", - "type": "boolean" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "files", - "type": "boolean" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Commit" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Get a single commit from a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { - "get": { - "operationId": "repoDownloadCommitDiffOrPatch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "SHA of the commit to get", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "whether the output is diff or patch", - "enum": [ - "diff", - "patch" - ], - "in": "path", - "name": "diffType", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "text/plain" - ], - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a commit's diff or patch", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { - "get": { - "operationId": "repoGetNote", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "a git ref or commit sha", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "include verification for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "verification", - "type": "boolean" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "files", - "type": "boolean" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/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": "repoListAllGitRefs", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get specified ref or filtered repository's refs", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { - "get": { - "operationId": "repoListGitRefs", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "part or full name of the ref", - "in": "path", - "name": "ref", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get specified ref or filtered repository's refs", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { - "get": { - "operationId": "GetAnnotatedTag", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "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, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/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": "GetTree", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "sha of the commit", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "show all directories and files", - "in": "query", - "name": "recursive", - "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", - "type": "integer" - }, - { - "description": "number of items per page", - "in": "query", - "name": "per_page", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Gets the tree of a repository.", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { - "get": { - "operationId": "repoListHooks", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List the hooks in a repository", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateHookOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Create a hook", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { - "get": { - "operationId": "repoListGitHooks", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/GitHookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List the Git hooks in a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "delete": { - "operationId": "repoDeleteGitHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the hook to get", - "in": "path", - "name": "id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a Git hook in a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetGitHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the hook to get", - "in": "path", - "name": "id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a Git hook", - "tags": [ - "repository" - ] - }, - "patch": { - "operationId": "repoEditGitHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the hook to get", - "in": "path", - "name": "id", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditGitHookOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Edit a Git hook in a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { - "delete": { - "operationId": "repoDeleteHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the hook to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a hook in a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the hook to get", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a hook", - "tags": [ - "repository" - ] - }, - "patch": { - "operationId": "repoEditHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the hook", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Edit a hook in a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { - "post": { - "operationId": "repoTestHook", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the hook to test", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Test a push webhook", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { - "operationId": "repoGetIssueConfig", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfig" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Returns the issue config for a repo", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { - "get": { - "operationId": "repoValidateIssueConfig", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Returns the validation information for a issue config", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { - "get": { - "operationId": "repoGetIssueTemplates", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/IssueTemplates" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get available issue templates for a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { - "get": { - "operationId": "issueListIssues", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "whether issue is open or closed", - "enum": [ - "closed", - "open", - "all" - ], - "in": "query", - "name": "state", - "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", - "type": "string" - }, - { - "description": "search string", - "in": "query", - "name": "q", - "type": "string" - }, - { - "description": "filter by type (issues / pulls) if set", - "enum": [ - "issues", - "pulls" - ], - "in": "query", - "name": "type", - "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", - "type": "string" - }, - { - "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "Only show items which were created by the given user", - "in": "query", - "name": "created_by", - "type": "string" - }, - { - "description": "Only show items for which the given user is assigned", - "in": "query", - "name": "assigned_by", - "type": "string" - }, - { - "description": "Only show items in which the given user was mentioned", - "in": "query", - "name": "mentioned_by", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's issues", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueCreateIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateIssueOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "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": "issueGetRepoComments", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "if provided, only comments updated since the provided time are returned.", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "if provided, only comments updated before the provided time are returned.", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List all comments in a repository", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { - "delete": { - "operationId": "issueDeleteComment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of comment to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a comment", - "tags": [ - "issue" - ] - }, - "get": { - "consumes": [ - "application/json" - ], - "operationId": "issueGetComment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a comment", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditComment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Edit a comment", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { - "get": { - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "summary": "List comment's attachments", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "multipart/form-data" - ], - "operationId": "issueCreateIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "name of the attachment", - "in": "query", - "name": "name", - "type": "string" - }, - { - "description": "attachment to upload", - "in": "formData", - "name": "attachment", - "required": true, - "type": "file" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Create a comment attachment", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { - "delete": { - "operationId": "issueDeleteIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to delete", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Delete a comment attachment", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueGetIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to get", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "summary": "Get a comment attachment", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to edit", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Edit a comment attachment", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueDeleteCommentReaction", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "content", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Remove a reaction from a comment of an issue", - "tags": [ - "issue" - ] - }, - "get": { - "consumes": [ - "application/json" - ], - "operationId": "issueGetCommentReactions", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a list of reactions from a comment of an issue", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issuePostCommentReaction", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the comment to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "content", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Add a reaction to a comment of an issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "operationId": "repoListPinnedIssues", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repo's pinned issues", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "delete": { - "operationId": "issueDelete", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of issue to delete", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete an issue", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueGetIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to get", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get an issue", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to edit", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditIssueOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/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": "issueListIssueAttachments", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "summary": "List issue's attachments", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "multipart/form-data" - ], - "operationId": "issueCreateIssueAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "name of the attachment", - "in": "query", - "name": "name", - "type": "string" - }, - { - "description": "attachment to upload", - "in": "formData", - "name": "attachment", - "required": true, - "type": "file" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Create an issue attachment", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { - "delete": { - "operationId": "issueDeleteIssueAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to delete", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Delete an issue attachment", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueGetIssueAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to get", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "summary": "Get an issue attachment", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditIssueAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to edit", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Edit an issue attachment", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { - "delete": { - "operationId": "issueRemoveIssueBlocking", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "in": "path", - "name": "index", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Unblock the issue given in the body by the issue in path", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueListBlocks", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "in": "path", - "name": "index", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List issues that are blocked by this issue", - "tags": [ - "issue" - ] - }, - "post": { - "operationId": "issueCreateIssueBlocking", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "in": "path", - "name": "index", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/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": "issueGetComments", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "if provided, only comments updated since the specified time are returned.", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "if provided, only comments updated before the provided time are returned.", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List all comments on an issue", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueCreateComment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Comment" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/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": "issueDeleteCommentDeprecated", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "this parameter is ignored", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of comment to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a comment", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "deprecated": true, - "operationId": "issueEditCommentDeprecated", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "this parameter is ignored", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the comment to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Edit a comment", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditIssueDeadline", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to create or update a deadline on", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditDeadlineOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/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": "issueRemoveIssueDependencies", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "in": "path", - "name": "index", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Remove an issue dependency", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueListIssueDependencies", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "in": "path", - "name": "index", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "tags": [ - "issue" - ] - }, - "post": { - "operationId": "issueCreateIssueDependencies", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "in": "path", - "name": "index", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/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": "issueClearLabels", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Remove all labels from an issue", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueGetLabels", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get an issue's labels", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueAddLabel", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Add a label to an issue", - "tags": [ - "issue" - ] - }, - "put": { - "consumes": [ - "application/json" - ], - "operationId": "issueReplaceLabels", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Replace an issue's labels", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { - "delete": { - "operationId": "issueRemoveLabel", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the label to remove", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Remove a label from an issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueUnlockIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Unlock an issue", - "tags": [ - "issue" - ] - }, - "put": { - "consumes": [ - "application/json" - ], - "operationId": "issueLockIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/LockIssueOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Lock an issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { - "delete": { - "operationId": "unpinIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of issue to unpin", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Unpin an Issue", - "tags": [ - "issue" - ] - }, - "post": { - "operationId": "pinIssue", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of issue to pin", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Pin an Issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "operationId": "moveIssuePin", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "the new position", - "format": "int64", - "in": "path", - "name": "position", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Moves the Pin to the given Position", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueDeleteIssueReaction", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "content", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Remove a reaction from an issue", - "tags": [ - "issue" - ] - }, - "get": { - "consumes": [ - "application/json" - ], - "operationId": "issueGetIssueReactions", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a list reactions of an issue", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issuePostIssueReaction", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "content", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Add a reaction to an issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueDeleteStopWatch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to stop the stopwatch on", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Delete an issue's existing stopwatch.", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueStartStopWatch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to create the stopwatch on", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Start stopwatch on an issue.", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueStopStopWatch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to stop the stopwatch on", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Stop an issue's existing stopwatch.", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { - "get": { - "consumes": [ - "application/json" - ], - "operationId": "issueSubscriptions", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get users who subscribed on an issue.", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { - "get": { - "consumes": [ - "application/json" - ], - "operationId": "issueCheckSubscription", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Check if user is subscribed to an issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueDeleteSubscription", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "username of the user to unsubscribe from an issue", - "in": "path", - "name": "user", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Unsubscribe user from issue", - "tags": [ - "issue" - ] - }, - "put": { - "consumes": [ - "application/json" - ], - "operationId": "issueAddSubscription", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "username of the user to subscribe the issue to", - "in": "path", - "name": "user", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Subscribe user to issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { - "get": { - "operationId": "issueGetCommentsAndTimeline", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "if provided, only comments updated since the specified time are returned.", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "if provided, only comments updated before the provided time are returned.", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TimelineList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List all comments and events on an issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueResetTime", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue to add tracked time to", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Reset a tracked time of an issue", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueTrackedTimes", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "optional filter by user (available for issue managers)", - "in": "query", - "name": "user", - "type": "string" - }, - { - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List an issue's tracked times", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueAddTime", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/AddTimeOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Add tracked time to a issue", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { - "delete": { - "consumes": [ - "application/json" - ], - "operationId": "issueDeleteTime", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the issue", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of time to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete specific tracked time", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys": { - "get": { - "operationId": "repoListKeys", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "the key_id to search for", - "in": "query", - "name": "key_id", - "type": "integer" - }, - { - "description": "fingerprint of the key", - "in": "query", - "name": "fingerprint", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKeyList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's keys", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateKey", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Add a key to a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { - "delete": { - "operationId": "repoDeleteKey", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the key to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a key from a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetKey", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the key to get", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a repository's key by id", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "get": { - "operationId": "issueListLabels", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get all of a repository's labels", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueCreateLabel", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Create a label", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { - "delete": { - "operationId": "issueDeleteLabel", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the label to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a label", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueGetLabel", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the label to get", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a single label", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditLabel", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the label to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditLabelOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Update a label", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { - "get": { - "operationId": "repoGetLanguages", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get languages and number of bytes of code written", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/licenses": { - "get": { - "operationId": "repoGetLicenses", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/LicensesList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get repo licenses", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { - "get": { - "operationId": "repoGetRawFileOrLFS", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "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", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/octet-stream" - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/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": "repoMergeUpstream", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/MergeUpstreamResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Merge a branch from upstream", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones": { - "get": { - "operationId": "issueGetMilestonesList", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", - "in": "query", - "name": "state", - "type": "string" - }, - { - "description": "filter by milestone name", - "in": "query", - "name": "name", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get all of a repository's opened milestones", - "tags": [ - "issue" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "issueCreateMilestone", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateMilestoneOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Create a milestone", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "delete": { - "operationId": "issueDeleteMilestone", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "the milestone to delete, identified by ID and if not available by name", - "in": "path", - "name": "id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a milestone", - "tags": [ - "issue" - ] - }, - "get": { - "operationId": "issueGetMilestone", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "the milestone to get, identified by ID and if not available by name", - "in": "path", - "name": "id", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a milestone", - "tags": [ - "issue" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "issueEditMilestone", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "the milestone to edit, identified by ID and if not available by name", - "in": "path", - "name": "id", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditMilestoneOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Update a milestone", - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { - "operationId": "repoMirrorSync", - "parameters": [ - { - "description": "owner of the repo to sync", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to sync", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Sync a mirrored repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { - "get": { - "operationId": "repoNewPinAllowed", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Returns if new Issue Pins are allowed", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "get": { - "consumes": [ - "application/json" - ], - "operationId": "notifyGetRepoList", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "If true, show notifications marked as read. Default value is false", - "in": "query", - "name": "all", - "type": "boolean" - }, - { - "collectionFormat": "multi", - "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned", - "in": "query", - "items": { - "type": "string" - }, - "name": "status-types", - "type": "array" - }, - { - "collectionFormat": "multi", - "description": "filter notifications by subject type", - "in": "query", - "items": { - "enum": [ - "issue", - "pull", - "commit", - "repository" - ], - "type": "string" - }, - "name": "subject-type", - "type": "array" - }, - { - "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "summary": "List users's notification threads on a specific repo", - "tags": [ - "notification" - ] - }, - "put": { - "consumes": [ - "application/json" - ], - "operationId": "notifyReadRepoList", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "If true, mark all notifications on this repo. Default value is false", - "in": "query", - "name": "all", - "type": "string" - }, - { - "collectionFormat": "multi", - "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", - "in": "query", - "items": { - "type": "string" - }, - "name": "status-types", - "type": "array" - }, - { - "description": "Status to mark notifications as. Defaults to read.", - "in": "query", - "name": "to-status", - "type": "string" - }, - { - "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", - "format": "date-time", - "in": "query", - "name": "last_read_at", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "205": { - "$ref": "#/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": "repoListPullRequests", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "Name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "Filter by target base branch of the pull request", - "in": "query", - "name": "base_branch", - "type": "string" - }, - { - "default": "open", - "description": "State of pull request", - "enum": [ - "open", - "closed", - "all" - ], - "in": "query", - "name": "state", - "type": "string" - }, - { - "description": "Type of sort", - "enum": [ - "oldest", - "recentupdate", - "recentclose", - "leastupdate", - "mostcomment", - "leastcomment", - "priority" - ], - "in": "query", - "name": "sort", - "type": "string" - }, - { - "description": "ID of the milestone", - "format": "int64", - "in": "query", - "name": "milestone", - "type": "integer" - }, - { - "collectionFormat": "multi", - "description": "Label IDs", - "in": "query", - "items": { - "format": "int64", - "type": "integer" - }, - "name": "labels", - "type": "array" - }, - { - "description": "Filter by pull request author", - "in": "query", - "name": "poster", - "type": "string" - }, - { - "default": 1, - "description": "Page number of results to return (1-based)", - "in": "query", - "minimum": 1, - "name": "page", - "type": "integer" - }, - { - "description": "Page size of results", - "in": "query", - "minimum": 0, - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" - } - }, - "summary": "List a repo's pull requests", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreatePullRequest", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreatePullRequestOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Create a pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { - "operationId": "repoListPinnedPullRequests", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repo's pinned pull requests", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { - "get": { - "operationId": "repoGetPullRequestByBaseHead", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "base of the pull request to get", - "in": "path", - "name": "base", - "required": true, - "type": "string" - }, - { - "description": "head of the pull request to get", - "in": "path", - "name": "head", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a pull request by base and head", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { - "get": { - "operationId": "repoGetPullRequest", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to get", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a pull request", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoEditPullRequest", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to edit", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditPullRequestOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "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": "repoDownloadPullDiffOrPatch", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to get", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "whether the output is diff or patch", - "enum": [ - "diff", - "patch" - ], - "in": "path", - "name": "diffType", - "required": true, - "type": "string" - }, - { - "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", - "in": "query", - "name": "binary", - "type": "boolean" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "text/plain" - ], - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a pull request diff or patch", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "operationId": "repoGetPullRequestCommits", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to get", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "include verification for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "verification", - "type": "boolean" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "in": "query", - "name": "files", - "type": "boolean" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get commits for a pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { - "get": { - "operationId": "repoGetPullRequestFiles", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to get", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "skip to given file", - "in": "query", - "name": "skip-to", - "type": "string" - }, - { - "description": "whitespace behavior", - "enum": [ - "ignore-all", - "ignore-change", - "ignore-eol", - "show-all" - ], - "in": "query", - "name": "whitespace", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ChangedFileList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get changed files for a pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { - "delete": { - "operationId": "repoCancelScheduledAutoMerge", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to merge", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Cancel the scheduled auto merge for the given pull request", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoPullRequestIsMerged", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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": "repoMergePullRequest", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to merge", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/MergePullRequestOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Merge a pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { - "delete": { - "operationId": "repoDeletePullReviewRequests", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "cancel review requests for a pull request", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoCreatePullReviewRequests", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "create review requests for a pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { - "get": { - "operationId": "repoListPullReviews", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List all reviews for a pull request", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoCreatePullReview", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Create a review to an pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { - "delete": { - "operationId": "repoDeletePullReview", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a specific review from a pull request", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetPullReview", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a specific review for a pull request", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoSubmitPullReview", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Submit a pending review to an pull request", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { - "get": { - "operationId": "repoGetPullReviewComments", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" - }, - "404": { - "$ref": "#/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": "repoDismissPullReview", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/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": "repoUnDismissPullReview", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/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": "repoUpdatePullRequest", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request to get", - "format": "int64", - "in": "path", - "name": "index", - "required": true, - "type": "integer" - }, - { - "description": "how to update pull request", - "enum": [ - "merge", - "rebase" - ], - "in": "query", - "name": "style", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Merge PR's baseBranch into headBranch", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "get": { - "operationId": "repoListPushMirrors", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get all push mirrors of the repository", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoAddPushMirror", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "add a push mirror to the repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { - "post": { - "operationId": "repoPushMirrorSync", - "parameters": [ - { - "description": "owner of the repo to sync", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to sync", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Sync all push mirrored repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { - "delete": { - "operationId": "repoDeletePushMirror", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "remote name of the pushMirror", - "in": "path", - "name": "name", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "deletes a push mirror from a repository by remoteName", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetPushMirrorByRemoteName", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "remote name of push mirror", - "in": "path", - "name": "name", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get push mirror of the repository by remoteName", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { - "get": { - "operationId": "repoGetRawFile", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "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", - "in": "path", - "name": "filepath", - "required": true, - "type": "string" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "in": "query", - "name": "ref", - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/octet-stream" - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a file from a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { - "get": { - "operationId": "repoListReleases", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", - "in": "query", - "name": "draft", - "type": "boolean" - }, - { - "description": "filter (exclude / include) pre-releases", - "in": "query", - "name": "pre-release", - "type": "boolean" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/ReleaseList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repo's releases", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateRelease", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateReleaseOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Create a release", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { - "get": { - "operationId": "repoGetLatestRelease", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/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": "repoDeleteReleaseByTag", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "tag name of the release to delete", - "in": "path", - "name": "tag", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Delete a release by tag name", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetReleaseByTag", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "tag name of the release to get", - "in": "path", - "name": "tag", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a release by tag name", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { - "delete": { - "operationId": "repoDeleteRelease", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release to delete", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Delete a release", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetRelease", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release to get", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a release", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoEditRelease", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release to edit", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditReleaseOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Update a release", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { - "get": { - "operationId": "repoListReleaseAttachments", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List release's attachments", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "multipart/form-data", - "application/octet-stream" - ], - "operationId": "repoCreateReleaseAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "name of the attachment", - "in": "query", - "name": "name", - "type": "string" - }, - { - "description": "attachment to upload", - "in": "formData", - "name": "attachment", - "type": "file" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/error" - } - }, - "summary": "Create a release attachment", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { - "delete": { - "operationId": "repoDeleteReleaseAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to delete", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a release attachment", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetReleaseAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to get", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a release attachment", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoEditReleaseAttachment", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the release", - "format": "int64", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to edit", - "format": "int64", - "in": "path", - "name": "attachment_id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Edit a release attachment", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/reviewers": { - "get": { - "operationId": "repoGetReviewers", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/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": "repoSigningKey", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "text/plain" - ], - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } - } - }, - "summary": "Get signing-key.gpg for given repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { - "get": { - "operationId": "repoSigningKeySSH", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "text/plain" - ], - "responses": { - "200": { - "description": "ssh public key", - "schema": { - "type": "string" - } - } - }, - "summary": "Get signing-key.pub for given repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { - "get": { - "operationId": "repoListStargazers", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repo's stargazers", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "get": { - "operationId": "repoListStatuses", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "sha of the commit", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "description": "type of sort", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "in": "query", - "name": "sort", - "type": "string" - }, - { - "description": "type of state", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "in": "query", - "name": "state", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a commit's statuses", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoCreateStatus", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "sha of the commit", - "in": "path", - "name": "sha", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateStatusOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Create a commit status", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { - "operationId": "repoListSubscribers", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repo's watchers", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "delete": { - "operationId": "userCurrentDeleteSubscription", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Unwatch a repo", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "userCurrentCheckSubscription", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/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": "userCurrentPutSubscription", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Watch a repo", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { - "get": { - "operationId": "repoListTagProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" - } - }, - "summary": "List tag protections for a repository", - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateTagProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateTagProtectionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "$ref": "#/responses/TagProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Create a tag protections for a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { - "delete": { - "operationId": "repoDeleteTagProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of protected tag", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Delete a specific tag protection for the repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetTagProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of the tag protect to get", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a specific tag protection for the repository", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoEditTagProtection", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "id of protected tag", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/EditTagProtectionOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/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": "repoListTags", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results, default maximum page size is 50", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TagList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's tags", - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoCreateTag", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateTagOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Create a new git tag in a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { - "delete": { - "operationId": "repoDeleteTag", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of tag to delete", - "in": "path", - "name": "tag", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "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" - } - }, - "summary": "Delete a repository's tag by name", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetTag", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of tag", - "in": "path", - "name": "tag", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get the tag of a repository by tag name", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { - "operationId": "repoListTeams", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repository's teams", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { - "delete": { - "operationId": "repoDeleteTeam", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "team name", - "in": "path", - "name": "team", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Delete a team from a repository", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoCheckTeam", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "team name", - "in": "path", - "name": "team", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - } - }, - "summary": "Check if a team is assigned to a repository", - "tags": [ - "repository" - ] - }, - "put": { - "operationId": "repoAddTeam", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "team name", - "in": "path", - "name": "team", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Add a team to a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times": { - "get": { - "operationId": "repoTrackedTimes", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "optional filter by user (available for issue managers)", - "in": "query", - "name": "user", - "type": "string" - }, - { - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "since", - "type": "string" - }, - { - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "format": "date-time", - "in": "query", - "name": "before", - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a repo's tracked times", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { - "get": { - "deprecated": true, - "operationId": "userTrackedTimes", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "username of the user whose tracked times are to be listed", - "in": "path", - "name": "user", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "List a user's tracked times in a repo", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics": { - "get": { - "operationId": "repoListTopics", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/TopicNames" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get list of topics that a repository has", - "tags": [ - "repository" - ] - }, - "put": { - "operationId": "repoUpdateTopics", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/RepoTopicOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "summary": "Replace list of topics for a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { - "delete": { - "operationId": "repoDeleteTopic", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the topic to delete", - "in": "path", - "name": "topic", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "summary": "Delete a topic from a repository", - "tags": [ - "repository" - ] - }, - "put": { - "operationId": "repoAddTopic", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the topic to add", - "in": "path", - "name": "topic", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "summary": "Add a topic to a repository", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer": { - "post": { - "operationId": "repoTransfer", - "parameters": [ - { - "description": "owner of the repo to transfer", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to transfer", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "Transfer Options", - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TransferRepoOption" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "summary": "Transfer a repo ownership", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "operationId": "acceptRepoTransfer", - "parameters": [ - { - "description": "owner of the repo to transfer", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to transfer", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Accept a repo transfer", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { - "operationId": "rejectRepoTransfer", - "parameters": [ - { - "description": "owner of the repo to transfer", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo to transfer", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Reject a repo transfer", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "consumes": [ - "application/json" - ], - "operationId": "repoCreateWikiPage", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "201": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Create a wiki page", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { - "delete": { - "operationId": "repoDeleteWikiPage", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the page", - "in": "path", - "name": "pageName", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Delete a wiki page", - "tags": [ - "repository" - ] - }, - "get": { - "operationId": "repoGetWikiPage", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the page", - "in": "path", - "name": "pageName", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get a wiki page", - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "operationId": "repoEditWikiPage", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the page", - "in": "path", - "name": "pageName", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "summary": "Edit a wiki page", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { - "get": { - "operationId": "repoGetWikiPages", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "page size of results", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPageList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get all wiki pages", - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { - "get": { - "operationId": "repoGetWikiPageRevisions", - "parameters": [ - { - "description": "owner of the repo", - "in": "path", - "name": "owner", - "required": true, - "type": "string" - }, - { - "description": "name of the repo", - "in": "path", - "name": "repo", - "required": true, - "type": "string" - }, - { - "description": "name of the page", - "in": "path", - "name": "pageName", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "in": "query", - "name": "page", - "type": "integer" - }, - { - "description": "group ID of the repo", - "format": "int64", - "in": "path", - "name": "group_id", - "required": true, - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "summary": "Get revisions of a wiki page", - "tags": [ - "repository" - ] - } - } - } + "paths": { + "/repos/{owner}/group/{group_id}/{repo}/milestones": { + "get": { + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "state", + "in": "query", + "type": "string", + "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"" + }, + { + "name": "name", + "in": "query", + "type": "string", + "description": "filter by milestone name" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "201": { + "$ref": "#/responses/Milestone" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "operationId": "repoDeleteReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a release attachment" + }, + "patch": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned." + }, + { + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before" + }, + { + "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": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Comment" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "get": { + "operationId": "repoGetReleaseByTag", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "tag name of the release to get", + "name": "tag" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release by tag name" + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "a git ref or commit sha", + "name": "sha" + }, + { + "in": "query", + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat" + }, + { + "name": "verification", + "in": "query", + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { + "operationId": "issueDeleteTime", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of time to delete" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete specific tracked time" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { + "get": { + "operationId": "repoListReleaseAttachments", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List release's attachments" + }, + "post": { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path" + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "in": "formData", + "type": "file", + "description": "attachment to upload", + "name": "attachment" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "get": { + "operationId": "repoGetPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "409": { + "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "type": "integer", + "description": "runid of the workflow run", + "name": "run", + "in": "path", + "required": true + }, + { + "name": "name", + "in": "query", + "type": "string", + "description": "name of the artifact" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ssh public key", + "schema": { + "type": "string" + } + } + }, + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get signing-key.pub for given repository", + "operationId": "repoSigningKeySSH" + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "409": { + "description": "Cannot stop a non-existent stopwatch" + }, + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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": { + "summary": "Make the issue in the url depend on the issue in the form.", + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "delete": { + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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 + }, + { + "schema": { + "$ref": "#/definitions/IssueMeta" + }, + "name": "body", + "in": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove an issue dependency" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { + "delete": { + "operationId": "issueRemoveLabel", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to remove", + "name": "id" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a label from an issue" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueTemplates" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { + "get": { + "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 + }, + { + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "get": { + "operationId": "notifyGetRepoList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "List users's notification threads on a specific repo" + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "Mark notification threads as read, pinned or unread on a specific repo", + "operationId": "notifyReadRepoList", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "name": "status-types", + "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": "to-status", + "in": "query", + "type": "string", + "description": "Status to mark notifications as. Defaults to read." + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys": { + "post": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a key to a repository", + "operationId": "repoCreateKey" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, + { + "name": "fingerprint", + "in": "query", + "type": "string", + "description": "fingerprint of the key" + }, + { + "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" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { + "delete": { + "summary": "Delete a repository's tag by name", + "operationId": "repoDeleteTag", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Tag" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "responses": { + "201": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a wiki page", + "operationId": "repoCreateWikiPage", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body", + "in": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Modify multiple files in a repository", + "operationId": "repoChangeFiles", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { + "post": { + "responses": { + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge" + }, + { + "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" + } + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "description": "pull request has not been merged" + }, + "204": { + "description": "pull request has been merged" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "delete": { + "summary": "Delete an 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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "runner_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the runner" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Lock an issue", + "operationId": "issueLockIssue", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "operationId": "issueCreateIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path" + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true, + "type": "file" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a comment attachment" + } + }, + "/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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/PullRequestList" + } + } + } + }, + "/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 + }, + { + "name": "sha", + "in": "path", + "required": true, + "type": "string", + "description": "SHA of the commit to get" + }, + { + "name": "diffType", + "in": "path", + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch" + }, + { + "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}/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 + }, + { + "name": "name", + "in": "query", + "type": "string", + "description": "name of the artifact" + }, + { + "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}/issues/{index}/reactions": { + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "get": { + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", + "parameters": [ + { + "description": "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" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create or Update a secret value in a repository", + "operationId": "updateRepoSecret", + "parameters": [ + { + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a secret in a repository", + "operationId": "deleteRepoSecret", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + }, + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Create a branch", + "operationId": "repoCreateBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a repository", + "operationId": "listWorkflowJobs", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment", + "operationId": "issueGetComment" + }, + "delete": { + "summary": "Delete a comment", + "operationId": "issueDeleteComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ] + }, + "patch": { + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditComment", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/file-contents": { + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ContentsListResponse" + } + }, + "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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "post": { + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "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" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetFilesOptions" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { + "operationId": "repoUnDismissPullReview", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel to dismiss a review for a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues": { + "get": { + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + }, + { + "description": "search string", + "name": "q", + "in": "query", + "type": "string" + }, + { + "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" + }, + { + "name": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format" + }, + { + "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" + }, + { + "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" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/IssueList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + } + }, + "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" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "put": { + "tags": [ + "repository" + ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WatchInfo" + } + } + }, + "delete": { + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "repository" + ] + }, + "get": { + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "get": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ReferenceList" + } + }, + "produces": [ + "application/json" + ], + "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.", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.", + "operationId": "repoGetContentsExt", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "filepath", + "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." + }, + { + "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": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsExtResponse" + }, + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "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" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo to fork" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork" + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "base of the pull request to get", + "name": "base" + }, + { + "required": true, + "type": "string", + "description": "head of the pull request to get", + "name": "head", + "in": "path" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path" + }, + { + "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" + }, + { + "name": "files", + "in": "query", + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "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" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "parameters": [ + { + "type": "string", + "description": "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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" + }, + { + "in": "query", + "type": "string", + "description": "triggered by user", + "name": "actor" + }, + { + "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}/issues/{index}": { + "get": { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete an issue", + "operationId": "issueDelete", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + ] + }, + "patch": { + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssue", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { + "get": { + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the EditorConfig definitions of a file in a repository" + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + } + } + }, + "put": { + "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 + }, + { + "required": true, + "type": "string", + "description": "team name", + "name": "team", + "in": "path" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a team from a repository", + "operationId": "repoDeleteTeam", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "get": { + "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 + }, + { + "required": true, + "type": "integer", + "description": "id of the tag protect to get", + "name": "id", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TagProtection" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "patch": { + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet" + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo to delete", + "name": "repo" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/languages": { + "get": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get" + }, + { + "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" + } + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer": { + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path" + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + }, + "description": "Transfer Options", + "name": "body", + "in": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer" + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "schema": { + "type": "string" + }, + "description": "GPG armored public key" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release to get" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release to delete", + "name": "id", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEditRelease", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a release" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "tags": [ + "issue" + ], + "summary": "Check if user is subscribed to an issue", + "operationId": "issueCheckSubscription", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { + "get": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level runners", + "operationId": "getRepoRunners", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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}/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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that have write access and can be assigned to issues", + "operationId": "repoGetAssignees" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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": { + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "patch": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateActionWorkflowDispatch" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/reviewers": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Test a push webhook", + "operationId": "repoTestHook", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/actions/runs/{run}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "name": "run", + "in": "path", + "required": true, + "type": "string", + "description": "id of the run" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun" + }, + "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 + }, + { + "name": "run", + "in": "path", + "required": true, + "type": "integer", + "description": "runid of the workflow run" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "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 + }, + { + "name": "recursive", + "in": "query", + "type": "boolean", + "description": "show all directories and files" + }, + { + "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" + }, + { + "in": "query", + "type": "integer", + "description": "number of items per page", + "name": "per_page" + }, + { + "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}/actions/workflows/{workflow_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflow" + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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}/commits/{sha}/pull": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the merged pull request of the commit", + "operationId": "repoGetCommitPullRequest", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's combined status, by branch/tag/commit reference" + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "delete": { + "operationId": "issueDeleteLabel", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a label" + }, + "patch": { + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to edit" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "get": { + "tags": [ + "issue" + ], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path" + }, + { + "description": "id of the review", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review" + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + }, + "name": "body", + "in": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request", + "operationId": "repoSubmitPullReview" + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "id of the review", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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}/collaborators": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators" + } + }, + "/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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since", + "in": "query" + }, + { + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { + "post": { + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of issue to unpin" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "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 + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repository permissions for a user" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "get": { + "operationId": "repoGetIssueConfig", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the issue config for a repo" + } + }, + "/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": { + "operationId": "repoUpdateTopics", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + }, + "name": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Replace list of topics for a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repo's releases", + "operationId": "repoListReleases", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "draft", + "in": "query", + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show" + }, + { + "type": "boolean", + "description": "filter (exclude / include) pre-releases", + "name": "pre-release", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + }, + "name": "body", + "in": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the hook to get" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditGitHookOption" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "parameters": [ + { + "description": "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": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "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" + }, + "201": { + "$ref": "#/responses/empty" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "get": { + "tags": [ + "issue" + ], + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add or Update a collaborator to a repository", + "operationId": "repoAddCollaborator", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "collaborator", + "in": "path", + "required": true, + "type": "string", + "description": "username of the user to add or update as a collaborator" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks": { + "get": { + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "post": { + "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" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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}/contents/{filepath}": { + "post": { + "operationId": "repoCreateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository" + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + }, + "name": "body", + "in": "body", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/error" + } + } + }, + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path" + }, + { + "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" + } + }, + "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead." + }, + "put": { + "responses": { + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileResponse" + }, + "201": { + "$ref": "#/responses/FileResponse" + } + }, + "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 + }, + { + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + }, + "name": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { + "post": { + "summary": "Update the priorities of branch protections for a repository.", + "operationId": "repoUpdateBranchProtectionPriories", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "get": { + "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 + }, + { + "name": "run", + "in": "path", + "required": true, + "type": "integer", + "description": "runid of the workflow run" + }, + { + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query", + "type": "string" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { + "tags": [ + "repository" + ], + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { + "post": { + "operationId": "repoCreatePullReviewRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "create review requests for a pull request" + }, + "delete": { + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a hook", + "operationId": "repoGetHook" + }, + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the hook to delete" + }, + { + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the hook", + "name": "id", + "in": "path" + }, + { + "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}/media/{filepath}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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 + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + } + }, + "produces": [ + "application/octet-stream" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "post": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "get": { + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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", + "format": "int64" + }, + { + "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" + }, + { + "name": "before", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "get": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/PushMirror" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "remote name of push mirror" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "operationId": "repoDeletePushMirror", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "deletes a push mirror from a repository by remoteName" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { + "get": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List all reviews for a pull request", + "operationId": "repoListPullReviews" + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { + "get": { + "operationId": "getArtifact", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Artifact" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific artifact for a workflow run" + }, + "delete": { + "summary": "Deletes a specific artifact for a workflow run", + "operationId": "deleteArtifact", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags": { + "get": { + "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 + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "schema": { + "$ref": "#/definitions/CreateTagOption" + }, + "name": "body", + "in": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { + "post": { + "parameters": [ + { + "type": "string", + "description": "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 + }, + { + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content", + "in": "body" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to a comment of an issue", + "operationId": "issuePostCommentReaction" + }, + "delete": { + "summary": "Remove a reaction from a comment of an issue", + "operationId": "issueDeleteCommentReaction", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content", + "in": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" + }, + { + "name": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" + }, + { + "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" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJob" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "get": { + "operationId": "repoGetKey", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the key to get" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's key by id" + }, + "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}/issues/{index}/assets/{attachment_id}": { + "get": { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "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 + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { + "post": { + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { + "parameters": [ + { + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get changed files for a pull request", + "operationId": "repoGetPullRequestFiles", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "type": "string", + "description": "skip to given file", + "name": "skip-to", + "in": "query" + }, + { + "in": "query", + "enum": [ + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" + ], + "type": "string", + "description": "whitespace behavior", + "name": "whitespace" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + }, + "name": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch" + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "artifact_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the artifact" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "302": { + "description": "redirect to the blob download" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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": { + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits": { + "get": { + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "SHA or branch to start listing commits from (usually 'master')", + "name": "sha", + "in": "query" + }, + { + "in": "query", + "type": "string", + "description": "filepath of a file/dir", + "name": "path" + }, + { + "type": "string", + "format": "date-time", + "description": "Only commits after this date will be returned (ISO 8601 format)", + "name": "since", + "in": "query" + }, + { + "name": "until", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only commits before this date will be returned (ISO 8601 format)" + }, + { + "in": "query", + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat" + }, + { + "name": "verification", + "in": "query", + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query", + "type": "boolean" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "get": { + "operationId": "getRepoVariable", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "variablename", + "in": "path", + "required": true, + "type": "string", + "description": "name of the variable" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repo-level variable" + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + }, + "name": "body", + "in": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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": { + "operationId": "createRepoVariable", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "409": { + "description": "variable name already exists." + }, + "500": { + "$ref": "#/responses/error" + }, + "201": { + "description": "response when creating a repo-level variable" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repo-level variable" + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "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}/git/tags/{sha}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", + "name": "sha", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tag object of an annotated tag (not lightweight tags)", + "operationId": "GetAnnotatedTag" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + } + ] + } + }, + "/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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/PushMirrorList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/PushMirror" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePushMirrorOption" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "get": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "Name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "query", + "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" + }, + { + "description": "ID of the milestone", + "name": "milestone", + "in": "query", + "type": "integer", + "format": "int64" + }, + { + "name": "labels", + "in": "query", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi", + "description": "Label IDs" + }, + { + "type": "string", + "description": "Filter by pull request author", + "name": "poster", + "in": "query" + }, + { + "name": "page", + "in": "query", + "minimum": 1, + "type": "integer", + "default": 1, + "description": "Page number of results to return (1-based)" + }, + { + "minimum": 0, + "type": "integer", + "description": "Page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests" + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pageName", + "in": "path", + "required": true, + "type": "string", + "description": "name of the page" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WikiPage" + } + } + }, + "delete": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "tags": [ + "repository" + ], + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "patch": { + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a wiki page" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "delete": { + "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 + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a milestone" + }, + "patch": { + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "the milestone to edit, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + }, + "name": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/topics/{topic}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "topic", + "in": "path", + "required": true, + "type": "string", + "description": "name of the topic to add" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the topic to delete", + "name": "topic", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repository's teams", + "operationId": "repoListTeams", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "description": "this parameter is ignored" + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "deprecated": true, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditCommentDeprecated", + "parameters": [ + { + "type": "string", + "description": "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 + }, + { + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { + "get": { + "operationId": "repoGetPullReviewComments", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + } + }, + "post": { + "operationId": "repoCreateBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch protections for a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "in": "formData", + "required": true, + "type": "file", + "description": "attachment to upload", + "name": "attachment" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "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}/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": [ + { + "description": "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" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + } + }, + "post": { + "parameters": [ + { + "type": "string", + "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" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "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": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "get": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of protected branch", + "name": "name" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "operationId": "repoDeleteBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch protection for the repository" + }, + "patch": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "name of protected branch" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { + "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" + } + }, + "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 + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "username of the user to subscribe the issue to", + "name": "user" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update avatar", + "operationId": "repoUpdateAvatar" + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "type": "string", + "description": "type of state", + "name": "state", + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ] + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + } + } } \ No newline at end of file diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index d02aeba667..8c38625c6d 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -80,66 +80,66 @@ func TestAPISearchRepo(t *testing.T) { }{ { name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{ - nil: {count: 36}, - user: {count: 36}, - user2: {count: 36}, - }, + nil: {count: 36}, + user: {count: 36}, + user2: {count: 36}, + }, }, { name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesDefault", requestURL: "/api/v1/repos/search?default&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "big_test_"), expectedResults: expectedResults{ - nil: {count: 7, repoName: "big_test_"}, - user: {count: 7, repoName: "big_test_"}, - user2: {count: 7, repoName: "big_test_"}, - }, + nil: {count: 7, repoName: "big_test_"}, + user: {count: 7, repoName: "big_test_"}, + user2: {count: 7, repoName: "big_test_"}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "user2/big_test_"), expectedResults: expectedResults{ - user2: {count: 2, repoName: "big_test_"}, - }, + user2: {count: 2, repoName: "big_test_"}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user.ID), expectedResults: expectedResults{ - nil: {count: 5}, - user: {count: 9, includesPrivate: true}, - user2: {count: 6, includesPrivate: true}, - }, + nil: {count: 5}, + user: {count: 9, includesPrivate: true}, + user2: {count: 6, includesPrivate: true}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser2", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user2.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 2, includesPrivate: true}, - user2: {count: 2, includesPrivate: true}, - user4: {count: 1}, - }, + nil: {count: 1}, + user: {count: 2, includesPrivate: true}, + user2: {count: 2, includesPrivate: true}, + user4: {count: 1}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser3", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", org3.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 4, includesPrivate: true}, - user2: {count: 3, includesPrivate: true}, - org3: {count: 4, includesPrivate: true}, - }, + nil: {count: 1}, + user: {count: 4, includesPrivate: true}, + user2: {count: 3, includesPrivate: true}, + org3: {count: 4, includesPrivate: true}, + }, }, { name: "RepositoriesOwnedByOrganization", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", orgUser.ID), expectedResults: expectedResults{ - nil: {count: 1, repoOwnerID: orgUser.ID}, - user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, - user2: {count: 1, repoOwnerID: orgUser.ID}, - }, + nil: {count: 1, repoOwnerID: orgUser.ID}, + user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, + user2: {count: 1, repoOwnerID: orgUser.ID}, + }, }, {name: "RepositoriesAccessibleAndRelatedToUser4", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user4.ID), expectedResults: expectedResults{ nil: {count: 3}, From 4541e5004602a9eaba679836ce0c061bc2f67f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 17:59:31 -0500 Subject: [PATCH 107/218] remove references to `db.DefaultContext` --- services/group/group_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/group/group_test.go b/services/group/group_test.go index d98ee68f39..a726123e94 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -6,7 +6,6 @@ package group import ( "testing" - "code.gitea.io/gitea/models/db" group_model "code.gitea.io/gitea/models/group" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" @@ -29,7 +28,7 @@ func TestNewGroup(t *testing.T) { Name: groupName, OwnerID: 3, } - assert.NoError(t, NewGroup(db.DefaultContext, group)) + assert.NoError(t, NewGroup(t.Context(), group)) unittest.AssertExistsAndLoadBean(t, &group_model.Group{Name: groupName}) } @@ -68,7 +67,7 @@ func TestMoveRepo(t *testing.T) { }) origCount := unittest.GetCount(t, new(repo_model.Repository), cond) - assert.NoError(t, MoveGroupItem(db.DefaultContext, MoveGroupOptions{ + assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{ NewParent: 123, ItemID: 32, IsGroup: false, From 2f906e913752a8e6b70ab5a53987093308703dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 18:04:39 -0500 Subject: [PATCH 108/218] appease the linter --- build_tools/swagger/main.go | 4 +++- models/migrations/v1_26/v324.go | 3 +++ routers/api/v1/api.go | 7 +++---- routers/api/v1/repo/pull.go | 1 - 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index 24b4c42dab..1c32b4c28c 100644 --- a/build_tools/swagger/main.go +++ b/build_tools/swagger/main.go @@ -1,3 +1,5 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT //go:generate go run main.go ../../ package main @@ -61,7 +63,7 @@ func generatePaths(root string) map[string]any { } func writeMapToFile(filename string, data map[string]any) { - bytes, err := json.MarshalIndent(data, "", "\t") + bytes, err := json.MarshalIndent(data, "", " ") if err != nil { log.Fatal(err) } diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index b70de1901b..b327157ed5 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package v1_26 import "xorm.io/xorm" diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 9e14b3f5e7..5999705588 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -140,14 +140,13 @@ func repoAssignment() func(ctx *context.APIContext) { userName := ctx.PathParam("username") repoName := ctx.PathParam("reponame") var gid int64 - group := ctx.PathParam("group_id") - if group != "" { - gid, _ = strconv.ParseInt(group, 10, 64) + 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 } - group += "/" } var ( owner *user_model.User diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index d506cec232..6af6a11ee5 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -266,7 +266,6 @@ func GetPullRequestByBaseHead(ctx *context.APIContext) { } else { owner, name = split[0], split[1] } - } else { owner = split[0] gid = ctx.Repo.Repository.GroupID From 96464507a97f7bff5c229979cbdf4788760ecc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 18:48:48 -0500 Subject: [PATCH 109/218] fix `groupSegmentWithTrailingSlash` to return an empty string if gid <= 0 --- models/repo/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/repo/repo.go b/models/repo/repo.go index e24dee8fbd..505d56c63b 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -682,6 +682,9 @@ func getGroupSegment(gid int64) string { } func groupSegmentWithTrailingSlash(gid int64) string { + if gid < 1 { + return "" + } return getGroupSegment(gid) + "/" } From 03a3195e8e012957f269b11b983613e358120385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 20:31:06 -0500 Subject: [PATCH 110/218] update activity actions to return paths/links with a repo's group --- models/activities/action.go | 21 ++++++++++++++++++--- modules/templates/util_misc.go | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) 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/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 From 3655cc877cab7ddce0a82d2b50d91e75cc273e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 21:53:42 -0500 Subject: [PATCH 111/218] add trailing newline when generating swagger group routes --- build_tools/swagger/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index 1c32b4c28c..927157e17e 100644 --- a/build_tools/swagger/main.go +++ b/build_tools/swagger/main.go @@ -67,6 +67,7 @@ func writeMapToFile(filename string, data map[string]any) { if err != nil { log.Fatal(err) } + bytes = append(bytes, '\n') err = os.WriteFile(filename, bytes, 0o666) if err != nil { log.Fatal(err) From 5dff23b71e594c99f1b117ff83d06c1509de7694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 22:04:26 -0500 Subject: [PATCH 112/218] update v1_groups.json --- templates/swagger/v1_groups.json | 27672 ++++++++++++++--------------- 1 file changed, 13836 insertions(+), 13836 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index c830fd6661..5bf56d2120 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,9 +1,140 @@ { "paths": { - "/repos/{owner}/group/{group_id}/{repo}/milestones": { + "/repos/{owner}/group/{group_id}/{repo}/topics": { "get": { - "summary": "Get all of a repository's opened milestones", - "operationId": "issueGetMilestonesList", + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { + "patch": { + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", "parameters": [ { "required": true, @@ -20,16 +151,2729 @@ "required": true }, { + "in": "path", + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "get": { + "tags": [ + "repository" + ], + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "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 + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "tags": [ + "repository" + ] + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "name": "diffType", + "in": "path", + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/LicensesList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "team name", + "name": "team" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + } + } + }, + "put": { + "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 + }, + { + "description": "team name", + "name": "team", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a team from a repository", + "operationId": "repoDeleteTeam", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "team name", + "name": "team" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateActionWorkflowDispatch" + }, + "name": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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": "issueCreateIssueCommentAttachment", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": "name of the attachment", + "name": "name", + "in": "query", + "type": "string" + }, + { + "name": "attachment", + "in": "formData", + "required": true, + "type": "file", + "description": "attachment to upload" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { + "post": { + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "path of the file to create", + "name": "filepath" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + }, + "name": "body", + "in": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileDeleteResponse" + } + }, + "consumes": [ + "application/json" + ] + }, + "get": { + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead." + }, + "put": { + "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": [ + { + "description": "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" + }, + { + "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" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "get": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/VariableList" + } + }, + "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 + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "description": "this parameter is ignored", + "name": "index" + }, + { + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "summary": "Edit a comment", + "tags": [ + "issue" + ], + "operationId": "issueEditCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { + "tags": [ + "repository" + ], + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues": { + "get": { + "tags": [ + "issue" + ], + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "whether issue is open or closed", "name": "state", + "in": "query" + }, + { "in": "query", "type": "string", - "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"" + "description": "comma separated list of label names. Fetch only issues that have any of this label names. Non existent labels are discarded.", + "name": "labels" + }, + { + "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" + }, + { + "name": "milestones", + "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" + }, + { + "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" + }, + { + "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" + }, + { + "name": "created_by", + "in": "query", + "type": "string", + "description": "Only show items which were created by the given user" + }, + { + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Reaction" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "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/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/reviewers": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id" }, { "name": "name", "in": "query", "type": "string", - "description": "filter by milestone name" + "description": "name of the attachment" + }, + { + "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": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Attachment" + } + } + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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}/actions/workflows/{workflow_id}/enable": { + "put": { + "responses": { + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Enable a workflow", + "operationId": "ActionsEnableWorkflow", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents": { + "post": { + "summary": "Modify multiple files in a repository", + "operationId": "repoChangeFiles", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a release", + "operationId": "repoEditRelease", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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}/commits/{ref}/status": { + "get": { + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's combined status, by branch/tag/commit reference" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's teams", + "operationId": "repoListTeams", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the workflow" + }, + { + "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}/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 + }, + { + "required": true, + "type": "string", + "description": "username of the user whose tracked times are to be listed", + "name": "user", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a label", + "operationId": "issueDeleteLabel", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "patch": { + "operationId": "issueEditLabel", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Label" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a label" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "operationId": "moveIssuePin", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position" + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "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/jobs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a repository", + "operationId": "listWorkflowJobs", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query", + "type": "string" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", @@ -54,82 +2898,16 @@ ], "responses": { "200": { - "$ref": "#/responses/MilestoneList" + "$ref": "#/responses/LabelList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } }, "post": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "201": { - "$ref": "#/responses/Milestone" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment", + "summary": "Create a label", + "operationId": "issueCreateLabel", "parameters": [ { "type": "string", @@ -146,20 +2924,139 @@ "type": "string" }, { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + }, + { + "name": "group_id", "type": "integer", "format": "int64", - "description": "id of the release", - "name": "id", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, + { + "in": "path", + "required": true, + "type": "string", + "description": "branch to delete", + "name": "branch" + }, { "type": "integer", "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", + "required": true, "in": "path", - "required": true + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Rename a branch", + "operationId": "repoRenameBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "branch", + "in": "path", + "required": true, + "type": "string", + "description": "name of the branch" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/RenameBranchRepoOption" + }, + "name": "body" }, { "required": true, @@ -170,17 +3067,404 @@ "format": "int64" } ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "branch", + "in": "path", + "required": true, + "type": "string", + "description": "branch to get" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/Branch" }, "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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "put": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Lock an issue", + "operationId": "issueLockIssue" }, "delete": { - "operationId": "repoDeleteReleaseAttachment", + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { + "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 + }, + { + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query", + "type": "boolean" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + "get": { + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", "parameters": [ { "type": "string", @@ -197,20 +3481,2172 @@ "name": "repo" }, { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "attachment_id", "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "id of the release", - "name": "id" + "description": "id of the attachment to get" }, { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "index", + "in": "path", + "required": true, "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { "format": "int64", "description": "id of the attachment to delete", "name": "attachment_id", "in": "path", + "required": true, + "type": "integer" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "post": { + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body", + "in": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "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}/issues/{index}/stopwatch/start": { + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { + "get": { + "parameters": [ + { + "description": "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" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get users who subscribed on an issue.", + "operationId": "issueSubscriptions" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "description": "id of the tag protect to get", + "name": "id", + "in": "path", + "required": true + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "get": { + "operationId": "issueGetIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue" + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete an issue", + "operationId": "issueDelete", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to edit", + "name": "index" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Issue" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "get": { + "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 + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "description": "runid of the workflow run", + "name": "run" + }, + { + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "the milestone to delete, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone" + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "description": "the milestone to edit, identified by ID and if not available by name" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "name": "verification", + "in": "query", + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')" + }, + { + "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" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results (ignored if used with 'path')" + }, + { + "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}/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}/collaborators": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "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}/actions/artifacts": { + "get": { + "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 + }, + { + "name": "name", + "in": "query", + "type": "string", + "description": "name of the artifact" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all artifacts for a repository", + "operationId": "getArtifacts" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { + "get": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the merged pull request of the commit" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "get": { + "tags": [ + "repository" + ], + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + }, + "name": "body", + "in": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch protections for a repository", + "operationId": "repoCreateBranchProtection" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "get": { + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issue's attachments" + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "required": true, + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "put": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "username of the user to add or update as a collaborator", + "name": "collaborator" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + }, + "name": "body" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "get": { + "summary": "Check if a user is a collaborator of a repository", + "operationId": "repoCheckCollaborator", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "username of the user to check for being a collaborator", + "name": "collaborator", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "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 + }, + { + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" }, { "description": "group ID of the repo", @@ -235,17 +5671,128 @@ "tags": [ "repository" ], - "summary": "Delete a release attachment" + "summary": "Delete a hook in a repository" }, "patch": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/languages": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", "parameters": [ { "type": "string", @@ -262,27 +5809,126 @@ "description": "name of the repo" }, { - "required": true, "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "name": "group_id", "type": "integer", "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "name": "body", - "in": "body", + "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": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "name": "ref" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } + "type": "file" + }, + "description": "Returns raw file content." + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "required": true, + "type": "string", + "description": "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" + }, + { + "schema": { + "$ref": "#/definitions/IssueMeta" + }, + "name": "body", + "in": "body" }, { "description": "group ID of the repo", @@ -294,31 +5940,148 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "index of the issue", + "name": "index" + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" } }, - "consumes": [ + "produces": [ "application/json" + ], + "tags": [ + "issue" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { - "get": { + }, + "post": { + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", + "summary": "Make the issue in the url depend on the issue in the form." + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", "parameters": [ { "description": "owner of the repo", @@ -335,26 +6098,1323 @@ "required": true }, { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "index of the issue", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/IssueList" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { + "get": { + "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 + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tag object of an annotated tag (not lightweight tags)" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection" + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch protection for the repository", + "operationId": "repoDeleteBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + ] + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times": { + "get": { + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query", + "type": "string" + }, + { + "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" + }, + { + "name": "before", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path" + }, + { + "type": "boolean", + "description": "show all directories and files", + "name": "recursive", + "in": "query" + }, + { + "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" + }, + { + "description": "number of items per page", + "name": "per_page", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query", + "type": "array", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "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" + }, + { + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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": "notifyReadRepoList", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "all", + "in": "query", + "type": "string", + "description": "If true, mark all notifications on this repo. Default value is false" + }, + { + "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": "array", + "items": { + "type": "string" + } + }, + { + "name": "to-status", + "in": "query", + "type": "string", + "description": "Status to mark notifications as. Defaults to read." + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "put": { + "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 + }, + { + "name": "variablename", + "in": "path", + "required": true, + "type": "string", + "description": "name of the variable" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a repo-level variable" + }, + "post": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repo-level variable", + "operationId": "createRepoVariable" + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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" + } + } + }, + "get": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ActionVariable" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/file-contents": { + "get": { + "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" + }, + { + "in": "query", + "required": true, + "type": "string", + "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ContentsListResponse" + } + }, + "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" + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the metadata and contents of requested files", + "operationId": "repoGetFileContentsPost", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ContentsListResponse" + } + }, + "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`." + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + }, + "delete": { + "operationId": "repoDeletePushMirror", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "remote name of the pushMirror", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "deletes a push mirror from a repository by remoteName" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { + "get": { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowJob" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow job for a workflow run", + "operationId": "getWorkflowJob" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", "name": "index", "in": "path", "required": true }, { - "name": "since", - "in": "query", "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned." + "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" + }, + { + "description": "page size of results", + "name": "limit", "in": "query", + "type": "integer" + }, + { + "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}/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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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" + "name": "before", + "in": "query" }, { "description": "group ID of the repo", @@ -402,11 +7462,11 @@ "operationId": "issueCreateComment", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -416,55 +7476,19 @@ "required": true }, { - "description": "index of the issue", "name": "index", "in": "path", "required": true, "type": "integer", - "format": "int64" + "format": "int64", + "description": "index of the issue" }, { - "name": "body", - "in": "body", "schema": { "$ref": "#/definitions/CreateIssueCommentOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { - "get": { - "operationId": "repoGetReleaseByTag", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "tag name of the release to get", - "name": "tag" + }, + "name": "body", + "in": "body" }, { "format": "int64", @@ -474,81 +7498,17 @@ "name": "group_id", "type": "integer" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { "responses": { - "200": { - "$ref": "#/responses/Release" - }, "404": { "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release by tag name" - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "tag name of the release to delete", - "name": "tag", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { "204": { "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" } }, "produces": [ @@ -557,8 +7517,8 @@ "tags": [ "repository" ], - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", + "summary": "Test a push webhook", + "operationId": "repoTestHook", "parameters": [ { "type": "string", @@ -567,108 +7527,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a note corresponding to a single commit from a repository", - "operationId": "repoGetNote", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, { "required": true, "type": "string", @@ -677,122 +7535,101 @@ "in": "path" }, { - "in": "path", - "required": true, - "type": "string", - "description": "a git ref or commit sha", - "name": "sha" - }, - { - "in": "query", - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat" - }, - { - "name": "verification", - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Commit" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { - "delete": { - "operationId": "issueDeleteTime", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": "id of the hook to test", "name": "id", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of time to delete" + "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" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { + "get": { "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/CommentList" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Delete specific tracked time" + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since" + }, + { + "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" + } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { "get": { "produces": [ "application/json" @@ -800,8 +7637,8 @@ "tags": [ "repository" ], - "summary": "List a repository's action tasks", - "operationId": "ListActionTasks", + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", "parameters": [ { "description": "owner of the repo", @@ -811,21 +7648,21 @@ "type": "string" }, { - "name": "repo", - "in": "path", "required": true, "type": "string", - "description": "name of the repo" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { "type": "integer", - "description": "page size of results, default maximum page size is 50", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", "name": "limit", "in": "query" }, @@ -848,68 +7685,37 @@ "404": { "$ref": "#/responses/notFound" }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, "200": { - "$ref": "#/responses/TasksList" + "$ref": "#/responses/PushMirrorList" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + }, "post": { - "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" + }, + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { - "get": { - "operationId": "repoListReleaseAttachments", + ], + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", "parameters": [ { "description": "owner of the repo", @@ -919,19 +7725,54 @@ "type": "string" }, { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + ] + } + }, + "/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 + }, + { + "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true + "name": "repo" }, { "in": "path", @@ -944,60 +7785,48 @@ ], "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List release's attachments" - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { "parameters": [ { - "type": "string", - "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { + "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path" + "description": "index of the issue", + "name": "index" }, { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "in": "formData", - "type": "file", - "description": "attachment to upload", - "name": "attachment" + "description": "username of the user to subscribe the issue to", + "name": "user", + "in": "path", + "required": true, + "type": "string" }, { "required": true, @@ -1009,31 +7838,102 @@ } ], "responses": { + "304": { + "description": "User can only subscribe itself if he is no admin" + }, "404": { "$ref": "#/responses/notFound" }, - "413": { - "$ref": "#/responses/error" + "200": { + "description": "Already subscribed" }, "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" + "description": "Successfully Subscribed" } }, "consumes": [ - "multipart/form-data", - "application/octet-stream" + "application/json" ], "produces": [ "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription" + }, + "delete": { + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "type": "string", + "description": "username of the user to unsubscribe from an issue", + "name": "user", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "Already unsubscribed" + }, + "201": { + "description": "Successfully Unsubscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { - "get": { - "operationId": "repoGetPullRequest", + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "delete": { + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", "parameters": [ { "type": "string", @@ -1043,19 +7943,130 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "in": "path", "required": true, + "type": "string", + "description": "id of the runner", + "name": "runner_id" + }, + { "type": "integer", "format": "int64", - "description": "index of the pull request to get", - "name": "index" + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "description": "runner has been deleted" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "get": { + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "type": "string", + "description": "id of the run", + "name": "run", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -1068,154 +8079,25 @@ ], "responses": { "200": { - "$ref": "#/responses/PullRequest" + "$ref": "#/responses/WorkflowRun" }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request" - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "409": { + "400": { "$ref": "#/responses/error" }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { - "get": { + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun", + "summary": "Delete a workflow run", + "operationId": "deleteActionRun", "parameters": [ { "type": "string", @@ -1225,11 +8107,11 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repository", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", @@ -1239,26 +8121,20 @@ "required": true }, { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the artifact" - }, - { - "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo" } ], "responses": { "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/ArtifactsList" + "204": { + "description": "No Content" }, "400": { "$ref": "#/responses/error" @@ -1266,384 +8142,32 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "description": "ssh public key", - "schema": { - "type": "string" - } - } - }, - "produces": [ - "text/plain" - ], - "tags": [ - "repository" - ], - "summary": "Get signing-key.pub for given repository", - "operationId": "repoSigningKeySSH" - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "409": { - "description": "Cannot stop a non-existent stopwatch" - }, - "201": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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": { - "summary": "Make the issue in the url depend on the issue in the form.", - "operationId": "issueCreateIssueDependencies", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "operationId": "issueRemoveIssueDependencies", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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 - }, - { - "schema": { - "$ref": "#/definitions/IssueMeta" - }, - "name": "body", - "in": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove an issue dependency" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { - "delete": { - "operationId": "issueRemoveLabel", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the label to remove", - "name": "id" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove a label from an issue" - } - }, "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { "delete": { "summary": "Delete an issue's existing stopwatch.", "operationId": "issueDeleteStopWatch", "parameters": [ { - "type": "string", - "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { + "name": "index", + "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path" + "description": "index of the issue to stop the stopwatch on" }, { "name": "group_id", @@ -1679,1636 +8203,7 @@ ] } }, - "/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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueTemplates" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "get": { - "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 - }, - { - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a commit status", - "operationId": "repoCreateStatus", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateStatusOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "get": { - "operationId": "notifyGetRepoList", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "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" - }, - { - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "notification" - ], - "summary": "List users's notification threads on a specific repo" - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "notification" - ], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - }, - { - "name": "status-types", - "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": "to-status", - "in": "query", - "type": "string", - "description": "Status to mark notifications as. Defaults to read." - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys": { - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add a key to a repository", - "operationId": "repoCreateKey" - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "description": "the key_id to search for", - "name": "key_id", - "in": "query" - }, - { - "name": "fingerprint", - "in": "query", - "type": "string", - "description": "fingerprint of the key" - }, - { - "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" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKeyList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { - "delete": { - "summary": "Delete a repository's tag by name", - "operationId": "repoDeleteTag", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get the tag of a repository by tag name", - "operationId": "repoGetTag", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Tag" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "responses": { - "201": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a wiki page", - "operationId": "repoCreateWikiPage", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", - "in": "query" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" - } - } - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a label to an issue", - "operationId": "issueAddLabel", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { - "post": { - "responses": { - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge" - }, - { - "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" - } - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "index of the pull request to merge", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "description": "pull request has not been merged" - }, - "204": { - "description": "pull request has been merged" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { - "delete": { - "summary": "Delete an 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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "runner_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the runner" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunner" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - } - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Lock an issue", - "operationId": "issueLockIssue", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "post": { - "operationId": "issueCreateIssueCommentAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path" - }, - { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "description": "attachment to upload", - "name": "attachment", - "in": "formData", - "required": true, - "type": "file" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a comment attachment" - } - }, - "/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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PullRequestList" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { "get": { "produces": [ "text/plain" @@ -3316,676 +8211,8 @@ "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 - }, - { - "name": "sha", - "in": "path", - "required": true, - "type": "string", - "description": "SHA of the commit to get" - }, - { - "name": "diffType", - "in": "path", - "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch" - }, - { - "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}/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 - }, - { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the artifact" - }, - { - "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}/issues/{index}/reactions": { - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "get": { - "summary": "Get a list reactions of an issue", - "operationId": "issueGetIssueReactions", - "parameters": [ - { - "description": "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" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create or Update a secret value in a repository", - "operationId": "updateRepoSecret", - "parameters": [ - { - "description": "owner of the repository", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ] - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Create a branch", - "operationId": "repoCreateBranch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a comment", - "operationId": "issueGetComment" - }, - "delete": { - "summary": "Delete a comment", - "operationId": "issueDeleteComment", + "summary": "Get signing-key.pub for given repository", + "operationId": "repoSigningKeySSH", "parameters": [ { "type": "string", @@ -4001,2276 +8228,6 @@ "type": "string", "description": "name of the repo" }, - { - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ] - }, - "patch": { - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment", - "operationId": "issueEditComment", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ContentsListResponse" - } - }, - "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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "post": { - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "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" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GetFilesOptions" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { - "post": { - "operationId": "repoUnDismissPullReview", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Cancel to dismiss a review for a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { - "get": { - "summary": "List a repository's issues", - "operationId": "issueListIssues", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "description": "search string", - "name": "q", - "in": "query", - "type": "string" - }, - { - "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" - }, - { - "name": "since", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format" - }, - { - "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" - }, - { - "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" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/IssueList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - } - }, - "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" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "put": { - "tags": [ - "repository" - ], - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WatchInfo" - } - } - }, - "delete": { - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "repository" - ] - }, - "get": { - "tags": [ - "repository" - ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs": { - "get": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ReferenceList" - } - }, - "produces": [ - "application/json" - ], - "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.", - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.", - "operationId": "repoGetContentsExt", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "filepath", - "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." - }, - { - "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": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsExtResponse" - }, - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "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" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo to fork", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to fork" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Fork a repository", - "operationId": "createFork" - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "base of the pull request to get", - "name": "base" - }, - { - "required": true, - "type": "string", - "description": "head of the pull request to get", - "name": "head", - "in": "path" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/GitBlobResponse" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path" - }, - { - "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" - }, - { - "name": "files", - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "parameters": [ - { - "type": "string", - "description": "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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to sync", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo to sync", - "name": "repo", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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" - }, - { - "in": "query", - "type": "string", - "description": "triggered by user", - "name": "actor" - }, - { - "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}/issues/{index}": { - "get": { - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to get", - "name": "index", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete an issue", - "operationId": "issueDelete", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - ] - }, - "patch": { - "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueEditIssue", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { - "get": { - "operationId": "repoGetEditorConfig", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get the EditorConfig definitions of a file in a repository" - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "team name", - "name": "team", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - } - } - }, - "put": { - "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 - }, - { - "required": true, - "type": "string", - "description": "team name", - "name": "team", - "in": "path" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "team name", - "name": "team", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { - "get": { - "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 - }, - { - "required": true, - "type": "integer", - "description": "id of the tag protect to get", - "name": "id", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TagProtection" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "patch": { - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "id of protected tag", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditTagProtectionOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Repository" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository", - "operationId": "repoGet" - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to delete", - "name": "repo" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { - "get": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get" - }, - { - "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" - } - ] - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo to transfer", - "name": "repo", - "in": "path" - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/TransferRepoOption" - }, - "description": "Transfer Options", - "name": "body", - "in": "body" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer" - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, { "description": "group ID of the repo", "name": "group_id", @@ -6282,5284 +8239,12 @@ ], "responses": { "200": { + "description": "ssh public key", "schema": { "type": "string" - }, - "description": "GPG armored public key" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to get" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "summary": "Delete a release", - "operationId": "repoDeleteRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to delete", - "name": "id", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "tags": [ - "repository" - ] - }, - "patch": { - "operationId": "repoEditRelease", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a release" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { - "get": { - "tags": [ - "issue" - ], - "summary": "Check if user is subscribed to an issue", - "operationId": "issueCheckSubscription", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repo-level runners", - "operationId": "getRepoRunners", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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}/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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Return all users that have write access and can be assigned to issues", - "operationId": "repoGetAssignees" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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": { - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "patch": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateActionWorkflowDispatch" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/reviewers": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Return all users that can be requested to review in this repo", - "operationId": "repoGetReviewers" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Test a push webhook", - "operationId": "repoTestHook", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/actions/runs/{run}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "name": "run", - "in": "path", - "required": true, - "type": "string", - "description": "id of the run" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowRun" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun" - }, - "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 - }, - { - "name": "run", - "in": "path", - "required": true, - "type": "integer", - "description": "runid of the workflow run" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "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 - }, - { - "name": "recursive", - "in": "query", - "type": "boolean", - "description": "show all directories and files" - }, - { - "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" - }, - { - "in": "query", - "type": "integer", - "description": "number of items per page", - "name": "per_page" - }, - { - "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}/actions/workflows/{workflow_id}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/ActionWorkflow" - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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}/commits/{sha}/pull": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get the merged pull request of the commit", - "operationId": "repoGetCommitPullRequest", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CombinedStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's combined status, by branch/tag/commit reference" - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { - "delete": { - "operationId": "issueDeleteLabel", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label" - }, - "patch": { - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the label to edit" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditLabelOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "get": { - "tags": [ - "issue" - ], - "summary": "Get a single label", - "operationId": "issueGetLabel", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the label to get", - "name": "id" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path" - }, - { - "description": "id of the review", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - }, - "name": "body", - "in": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an pull request", - "operationId": "repoSubmitPullReview" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "id of the review", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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}/collaborators": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's collaborators", - "operationId": "repoListCollaborators" - } - }, - "/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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPageList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the provided time are returned.", - "name": "since", - "in": "query" - }, - { - "in": "query", - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { - "post": { - "tags": [ - "issue" - ], - "summary": "Pin an Issue", - "operationId": "pinIssue", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to unpin" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "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 - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoCollaboratorPermission" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repository permissions for a user" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { - "operationId": "repoGetIssueConfig", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfig" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Returns the issue config for a repo" - } - }, - "/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": { - "operationId": "repoUpdateTopics", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/RepoTopicOptions" - }, - "name": "body" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Replace list of topics for a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "draft", - "in": "query", - "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show" - }, - { - "type": "boolean", - "description": "filter (exclude / include) pre-releases", - "name": "pre-release", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "summary": "Create a release", - "operationId": "repoCreateRelease", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "schema": { - "$ref": "#/definitions/CreateReleaseOption" - }, - "name": "body", - "in": "body" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a Git hook", - "operationId": "repoGetGitHook", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a Git hook in a repository", - "operationId": "repoDeleteGitHook", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the hook to get" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditGitHookOption" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { - "parameters": [ - { - "description": "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": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "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" - }, - "201": { - "$ref": "#/responses/empty" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Start stopwatch on an issue.", - "operationId": "issueStartStopWatch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { - "get": { - "tags": [ - "issue" - ], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "collaborator", - "in": "path", - "required": true, - "type": "string", - "description": "username of the user to add or update as a collaborator" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a collaborator from a repository", - "operationId": "repoDeleteCollaborator", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { - "get": { - "summary": "List the hooks in a repository", - "operationId": "repoListHooks", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "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" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a branch from upstream", - "operationId": "repoMergeUpstream", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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}/contents/{filepath}": { - "post": { - "operationId": "repoCreateFile", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a file in a repository" - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - }, - "name": "body", - "in": "body", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" - } - } - }, - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "path of the dir, file, symlink or submodule in the repo", - "name": "filepath", - "in": "path" - }, - { - "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" - } - }, - "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead." - }, - "put": { - "responses": { - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileResponse" - }, - "201": { - "$ref": "#/responses/FileResponse" - } - }, - "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 - }, - { - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateFileOptions" - }, - "name": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { - "post": { - "summary": "Update the priorities of branch protections for a repository.", - "operationId": "repoUpdateBranchProtectionPriories", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { - "get": { - "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 - }, - { - "name": "run", - "in": "path", - "required": true, - "type": "integer", - "description": "runid of the workflow run" - }, - { - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query", - "type": "string" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { - "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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { - "tags": [ - "repository" - ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { - "post": { - "operationId": "repoCreatePullReviewRequests", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "create review requests for a pull request" - }, - "delete": { - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a hook", - "operationId": "repoGetHook" - }, - "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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to delete" - }, - { - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the hook", - "name": "id", - "in": "path" - }, - { - "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}/media/{filepath}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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 - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" } } - }, - "produces": [ - "application/octet-stream" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { - "post": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - } } - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "get": { - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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", - "format": "int64" - }, - { - "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" - }, - { - "name": "before", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirror" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string", - "description": "remote name of push mirror" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "operationId": "repoDeletePushMirror", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "deletes a push mirror from a repository by remoteName" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { - "get": { - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List all reviews for a pull request", - "operationId": "repoListPullReviews" - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "get": { - "operationId": "getArtifact", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Artifact" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific artifact for a workflow run" - }, - "delete": { - "summary": "Deletes a specific artifact for a workflow run", - "operationId": "deleteArtifact", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags": { - "get": { - "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 - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "schema": { - "$ref": "#/definitions/CreateTagOption" - }, - "name": "body", - "in": "body" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a new git tag in a repository", - "operationId": "repoCreateTag" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "post": { - "parameters": [ - { - "type": "string", - "description": "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 - }, - { - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content", - "in": "body" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction" - }, - "delete": { - "summary": "Remove a reaction from a comment of an issue", - "operationId": "issueDeleteCommentReaction", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content", - "in": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a list of reactions from a comment of an issue", - "operationId": "issueGetCommentReactions", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's tracked times", - "operationId": "repoTrackedTimes", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "optional filter by user (available for issue managers)", - "name": "user", - "in": "query" - }, - { - "name": "since", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" - }, - { - "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" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJob" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { - "get": { - "operationId": "repoGetKey", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the key to get" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's key by id" - }, - "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}/issues/{index}/assets/{attachment_id}": { - "get": { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "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 - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ] } }, "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { @@ -11601,6 +8286,46 @@ "in": "path", "required": true }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Gets a specific artifact for a workflow run", + "operationId": "getArtifact", + "parameters": [ + { + "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" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the artifact", + "name": "artifact_id" + }, { "required": true, "in": "path", @@ -11609,26 +8334,2103 @@ "type": "integer", "format": "int64" } + ], + "responses": { + "200": { + "$ref": "#/responses/Artifact" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "summary": "Deletes a specific artifact for a workflow run", + "operationId": "deleteArtifact", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the artifact", + "name": "artifact_id" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "/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": [ { - "description": "owner of the repo to transfer", + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on" + }, + { + "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}/mirror-sync": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to sync", + "name": "owner" + }, + { + "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}/tags": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags", + "operationId": "repoListTags", + "parameters": [ + { + "description": "owner of the repo", "name": "owner", "in": "path", "required": true, "type": "string" }, { + "in": "path", "required": true, "type": "string", - "description": "name of the repo to transfer", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "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": { + "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 + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagOption" + }, + "name": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an 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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review" + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + }, + "name": "body", + "in": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "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 + }, + { + "description": "id of the review", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific review from a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments" + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "get": { + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "tags": [ + "repository" + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "operationId": "issueCheckSubscription", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path" }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Check if user is subscribed to an issue" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "name": "sort", + "in": "query", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort" + }, + { + "name": "state", + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses, by branch/tag/commit reference", + "operationId": "repoListStatusesByRef" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { + "get": { + "parameters": [ + { + "type": "string", + "description": "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": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "description": "pull request has not been merged" + }, + "204": { + "description": "pull request has been merged" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged" + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + }, + "name": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest" + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "get": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/PullRequestList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests" + }, + "post": { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/PullRequest" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workflow event name", + "name": "event", + "in": "query" + }, + { + "name": "branch", + "in": "query", + "type": "string", + "description": "workflow branch" + }, + { + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" + }, + { + "description": "triggered by user", + "name": "actor", + "in": "query", + "type": "string" + }, + { + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query", + "type": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowRunsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's releases", + "operationId": "repoListReleases", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft", + "in": "query", + "type": "boolean" + }, + { + "name": "pre-release", + "in": "query", + "type": "boolean", + "description": "filter (exclude / include) pre-releases" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReleaseList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "responses": { + "201": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { + "get": { + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" + }, + { + "name": "diffType", + "in": "path", + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch" + }, + { + "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}/tags/{tag}": { + "get": { + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of tag", + "name": "tag", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository's tag by name", + "operationId": "repoDeleteTag" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "put": { + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "repository" + ] + }, + "delete": { + "parameters": [ + { + "description": "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": "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" + } + }, + "tags": [ + "repository" + ], + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription" + }, + "get": { + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks": { + "post": { + "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 + }, + { + "schema": { + "$ref": "#/definitions/CreateHookOption" + }, + "name": "body", + "in": "body" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook" + }, + "get": { + "operationId": "repoListHooks", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/HookList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the hooks in a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "get": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "description": "base of the pull request to get", + "name": "base", + "in": "path", + "required": true + }, + { + "description": "head of the pull request to get", + "name": "head", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get available issue templates for a repository", + "operationId": "repoGetIssueTemplates" + } + }, + "/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 + }, + { + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, { "description": "group ID of the repo", "name": "group_id", @@ -11646,7 +10448,448 @@ "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of comment to delete" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "summary": "Edit a comment", + "operationId": "issueEditComment", + "parameters": [ + { + "description": "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" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "delete": { + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + ] + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "operationId": "repoCreateStatus", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ @@ -11655,17 +10898,16 @@ "tags": [ "repository" ], - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer" + "summary": "Create a commit status" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { "tags": [ "repository" ], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", "parameters": [ { "name": "owner", @@ -11681,31 +10923,134 @@ "in": "path", "required": true }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, { "format": "int64", - "description": "index of the pull request to get", - "name": "index", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/forks": { + "post": { + "parameters": [ + { "in": "path", "required": true, - "type": "integer" + "type": "string", + "description": "owner of the repo to fork", + "name": "owner" }, { "type": "string", - "description": "skip to given file", - "name": "skip-to", - "in": "query" + "description": "name of the repo to fork", + "name": "repo", + "in": "path", + "required": true }, { - "in": "query", - "enum": [ - "ignore-all", - "ignore-change", - "ignore-eol", - "show-all" - ], + "in": "body", + "schema": { + "$ref": "#/definitions/CreateForkOption" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork" + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { "type": "string", - "description": "whitespace behavior", - "name": "whitespace" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" }, { "type": "integer", @@ -11714,10 +11059,466 @@ "in": "query" }, { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "get": { + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path" + }, + { + "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}/editorconfig/{filepath}": { + "get": { + "summary": "Get the EditorConfig definitions of a file in a repository", + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "description": "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" + }, + { + "name": "filepath", + "in": "path", + "required": true, + "type": "string", + "description": "filepath of file to get" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release" + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id" + }, + { + "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}/wiki/pages": { + "get": { + "operationId": "repoGetWikiPages", + "parameters": [ + { + "description": "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" + }, + { + "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" + "in": "query" }, { "description": "group ID of the repo", @@ -11730,7 +11531,121 @@ ], "responses": { "200": { - "$ref": "#/responses/ChangedFileList" + "$ref": "#/responses/WikiPageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get all wiki pages" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" }, "404": { "$ref": "#/responses/notFound" @@ -11739,9 +11654,2010 @@ "produces": [ "application/json" ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo to delete", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "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": [ + { + "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, + "type": "string" + }, + { + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { + "operationId": "repoListPinnedPullRequests", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned pull requests" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { + "put": { + "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 + }, + { + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true, + "type": "string" + }, + { + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + }, + "name": "body", + "in": "body" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ] + }, + "delete": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "description": "delete one secret of the repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List tag protections for a repository" + }, + "post": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection" + } + }, + "/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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query", + "type": "string" + }, + { + "name": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" + }, + { + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + }, + "delete": { + "parameters": [ + { + "description": "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" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime" + } + }, + "/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" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "put": { + "operationId": "repoAddTopic", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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": { + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a topic to a repository" + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { + "summary": "List a repository's branches", + "operationId": "repoListBranches", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "post": { + "summary": "Create a branch", + "operationId": "repoCreateBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "409": { + "description": "The branch with the same name already exists." + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Branch" + }, + "403": { + "description": "The branch is archived or a mirror." + }, + "404": { + "description": "The old branch does not exist." + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "sha", + "in": "path", + "required": true, + "type": "string", + "description": "a git ref or commit sha" + }, + { + "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" + }, + { + "name": "files", + "in": "query", + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path" + }, + { + "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}/issues/comments/{id}/reactions": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions" + }, + "post": { + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to a comment of an issue", + "operationId": "issuePostCommentReaction", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Remove a reaction from a comment of an issue", + "operationId": "issueDeleteCommentReaction", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { + "get": { + "operationId": "downloadArtifact", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Downloads a specific artifact for a workflow run redirects to blob url" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken" + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoCreateRunnerRegistrationToken", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment" + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ] + }, + "patch": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + }, + "name": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment" + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, + { + "name": "fingerprint", + "in": "query", + "type": "string", + "description": "fingerprint of the key" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "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": { + "tags": [ + "repository" + ], + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { "post": { "parameters": [ { @@ -11759,20 +13675,175 @@ "required": true }, { - "in": "body", "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - }, - "name": "body" + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path" }, { + "name": "group_id", "type": "integer", "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue" + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path", + "required": true + }, + { "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + }, + "name": "body", + "in": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { @@ -11794,700 +13865,11 @@ ], "tags": [ "repository" - ], - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch" - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "artifact_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "302": { - "description": "redirect to the blob download" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "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": { - "summary": "Create a label", - "operationId": "issueCreateLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { - "get": { - "summary": "Get a list of all commits from a repository", - "operationId": "repoGetAllCommits", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "SHA or branch to start listing commits from (usually 'master')", - "name": "sha", - "in": "query" - }, - { - "in": "query", - "type": "string", - "description": "filepath of a file/dir", - "name": "path" - }, - { - "type": "string", - "format": "date-time", - "description": "Only commits after this date will be returned (ISO 8601 format)", - "name": "since", - "in": "query" - }, - { - "name": "until", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only commits before this date will be returned (ISO 8601 format)" - }, - { - "in": "query", - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat" - }, - { - "name": "verification", - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query", - "type": "boolean" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { - "get": { - "operationId": "getRepoVariable", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "variablename", - "in": "path", - "required": true, - "type": "string", - "description": "name of the variable" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repo-level variable" - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - }, - "name": "body", - "in": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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": { - "operationId": "createRepoVariable", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateVariableOption" - }, - "name": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "409": { - "description": "variable name already exists." - }, - "500": { - "$ref": "#/responses/error" - }, - "201": { - "description": "response when creating a repo-level variable" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a repo-level variable" - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ActionVariable" - }, - "201": { - "description": "response when deleting a variable" - }, - "204": { - "description": "response when deleting a variable" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "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}/git/tags/{sha}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", - "name": "sha", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)", - "operationId": "GetAnnotatedTag" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { - "get": { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" ] } }, "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { "get": { - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], @@ -12525,39 +13907,41 @@ "in": "query" }, { - "type": "integer", - "description": "page size of results", "name": "limit", - "in": "query" + "in": "query", + "type": "integer", + "description": "page size of results" }, { - "description": "group ID of the repo", - "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } - ] + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ActivityFeedsList" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", "parameters": [ { - "type": "string", - "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { "type": "string", @@ -12567,45 +13951,206 @@ "required": true }, { - "type": "string", - "description": "part or full name of the ref", - "name": "ref", + "description": "id of the hook to get", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/ReferenceList" + "$ref": "#/responses/GitHook" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "get": { + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", "parameters": [ { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "patch": { + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", + "parameters": [ + { + "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the hook to get" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo to transfer", + "name": "repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "202": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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", @@ -12622,85 +14167,10 @@ }, { "type": "integer", - "description": "page size of results", + "description": "page size of results, default maximum page size is 50", "name": "limit", "in": "query" }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirror" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" - }, - "name": "body" - }, { "description": "group ID of the repo", "name": "group_id", @@ -12709,11 +14179,32 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { "get": { + "operationId": "repoGetPullRequest", "parameters": [ { "description": "owner of the repo", @@ -12723,99 +14214,32 @@ "type": "string" }, { - "required": true, - "type": "string", - "description": "Name of the repo", + "description": "name of the repo", "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", "in": "path" }, { - "in": "query", - "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" - }, - { - "description": "ID of the milestone", - "name": "milestone", - "in": "query", - "type": "integer", - "format": "int64" - }, - { - "name": "labels", - "in": "query", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "multi", - "description": "Label IDs" - }, - { - "type": "string", - "description": "Filter by pull request author", - "name": "poster", - "in": "query" - }, - { - "name": "page", - "in": "query", - "minimum": 1, - "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)" - }, - { - "minimum": 0, - "type": "integer", - "description": "Page size of results", - "name": "limit", - "in": "query" - }, - { + "name": "group_id", "type": "integer", "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { - "500": { - "$ref": "#/responses/error" - }, "200": { - "$ref": "#/responses/PullRequestList" + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" @@ -12827,22 +14251,27 @@ "tags": [ "repository" ], - "summary": "List a repo's pull requests", - "operationId": "repoListPullRequests" + "summary": "Get a pull request" }, - "post": { + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Create a pull request", - "operationId": "repoCreatePullRequest", + "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "repoEditPullRequest", "parameters": [ { + "description": "owner of the repo", + "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" + "type": "string" }, { "name": "repo", @@ -12851,29 +14280,34 @@ "type": "string", "description": "name of the repo" }, + { + "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/CreatePullRequestOption" + "$ref": "#/definitions/EditPullRequestOption" } }, { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { "422": { "$ref": "#/responses/validationError" }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, "201": { "$ref": "#/responses/PullRequest" }, @@ -12885,26 +14319,86 @@ }, "409": { "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" + }, + { + "type": "string", + "description": "how to update pull request", + "name": "style", + "in": "query", + "enum": [ + "merge", + "rebase" + ] + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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}/milestones": { + "get": { "parameters": [ { "type": "string", @@ -12913,6 +14407,83 @@ "in": "path", "required": true }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList" + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, { "description": "name of the repo", "name": "repo", @@ -12921,11 +14492,310 @@ "type": "string" }, { - "name": "pageName", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "201": { + "$ref": "#/responses/Milestone" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { + "get": { + "parameters": [ + { "in": "path", "required": true, "type": "string", - "description": "name of the page" + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "type": "string", + "description": "the name of the commit/branch/tag, default to the repository’s default branch.", + "name": "ref", + "in": "query" + }, + { + "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": "string" + }, + { + "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" + } + }, + "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" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "get": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline" + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { + "post": { + "summary": "create review requests for a pull request", + "operationId": "repoCreatePullReviewRequests", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + }, + "name": "body", + "in": "body", + "required": true + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } }, { "name": "group_id", @@ -12937,112 +14807,8 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WikiPage" - } - } - }, - "delete": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, "204": { "$ref": "#/responses/empty" - } - }, - "tags": [ - "repository" - ], - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "patch": { - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body" - }, - { - "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" @@ -13050,282 +14816,8 @@ "404": { "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a wiki page" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { - "get": { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "delete": { - "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 - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a milestone" - }, - "patch": { - "tags": [ - "issue" - ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "the milestone to edit, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditMilestoneOption" - }, - "name": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "the milestone to get, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/topics/{topic}": { - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add a topic to a repository", - "operationId": "repoAddTopic", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "topic", - "in": "path", - "required": true, - "type": "string", - "description": "name of the topic to add" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, "422": { - "$ref": "#/responses/invalidTopicsError" + "$ref": "#/responses/validationError" } }, "produces": [ @@ -13334,48 +14826,17 @@ "tags": [ "repository" ], - "summary": "Delete a topic from a repository", - "operationId": "repoDeleteTopic", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the topic to delete", - "name": "topic", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests" } }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { "get": { "tags": [ "repository" ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", + "summary": "Get repository permissions for a user", + "operationId": "repoGetRepoPermissions", "parameters": [ { "type": "string", @@ -13384,247 +14845,6 @@ "in": "path", "required": true }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete a comment", - "operationId": "issueDeleteCommentDeprecated", - "deprecated": true, - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "description": "this parameter is ignored" - }, - { - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": [ - "application/json" - ], - "deprecated": true, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment", - "operationId": "issueEditCommentDeprecated", - "parameters": [ - { - "type": "string", - "description": "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 - }, - { - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { - "get": { - "operationId": "repoGetPullReviewComments", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific review for a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, { "in": "path", "required": true, @@ -13633,43 +14853,11 @@ "name": "repo" }, { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - } - }, - "post": { - "operationId": "repoCreateBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", + "name": "collaborator", "in": "path", "required": true, "type": "string", - "description": "name of the repo" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - }, - "name": "body" + "description": "username of the collaborator whose permissions are to be obtained" }, { "required": true, @@ -13681,97 +14869,23 @@ } ], "responses": { - "201": { - "$ref": "#/responses/BranchProtection" + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a branch protections for a repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List issue's attachments", - "operationId": "issueListIssueAttachments", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "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", @@ -13780,247 +14894,6 @@ "in": "path", "required": true }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "in": "formData", - "required": true, - "type": "file", - "description": "attachment to upload", - "name": "attachment" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "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}/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": [ - { - "description": "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" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to create or update a deadline on" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditDeadlineOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" - } - } - }, - "post": { - "parameters": [ - { - "type": "string", - "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" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/TagProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, { "type": "string", "description": "name of the repository", @@ -14029,16 +14902,126 @@ "required": true }, { + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", + "description": "runid of the workflow run", + "name": "run", + "in": "path" + }, + { + "type": "string", + "description": "name of the artifact", + "name": "name", "in": "query" }, { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all artifacts for a repository run", + "operationId": "getArtifactsOfRun" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/UserList" + } + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateBranchProtectionPriories" + } }, { "name": "group_id", @@ -14049,497 +15032,10 @@ "description": "group ID of the repo" } ], - "responses": { - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "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": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/licenses": { - "get": { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Compare" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch", - "name": "name" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "operationId": "repoDeleteBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch protection for the repository" - }, - "patch": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, "404": { "$ref": "#/responses/notFound" }, @@ -14549,504 +15045,8 @@ "423": { "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { - "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" - } - }, - "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 - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "username of the user to subscribe the issue to", - "name": "user" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update avatar", - "operationId": "repoUpdateAvatar" - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete avatar", - "operationId": "repoDeleteAvatar", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref" - }, - { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query" - }, - { - "type": "string", - "description": "type of state", - "name": "state", - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ] - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } } } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Branch" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "branch to delete", - "name": "branch", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } } } } \ No newline at end of file From ca37aaec60f3d2b3d78701e0ac8c898adea9f814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 22:40:43 -0500 Subject: [PATCH 113/218] fix wrong group in issue xref test --- models/issues/issue_xref_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/issues/issue_xref_test.go b/models/issues/issue_xref_test.go index b25a704bec..766c70a14b 100644 --- a/models/issues/issue_xref_test.go +++ b/models/issues/issue_xref_test.go @@ -54,7 +54,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { itarget = testCreateIssue(t, 3, 3, "title4", "content4", false) // Cross-reference to issue #4 by admin - content = fmt.Sprintf("content5, mentions org3/repo3#%d", itarget.Index) + content = fmt.Sprintf("content5, mentions org3/129/repo3#%d", itarget.Index) i = testCreateIssue(t, 2, 1, "title5", content, false) ref = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}) assert.Equal(t, issues_model.CommentTypeIssueRef, ref.Type) From e290d3695999b63199fd051bb66f871721cb7903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 22:54:05 -0500 Subject: [PATCH 114/218] update group swagger definitions --- templates/swagger/v1_groups.json | 26446 ++++++++++++++--------------- 1 file changed, 13223 insertions(+), 13223 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 5bf56d2120..0a73b3e46f 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,15 +1,8 @@ { "paths": { - "/repos/{owner}/group/{group_id}/{repo}/topics": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", + "operationId": "repoListCollaborators", "parameters": [ { "type": "string", @@ -19,11 +12,97 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "get": { + "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" + }, + { + "description": "workflow branch", + "name": "branch", + "in": "query", + "type": "string" + }, + { + "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", @@ -48,24 +127,14 @@ ], "responses": { "200": { - "$ref": "#/responses/TopicNames" + "$ref": "#/responses/WorkflowRunsList" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "put": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } }, "produces": [ "application/json" @@ -73,8 +142,13 @@ "tags": [ "repository" ], - "summary": "Replace list of topics for a repository", - "operationId": "repoUpdateTopics", + "summary": "Lists all runs for a repository run" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", "parameters": [ { "type": "string", @@ -83,6 +157,512 @@ "in": "path", "required": true }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/definitions/UpdateRepoAvatarOption" + }, + "name": "body", + "in": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { + "get": { + "summary": "Get a commit's diff or patch", + "operationId": "repoDownloadCommitDiffOrPatch", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "sha", + "in": "path", + "required": true, + "type": "string", + "description": "SHA of the commit to get" + }, + { + "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" + } + }, + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a label", + "operationId": "issueEditLabel", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Label" + } + } + }, + "get": { + "operationId": "issueGetLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a single label" + }, + "delete": { + "operationId": "issueDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to delete" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a label" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot cancel a non-existent stopwatch" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "whether issue is open or closed", + "name": "state", + "in": "query", + "enum": [ + "closed", + "open", + "all" + ], + "type": "string" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "in": "query", + "type": "string", + "description": "Only show items which were created by the given user", + "name": "created_by" + }, + { + "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" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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": { + "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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, { "in": "path", "required": true, @@ -94,7 +674,564 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/RepoTopicOptions" + "$ref": "#/definitions/CreateIssueOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/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": [ + { + "description": "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" + }, + { + "required": true, + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path" + }, + { + "name": "sort", + "in": "query", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + "get": { + "tags": [ + "issue" + ], + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", + "parameters": [ + { + "description": "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" + }, + { + "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", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", + "parameters": [ + { + "description": "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" + }, + { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "get": { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "operationId": "issueStartStopWatch", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue." + } + }, + "/repos/{owner}/group/{group_id}/{repo}/languages": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { + "post": { + "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" } }, { @@ -106,10 +1243,241 @@ "format": "int64" } ] + }, + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ] + }, + { + "description": "type of state", + "name": "state", + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitStatusList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses" } }, "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, "patch": { + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], "responses": { "200": { "$ref": "#/responses/WikiPage" @@ -132,54 +1500,19 @@ ], "tags": [ "repository" - ], - "summary": "Edit a wiki page", - "operationId": "repoEditWikiPage", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } ] - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", + "summary": "Downloads the job logs for a workflow run", + "operationId": "downloadActionsRunJobLogs", "parameters": [ { "name": "owner", @@ -189,16 +1522,79 @@ "description": "owner of the repo" }, { + "description": "name of the repository", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { + "type": "integer", + "description": "id of the job", + "name": "job_id", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "output blob content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, "type": "string", - "description": "name of the page", - "name": "pageName", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", "in": "path", "required": true }, @@ -212,128 +1608,17 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "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 - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "tags": [ - "repository" - ] - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" + "422": { + "$ref": "#/responses/validationError" }, - { - "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 - }, - { - "name": "diffType", - "in": "path", - "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/PullReview" } } } @@ -356,6 +1641,278 @@ ], "summary": "Get repo licenses", "operationId": "repoGetLicenses", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "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 + }, + { + "name": "variablename", + "in": "path", + "required": true, + "type": "string", + "description": "name of the variable" + }, + { + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + }, + "name": "body", + "in": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "201": { + "description": "response when updating a repo-level variable" + }, + "204": { + "description": "response when updating a repo-level variable" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repo-level variable", + "operationId": "createRepoVariable", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + } + } + }, + "get": { + "operationId": "getRepoVariable", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repo-level variable" + } + }, + "/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", @@ -372,14 +1929,331 @@ "type": "string" }, { + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "operationId": "repoSubmitPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { @@ -394,18 +2268,18 @@ "operationId": "repoCheckTeam", "parameters": [ { + "required": true, + "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "in": "path", @@ -415,12 +2289,12 @@ "name": "team" }, { + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true + "format": "int64" } ], "responses": { @@ -436,16 +2310,69 @@ } }, "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], "summary": "Add a team to a repository", "operationId": "repoAddTeam", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, { "type": "string", "description": "name of the repo", @@ -483,14 +2410,6 @@ "$ref": "#/responses/validationError" } }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { "produces": [ "application/json" ], @@ -498,1352 +2417,19 @@ "repository" ], "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "team name", - "name": "team" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateActionWorkflowDispatch" - }, - "name": "body" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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": "issueCreateIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": "name of the attachment", - "name": "name", - "in": "query", - "type": "string" - }, - { - "name": "attachment", - "in": "formData", - "required": true, - "type": "file", - "description": "attachment to upload" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { - "post": { - "responses": { - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a file in a repository", - "operationId": "repoCreateFile", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "path of the file to create", - "name": "filepath" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateFileOptions" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - }, - "name": "body", - "in": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" - } - }, - "consumes": [ - "application/json" - ] - }, - "get": { - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead." - }, - "put": { - "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": [ - { - "description": "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" - }, - { - "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" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/VariableList" - } - }, - "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 - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "description": "this parameter is ignored", - "name": "index" - }, - { - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Edit a comment", - "tags": [ - "issue" - ], - "operationId": "issueEditCommentDeprecated", - "deprecated": true, - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { - "tags": [ - "repository" - ], - "summary": "Dismiss a review for a pull request", - "operationId": "repoDismissPullReview", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { - "get": { - "tags": [ - "issue" - ], - "summary": "List a repository's issues", - "operationId": "issueListIssues", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "enum": [ - "closed", - "open", - "all" - ], - "type": "string", - "description": "whether issue is open or closed", - "name": "state", - "in": "query" - }, - { - "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" - }, - { - "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" - }, - { - "name": "milestones", - "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" - }, - { - "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" - }, - { - "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" - }, - { - "name": "created_by", - "in": "query", - "type": "string", - "description": "Only show items which were created by the given user" - }, - { - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Reaction" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "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/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/reviewers": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Return all users that can be requested to review in this repo", - "operationId": "repoGetReviewers", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments" - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id" - }, - { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the attachment" - }, - { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/error" - }, - "201": { - "$ref": "#/responses/Attachment" - } - } + "operationId": "repoDeleteTeam" } }, "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { "get": { + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, "produces": [ "application/json" ], @@ -1854,75 +2440,11 @@ "operationId": "repoGetLatestRelease", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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}/actions/workflows/{workflow_id}/enable": { - "put": { - "responses": { - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Enable a workflow", - "operationId": "ActionsEnableWorkflow", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { "in": "path", @@ -1931,780 +2453,6 @@ "description": "name of the repo", "name": "repo" }, - { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents": { - "post": { - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the release to get", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "summary": "Delete a release", - "operationId": "repoDeleteRelease", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a release", - "operationId": "repoEditRelease", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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}/commits/{ref}/status": { - "get": { - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CombinedStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's combined status, by branch/tag/commit reference" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/MergeUpstreamResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "workflow_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the workflow" - }, - { - "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}/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 - }, - { - "required": true, - "type": "string", - "description": "username of the user whose tracked times are to be listed", - "name": "user", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to get", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label", - "operationId": "issueDeleteLabel", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the label to delete", - "name": "id" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "patch": { - "operationId": "issueEditLabel", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the label to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditLabelOption" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Label" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a label" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "operationId": "moveIssuePin", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position" - }, { "name": "group_id", "type": "integer", @@ -2713,375 +2461,10 @@ "in": "path", "description": "group ID of the repo" } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position" - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "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/jobs": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query", - "type": "string" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "summary": "Create a label", - "operationId": "issueCreateLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "branch to delete", - "name": "branch" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Rename a branch", - "operationId": "repoRenameBranch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "branch", - "in": "path", - "required": true, - "type": "string", - "description": "name of the branch" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/RenameBranchRepoOption" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { "get": { "produces": [ "application/json" @@ -3089,1027 +2472,8 @@ "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "branch", - "in": "path", - "required": true, - "type": "string", - "description": "branch to get" - }, - { - "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" - } - } - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Lock an issue", - "operationId": "issueLockIssue" - }, - "delete": { - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { - "post": { - "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 - }, - { - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query", - "type": "boolean" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { - "get": { - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "tags": [ - "issue" - ], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "tags": [ - "issue" - ], - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "post": { - "summary": "Add a label to an issue", - "operationId": "issueAddLabel", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "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}/issues/{index}/stopwatch/start": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Start stopwatch on an issue.", - "operationId": "issueStartStopWatch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { - "get": { + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", "parameters": [ { "description": "owner of the repo", @@ -4126,1066 +2490,69 @@ "type": "string" }, { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a specific tag protection for the repository", - "operationId": "repoGetTagProtection", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "description": "id of the tag protect to get", - "name": "id", - "in": "path", - "required": true - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "get": { - "operationId": "issueGetIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to get", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue" - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete an issue", - "operationId": "issueDelete", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to edit", - "name": "index" - }, - { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "201": { - "$ref": "#/responses/Issue" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { - "get": { - "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 - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "description": "runid of the workflow run", - "name": "run" - }, - { - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "the milestone to get, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "the milestone to delete, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone" - }, - "patch": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "description": "the milestone to edit, identified by ID and if not available by name" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditMilestoneOption" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get revisions of a wiki page", - "operationId": "repoGetWikiPageRevisions", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "in": "path", - "required": true, "type": "string", "description": "sha of the commit", - "name": "sha" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitBlobResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "name": "verification", - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')" - }, - { - "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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results (ignored if used with 'path')" - }, - { - "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}/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}/collaborators": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's collaborators", - "operationId": "repoListCollaborators", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "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}/actions/artifacts": { - "get": { - "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 - }, - { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the artifact" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all artifacts for a repository", - "operationId": "getArtifacts" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { - "get": { - "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 }, { + "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" + }, + { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/PullRequest" + "$ref": "#/responses/GitTreeResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get the merged pull request of the commit" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { - "get": { - "tags": [ - "repository" - ], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection", + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -5205,138 +2572,53 @@ ], "responses": { "200": { - "$ref": "#/responses/BranchProtectionList" + "$ref": "#/responses/RegistrationToken" + } + } + }, + "post": { + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" } }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - }, - "name": "body", - "in": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a branch protections for a repository", - "operationId": "repoCreateBranchProtection" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { "get": { - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List issue's attachments" - }, - "post": { - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create an issue attachment", - "operationId": "issueCreateIssueAttachment", + "operationId": "repoGetRepoPermissions", "parameters": [ { "in": "path", @@ -5352,65 +2634,45 @@ "in": "path", "required": true }, + { + "in": "path", + "required": true, + "type": "string", + "description": "username of the collaborator whose permissions are to be obtained", + "name": "collaborator" + }, { "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" - }, - { - "required": true, - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData" - }, - { "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repository permissions for a user" } }, "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { - "put": { - "tags": [ - "repository" - ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", + "get": { + "operationId": "repoCheckCollaborator", "parameters": [ { "type": "string", @@ -5419,117 +2681,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "username of the user to add or update as a collaborator", - "name": "collaborator" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - }, - "name": "body" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a collaborator from a repository", - "operationId": "repoDeleteCollaborator", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "get": { - "summary": "Check if a user is a collaborator of a repository", - "operationId": "repoCheckCollaborator", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, { "description": "name of the repo", "name": "repo", @@ -5545,12 +2696,12 @@ "required": true }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { @@ -5569,19 +2720,18 @@ ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { - "get": { + ], + "summary": "Check if a user is a collaborator of a repository" + }, + "put": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get a hook", - "operationId": "repoGetHook", + "summary": "Add or Update a collaborator to a repository", + "operationId": "repoAddCollaborator", "parameters": [ { "type": "string", @@ -5591,62 +2741,25 @@ "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "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 - }, - { - "description": "id of the hook to delete", - "name": "id", - "in": "path", "required": true, - "type": "integer", - "format": "int64" + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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", @@ -5658,6 +2771,57 @@ } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "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 + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, "204": { "$ref": "#/responses/empty" }, @@ -5671,97 +2835,45 @@ "tags": [ "repository" ], - "summary": "Delete a hook in a repository" - }, - "patch": { + "summary": "Delete a collaborator from a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { + "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": "owner of the repo" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "description": "index of the hook", + "format": "int64", + "description": "id of the comment", "name": "id", "in": "path", "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a hook in a repository", - "operationId": "repoEditHook" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 }, { "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", "in": "path" }, { @@ -5772,135 +2884,25 @@ "in": "path", "description": "group ID of the repo" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { + ], "responses": { "200": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } }, "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } ] - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "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": "query", - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "name": "ref" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "schema": { - "type": "file" - }, - "description": "Returns raw file content." - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + }, "delete": { - "produces": [ - "application/json" - ], "tags": [ "issue" ], - "summary": "Remove an issue dependency", - "operationId": "issueRemoveIssueDependencies", + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", "parameters": [ { "required": true, @@ -5910,84 +2912,28 @@ "in": "path" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "schema": { - "$ref": "#/definitions/IssueMeta" - }, - "name": "body", - "in": "body" - }, - { - "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" - } - } - }, - "get": { - "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", + "description": "id of the comment", + "name": "id", "in": "path", "required": true }, { - "type": "string", - "description": "name of the repo", - "name": "repo", + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", "in": "path", "required": true }, - { - "in": "path", - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index" - }, - { - "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" - }, { "name": "group_id", "type": "integer", @@ -5998,308 +2944,51 @@ } ], "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "operationId": "issueCreateIssueDependencies", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Make the issue in the url depend on the issue in the form." - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/IssueList" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { - "get": { - "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 - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "423": { + "$ref": "#/responses/repoArchivedError" }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "name of protected branch", - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection" - }, - "delete": { - "responses": { "204": { "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" } }, "produces": [ "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch protection for the repository", - "operationId": "repoDeleteBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } ] }, "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", + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "description": "name of the repo", - "name": "repo", - "in": "path", "required": true, - "type": "string" + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path" }, { - "type": "string", - "description": "name of protected branch", - "name": "name", + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", "in": "path", "required": true }, @@ -6307,7 +2996,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" + "$ref": "#/definitions/EditAttachmentOptions" } }, { @@ -6320,11 +3009,11 @@ } ], "responses": { - "200": { - "$ref": "#/responses/BranchProtection" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" }, "422": { "$ref": "#/responses/validationError" @@ -6332,1122 +3021,6 @@ "423": { "$ref": "#/responses/repoArchivedError" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times": { - "get": { - "summary": "List a repo's tracked times", - "operationId": "repoTrackedTimes", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "optional filter by user (available for issue managers)", - "name": "user", - "in": "query", - "type": "string" - }, - { - "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" - }, - { - "name": "before", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/octet-stream" - ], - "tags": [ - "repository" - ], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" - }, - { - "type": "boolean", - "description": "show all directories and files", - "name": "recursive", - "in": "query" - }, - { - "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" - }, - { - "description": "number of items per page", - "name": "per_page", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "description": "filter notifications by subject type", - "name": "subject-type", - "in": "query", - "type": "array", - "items": { - "enum": [ - "issue", - "pull", - "commit", - "repository" - ], - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "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" - }, - { - "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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": "notifyReadRepoList", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "all", - "in": "query", - "type": "string", - "description": "If true, mark all notifications on this repo. Default value is false" - }, - { - "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": "array", - "items": { - "type": "string" - } - }, - { - "name": "to-status", - "in": "query", - "type": "string", - "description": "Status to mark notifications as. Defaults to read." - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { - "put": { - "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 - }, - { - "name": "variablename", - "in": "path", - "required": true, - "type": "string", - "description": "name of the variable" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a repo-level variable" - }, - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a repo-level variable", - "operationId": "createRepoVariable" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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" - } - } - }, - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ActionVariable" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repo-level variable", - "operationId": "getRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { - "get": { - "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" - }, - { - "in": "query", - "required": true, - "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ContentsListResponse" - } - }, - "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" - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ContentsListResponse" - } - }, - "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`." - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - }, - "delete": { - "operationId": "repoDeletePushMirror", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "remote name of the pushMirror", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "deletes a push mirror from a repository by remoteName" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { - "get": { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowJob" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow job for a workflow run", - "operationId": "getWorkflowJob" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "part or full name of the ref", - "name": "ref", - "in": "path", - "required": true - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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}/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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Comment" - }, - "403": { - "$ref": "#/responses/forbidden" - } }, "consumes": [ "application/json" @@ -7457,1570 +3030,6 @@ ], "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - }, - "name": "body", - "in": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { - "post": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "query", - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the provided time are returned.", - "name": "since" - }, - { - "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" - } - ] - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirrorList" - } - } - }, - "post": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "description": "username of the user to subscribe the issue to", - "name": "user", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "304": { - "description": "User can only subscribe itself if he is no admin" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "Already subscribed" - }, - "201": { - "description": "Successfully Subscribed" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription" - }, - "delete": { - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "type": "string", - "description": "username of the user to unsubscribe from an issue", - "name": "user", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "Already unsubscribed" - }, - "201": { - "description": "Successfully Unsubscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { - "delete": { - "summary": "Delete an 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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the runner", - "name": "runner_id" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "description": "runner has been deleted" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "id of the runner", - "name": "runner_id", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunner" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "type": "string", - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { - "delete": { - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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}/push_mirrors-sync": { - "post": { - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Gets a specific artifact for a workflow run", - "operationId": "getArtifact", - "parameters": [ - { - "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" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Artifact" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "summary": "Deletes a specific artifact for a workflow run", - "operationId": "deleteArtifact", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on" - }, - { - "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}/mirror-sync": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to sync", - "name": "owner" - }, - { - "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}/tags": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's tags", - "operationId": "repoListTags", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "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": { - "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 - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagOption" - }, - "name": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an 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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - }, - "name": "body", - "in": "body" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "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 - }, - { - "description": "id of the review", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific review from a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReviewComments" - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { - "get": { - "summary": "Get a repository's key by id", - "operationId": "repoGetKey", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "tags": [ - "repository" ] } }, @@ -9043,19 +3052,19 @@ "required": true }, { + "required": true, + "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { @@ -9068,1454 +3077,17 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { "get": { - "operationId": "issueCheckSubscription", + "operationId": "issueGetCommentReactions", "parameters": [ { + "required": true, + "type": "string", + "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", "in": "path" }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Check if user is subscribed to an issue" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "name": "sort", - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort" - }, - { - "name": "state", - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string", - "description": "type of state" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses, by branch/tag/commit reference", - "operationId": "repoListStatusesByRef" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { - "get": { - "parameters": [ - { - "type": "string", - "description": "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": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "description": "pull request has not been merged" - }, - "204": { - "description": "pull request has been merged" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged" - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", - "name": "index", - "in": "path" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/MergePullRequestOption" - }, - "name": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { - "get": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/PullRequestList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pull requests" - }, - "post": { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/PullRequest" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "workflow event name", - "name": "event", - "in": "query" - }, - { - "name": "branch", - "in": "query", - "type": "string", - "description": "workflow branch" - }, - { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" - }, - { - "description": "triggered by user", - "name": "actor", - "in": "query", - "type": "string" - }, - { - "description": "triggering sha of the workflow run", - "name": "head_sha", - "in": "query", - "type": "string" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WorkflowRunsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", - "name": "draft", - "in": "query", - "type": "boolean" - }, - { - "name": "pre-release", - "in": "query", - "type": "boolean", - "description": "filter (exclude / include) pre-releases" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReleaseList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "responses": { - "201": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a release", - "operationId": "repoCreateRelease", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { - "get": { - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index" - }, - { - "name": "diffType", - "in": "path", - "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch" - }, - { - "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}/tags/{tag}": { - "get": { - "summary": "Get the tag of a repository by tag name", - "operationId": "repoGetTag", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of tag", - "name": "tag", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "parameters": [ - { - "type": "string", - "description": "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repository's tag by name", - "operationId": "repoDeleteTag" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "put": { - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "repository" - ] - }, - "delete": { - "parameters": [ - { - "description": "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": "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" - } - }, - "tags": [ - "repository" - ], - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription" - }, - "get": { - "tags": [ - "repository" - ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { - "post": { - "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 - }, - { - "schema": { - "$ref": "#/definitions/CreateHookOption" - }, - "name": "body", - "in": "body" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a hook" - }, - "get": { - "operationId": "repoListHooks", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/HookList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List the hooks in a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { - "get": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "string", - "description": "base of the pull request to get", - "name": "base", - "in": "path", - "required": true - }, - { - "description": "head of the pull request to get", - "name": "head", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates" - } - }, - "/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 - }, - { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete a comment", - "operationId": "issueDeleteComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "summary": "Edit a comment", - "operationId": "issueEditComment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, { "description": "name of the repo", "name": "repo", @@ -10531,94 +3103,6 @@ "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, { "name": "group_id", "type": "integer", @@ -10630,246 +3114,57 @@ ], "responses": { "200": { - "$ref": "#/responses/IssueList" + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "post": { - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } }, - "produces": [ + "consumes": [ "application/json" ], - "tags": [ - "issue" - ] - }, - "delete": { - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Unblock the issue given in the body by the issue in path", - "operationId": "issueRemoveIssueBlocking", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" - }, - { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query" - }, - { - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string", - "description": "type of state", - "name": "state" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - } - } + "summary": "Get a list of reactions from a comment of an issue" }, "post": { - "operationId": "repoCreateStatus", + "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", "required": true, "type": "string" }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" + "description": "name of the repo" }, { - "name": "body", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "name": "content", "in": "body", "schema": { - "$ref": "#/definitions/CreateStatusOption" + "$ref": "#/definitions/EditReactionOption" } }, { @@ -10882,39 +3177,45 @@ } ], "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" + ] + }, + "delete": { + "produces": [ + "application/json" ], - "summary": "Create a commit status" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { "tags": [ - "repository" + "issue" ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -10924,66 +3225,19 @@ "required": true }, { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true - }, - { + "type": "integer", "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to fork", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo to fork", - "name": "repo", + "description": "id of the comment to edit", + "name": "id", "in": "path", "required": true }, { - "in": "body", "schema": { - "$ref": "#/definitions/CreateForkOption" + "$ref": "#/definitions/EditReactionOption" }, - "name": "body" + "name": "content", + "in": "body" }, { "description": "group ID of the repo", @@ -10995,9 +3249,49 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to transfer" + }, + { + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { "202": { "$ref": "#/responses/Repository" }, @@ -11006,9 +3300,6 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." } }, "produces": [ @@ -11017,26 +3308,211 @@ "tags": [ "repository" ], - "summary": "Fork a repository", - "operationId": "createFork" + "summary": "Accept a repo transfer" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { + "post": { + "responses": { + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Reaction" + } + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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" + } + ] + }, + "delete": { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] }, "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 + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "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" + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's forks", - "operationId": "listForks", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { + "put": { + "operationId": "ActionsEnableWorkflow", "parameters": [ { "type": "string", @@ -11053,35 +3529,52 @@ "name": "repo" }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { + "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 + "required": true, + "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { - "get": { + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + } + }, + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get a release by tag name", - "operationId": "repoGetReleaseByTag", + "summary": "Enable a workflow" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { "parameters": [ { "type": "string", @@ -11098,9 +3591,340 @@ "required": true }, { + "required": true, "type": "string", - "description": "tag name of the release to get", - "name": "tag", + "description": "name of the page", + "name": "pageName", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions" + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "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": { + "tags": [ + "repository" + ], + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + }, + "name": "body", + "in": "body", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags": { + "get": { + "operationId": "repoListTags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results, default maximum page size is 50" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags" + }, + "post": { + "responses": { + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "get": { + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "description": "User is not watching this repo or repo do not exist" + } + } + }, + "put": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, @@ -11115,29 +3939,34 @@ ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } }, - "produces": [ - "application/json" - ] + "tags": [ + "repository" + ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription" }, "delete": { "tags": [ "repository" ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -11146,67 +3975,6 @@ "in": "path", "required": true }, - { - "required": true, - "type": "string", - "description": "tag name of the release to delete", - "name": "tag", - "in": "path" - }, - { - "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}/editorconfig/{filepath}": { - "get": { - "summary": "Get the EditorConfig definitions of a file in a repository", - "operationId": "repoGetEditorConfig", - "parameters": [ - { - "description": "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" - }, - { - "name": "filepath", - "in": "path", - "required": true, - "type": "string", - "description": "filepath of file to get" - }, - { - "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", @@ -11217,19 +3985,13 @@ } ], "responses": { - "200": { - "description": "success" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { @@ -11241,11 +4003,11 @@ "operationId": "issueDeleteTime", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -11271,26 +4033,26 @@ "required": true }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, "204": { "$ref": "#/responses/empty" }, "400": { "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } }, "consumes": [ @@ -11301,8 +4063,16 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { + "/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": [ { "required": true, @@ -11312,27 +4082,100 @@ "in": "path" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueTemplates" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { + "get": { + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "description": "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the validation information for a issue config" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { + "get": { + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "name of tag", + "name": "tag", + "in": "path", + "required": true }, { "required": true, @@ -11345,7 +4188,7 @@ ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" @@ -11356,9 +4199,7 @@ ], "tags": [ "repository" - ], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment" + ] }, "delete": { "produces": [ @@ -11367,69 +4208,63 @@ "tags": [ "repository" ], - "summary": "Delete a release attachment", - "operationId": "repoDeleteReleaseAttachment", + "summary": "Delete a repository's tag by name", + "operationId": "repoDeleteTag", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "description": "name of the repo", "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of tag to delete", + "name": "tag" }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release" - }, - { - "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", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo" } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "404": { "$ref": "#/responses/notFound" }, - "204": { + "405": { "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } - }, - "patch": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "get": { "parameters": [ { "name": "owner", @@ -11438,69 +4273,6 @@ "type": "string", "description": "owner of the repo" }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id" - }, - { - "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}/wiki/pages": { - "get": { - "operationId": "repoGetWikiPages", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, { "description": "name of the repo", "name": "repo", @@ -11509,16 +4281,11 @@ "type": "string" }, { - "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" + "in": "path", + "required": true, + "type": "string", + "description": "remote name of push mirror", + "name": "name" }, { "description": "group ID of the repo", @@ -11530,130 +4297,27 @@ } ], "responses": { + "404": { + "$ref": "#/responses/notFound" + }, "200": { - "$ref": "#/responses/WikiPageList" + "$ref": "#/responses/PushMirror" }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get all wiki pages" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { - "delete": { - "tags": [ - "issue" - ], - "summary": "Remove a label from an issue", - "operationId": "issueRemoveLabel", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}": { - "get": { + ], "tags": [ "repository" ], - "summary": "Get a repository", - "operationId": "repoGet", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName" }, "delete": { "produces": [ @@ -11662,647 +4326,8 @@ "tags": [ "repository" ], - "summary": "Delete a repository", - "operationId": "repoDelete", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo to delete", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo to delete", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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": [ - { - "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, - "type": "string" - }, - { - "description": "Properties of a repo that you can edit", - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditRepoOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfig" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { - "operationId": "repoListPinnedPullRequests", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned pull requests" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "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 - }, - { - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true, - "type": "string" - }, - { - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - }, - "name": "body", - "in": "body" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ] - }, - "delete": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { - "get": { - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List tag protections for a repository" - }, - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagProtectionOption" - }, - "name": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/TagProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection" - } - }, - "/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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "description": "optional filter by user (available for issue managers)", - "name": "user", - "in": "query", - "type": "string" - }, - { - "name": "since", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" - }, - { - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "responses": { - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", + "summary": "deletes a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", "parameters": [ { "in": "path", @@ -12312,11 +4337,62 @@ "name": "owner" }, { - "required": true, - "type": "string", "description": "name of the repo", "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/issues/{index}/subscriptions/check": { + "get": { + "tags": [ + "issue" + ], + "summary": "Check if user is subscribed to an issue", + "operationId": "issueCheckSubscription", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" }, { "name": "index", @@ -12326,944 +4402,6 @@ "format": "int64", "description": "index of the issue" }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddTimeOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - }, - "delete": { - "parameters": [ - { - "description": "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" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime" - } - }, - "/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" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "summary": "Update avatar", - "operationId": "repoUpdateAvatar", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete avatar", - "operationId": "repoDeleteAvatar", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { - "put": { - "operationId": "repoAddTopic", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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": { - "422": { - "$ref": "#/responses/invalidTopicsError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add a topic to a repository" - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a topic from a repository", - "operationId": "repoDeleteTopic", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "name of the topic to delete", - "name": "topic", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches": { - "get": { - "summary": "List a repository's branches", - "operationId": "repoListBranches", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "summary": "Create a branch", - "operationId": "repoCreateBranch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": { - "409": { - "description": "The branch with the same name already exists." - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Branch" - }, - "403": { - "description": "The branch is archived or a mirror." - }, - "404": { - "description": "The old branch does not exist." - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Commit" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a single commit from a repository", - "operationId": "repoGetSingleCommit", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "sha", - "in": "path", - "required": true, - "type": "string", - "description": "a git ref or commit sha" - }, - { - "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" - }, - { - "name": "files", - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path" - }, - { - "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}/issues/comments/{id}/reactions": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a list of reactions from a comment of an issue", - "operationId": "issueGetCommentReactions" - }, - "post": { - "responses": { - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Remove a reaction from a comment of an issue", - "operationId": "issueDeleteCommentReaction", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { - "get": { - "operationId": "downloadArtifact", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Downloads a specific artifact for a workflow run redirects to blob url" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken" - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoCreateRunnerRegistrationToken", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, { "format": "int64", "required": true, @@ -13275,191 +4413,10 @@ ], "responses": { "200": { - "$ref": "#/responses/RegistrationToken" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/WatchInfo" }, "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment" - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ] - }, - "patch": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - }, - "name": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "$ref": "#/responses/notFound" } }, "consumes": [ @@ -13467,83 +4424,11 @@ ], "produces": [ "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "/repos/{owner}/group/{group_id}/{repo}/hooks": { "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "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": [ { "required": true, @@ -13560,22 +4445,10 @@ "name": "repo" }, { + "in": "query", "type": "integer", - "description": "the key_id to search for", - "name": "key_id", - "in": "query" - }, - { - "name": "fingerprint", - "in": "query", - "type": "string", - "description": "fingerprint of the key" - }, - { "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" + "name": "page" }, { "type": "integer", @@ -13584,36 +4457,58 @@ "in": "query" }, { - "description": "group ID of the repo", - "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/DeployKeyList" + "$ref": "#/responses/HookList" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "post": { + }, + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Add a key to a repository", - "operationId": "repoCreateKey", + "summary": "List the hooks in a repository", + "operationId": "repoListHooks" + }, + "post": { + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook", + "operationId": "repoCreateHook", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -13626,171 +4521,9 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateKeyOption" + "$ref": "#/definitions/CreateHookOption" } }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "tags": [ - "issue" - ], - "summary": "Pin an Issue", - "operationId": "pinIssue" - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Unpin an Issue", - "operationId": "unpinIssue", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "in": "path", - "required": true - }, { "required": true, "in": "path", @@ -13799,343 +4532,31 @@ "type": "integer", "format": "int64" } - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - }, - "name": "body", - "in": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/FileResponse" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ActivityFeedsList" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "get": { - "summary": "Get a Git hook", - "operationId": "repoGetGitHook", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a Git hook in a repository", - "operationId": "repoDeleteGitHook", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "patch": { - "summary": "Edit a Git hook in a repository", - "operationId": "repoEditGitHook", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the hook to get" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to transfer", - "name": "repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "202": { - "$ref": "#/responses/Repository" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" ] } }, "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { "get": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" + } + }, "produces": [ "application/json" ], @@ -14179,39 +4600,26 @@ "required": true, "in": "path" } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/TasksList" - } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { "get": { - "operationId": "repoGetPullRequest", + "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" + "required": true }, { "description": "name of the repo", @@ -14221,12 +4629,449 @@ "type": "string" }, { + "type": "integer", + "format": "int64", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflowList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "get": { + "summary": "Get an issue", + "operationId": "issueGetIssue", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "index", + "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request to get", - "name": "index", + "description": "index of the issue to get" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of issue to delete" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Issue" + } + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to edit" + }, + { + "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" + } + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "compare two branches or commits", + "name": "basehead" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "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" + }, + { + "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}/issues/{index}/subscriptions": { + "get": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "name": "group_id", @@ -14239,7 +5084,121 @@ ], "responses": { "200": { - "$ref": "#/responses/PullRequest" + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get users who subscribed on an issue.", + "operationId": "issueSubscriptions" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "run", + "in": "path", + "required": true, + "type": "integer", + "description": "runid of the workflow run" + }, + { + "description": "name of the artifact", + "name": "name", + "in": "query", + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path" + }, + { + "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" @@ -14251,9 +5210,291 @@ "tags": [ "repository" ], - "summary": "Get a pull request" + "summary": "Get a Git hook", + "operationId": "repoGetGitHook" + }, + "delete": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] }, "patch": { + "operationId": "repoEditGitHook", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a Git hook in a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's activity feeds", + "operationId": "repoListActivityFeeds" + } + }, + "/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 + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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", + "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}/branch_protections/priority": { + "post": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, "consumes": [ "application/json" ], @@ -14263,8 +5504,742 @@ "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", + "summary": "Update the priorities of branch protections for a repository.", + "operationId": "repoUpdateBranchProtectionPriories" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times": { + "get": { + "operationId": "repoTrackedTimes", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "user", + "in": "query", + "type": "string", + "description": "optional filter by user (available for issue managers)" + }, + { + "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" + }, + { + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's tracked times" + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/signing-key.gpg": { + "get": { + "summary": "Get signing-key.gpg for given repository", + "operationId": "repoSigningKey", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + }, + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repository's teams", + "operationId": "repoListTeams", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow job for a workflow run", + "operationId": "getWorkflowJob" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "get": { + "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 + }, + { + "description": "base of the pull request to get", + "name": "base", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "head of the pull request to get", + "name": "head", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "put": { + "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" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { + "get": { + "summary": "Lists all artifacts for a repository", + "operationId": "getArtifacts", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "type": "string", + "description": "name of the artifact", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ArtifactsList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { + "get": { + "tags": [ + "issue" + ], + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "required": true, + "type": "string", + "description": "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" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" + }, + { + "name": "before", + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned." + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", "parameters": [ { "description": "owner of the repo", @@ -14281,20 +6256,2590 @@ "description": "name of the repo" }, { + "name": "index", + "in": "path", + "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request to edit", + "description": "index of the issue" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Comment" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues" + } + }, + "/repos/{owner}/group/{group_id}/{repo}": { + "get": { + "operationId": "repoGet", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository" + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to delete", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo to edit", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo to edit" + }, + { + "schema": { + "$ref": "#/definitions/EditRepoOption" + }, + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "get": { + "tags": [ + "issue" + ], + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue", "name": "index", "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "user", + "in": "query", + "type": "string", + "description": "optional filter by user (available for issue managers)" + }, + { + "name": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" + }, + { + "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": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + }, + "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 + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's releases", + "operationId": "repoListReleases", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft" + }, + { + "in": "query", + "type": "boolean", + "description": "filter (exclude / include) pre-releases", + "name": "pre-release" + }, + { + "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": { + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits": { + "get": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "in": "query", + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "in": "query", + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results (ignored if used with 'path')", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "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" + }, + { + "type": "string", + "description": "filter by milestone name", + "name": "name", + "in": "query" + }, + { + "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" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "responses": { + "201": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditPullRequestOption" + "$ref": "#/definitions/CreateMilestoneOption" } }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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": { + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents": { + "get": { + "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" + } + }, + "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." + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "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}/branch_protections": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch protections for a repository", + "operationId": "repoCreateBranchProtection", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path" + }, + { + "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" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query", + "type": "boolean" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitList" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the hook to test", + "name": "id" + }, + { + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "delete": { + "operationId": "issueDeleteComment", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a comment" + }, + "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 + }, + { + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment", + "operationId": "issueGetComment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true + }, + "patch": { + "summary": "Edit a comment", + "operationId": "issueEditCommentDeprecated", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "deprecated": true + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "ref", + "in": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch." + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "success" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { + "get": { + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "deprecated": true, + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { + "patch": { + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "name of protected branch" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "name of protected branch" + }, + { + "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": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch protection for the repository", + "operationId": "repoDeleteBranchProtection", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + "post": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "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" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "get": { + "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" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "delete": { + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release to delete" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "patch": { + "operationId": "repoEditRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a release" + }, + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release", + "operationId": "repoGetRelease" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "string", + "description": "tag name of the release to get", + "name": "tag", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag" + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true + }, { "format": "int64", "required": true, @@ -14308,25 +8853,16 @@ "422": { "$ref": "#/responses/validationError" }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "412": { - "$ref": "#/responses/error" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { "post": { "produces": [ "application/json" @@ -14334,15 +8870,73 @@ "tags": [ "repository" ], - "summary": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest", + "summary": "Sync all push mirrored repository", + "operationId": "repoPushMirrorSync", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to sync", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that have write access and can be assigned to issues", + "operationId": "repoGetAssignees", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "required": true, @@ -14351,35 +8945,982 @@ "name": "repo", "in": "path" }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's combined status, by branch/tag/commit reference", + "operationId": "repoGetCombinedStatusByRef", + "parameters": [ { "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index" + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" }, { "type": "string", - "description": "how to update pull request", - "name": "style", - "in": "query", - "enum": [ - "merge", - "rebase" - ] + "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" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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 + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ssh public key", + "schema": { + "type": "string" + } + } + }, + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get signing-key.pub for given repository", + "operationId": "repoSigningKeySSH" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "string", + "description": "index of the issue" + }, + { + "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": { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "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 + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/IssueList" + } + } + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", + "parameters": [ + { + "description": "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" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a repository", + "operationId": "listWorkflowJobs", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the artifact", + "name": "artifact_id" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "302": { + "description": "redirect to the blob download" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/pulls/{index}/merge": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged" + }, + "post": { + "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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a pull request" + }, + "delete": { + "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -14388,17 +9929,22 @@ "404": { "$ref": "#/responses/notFound" }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" + "423": { + "$ref": "#/responses/repoArchivedError" } - } + }, + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/milestones": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", "parameters": [ { "type": "string", @@ -14415,17 +9961,1143 @@ "description": "name of the repo" }, { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "required": true, "type": "string", - "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", - "name": "state", - "in": "query" + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "put": { + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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" + } + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" }, { "type": "string", - "description": "filter by milestone name", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "post": { + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "query", + "type": "string", + "description": "name of the attachment", + "name": "name" + }, + { + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer": { + "post": { + "parameters": [ + { + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer" + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "description": "how to update pull request", + "name": "style", + "in": "query", + "enum": [ + "merge", + "rebase" + ], + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { + "get": { + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/AttachmentList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List comment's attachments" + }, + "post": { + "responses": { + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "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 + }, + { + "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" + }, + { + "type": "string", + "description": "name of the attachment", "name": "name", "in": "query" }, + { + "required": true, + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/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" + }, + { + "in": "query", + "required": true, + "type": "string", + "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", + "name": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ContentsListResponse" + } + } + } + }, + "/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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + }, + "name": "body", + "in": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments" + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "name of the attachment", + "name": "name", + "in": "query", + "type": "string" + }, + { + "name": "attachment", + "in": "formData", + "required": true, + "type": "file", + "description": "attachment to upload" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/forks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo to fork" + }, + { + "schema": { + "$ref": "#/definitions/CreateForkOption" + }, + "name": "body", + "in": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "get": { + "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" + }, + { + "name": "whitespace", + "in": "query", + "enum": [ + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" + ], + "type": "string", + "description": "whitespace behavior" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ChangedFileList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get changed files for a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { + "get": { + "tags": [ + "issue" + ], + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -14449,7 +11121,7 @@ ], "responses": { "200": { - "$ref": "#/responses/MilestoneList" + "$ref": "#/responses/CommentList" }, "404": { "$ref": "#/responses/notFound" @@ -14457,68 +11129,93 @@ }, "produces": [ "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get all of a repository's opened milestones", - "operationId": "issueGetMilestonesList" - }, + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { "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": "owner of the repo" + "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": "id of the review", + "name": "id", + "in": "path", "required": true, - "type": "string" + "type": "integer", + "format": "int64" }, { "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/CreateMilestoneOption" + "$ref": "#/definitions/DismissPullReviewOptions" } }, { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "201": { - "$ref": "#/responses/Milestone" + "422": { + "$ref": "#/responses/validationError" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview" } }, - "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { + "/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": [ { "in": "path", @@ -14535,24 +11232,641 @@ "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", + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Commit" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "put": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "get": { + "summary": "Lists all jobs for a workflow run", + "operationId": "listWorkflowRunJobs", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete an 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 + }, + { + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "description": "runner has been deleted" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, "type": "string" }, { "type": "string", - "description": "the name of the commit/branch/tag, default to the repository’s default branch.", - "name": "ref", - "in": "query" + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true }, { - "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", + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, "type": "string" }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path" + }, + { + "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": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the branch", + "name": "branch" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { + "operationId": "repoListTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List tag protections for a repository" + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "required": true, + "type": "string", + "description": "username of the user to subscribe the issue to", + "name": "user", + "in": "path" + }, { "description": "group ID of the repo", "name": "group_id", @@ -14564,32 +11878,63 @@ ], "responses": { "200": { - "$ref": "#/responses/ContentsExtResponse" + "description": "Already subscribed" + }, + "201": { + "description": "Successfully Subscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" }, "404": { "$ref": "#/responses/notFound" } }, - "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.", + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.", - "operationId": "repoGetContentsExt" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { - "get": { + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription" + }, + "delete": { + "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" + } + }, + "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" + "required": true }, { "name": "repo", @@ -14608,29 +11953,64 @@ }, { "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query" + "description": "username of the user to unsubscribe from an issue", + "name": "user", + "in": "path", + "required": true }, { - "name": "page", - "in": "query", + "name": "group_id", "type": "integer", - "description": "page number of results to return (1-based)" - }, + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "get": { + "operationId": "repoDownloadPullDiffOrPatch", + "parameters": [ { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", - "in": "query", + "required": true, "type": "string", - "format": "date-time" + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get" + }, + { + "in": "path", + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch", + "name": "diffType" + }, + { + "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", @@ -14643,32 +12023,28 @@ ], "responses": { "200": { - "$ref": "#/responses/TimelineList" + "$ref": "#/responses/string" }, "404": { "$ref": "#/responses/notFound" } }, "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { - "get": { - "produces": [ - "application/json" + "text/plain" ], "tags": [ "repository" ], - "summary": "List the Git hooks in a repository", - "operationId": "repoListGitHooks", + "summary": "Get a pull request diff or patch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repository's branches", + "operationId": "repoListBranches", "parameters": [ { "type": "string", @@ -14684,6 +12060,249 @@ "name": "repo", "in": "path" }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch", + "operationId": "repoCreateBranch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchRepoOption" + }, + "name": "body" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { + "post": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { + "get": { + "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" + }, + { + "name": "includes", + "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." + }, { "type": "integer", "format": "int64", @@ -14695,18 +12314,722 @@ ], "responses": { "200": { - "$ref": "#/responses/GitHookList" + "$ref": "#/responses/ContentsExtResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { + "put": { + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileResponse" + }, + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + } + }, + "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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "path of the file to delete", + "name": "filepath" + }, + { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "get": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Artifact" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific artifact for a workflow run", + "operationId": "getArtifact", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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" + } + ] + }, + "delete": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the artifact", + "name": "artifact_id" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Deletes a specific artifact for a workflow run" + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "key_id", + "in": "query", + "type": "integer", + "description": "the key_id to search for" + }, + { + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query", + "type": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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": { + "operationId": "repoCreateKey", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a key to a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { + "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" + } + }, + "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" + }, + { + "default": "open", + "description": "State of pull request", + "name": "state", + "in": "query", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + }, + { + "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" + }, + { + "collectionFormat": "multi", + "description": "Label IDs", + "name": "labels", + "in": "query", + "type": "array", + "items": { + "format": "int64", + "type": "integer" + } + }, + { + "type": "string", + "description": "Filter by pull request author", + "name": "poster", + "in": "query" + }, + { + "name": "page", + "in": "query", + "minimum": 1, + "type": "integer", + "default": 1, + "description": "Page number of results to return (1-based)" + }, + { + "type": "integer", + "description": "Page size of results", + "name": "limit", + "in": "query", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, "post": { - "summary": "create review requests for a pull request", - "operationId": "repoCreatePullReviewRequests", + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection", "parameters": [ { "description": "owner of the repo", @@ -14723,36 +13046,142 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "description": "id of the tag protect to get", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer" }, { - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - }, - "name": "body", - "in": "body", - "required": true - }, - { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", "required": true + }, + { + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "patch": { + "tags": [ + "repository" + ], + "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditTagProtection", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id" + }, + { + "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" }, - "201": { - "$ref": "#/responses/PullReviewList" + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" @@ -14763,17 +13192,52 @@ ], "tags": [ "repository" - ] - }, - "delete": { + ], + "summary": "Get the merged pull request of the commit", + "operationId": "repoGetCommitPullRequest", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", + "in": "path" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, { "required": true, "type": "string", @@ -14782,19 +13246,130 @@ "in": "path" }, { + "in": "body", "required": true, + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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", - "description": "index of the pull request", - "name": "index", + "required": true, "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { "name": "body", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" + "$ref": "#/definitions/RepoTopicOptions" } }, { @@ -14806,6 +13381,58 @@ "description": "group ID of the repo" } ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + } + }, + "/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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], "responses": { "204": { "$ref": "#/responses/empty" @@ -14815,9 +13442,201 @@ }, "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 }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of issue to unpin", + "name": "index", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { + "tags": [ + "repository" + ], + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the workflow" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { "422": { "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { + "tags": [ + "repository" + ], + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" } }, "produces": [ @@ -14825,18 +13644,247 @@ ], "tags": [ "repository" - ], - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { + "put": { + "operationId": "updateRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create or Update a secret value in a repository" + }, + "delete": { + "summary": "Delete a secret in a repository", + "operationId": "deleteRepoSecret", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "description": "delete one secret of the repository" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { "get": { "tags": [ "repository" ], - "summary": "Get repository permissions for a user", - "operationId": "repoGetRepoPermissions", + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "type": "string", + "description": "id of the run", + "name": "run", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a workflow run", + "operationId": "deleteActionRun", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "description": "runid of the workflow run", + "name": "run", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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", @@ -14853,11 +13901,81 @@ "name": "repo" }, { - "name": "collaborator", + "name": "index", "in": "path", "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + }, + "name": "body", + "in": "body" + }, + { + "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": "username of the collaborator whose permissions are to be obtained" + "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": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } }, { "required": true, @@ -14869,22 +13987,766 @@ } ], "responses": { - "200": { - "$ref": "#/responses/RepoCollaboratorPermission" + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/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 + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "get": { + "operationId": "repoGetArchive", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "success" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, "404": { "$ref": "#/responses/notFound" } }, "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + }, + "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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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 + }, + { + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + }, + "name": "body", + "in": "body" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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": { + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the hook to delete" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEditHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the hook" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a hook in a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/UserList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateActionWorkflowDispatch" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", + "name": "status-types", + "in": "query", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "type": "string", + "description": "Status to mark notifications as. Defaults to read.", + "name": "to-status", + "in": "query" + }, + { + "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": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + } + }, + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all" + }, + { + "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" + }, + { + "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" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "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" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { "get": { "parameters": [ { @@ -14902,126 +14764,16 @@ "required": true }, { - "required": true, "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path" - }, - { - "type": "string", - "description": "name of the artifact", - "name": "name", + "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/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/UserList" - } - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchProtectionPriories" - } + "description": "page size of results", + "name": "limit", + "in": "query" }, { "name": "group_id", @@ -15033,20 +14785,268 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets" + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Note" }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "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" } - } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "post": { + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePushMirrorOption" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "get": { + "operationId": "repoListPushMirrors", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get all push mirrors of the repository" } } } -} \ No newline at end of file +} From 23b891acd30b8a394cdd3f23b1b0a98e700bc951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 23:22:16 -0500 Subject: [PATCH 115/218] fix determinism of repo group swagger output --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8bcd4c3947..af4b85bdf7 100644 --- a/Makefile +++ b/Makefile @@ -208,7 +208,8 @@ fmt: ## format the Go and template code .PHONY: fmt-check fmt-check: fmt - @diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \ + @shopt -s extglob; \ + diff=$$(git diff --color=always $(GO_SOURCES) $(shell find templates -type f -not -name "v1_groups.json") $(WEB_DIRS)); \ if [ -n "$$diff" ]; then \ echo "Please run 'make fmt' and commit the result:"; \ printf "%s" "$${diff}"; \ From cca827705d2f531cef3e00ec4f1d5fd3202c3005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 01:37:10 -0500 Subject: [PATCH 116/218] fix issue reference regex --- modules/markup/html.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index 4c3a43c511..aae3e4d60f 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -82,7 +82,7 @@ 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_.-]+/)?[\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_.-]+/)?[\w_.-]+/pulls/((?:\w{1,10}-)?[1-9][0-9]*)/files([\?|#](\S+)?)?\b`) From cb4f3a2d2722f486b1d191082538a6c44924bb78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 16:29:47 -0500 Subject: [PATCH 117/218] move dummy repositories to proper subgroup directories --- .../private_repo_on_limited_org.git/HEAD | 0 .../private_repo_on_limited_org.git/config | 0 .../74/8bf557dfc9c6457998b5118a6c8b2129f56c30 | Bin .../a5/46f86c7dd182592b96639045e176dde8df76ef | Bin .../b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 | Bin .../refs/heads/master | 0 .../public_repo_on_limited_org.git/HEAD | 0 .../public_repo_on_limited_org.git/config | 0 .../21/2f14c8b713de38bd0b3fb23bd288369b01668a | Bin .../90/e402c3937a4639725fcc59ca1f529e7dc8506f | Bin .../ed/d9c1000cd1444efd63e153e3554c8d5656bf65 | Bin .../refs/heads/master | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../repo_external_tracker_alpha.git}/HEAD | 0 .../repo_external_tracker_alpha.git}/config | 20 +++++++++--------- .../config.backup | 0 .../repo_external_tracker_alpha.git}/index | Bin .../logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../repo_external_tracker.git}/COMMITMESSAGE | 0 .../repo_external_tracker.git}/COMMIT_EDITMSG | 0 .../repo_external_tracker.git}/HEAD | 0 .../repo_external_tracker.git}/config | 20 +++++++++--------- .../repo_external_tracker.git}/config.backup | 0 .../repo_external_tracker.git}/index | Bin .../repo_external_tracker.git}/logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../repo_external_tracker_numeric.git/HEAD | 0 .../repo_external_tracker_numeric.git/config | 20 +++++++++--------- .../config.backup | 0 .../repo_external_tracker_numeric.git/index | Bin .../logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../org3/{ => 129}/repo3.git/HEAD | 0 .../org3/{ => 129}/repo3.git/config | 0 .../{ => 129}/repo3.git/hooks/post-receive | 0 .../repo3.git/hooks/post-receive.d/gitea | 0 .../{ => 129}/repo3.git/hooks/pre-receive | 0 .../repo3.git/hooks/pre-receive.d/gitea | 0 .../org3/{ => 129}/repo3.git/hooks/update | 0 .../{ => 129}/repo3.git/hooks/update.d/gitea | 0 .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin .../d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 | Bin .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin .../ec/f0db3c1ec806522de4b491fb9a3c7457398c61 | Bin .../ee/16d127df463aa491e08958120f2108b02468df | Bin .../{ => 129}/repo3.git/refs/heads/master | 0 .../repo3.git/refs/heads/test_branch | 0 .../org3/{ => 139}/repo5.git/HEAD | 0 .../org3/{ => 139}/repo5.git/config | 0 .../{ => 139}/repo5.git/hooks/post-receive | 0 .../repo5.git/hooks/post-receive.d/gitea | 0 .../{ => 139}/repo5.git/hooks/pre-receive | 0 .../repo5.git/hooks/pre-receive.d/gitea | 0 .../org3/{ => 139}/repo5.git/hooks/update | 0 .../{ => 139}/repo5.git/hooks/update.d/gitea | 0 .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin .../d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 | Bin .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin .../ec/f0db3c1ec806522de4b491fb9a3c7457398c61 | Bin .../ee/16d127df463aa491e08958120f2108b02468df | Bin .../{ => 139}/repo5.git/refs/heads/master | 0 .../repo5.git/refs/heads/test_branch | 0 .../org41/{ => 90}/repo61.git/HEAD | 0 .../org41/{ => 90}/repo61.git/config | 0 .../org41/{ => 90}/repo61.git/objects/.keep | 0 .../org41/{ => 90}/repo61.git/refs/.keep | 0 .../{ => 106}/search-by-path.git/GIT_COLA_MSG | 0 .../org42/{ => 106}/search-by-path.git/HEAD | 0 .../org42/{ => 106}/search-by-path.git/config | 0 .../{ => 106}/search-by-path.git/description | 0 .../search-by-path.git/hooks/post-receive | 0 .../hooks/post-receive.d/gitea | 0 .../search-by-path.git/hooks/pre-receive | 0 .../hooks/pre-receive.d/gitea | 0 .../search-by-path.git/hooks/proc-receive | 0 .../hooks/proc-receive.d/gitea | 0 .../{ => 106}/search-by-path.git/hooks/update | 0 .../search-by-path.git/hooks/update.d/gitea | 0 .../{ => 106}/search-by-path.git/info/refs | 0 .../search-by-path.git/logs/refs/heads/master | 0 .../search-by-path.git/objects/info/packs | 0 ...76cf6e2b46bc816936ab69306fb10aea571.bitmap | Bin ...bef76cf6e2b46bc816936ab69306fb10aea571.idx | Bin ...ef76cf6e2b46bc816936ab69306fb10aea571.pack | Bin ...bef76cf6e2b46bc816936ab69306fb10aea571.rev | Bin .../{ => 106}/search-by-path.git/packed-refs | 0 .../{ => 106}/search-by-path.git/refs/.keep | 0 .../public_repo_on_private_org.git}/HEAD | 0 .../public_repo_on_private_org.git}/config | 0 .../04/f99c528b643b9175a4b156cdfc13aba6b43853 | Bin .../86/de16d8658f5c0a17ec6aa313871295d7072f78 | Bin .../bf/19fd4707acb403c4aca44f126ab69142ac59ce | Bin .../refs/heads/master | 0 .../private_repo_on_private_org.git}/HEAD | 0 .../private_repo_on_private_org.git}/config | 0 .../6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 | Bin .../7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 | Bin .../b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 | Bin .../refs/heads/master | 0 127 files changed, 30 insertions(+), 30 deletions(-) rename tests/gitea-repositories-meta/limited_org/{ => 221}/private_repo_on_limited_org.git/HEAD (100%) rename tests/gitea-repositories-meta/limited_org/{ => 221}/private_repo_on_limited_org.git/config (100%) rename tests/gitea-repositories-meta/limited_org/{ => 221}/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 (100%) rename tests/gitea-repositories-meta/limited_org/{ => 221}/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef (100%) rename tests/gitea-repositories-meta/limited_org/{ => 221}/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 (100%) rename tests/gitea-repositories-meta/limited_org/{ => 221}/private_repo_on_limited_org.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/limited_org/{ => 231}/public_repo_on_limited_org.git/HEAD (100%) rename tests/gitea-repositories-meta/limited_org/{ => 231}/public_repo_on_limited_org.git/config (100%) rename tests/gitea-repositories-meta/limited_org/{ => 231}/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a (100%) rename tests/gitea-repositories-meta/limited_org/{ => 231}/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f (100%) rename tests/gitea-repositories-meta/limited_org/{ => 231}/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 (100%) rename tests/gitea-repositories-meta/limited_org/{ => 231}/public_repo_on_limited_org.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/COMMITMESSAGE (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/HEAD (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/config (94%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/config.backup (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/index (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/logs/HEAD (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/logs/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker.git => 41/repo_external_tracker_alpha.git}/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/COMMITMESSAGE (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/HEAD (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/config (94%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/config.backup (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/index (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/logs/HEAD (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/logs/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{repo_external_tracker_alpha.git => 49/repo_external_tracker.git}/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/COMMITMESSAGE (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/HEAD (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/config (94%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/config.backup (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/index (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/logs/HEAD (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/logs/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{ => 53}/repo_external_tracker_numeric.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/HEAD (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/config (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/hooks/post-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/hooks/post-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/hooks/pre-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/hooks/pre-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/hooks/update (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/hooks/update.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/org3/{ => 129}/repo3.git/refs/heads/test_branch (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/HEAD (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/config (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/hooks/post-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/hooks/post-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/hooks/pre-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/hooks/pre-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/hooks/update (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/hooks/update.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/objects/ee/16d127df463aa491e08958120f2108b02468df (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/org3/{ => 139}/repo5.git/refs/heads/test_branch (100%) rename tests/gitea-repositories-meta/org41/{ => 90}/repo61.git/HEAD (100%) rename tests/gitea-repositories-meta/org41/{ => 90}/repo61.git/config (100%) rename tests/gitea-repositories-meta/org41/{ => 90}/repo61.git/objects/.keep (100%) rename tests/gitea-repositories-meta/org41/{ => 90}/repo61.git/refs/.keep (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/GIT_COLA_MSG (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/HEAD (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/config (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/description (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/post-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/post-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/pre-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/pre-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/proc-receive (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/proc-receive.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/update (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/hooks/update.d/gitea (100%) mode change 100755 => 100644 rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/info/refs (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/objects/info/packs (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.bitmap (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.idx (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.pack (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.rev (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/packed-refs (100%) rename tests/gitea-repositories-meta/org42/{ => 106}/search-by-path.git/refs/.keep (100%) rename tests/gitea-repositories-meta/privated_org/{private_repo_on_private_org.git => 340/public_repo_on_private_org.git}/HEAD (100%) rename tests/gitea-repositories-meta/privated_org/{private_repo_on_private_org.git => 340/public_repo_on_private_org.git}/config (100%) rename tests/gitea-repositories-meta/privated_org/{ => 340}/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 (100%) rename tests/gitea-repositories-meta/privated_org/{ => 340}/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 (100%) rename tests/gitea-repositories-meta/privated_org/{ => 340}/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce (100%) rename tests/gitea-repositories-meta/privated_org/{ => 340}/public_repo_on_private_org.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/privated_org/{public_repo_on_private_org.git => 352/private_repo_on_private_org.git}/HEAD (100%) rename tests/gitea-repositories-meta/privated_org/{public_repo_on_private_org.git => 352/private_repo_on_private_org.git}/config (100%) rename tests/gitea-repositories-meta/privated_org/{ => 352}/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 (100%) rename tests/gitea-repositories-meta/privated_org/{ => 352}/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 (100%) rename tests/gitea-repositories-meta/privated_org/{ => 352}/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 (100%) rename tests/gitea-repositories-meta/privated_org/{ => 352}/private_repo_on_private_org.git/refs/heads/master (100%) diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD b/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD rename to tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/HEAD diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config b/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/config similarity index 100% rename from tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config rename to tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/config diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 b/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 similarity index 100% rename from tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 rename to tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef b/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef similarity index 100% rename from tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef rename to tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 b/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 similarity index 100% rename from tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 rename to tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master b/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master rename to tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD b/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD rename to tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/HEAD diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config b/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/config similarity index 100% rename from tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config rename to tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/config diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a b/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a similarity index 100% rename from tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a rename to tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f b/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f similarity index 100% rename from tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f rename to tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 b/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 similarity index 100% rename from tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 rename to tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master b/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master rename to tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMITMESSAGE similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMITMESSAGE diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/HEAD diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config similarity index 94% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/config rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config index 48ee2884b4..2768a2037e 100644 --- a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config +++ b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config @@ -1,10 +1,10 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - symlinks = false - ignorecase = true -[user] - name = user2 - email = user2@example.com +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[user] + name = user2 + email = user2@example.com diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config.backup similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config.backup diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/index b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/index similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/index rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/index diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master b/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMITMESSAGE similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMITMESSAGE diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/HEAD diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config similarity index 94% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config index 48ee2884b4..2768a2037e 100644 --- a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config +++ b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config @@ -1,10 +1,10 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - symlinks = false - ignorecase = true -[user] - name = user2 - email = user2@example.com +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[user] + name = user2 + email = user2@example.com diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config.backup similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config.backup diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/index similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/index diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master b/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMITMESSAGE similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMITMESSAGE diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/HEAD diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config similarity index 94% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config index 48ee2884b4..2768a2037e 100644 --- a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config +++ b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config @@ -1,10 +1,10 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - symlinks = false - ignorecase = true -[user] - name = user2 - email = user2@example.com +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[user] + name = user2 + email = user2@example.com diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config.backup similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config.backup diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/index similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/index diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master b/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/repo3.git/HEAD b/tests/gitea-repositories-meta/org3/129/repo3.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/HEAD rename to tests/gitea-repositories-meta/org3/129/repo3.git/HEAD diff --git a/tests/gitea-repositories-meta/org3/repo3.git/config b/tests/gitea-repositories-meta/org3/129/repo3.git/config similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/config rename to tests/gitea-repositories-meta/org3/129/repo3.git/config diff --git a/tests/gitea-repositories-meta/org3/repo3.git/hooks/post-receive b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/hooks/post-receive rename to tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive diff --git a/tests/gitea-repositories-meta/org3/repo3.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org3/repo3.git/hooks/pre-receive b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/hooks/pre-receive rename to tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive diff --git a/tests/gitea-repositories-meta/org3/repo3.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org3/repo3.git/hooks/update b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/hooks/update rename to tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update diff --git a/tests/gitea-repositories-meta/org3/repo3.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update.d/gitea diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 diff --git a/tests/gitea-repositories-meta/org3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df b/tests/gitea-repositories-meta/org3/129/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df rename to tests/gitea-repositories-meta/org3/129/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df diff --git a/tests/gitea-repositories-meta/org3/repo3.git/refs/heads/master b/tests/gitea-repositories-meta/org3/129/repo3.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/refs/heads/master rename to tests/gitea-repositories-meta/org3/129/repo3.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/repo3.git/refs/heads/test_branch b/tests/gitea-repositories-meta/org3/129/repo3.git/refs/heads/test_branch similarity index 100% rename from tests/gitea-repositories-meta/org3/repo3.git/refs/heads/test_branch rename to tests/gitea-repositories-meta/org3/129/repo3.git/refs/heads/test_branch diff --git a/tests/gitea-repositories-meta/org3/repo5.git/HEAD b/tests/gitea-repositories-meta/org3/139/repo5.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/HEAD rename to tests/gitea-repositories-meta/org3/139/repo5.git/HEAD diff --git a/tests/gitea-repositories-meta/org3/repo5.git/config b/tests/gitea-repositories-meta/org3/139/repo5.git/config similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/config rename to tests/gitea-repositories-meta/org3/139/repo5.git/config diff --git a/tests/gitea-repositories-meta/org3/repo5.git/hooks/post-receive b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/hooks/post-receive rename to tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive diff --git a/tests/gitea-repositories-meta/org3/repo5.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org3/repo5.git/hooks/pre-receive b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/hooks/pre-receive rename to tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive diff --git a/tests/gitea-repositories-meta/org3/repo5.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org3/repo5.git/hooks/update b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/hooks/update rename to tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update diff --git a/tests/gitea-repositories-meta/org3/repo5.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update.d/gitea diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 diff --git a/tests/gitea-repositories-meta/org3/repo5.git/objects/ee/16d127df463aa491e08958120f2108b02468df b/tests/gitea-repositories-meta/org3/139/repo5.git/objects/ee/16d127df463aa491e08958120f2108b02468df similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/objects/ee/16d127df463aa491e08958120f2108b02468df rename to tests/gitea-repositories-meta/org3/139/repo5.git/objects/ee/16d127df463aa491e08958120f2108b02468df diff --git a/tests/gitea-repositories-meta/org3/repo5.git/refs/heads/master b/tests/gitea-repositories-meta/org3/139/repo5.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/refs/heads/master rename to tests/gitea-repositories-meta/org3/139/repo5.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/repo5.git/refs/heads/test_branch b/tests/gitea-repositories-meta/org3/139/repo5.git/refs/heads/test_branch similarity index 100% rename from tests/gitea-repositories-meta/org3/repo5.git/refs/heads/test_branch rename to tests/gitea-repositories-meta/org3/139/repo5.git/refs/heads/test_branch diff --git a/tests/gitea-repositories-meta/org41/repo61.git/HEAD b/tests/gitea-repositories-meta/org41/90/repo61.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org41/repo61.git/HEAD rename to tests/gitea-repositories-meta/org41/90/repo61.git/HEAD diff --git a/tests/gitea-repositories-meta/org41/repo61.git/config b/tests/gitea-repositories-meta/org41/90/repo61.git/config similarity index 100% rename from tests/gitea-repositories-meta/org41/repo61.git/config rename to tests/gitea-repositories-meta/org41/90/repo61.git/config diff --git a/tests/gitea-repositories-meta/org41/repo61.git/objects/.keep b/tests/gitea-repositories-meta/org41/90/repo61.git/objects/.keep similarity index 100% rename from tests/gitea-repositories-meta/org41/repo61.git/objects/.keep rename to tests/gitea-repositories-meta/org41/90/repo61.git/objects/.keep diff --git a/tests/gitea-repositories-meta/org41/repo61.git/refs/.keep b/tests/gitea-repositories-meta/org41/90/repo61.git/refs/.keep similarity index 100% rename from tests/gitea-repositories-meta/org41/repo61.git/refs/.keep rename to tests/gitea-repositories-meta/org41/90/repo61.git/refs/.keep diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/GIT_COLA_MSG b/tests/gitea-repositories-meta/org42/106/search-by-path.git/GIT_COLA_MSG similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/GIT_COLA_MSG rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/GIT_COLA_MSG diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/HEAD b/tests/gitea-repositories-meta/org42/106/search-by-path.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/HEAD rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/HEAD diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/config b/tests/gitea-repositories-meta/org42/106/search-by-path.git/config similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/config rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/config diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/description b/tests/gitea-repositories-meta/org42/106/search-by-path.git/description similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/description rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/description diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/post-receive b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/post-receive rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/pre-receive b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/pre-receive rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/proc-receive b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/proc-receive rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/proc-receive.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/proc-receive.d/gitea rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive.d/gitea diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/update b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/update rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update.d/gitea old mode 100755 new mode 100644 similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update.d/gitea diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/info/refs b/tests/gitea-repositories-meta/org42/106/search-by-path.git/info/refs similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/info/refs rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/info/refs diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org42/106/search-by-path.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/objects/info/packs b/tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/info/packs similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/objects/info/packs rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/info/packs diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.bitmap b/tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.bitmap similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.bitmap rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.bitmap diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.idx b/tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.idx similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.idx rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.idx diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.pack b/tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.pack similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.pack rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.pack diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.rev b/tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.rev similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.rev rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.rev diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/packed-refs b/tests/gitea-repositories-meta/org42/106/search-by-path.git/packed-refs similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/packed-refs rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/packed-refs diff --git a/tests/gitea-repositories-meta/org42/search-by-path.git/refs/.keep b/tests/gitea-repositories-meta/org42/106/search-by-path.git/refs/.keep similarity index 100% rename from tests/gitea-repositories-meta/org42/search-by-path.git/refs/.keep rename to tests/gitea-repositories-meta/org42/106/search-by-path.git/refs/.keep diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD b/tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD rename to tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/HEAD diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config b/tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/config similarity index 100% rename from tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config rename to tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/config diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 b/tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 similarity index 100% rename from tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 rename to tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 b/tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 similarity index 100% rename from tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 rename to tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce b/tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce similarity index 100% rename from tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce rename to tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master b/tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master rename to tests/gitea-repositories-meta/privated_org/340/public_repo_on_private_org.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD b/tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD rename to tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/HEAD diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config b/tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/config similarity index 100% rename from tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config rename to tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/config diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 b/tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 similarity index 100% rename from tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 rename to tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 b/tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 similarity index 100% rename from tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 rename to tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 b/tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 similarity index 100% rename from tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 rename to tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master b/tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master rename to tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/refs/heads/master From c613988a0f76eb197e59c8539c2e6bbfbbb888b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 16:32:23 -0500 Subject: [PATCH 118/218] fix mssql migrations --- models/migrations/v1_26/v324.go | 3 ++- models/repo/repo.go | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index b327157ed5..4dfd3040b6 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -7,7 +7,8 @@ import "xorm.io/xorm" func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error { type Repository struct { - GroupID int64 `xorm:"UNIQUE(s) INDEX DEFAULT NULL"` + LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"` + GroupID int64 `xorm:"UNIQUE(g) INDEX DEFAULT 0"` GroupSortOrder int } _, err := x.SyncWithOptions(xorm.SyncOptions{ diff --git a/models/repo/repo.go b/models/repo/repo.go index 505d56c63b..e1dd93cbaa 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -156,7 +156,7 @@ type Repository struct { OwnerID int64 `xorm:"UNIQUE(s) 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)"` @@ -220,7 +220,7 @@ type Repository struct { UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"` - GroupID int64 `xorm:"UNIQUE(s) INDEX DEFAULT NULL"` + GroupID int64 `xorm:"UNIQUE(g) INDEX DEFAULT 0"` GroupSortOrder int `xorm:"INDEX"` } @@ -813,6 +813,11 @@ func (err ErrRepoNotExist) Unwrap() error { // GetRepositoryByOwnerAndName returns the repository by given owner name and repo name 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)). From 2f0246f9ccbd3499b3c564c5f42656b62a08931e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 17:03:55 -0500 Subject: [PATCH 119/218] fix repo url parsing --- modules/git/url/url.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/git/url/url.go b/modules/git/url/url.go index d137de8f5b..69259b9e70 100644 --- a/modules/git/url/url.go +++ b/modules/git/url/url.go @@ -132,13 +132,14 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er if len(fields) >= 3 { ret.GroupID, pathErr = strconv.ParseInt(fields[1], 10, 64) if pathErr != nil { - return pathErr + ret.RepoName = strings.TrimSuffix(fields[1], ".git") + ret.RemainingPath = "/" + fields[2] + return nil } ret.RepoName = strings.TrimSuffix(fields[2], ".git") - ret.RemainingPath = "/" + fields[3] - } else { - ret.RepoName = strings.TrimSuffix(fields[1], ".git") - ret.RemainingPath = "/" + fields[2] + if len(fields) >= 4 { + ret.RemainingPath = "/" + fields[3] + } } } return nil From 1e9bf82454178f6f0f06cf5b0574f3d9e274f42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 17:22:19 -0500 Subject: [PATCH 120/218] add missing repo meta for group unit tests --- .../org3/144/repo21.git/COMMIT_EDITMSG | 1 + .../org3/144/repo21.git/HEAD | 1 + .../org3/144/repo21.git/MERGE_RR | 0 .../org3/144/repo21.git/config | 6 ++++++ .../org3/144/repo21.git/description | 1 + .../org3/144/repo21.git/index | Bin 0 -> 209 bytes .../org3/144/repo21.git/info/exclude | 6 ++++++ .../org3/144/repo21.git/logs/HEAD | 1 + .../org3/144/repo21.git/logs/refs/heads/master | 1 + .../3d/6e03e974fc3b3cfc74a4af56130015bea97a08 | Bin 0 -> 345 bytes .../7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b | Bin 0 -> 87 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../ef/0493b275aa2080237f676d2ef6559246f56636 | Bin 0 -> 22 bytes .../org3/144/repo21.git/refs/heads/master | 1 + 14 files changed, 18 insertions(+) create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/COMMIT_EDITMSG create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/HEAD create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/MERGE_RR create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/config create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/description create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/index create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/info/exclude create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/logs/HEAD create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/logs/refs/heads/master create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 create mode 100644 tests/gitea-repositories-meta/org3/144/repo21.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org3/144/repo21.git/COMMIT_EDITMSG new file mode 100644 index 0000000000..b1b7161055 --- /dev/null +++ b/tests/gitea-repositories-meta/org3/144/repo21.git/COMMIT_EDITMSG @@ -0,0 +1 @@ +init diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/HEAD b/tests/gitea-repositories-meta/org3/144/repo21.git/HEAD new file mode 100644 index 0000000000..cb089cd89a --- /dev/null +++ b/tests/gitea-repositories-meta/org3/144/repo21.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/MERGE_RR b/tests/gitea-repositories-meta/org3/144/repo21.git/MERGE_RR new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/config b/tests/gitea-repositories-meta/org3/144/repo21.git/config new file mode 100644 index 0000000000..8ad0b1bad6 --- /dev/null +++ b/tests/gitea-repositories-meta/org3/144/repo21.git/config @@ -0,0 +1,6 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + ignorecase = true diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/description b/tests/gitea-repositories-meta/org3/144/repo21.git/description new file mode 100644 index 0000000000..498b267a8c --- /dev/null +++ b/tests/gitea-repositories-meta/org3/144/repo21.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/index b/tests/gitea-repositories-meta/org3/144/repo21.git/index new file mode 100644 index 0000000000000000000000000000000000000000..eac58b57f6425a14c06e461b8b88453b0d593b80 GIT binary patch literal 209 zcmZ?q402{*U|<5_Oy!PAT)aL4U|MC83s4LS8kfLWK$`tM%j8X^s}vfP>(g`fzJ*S5 z`)ZeMH=@ti=-gWT-LNAIr4A161n!V}bHD~W`&2{BbHx51N z37*KnSzJ<@mZn!yQNj=s 1763936413 -0500 commit (initial): init diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org3/144/repo21.git/logs/refs/heads/master new file mode 100644 index 0000000000..0367c0feaa --- /dev/null +++ b/tests/gitea-repositories-meta/org3/144/repo21.git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 3d6e03e974fc3b3cfc74a4af56130015bea97a08 ☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 1763936413 -0500 commit (initial): init diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 b/tests/gitea-repositories-meta/org3/144/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 new file mode 100644 index 0000000000000000000000000000000000000000..3d62224f64023f98d592aa2a7e804c895b16feb0 GIT binary patch literal 345 zcmV-f0jB1au7JL^Pa(9w&*$G(*9dB`lVrh-tc%#8}~m^p(hra~x|6 z6m7(^YT)qtc6fOQy5vBkMa~5r_Rru(1#jG}$)l3>D)=G}`wuwJ+ELLKOWqbo^r~(u zQI+k2UxKV_s;O!nS%p&xOA?BY!vz1winLB2vJ_6g)wNx31QT}xzUPhz4QBSyM}Q!^ z4s6oB>yxfD_og#P3-NkthXt2?+TSX^pPOsLxvmlt^df)kl~dC1&3eB+f`m+KGBFj) z44bnd&UeXbh~1G{tGa{fa4=Z~)s2^Gsxzlgbe3$1WjgwLI|y1~sf03uv(>G&8>`;H rs7Y(HyZ2ejS{9@J+$5_AVK6i>Ff%bxC`wIC$xYSEO<{P?GI>+!Duo8+`t)4AZ=sXi tzNVQ$6&071rlskXRFp70oBL??ri<5{y}LEnl}Ft;^rR Date: Sun, 23 Nov 2025 17:33:11 -0500 Subject: [PATCH 121/218] remove redundant return value from `fillPathParts` --- modules/git/url/url.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/git/url/url.go b/modules/git/url/url.go index 69259b9e70..861573ee87 100644 --- a/modules/git/url/url.go +++ b/modules/git/url/url.go @@ -123,7 +123,7 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er ret := &RepositoryURL{} ret.GitURL = parsed - fillPathParts := func(s string) error { + fillPathParts := func(s string) { s = strings.TrimPrefix(s, "/") fields := strings.SplitN(s, "/", 4) var pathErr error @@ -134,7 +134,7 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er if pathErr != nil { ret.RepoName = strings.TrimSuffix(fields[1], ".git") ret.RemainingPath = "/" + fields[2] - return nil + return } ret.RepoName = strings.TrimSuffix(fields[2], ".git") if len(fields) >= 4 { @@ -142,7 +142,7 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er } } } - return nil + return } switch parsed.URL.Scheme { @@ -150,9 +150,7 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er if !httplib.IsCurrentGiteaSiteURL(ctx, repoURL) { return ret, nil } - if err = fillPathParts(strings.TrimPrefix(parsed.URL.Path, setting.AppSubURL)); err != nil { - return nil, err - } + fillPathParts(strings.TrimPrefix(parsed.URL.Path, setting.AppSubURL)) case "ssh", "git+ssh": domainSSH := setting.SSH.Domain domainCur := httplib.GuessCurrentHostDomain(ctx) @@ -166,9 +164,7 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er // check whether URL domain is current domain from context domainMatches = domainMatches || (domainCur != "" && domainCur == urlDomain) if domainMatches { - if err = fillPathParts(parsed.URL.Path); err != nil { - return nil, err - } + fillPathParts(parsed.URL.Path) } } return ret, nil From 51c6bc8067f68a6fabd2227cc97bb4c221ecad12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 17:46:43 -0500 Subject: [PATCH 122/218] fix repo url parsing (again) --- modules/git/url/url.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/git/url/url.go b/modules/git/url/url.go index 861573ee87..2283bff5db 100644 --- a/modules/git/url/url.go +++ b/modules/git/url/url.go @@ -140,9 +140,10 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er if len(fields) >= 4 { ret.RemainingPath = "/" + fields[3] } + } else { + ret.RepoName = strings.TrimSuffix(fields[1], ".git") } } - return } switch parsed.URL.Scheme { From d1b5c9f2d0244e4a3abbd46a0766ae841b018d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 18:08:36 -0500 Subject: [PATCH 123/218] fix moving repos to a different subgroup --- services/group/group.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/group/group.go b/services/group/group.go index 1ef3362061..d09077cbbf 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -7,6 +7,8 @@ import ( "context" "errors" "fmt" + "os" + "path/filepath" "strings" "code.gitea.io/gitea/models/db" @@ -16,6 +18,7 @@ import ( 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" ) @@ -137,6 +140,15 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model. 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 } From 4302f6f423653b1b7f957e7f26c178283d352a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 18:20:07 -0500 Subject: [PATCH 124/218] fix transfers of repos in subgroups --- services/repository/transfer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/repository/transfer.go b/services/repository/transfer.go index 76cae7ded3..c36fcb1f4b 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -304,7 +304,7 @@ 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.GroupID), repo_model.RelativePath(newOwner.Name, repo.Name, repo.GroupID) + 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) } @@ -316,7 +316,7 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName 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, repo.GroupID))); 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 From 7d34f95bc13aef9762c491b1ea27ee8517eacaad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 18:23:01 -0500 Subject: [PATCH 125/218] fix more regex patterns --- modules/markup/html.go | 4 ++-- modules/references/references.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index aae3e4d60f..5302837e79 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -85,10 +85,10 @@ var globalVars = sync.OnceValue(func() *globalVarsType { 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_.-]+/)?[\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/]+/)?([^\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: " 3 { + if len(parts) > 4 { return nil } - if len(parts) == 3 { - owner, rawGroup, name = parts[0], parts[1], parts[2] + if len(parts) == 4 { + owner, rawGroup, name = parts[0], parts[2], parts[3] } else { owner, name = parts[0], parts[1] } From f95b25b72bd5b11d37199bad4f708798f827486d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 20:18:04 -0500 Subject: [PATCH 126/218] fix failing test in issue_xref_test.go --- models/issues/issue_xref_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/issues/issue_xref_test.go b/models/issues/issue_xref_test.go index 766c70a14b..ba9db3887a 100644 --- a/models/issues/issue_xref_test.go +++ b/models/issues/issue_xref_test.go @@ -54,7 +54,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { itarget = testCreateIssue(t, 3, 3, "title4", "content4", false) // Cross-reference to issue #4 by admin - content = fmt.Sprintf("content5, mentions org3/129/repo3#%d", itarget.Index) + content = fmt.Sprintf("content5, mentions org3/group/129/repo3#%d", itarget.Index) i = testCreateIssue(t, 2, 1, "title5", content, false) ref = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}) assert.Equal(t, issues_model.CommentTypeIssueRef, ref.Type) @@ -63,7 +63,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { assert.Equal(t, references.XRefActionNone, ref.RefAction) // Cross-reference to issue #4 with no permission - content = fmt.Sprintf("content6, mentions org3/repo3#%d", itarget.Index) + content = fmt.Sprintf("content6, mentions org3/group/129/repo3#%d", itarget.Index) i = testCreateIssue(t, 4, 5, "title6", content, false) unittest.AssertNotExistsBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}) } From a0e980f6f4320bc4c2df9f9ae17da8f0a6b0b1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 21:01:39 -0500 Subject: [PATCH 127/218] fix integration test api urls --- tests/integration/actions_job_test.go | 13 +-- tests/integration/actions_log_test.go | 7 +- tests/integration/actions_trigger_test.go | 2 +- tests/integration/api_branch_test.go | 7 +- .../api_comment_attachment_test.go | 14 +-- tests/integration/api_comment_test.go | 20 ++-- .../integration/api_issue_attachment_test.go | 12 +-- tests/integration/api_issue_config_test.go | 2 +- tests/integration/api_issue_label_test.go | 6 +- tests/integration/api_issue_lock_test.go | 4 +- tests/integration/api_issue_milestone_test.go | 12 +-- tests/integration/api_issue_pin_test.go | 32 +++---- tests/integration/api_issue_reaction_test.go | 2 +- .../api_issue_subscription_test.go | 6 +- tests/integration/api_issue_test.go | 12 +-- tests/integration/api_keys_test.go | 6 +- tests/integration/api_notification_test.go | 6 +- tests/integration/api_packages_helm_test.go | 2 +- tests/integration/api_pull_commits_test.go | 2 +- tests/integration/api_pull_review_test.go | 76 +++++++-------- tests/integration/api_pull_test.go | 36 ++++---- .../api_releases_attachment_test.go | 2 +- tests/integration/api_releases_test.go | 24 ++--- tests/integration/api_repo_archive_test.go | 14 +-- tests/integration/api_repo_avatar_test.go | 8 +- .../integration/api_repo_collaborator_test.go | 18 ++-- .../integration/api_repo_file_create_test.go | 20 ++-- .../integration/api_repo_file_delete_test.go | 20 ++-- .../integration/api_repo_file_update_test.go | 22 ++--- .../integration/api_repo_files_change_test.go | 16 ++-- tests/integration/api_repo_files_get_test.go | 6 +- .../api_repo_get_contents_list_test.go | 18 ++-- .../integration/api_repo_get_contents_test.go | 20 ++-- tests/integration/api_repo_git_blobs_test.go | 16 ++-- tests/integration/api_repo_git_hook_test.go | 20 ++-- tests/integration/api_repo_git_tags_test.go | 8 +- tests/integration/api_repo_git_trees_test.go | 12 +-- tests/integration/api_repo_hook_test.go | 2 +- tests/integration/api_repo_test.go | 92 +++++++++---------- tests/integration/api_repo_topic_test.go | 18 ++-- tests/integration/editor_test.go | 7 +- tests/integration/eventsource_test.go | 2 +- tests/integration/migrate_test.go | 2 +- tests/integration/mirror_push_test.go | 2 +- tests/integration/privateactivity_test.go | 2 +- tests/integration/repo_generate_test.go | 2 +- tests/integration/repo_merge_upstream_test.go | 2 +- tests/integration/utils.go | 18 ++++ 48 files changed, 337 insertions(+), 335 deletions(-) create mode 100644 tests/integration/utils.go diff --git a/tests/integration/actions_job_test.go b/tests/integration/actions_job_test.go index c746167cec..22b4636525 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -156,11 +156,8 @@ jobs: } // check result - var groupSegment string - if apiRepo.GroupID > 0 { - groupSegment = fmt.Sprintf("%d/", apiRepo.GroupID) - } - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/tasks", user2.Name, groupSegment, apiRepo.Name)). + + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/tasks", user2.Name, maybeGroupSegment(apiRepo.GroupID), apiRepo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) actionTaskRespAfter := DecodeJSON(t, resp, &api.ActionTaskResponse{}) @@ -738,11 +735,7 @@ func getWorkflowCreateFileOptions(u *user_model.User, branch, msg, content strin } func createWorkflowFile(t *testing.T, authToken, ownerName, repoName string, groupID int64, treePath string, opts *api.CreateFileOptions) *api.FileResponse { - var groupSegment string - if groupID > 0 { - groupSegment = fmt.Sprintf("%d/", groupID) - } - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", ownerName, groupSegment, repoName, treePath), opts). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", ownerName, maybeGroupSegment(groupID), repoName, treePath), opts). AddTokenAuth(authToken) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index 78c30ebf41..2d063bae27 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -199,11 +199,8 @@ jobs: } // download task logs from API and check content - var groupSegment string - if repo.GroupID > 0 { - groupSegment = fmt.Sprintf("%d/", repo.GroupID) - } - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/jobs/%d/logs", user2.Name, groupSegment, repo.Name, job.ID)). + + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/jobs/%d/logs", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name, job.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) logTextLines = strings.Split(strings.TrimSpace(resp.Body.String()), "\n") diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 09a36eb7e9..a73916f37a 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1563,7 +1563,7 @@ jobs: createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts1) // user4 forks the repo - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/forks", baseRepo.OwnerName, baseRepo.GroupID, baseRepo.Name), + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/forks", baseRepo.OwnerName, maybeGroupSegment(baseRepo.GroupID), baseRepo.Name), &api.CreateForkOption{ Name: new("close-pull-request-with-path-fork"), }).AddTokenAuth(user4Token) diff --git a/tests/integration/api_branch_test.go b/tests/integration/api_branch_test.go index ad555c6c55..e023524438 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -169,11 +169,8 @@ func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { func testAPICreateBranch(t testing.TB, session *TestSession, groupID int64, user, repo, oldBranch, newBranch string, status int) bool { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - var groupSegment string - if groupID > 0 { - groupSegment = fmt.Sprintf("%d/", groupID) - } - req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+groupSegment+repo+"/branches", &api.CreateBranchRepoOption{ + + req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+maybeGroupSegment(groupID)+repo+"/branches", &api.CreateBranchRepoOption{ BranchName: newBranch, OldBranchName: oldBranch, }).AddTokenAuth(token) diff --git a/tests/integration/api_comment_attachment_test.go b/tests/integration/api_comment_attachment_test.go index 9ccc572ddf..b70808cd0a 100644 --- a/tests/integration/api_comment_attachment_test.go +++ b/tests/integration/api_comment_attachment_test.go @@ -36,17 +36,17 @@ func TestAPIGetCommentAttachment(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) }) session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusOK) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) @@ -70,7 +70,7 @@ func TestAPIListCommentAttachments(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) @@ -103,7 +103,7 @@ func TestAPICreateCommentAttachment(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, comment.ID), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID), body). AddTokenAuth(token). SetHeader("Content-Type", writer.FormDataContentType()) resp := session.MakeRequest(t, req, http.StatusCreated) @@ -133,7 +133,7 @@ func TestAPICreateCommentAttachmentWithUnallowedFile(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, comment.ID), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID), body). AddTokenAuth(token). SetHeader("Content-Type", writer.FormDataContentType()) @@ -196,7 +196,7 @@ func TestAPIDeleteCommentAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID, attachment.ID)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusNoContent) diff --git a/tests/integration/api_comment_test.go b/tests/integration/api_comment_test.go index d7120691f9..b6b302c4e6 100644 --- a/tests/integration/api_comment_test.go +++ b/tests/integration/api_comment_test.go @@ -30,7 +30,7 @@ func TestAPIListRepoComments(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments", repoOwner.Name, repo.GroupID, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) req := NewRequest(t, "GET", link.String()) resp := MakeRequest(t, req, http.StatusOK) @@ -75,7 +75,7 @@ func TestAPIListIssueComments(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/%d/comments", repoOwner.Name, repo.GroupID, repo.Name, issue.Index). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/%d/comments", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -112,7 +112,7 @@ func TestAPICreateComment(t *testing.T) { issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/comments", repo.OwnerName, repo.GroupID, repo.Name, issue.Index), map[string]string{ + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/comments", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), map[string]string{ "body": commentBody, }).AddTokenAuth(getUserToken(t, user34.Name, auth_model.AccessTokenScopeWriteRepository)) MakeRequest(t, req, http.StatusForbidden) @@ -125,7 +125,7 @@ func TestAPICreateComment(t *testing.T) { issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 13}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/comments", repo.OwnerName, repo.GroupID, repo.Name, issue.Index), map[string]string{ + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/comments", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), map[string]string{ "body": commentBody, }).AddTokenAuth(getUserToken(t, user34.Name, auth_model.AccessTokenScopeWriteRepository)) MakeRequest(t, req, http.StatusForbidden) @@ -141,9 +141,9 @@ func TestAPIGetComment(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID) MakeRequest(t, req, http.StatusOK) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -179,7 +179,7 @@ func TestAPIGetSystemUserComment(t *testing.T) { }) assert.NoError(t, err) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID) resp := MakeRequest(t, req, http.StatusOK) apiComment := DecodeJSON(t, resp, &api.Comment{}) @@ -245,13 +245,13 @@ func TestAPIDeleteComment(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) }) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/issues/comments/%d", repoOwner.Name, repo.GroupID, repo.Name, comment.ID). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -267,7 +267,7 @@ func TestAPIListIssueTimeline(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) // make request - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/issues/%d/timeline", repoOwner.Name, repo.GroupID, repo.Name, issue.Index) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/%d/timeline", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index) resp := MakeRequest(t, req, http.StatusOK) // check if lens of list returned by API and diff --git a/tests/integration/api_issue_attachment_test.go b/tests/integration/api_issue_attachment_test.go index d0830f94a4..2f79d70af7 100644 --- a/tests/integration/api_issue_attachment_test.go +++ b/tests/integration/api_issue_attachment_test.go @@ -32,7 +32,7 @@ func TestAPIGetIssueAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, issue.Index, attachment.ID)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index, attachment.ID)). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) apiAttachment := DecodeJSON(t, resp, &api.Attachment{}) @@ -51,7 +51,7 @@ func TestAPIListIssueAttachments(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, issue.Index)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) apiAttachment := DecodeJSON(t, resp, []api.Attachment{}) @@ -80,7 +80,7 @@ func TestAPICreateIssueAttachment(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, issue.Index), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), body). AddTokenAuth(token) req.Header.Add("Content-Type", writer.FormDataContentType()) resp := session.MakeRequest(t, req, http.StatusCreated) @@ -110,7 +110,7 @@ func TestAPICreateIssueAttachmentWithUnallowedFile(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets", repoOwner.Name, repo.GroupID, repo.Name, issue.Index), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), body). AddTokenAuth(token) req.Header.Add("Content-Type", writer.FormDataContentType()) @@ -152,7 +152,7 @@ func TestAPIEditIssueAttachmentWithUnallowedFile(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) filename := "file.bad" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, issue.Index, attachment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index, attachment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "name": filename, }).AddTokenAuth(token) @@ -171,7 +171,7 @@ func TestAPIDeleteIssueAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, issue.Index, attachment.ID)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index, attachment.ID)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusNoContent) diff --git a/tests/integration/api_issue_config_test.go b/tests/integration/api_issue_config_test.go index 60d1c4f10e..79606df66a 100644 --- a/tests/integration/api_issue_config_test.go +++ b/tests/integration/api_issue_config_test.go @@ -149,7 +149,7 @@ func TestAPIRepoValidateIssueConfig(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 49}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issue_config/validate", owner.Name, repo.GroupID, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issue_config/validate", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) t.Run("Valid", func(t *testing.T) { req := NewRequest(t, "GET", urlStr) diff --git a/tests/integration/api_issue_label_test.go b/tests/integration/api_issue_label_test.go index cdfc05e74a..38ecffe882 100644 --- a/tests/integration/api_issue_label_test.go +++ b/tests/integration/api_issue_label_test.go @@ -26,7 +26,7 @@ func TestAPIModifyLabels(t *testing.T) { owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/labels", owner.Name, repo.GroupID, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/labels", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) // CreateLabel req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateLabelOption{ @@ -60,7 +60,7 @@ func TestAPIModifyLabels(t *testing.T) { assert.Len(t, apiLabels, 2) // GetLabel - singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/labels/%d", owner.Name, repo.GroupID, repo.Name, dbLabel.ID) + singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/labels/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, dbLabel.ID) req = NewRequest(t, "GET", singleURLStr). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -124,7 +124,7 @@ func TestAPIAddIssueLabelsWithLabelNames(t *testing.T) { token := getTokenForLoggedInUser(t, user1Session, auth_model.AccessTokenScopeWriteIssue) // add the org label and the repo label to the issue - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/labels", owner.Name, repo.GroupID, repo.Name, issue.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/labels", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index) req := NewRequestWithJSON(t, "POST", urlStr, &api.IssueLabelsOption{ Labels: []any{repoLabel.Name, orgLabel.Name}, }).AddTokenAuth(token) diff --git a/tests/integration/api_issue_lock_test.go b/tests/integration/api_issue_lock_test.go index 6f8ddbf7af..724b73d2f3 100644 --- a/tests/integration/api_issue_lock_test.go +++ b/tests/integration/api_issue_lock_test.go @@ -27,7 +27,7 @@ func TestAPILockIssue(t *testing.T) { assert.False(t, issueBefore.IsLocked) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/lock", owner.Name, repo.GroupID, repo.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/lock", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issueBefore.Index) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) @@ -50,7 +50,7 @@ func TestAPILockIssue(t *testing.T) { issueBefore := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/lock", owner.Name, repo.GroupID, repo.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/lock", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issueBefore.Index) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) diff --git a/tests/integration/api_issue_milestone_test.go b/tests/integration/api_issue_milestone_test.go index 4836e8215e..a20970db82 100644 --- a/tests/integration/api_issue_milestone_test.go +++ b/tests/integration/api_issue_milestone_test.go @@ -34,7 +34,7 @@ func TestAPIIssuesMilestone(t *testing.T) { // update values of issue milestoneState := "closed" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones/%d", owner.Name, repo.GroupID, repo.Name, milestone.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, milestone.ID) req := NewRequestWithJSON(t, "PATCH", urlStr, structs.EditMilestoneOption{ State: &milestoneState, }).AddTokenAuth(token) @@ -48,7 +48,7 @@ func TestAPIIssuesMilestone(t *testing.T) { apiMilestone2 := DecodeJSON(t, resp, &structs.Milestone{}) assert.EqualValues(t, "closed", apiMilestone2.State) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones", owner.Name, repo.GroupID, repo.Name), structs.CreateMilestoneOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name), structs.CreateMilestoneOption{ Title: "wow", Description: "closed one", State: "closed", @@ -59,27 +59,27 @@ func TestAPIIssuesMilestone(t *testing.T) { assert.Equal(t, structs.StateClosed, apiMilestone.State) assert.Nil(t, apiMilestone.Deadline) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones?state=%s", owner.Name, repo.GroupID, repo.Name, "all")). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones?state=%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, "all")). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestones := DecodeJSON(t, resp, []structs.Milestone{}) assert.Len(t, apiMilestones, 4) assert.Nil(t, apiMilestones[0].Deadline) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones/%s", owner.Name, repo.GroupID, repo.Name, apiMilestones[2].Title)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, apiMilestones[2].Title)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestone = DecodeJSON(t, resp, &structs.Milestone{}) assert.Equal(t, apiMilestones[2], *apiMilestone) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones?state=%s&name=%s", owner.Name, repo.GroupID, repo.Name, "all", "milestone2")). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones?state=%s&name=%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, "all", "milestone2")). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestones = DecodeJSON(t, resp, []structs.Milestone{}) assert.Len(t, apiMilestones, 1) assert.Equal(t, int64(2), apiMilestones[0].ID) - req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/milestones/%d", owner.Name, repo.GroupID, repo.Name, apiMilestone.ID)). + req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, apiMilestone.ID)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } diff --git a/tests/integration/api_issue_pin_test.go b/tests/integration/api_issue_pin_test.go index 987dac9130..f1f5bab269 100644 --- a/tests/integration/api_issue_pin_test.go +++ b/tests/integration/api_issue_pin_test.go @@ -32,12 +32,12 @@ func TestAPIPinIssue(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) @@ -56,23 +56,23 @@ func TestAPIUnpinIssue(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) // Unpin the Issue - req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). + req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is no longer pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI = DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 0, issueAPI.PinOrder) @@ -92,34 +92,34 @@ func TestAPIMoveIssuePin(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the first Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the first Issue is pinned at position 1 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) // Pin the second Issue - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue2.Index)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue2.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Move the first Issue to position 2 - req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin/2", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). + req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin/2", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the first Issue is pinned at position 2 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI3 := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 2, issueAPI3.PinOrder) // Check if the second Issue is pinned at position 1 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", repo.OwnerName, repo.GroupID, repo.Name, issue2.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue2.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI4 := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI4.PinOrder) @@ -138,12 +138,12 @@ func TestAPIListPinnedIssues(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/pin", repo.OwnerName, repo.GroupID, repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is in the List - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/pinned", repo.OwnerName, repo.GroupID, repo.Name)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/pinned", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, req, http.StatusOK) issueList := DecodeJSON(t, resp, []api.Issue{}) @@ -158,7 +158,7 @@ func TestAPIListPinnedPullrequests(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/pinned", repo.OwnerName, repo.GroupID, repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/pinned", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, req, http.StatusOK) prList := DecodeJSON(t, resp, []api.PullRequest{}) @@ -171,7 +171,7 @@ func TestAPINewPinAllowed(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/new_pin_allowed", owner.Name, repo.GroupID, repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/new_pin_allowed", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, req, http.StatusOK) newPinsAllowed := DecodeJSON(t, resp, &api.NewIssuePinsAllowed{}) diff --git a/tests/integration/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go index b4dc3b858b..1ce1ef083c 100644 --- a/tests/integration/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -119,7 +119,7 @@ func TestAPICommentReactions(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/comments/%d/reactions", repoOwner.Name, repo.GroupID, repo.Name, comment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/reactions", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID) req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{ Reaction: "+1", }).AddTokenAuth(token) diff --git a/tests/integration/api_issue_subscription_test.go b/tests/integration/api_issue_subscription_test.go index 90085d8961..0980a80643 100644 --- a/tests/integration/api_issue_subscription_test.go +++ b/tests/integration/api_issue_subscription_test.go @@ -36,7 +36,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription := func(issue *issues_model.Issue, isWatching bool) { issueRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/subscriptions/check", issueRepo.OwnerName, issueRepo.GroupID, issueRepo.Name, issue.Index)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/subscriptions/check", issueRepo.OwnerName, maybeGroupSegment(issueRepo.GroupID), issueRepo.Name, issue.Index)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) wi := new(api.WatchInfo) @@ -56,7 +56,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription(issue5, false) issue1Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue1.RepoID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/subscriptions/%s", issue1Repo.OwnerName, issue1Repo.GroupID, issue1Repo.Name, issue1.Index, owner.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/subscriptions/%s", issue1Repo.OwnerName, maybeGroupSegment(issue1Repo.GroupID), issue1Repo.Name, issue1.Index, owner.Name) req := NewRequest(t, "DELETE", urlStr). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) @@ -68,7 +68,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription(issue1, false) issue5Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue5.RepoID}) - urlStr = fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d/subscriptions/%s", issue5Repo.OwnerName, issue5Repo.GroupID, issue5Repo.Name, issue5.Index, owner.Name) + urlStr = fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/subscriptions/%s", issue5Repo.OwnerName, maybeGroupSegment(issue5Repo.GroupID), issue5Repo.Name, issue5.Index, owner.Name) req = NewRequest(t, "PUT", urlStr). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go index f4d77b7eda..2c9a6c2432 100644 --- a/tests/integration/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -44,7 +44,7 @@ func testAPIListIssues(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner.Name, repo.GroupID, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) link.RawQuery = url.Values{"token": {token}, "state": {"all"}}.Encode() resp := MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) @@ -91,7 +91,7 @@ func testAPIListIssuesPublicOnly(t *testing.T) { session := loginUser(t, owner1.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner1.Name, repo1.GroupID, repo1.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner1.Name, maybeGroupSegment(repo1.GroupID), repo1.Name)) link.RawQuery = url.Values{"state": {"all"}}.Encode() req := NewRequest(t, "GET", link.String()).AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -101,7 +101,7 @@ func testAPIListIssuesPublicOnly(t *testing.T) { session = loginUser(t, owner2.Name) token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner2.Name, repo2.GroupID, repo2.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name)) link.RawQuery = url.Values{"state": {"all"}}.Encode() req = NewRequest(t, "GET", link.String()).AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -119,7 +119,7 @@ func testAPICreateIssue(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner.Name, repoBefore.GroupID, repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateIssueOption{ Body: body, Title: title, @@ -167,7 +167,7 @@ func testAPICreateIssueParallel(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues", owner.Name, repoBefore.GroupID, repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name) var wg sync.WaitGroup for i := range 10 { @@ -218,7 +218,7 @@ func testAPIEditIssue(t *testing.T) { body := "new content!" title := "new title from api set" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues/%d", owner.Name, repoBefore.GroupID, repoBefore.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name, issueBefore.Index) req := NewRequestWithJSON(t, "PATCH", urlStr, api.EditIssueOption{ State: &issueState, RemoveDeadline: &removeDeadline, diff --git a/tests/integration/api_keys_test.go b/tests/integration/api_keys_test.go index 9e94d71817..c6e42716bc 100644 --- a/tests/integration/api_keys_test.go +++ b/tests/integration/api_keys_test.go @@ -55,7 +55,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - keysURL := fmt.Sprintf("/api/v1/repos/%s/%d/%s/keys", repoOwner.Name, repo.GroupID, repo.Name) + keysURL := fmt.Sprintf("/api/v1/repos/%s/%s%s/keys", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name) rawKeyBody := api.CreateKeyOption{ Title: "read-only", Key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", @@ -75,7 +75,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { // Using the ID of a key that does not belong to the repository must fail { - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/keys/%d", repoOwner.Name, repo.GroupID, repo.Name, newDeployKey.ID)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/keys/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, newDeployKey.ID)). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -94,7 +94,7 @@ func TestCreateReadWriteDeployKey(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - keysURL := fmt.Sprintf("/api/v1/repos/%s/%d/%s/keys", repoOwner.Name, repo.GroupID, repo.Name) + keysURL := fmt.Sprintf("/api/v1/repos/%s/%s%s/keys", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name) rawKeyBody := api.CreateKeyOption{ Title: "read-write", Key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", diff --git a/tests/integration/api_notification_test.go b/tests/integration/api_notification_test.go index d4655b8b0d..2dfac39402 100644 --- a/tests/integration/api_notification_test.go +++ b/tests/integration/api_notification_test.go @@ -62,7 +62,7 @@ func TestAPINotification(t *testing.T) { assert.False(t, apiNL[2].Pinned) // -- GET /repos/{owner}/{repo}/notifications -- - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?status-types=unread", user2.Name, repo1.GroupID, repo1.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?status-types=unread", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiNL = DecodeJSON(t, resp, []api.NotificationThread{}) @@ -71,7 +71,7 @@ func TestAPINotification(t *testing.T) { assert.EqualValues(t, 4, apiNL[0].ID) // -- GET /repos/{owner}/{repo}/notifications -- multiple status-types - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?status-types=unread&status-types=pinned", user2.Name, repo1.GroupID, repo1.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?status-types=unread&status-types=pinned", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiNL = DecodeJSON(t, resp, []api.NotificationThread{}) @@ -125,7 +125,7 @@ func TestAPINotification(t *testing.T) { assert.Len(t, apiNL, 2) lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 <- only Notification 4 is in this filter ... - req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?last_read_at=%s", user2.Name, repo1.GroupID, repo1.Name, lastReadAt)). + req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?last_read_at=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, lastReadAt)). AddTokenAuth(token) MakeRequest(t, req, http.StatusResetContent) diff --git a/tests/integration/api_packages_helm_test.go b/tests/integration/api_packages_helm_test.go index 02df4ae906..c86bf267b1 100644 --- a/tests/integration/api_packages_helm_test.go +++ b/tests/integration/api_packages_helm_test.go @@ -159,7 +159,7 @@ dependencies: assert.Len(t, cv.Maintainers, 1) assert.Equal(t, packageAuthor, cv.Maintainers[0].Name) assert.Len(t, cv.Dependencies, 1) - assert.ElementsMatch(t, []string{fmt.Sprintf("%s%s/%s", setting.AppURL, url[1:], filename)}, cv.URLs) + assert.ElementsMatch(t, []string{fmt.Sprintf("%s/%s%s", setting.AppURL, url[1:], filename)}, cv.URLs) assert.Equal(t, url, result.ServerInfo.ContextPath) }) diff --git a/tests/integration/api_pull_commits_test.go b/tests/integration/api_pull_commits_test.go index aad51da1da..c064250dfd 100644 --- a/tests/integration/api_pull_commits_test.go +++ b/tests/integration/api_pull_commits_test.go @@ -23,7 +23,7 @@ func TestAPIPullCommits(t *testing.T) { assert.NoError(t, pr.LoadIssue(t.Context())) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pr.HeadRepoID}) - req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/commits", repo.OwnerName, repo.GroupID, repo.Name, pr.Index) + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/commits", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pr.Index) resp := MakeRequest(t, req, http.StatusOK) commits := DecodeJSON(t, resp, []*api.Commit{}) diff --git a/tests/integration/api_pull_review_test.go b/tests/integration/api_pull_review_test.go index c6f6f53c82..4a1b4f5fc2 100644 --- a/tests/integration/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -41,7 +41,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test ListPullReviews session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index). + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -65,13 +65,13 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.True(t, reviews[5].Official) // test GetPullReview - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, reviews[3].ID). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, reviews[3].ID). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review := DecodeJSON(t, resp, &api.PullReview{}) assert.Equal(t, reviews[3], review) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, reviews[5].ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, reviews[5].ID). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review = DecodeJSON(t, resp, &api.PullReview{}) @@ -79,7 +79,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test GetPullReviewComments comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: 7}) - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d/comments", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, 10). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d/comments", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, 10). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) reviewComments := DecodeJSON(t, resp, []*api.PullReviewComment{}) @@ -91,7 +91,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, comment.HTMLURL(t.Context()), reviewComments[0].HTMLURL) // test CreatePullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "body1", // Event: "" # will result in PENDING Comments: []api.CreatePullReviewComment{ @@ -120,7 +120,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, 3, review.CodeCommentsCount) // test SubmitPullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID), &api.SubmitPullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID), &api.SubmitPullReviewOptions{ Event: "APPROVED", Body: "just two nits", }).AddTokenAuth(token) @@ -131,7 +131,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, 3, review.CodeCommentsCount) // test dismiss review - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d/dismissals", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID), &api.DismissPullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d/dismissals", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID), &api.DismissPullReviewOptions{ Message: "test", }).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -140,7 +140,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.True(t, review.Dismissed) // test dismiss review - req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d/undismissals", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID)). + req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d/undismissals", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review = DecodeJSON(t, resp, &api.PullReview{}) @@ -148,7 +148,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.False(t, review.Dismissed) // test DeletePullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "just a comment", Event: "COMMENT", }).AddTokenAuth(token) @@ -156,12 +156,12 @@ func testAPIPullReviewGeneral(t *testing.T) { review = DecodeJSON(t, resp, &api.PullReview{}) assert.EqualValues(t, "COMMENT", review.State) assert.Equal(t, 0, review.CodeCommentsCount) - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index, review.ID). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // test CreatePullReview Comment without body but with comments - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ // Body: "", Event: "COMMENT", Comments: []api.CreatePullReviewComment{ @@ -188,7 +188,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test CreatePullReview Comment with body but without comments commentBody := "This is a body of the comment." - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: commentBody, Event: "COMMENT", Comments: []api.CreatePullReviewComment{}, @@ -202,7 +202,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.False(t, commentReview.Dismissed) // test CreatePullReview Comment without body and no comments - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "", Event: "COMMENT", Comments: []api.CreatePullReviewComment{}, @@ -218,7 +218,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.NoError(t, pullIssue12.LoadAttributes(t.Context())) repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue12.RepoID}) - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) reviews = DecodeJSON(t, resp, []*api.PullReview{}) @@ -246,19 +246,19 @@ func TestAPIPullReviewRequest(t *testing.T) { // Test add Review Request session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com", "user8"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // poster of pr can't be reviewer - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user1"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) // test user not exist - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"testOther"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) @@ -267,18 +267,18 @@ func TestAPIPullReviewRequest(t *testing.T) { session2 := loginUser(t, "user4") token2 := getTokenForLoggedInUser(t, session2, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4"}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // doer is not admin - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -289,12 +289,12 @@ func TestAPIPullReviewRequest(t *testing.T) { pull21Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue21.RepoID}) // repo60 user38Session := loginUser(t, "user38") user38Token := getTokenForLoggedInUser(t, user38Session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com"}, }).AddTokenAuth(user38Token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com"}, }).AddTokenAuth(user38Token) MakeRequest(t, req, http.StatusNoContent) @@ -302,12 +302,12 @@ func TestAPIPullReviewRequest(t *testing.T) { // the poster of the PR can add/remove a review request user39Session := loginUser(t, "user39") user39Token := getTokenForLoggedInUser(t, user39Session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(user39Token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.GroupID, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(user39Token) MakeRequest(t, req, http.StatusNoContent) @@ -316,12 +316,12 @@ func TestAPIPullReviewRequest(t *testing.T) { pullIssue22 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 22}) assert.NoError(t, pullIssue22.LoadAttributes(t.Context())) pull22Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue22.RepoID}) // repo61 - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.GroupID, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, maybeGroupSegment(pull22Repo.GroupID), pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user38"}, }).AddTokenAuth(user39Token) // user39 is from a team with read permission on pull requests unit MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.GroupID, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, maybeGroupSegment(pull22Repo.GroupID), pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user38"}, }).AddTokenAuth(user39Token) // user39 is from a team with read permission on pull requests unit MakeRequest(t, req, http.StatusNoContent) @@ -332,35 +332,35 @@ func TestAPIPullReviewRequest(t *testing.T) { repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue12.RepoID}) // Test add Team Review Request - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"team1", "owners"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // Test add Team Review Request to not allowned - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"test_team"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) // Test add Team Review Request to not exist - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"not_exist_team"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) // Test Remove team Review Request - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"team1"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // empty request test - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.GroupID, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } @@ -453,7 +453,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { token8 := getTokenForLoggedInUser(t, session8, auth_model.AccessTokenScopeWriteRepository) // user2 request user8 - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -463,7 +463,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 0, 1, 1, false) // user2 request user8 again, it is expected to be ignored - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -473,7 +473,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 0, 1, 1, false) // user8 reviews it as accept - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "APPROVED", Body: "lgtm", }).AddTokenAuth(token8) @@ -489,7 +489,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { assert.NoError(t, err) // user2 request user8 again - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -509,7 +509,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 1, 0, 1, false) // add a new valid approval - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "APPROVED", Body: "lgtm", }).AddTokenAuth(token8) @@ -520,7 +520,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 1, 0, 2, true) // now add a change request witch should dismiss the approval - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/reviews", repo.OwnerName, repo.GroupID, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "REQUEST_CHANGES", Body: "please change XYZ", }).AddTokenAuth(token8) diff --git a/tests/integration/api_pull_test.go b/tests/integration/api_pull_test.go index 180154ba63..924730a5db 100644 --- a/tests/integration/api_pull_test.go +++ b/tests/integration/api_pull_test.go @@ -43,7 +43,7 @@ func TestAPIViewPulls(t *testing.T) { ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls?state=all", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls?state=all", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(ctx.Token) resp := ctx.Session.MakeRequest(t, req, http.StatusOK) @@ -151,7 +151,7 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/master/branch2", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls/master/branch2", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(ctx.Token) resp := ctx.Session.MakeRequest(t, req, http.StatusOK) @@ -160,7 +160,7 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { assert.EqualValues(t, 3, pull.Index) assert.EqualValues(t, 2, pull.ID) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/pulls/master/branch-not-exist", owner.Name, repo.GroupID, repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls/master/branch-not-exist", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusNotFound) } @@ -181,7 +181,7 @@ func TestAPIMergePullWIP(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d/merge", owner.Name, repo.GroupID, repo.Name, pr.Index), &forms.MergePullRequestForm{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/merge", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, pr.Index), &forms.MergePullRequestForm{ MergeMessageField: pr.Issue.Title, Do: string(repo_model.MergeStyleMerge), }).AddTokenAuth(token) @@ -271,7 +271,7 @@ func TestAPICreatePullSuccess(t *testing.T) { session := loginUser(t, owner11.Name) prTitle := "test pull request title " + time.Now().String() token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &api.CreatePullRequestOption{ Head: owner11.Name + ":master", Base: "master", Title: prTitle, @@ -305,7 +305,7 @@ func TestAPICreatePullBasePermission(t *testing.T) { AllowMaintainerEdit: new(false), } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to base repo @@ -313,7 +313,7 @@ func TestAPICreatePullBasePermission(t *testing.T) { t.Run("AddUser4AsCollaborator", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) // create again - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // Also test that AllowMaintainerEdit is set to false, the default "true" case is covered by TestAPICreatePullSuccess @@ -338,18 +338,18 @@ func TestAPICreatePullHeadPermission(t *testing.T) { Base: "master", Title: "create a failure pr", } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with read permission ctx := NewAPITestContext(t, repo11.OwnerName, repo11.Name, repo11.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithRead", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with write permission t.Run("AddUser4AsCollaboratorWithWrite", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeWrite)) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) } @@ -361,7 +361,7 @@ func TestAPICreatePullSameRepoSuccess(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner.Name, repo.GroupID, repo.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name), &api.CreatePullRequestOption{ Head: owner.Name + ":pr-to-update", Base: "master", Title: "successfully create a PR between branches of the same repository", @@ -392,7 +392,7 @@ func TestAPICreatePullWithFieldsSuccess(t *testing.T) { Labels: []int64{5}, } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), opts). + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), opts). AddTokenAuth(token) res := MakeRequest(t, req, http.StatusCreated) @@ -425,7 +425,7 @@ func TestAPICreatePullWithFieldsFailure(t *testing.T) { Base: "master", } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), opts). + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) opts.Title = "is required" @@ -451,7 +451,7 @@ func TestAPIEditPull(t *testing.T) { session := loginUser(t, owner10.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) title := "create a success pr" - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls", owner10.Name, repo10.GroupID, repo10.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &api.CreatePullRequestOption{ Head: "develop", Base: "master", Title: title, @@ -462,7 +462,7 @@ func TestAPIEditPull(t *testing.T) { newTitle := "edit a this pr" newBody := "edited body" - req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d", owner10.Name, repo10.GroupID, repo10.Name, apiPull.Index), &api.EditPullRequestOption{ + req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name, apiPull.Index), &api.EditPullRequestOption{ Base: "feature/1", Title: newTitle, Body: &newBody, @@ -478,7 +478,7 @@ func TestAPIEditPull(t *testing.T) { unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: pull.Issue.ID, OldTitle: title, NewTitle: newTitle}) unittest.AssertExistsAndLoadBean(t, &issues_model.ContentHistory{IssueID: pull.Issue.ID, ContentText: newBody, IsFirstCreated: false}) - req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%d/%s/pulls/%d", owner10.Name, repo10.GroupID, repo10.Name, pull.Index), &api.EditPullRequestOption{ + req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name, pull.Index), &api.EditPullRequestOption{ Base: "not-exist", }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) @@ -565,11 +565,11 @@ func TestAPICommitPullRequest(t *testing.T) { ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) mergedCommitSHA := "1a8823cd1a9549fde083f992f6b9b87a7ab74fb3" - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/commits/%s/pull", owner.Name, repo.GroupID, repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/commits/%s/pull", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusOK) invalidCommitSHA := "abcd1234abcd1234abcd1234abcd1234abcd1234" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/commits/%s/pull", owner.Name, repo.GroupID, repo.Name, invalidCommitSHA).AddTokenAuth(ctx.Token) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/commits/%s/pull", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, invalidCommitSHA).AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_releases_attachment_test.go b/tests/integration/api_releases_attachment_test.go index 09bcaf5981..663f7c4df1 100644 --- a/tests/integration/api_releases_attachment_test.go +++ b/tests/integration/api_releases_attachment_test.go @@ -31,7 +31,7 @@ func testAPIEditReleaseAttachmentWithUnallowedFile(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) filename := "file.bad" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/%d/assets/%d", repoOwner.Name, repo.GroupID, repo.Name, release.ID, attachment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, release.ID, attachment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "name": filename, }).AddTokenAuth(token) diff --git a/tests/integration/api_releases_test.go b/tests/integration/api_releases_test.go index e128b21dff..4b8392321d 100644 --- a/tests/integration/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -46,7 +46,7 @@ func testAPIListReleasesWithWriteToken(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", user2.Name, repo.GroupID, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) apiReleases := DecodeJSON(t, resp, []*api.Release{}) if assert.Len(t, apiReleases, 3) { @@ -155,7 +155,7 @@ func testAPIGetDraftRelease(t *testing.T) { } func createNewReleaseUsingAPI(t *testing.T, token string, owner *user_model.User, repo *repo_model.Repository, name, target, title, desc string) *api.Release { - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", owner.Name, repo.GroupID, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateReleaseOption{ TagName: name, Title: title, @@ -198,7 +198,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) { newRelease := createNewReleaseUsingAPI(t, token, owner, repo, "v0.0.1", target, "v0.0.1", "test") - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/%d", owner.Name, repo.GroupID, repo.Name, newRelease.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, newRelease.ID) req := NewRequest(t, "GET", urlStr). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -244,7 +244,7 @@ func TestAPICreateProtectedTagRelease(t *testing.T) { commit, err := gitRepo.GetBranchCommit("master") assert.NoError(t, err) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", repo.OwnerName, repo.GroupID, repo.Name), &api.CreateReleaseOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &api.CreateReleaseOption{ TagName: "v0.0.1", Title: "v0.0.1", IsDraft: false, @@ -291,7 +291,7 @@ func TestAPICreateReleaseGivenInvalidTarget(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases", owner.Name, repo.GroupID, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateReleaseOption{ TagName: "i-point-to-an-invalid-target", Title: "Invalid Target", @@ -305,7 +305,7 @@ func testAPIGetLatestRelease(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/latest", owner.Name, repo.GroupID, repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/latest", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, req, http.StatusOK) release := DecodeJSON(t, resp, &api.Release{}) @@ -319,7 +319,7 @@ func testAPIGetReleaseByTag(t *testing.T) { tag := "v1.1" - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/tags/%s", owner.Name, repo.GroupID, repo.Name, tag)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/tags/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, tag)) resp := MakeRequest(t, req, http.StatusOK) release := DecodeJSON(t, resp, &api.Release{}) @@ -328,7 +328,7 @@ func testAPIGetReleaseByTag(t *testing.T) { nonexistingtag := "nonexistingtag" - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/tags/%s", owner.Name, repo.GroupID, repo.Name, nonexistingtag)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/tags/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, nonexistingtag)) resp = MakeRequest(t, req, http.StatusNotFound) err := DecodeJSON(t, resp, &api.APIError{}) @@ -378,17 +378,17 @@ func TestAPIDeleteReleaseByTagName(t *testing.T) { createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") // delete release - req := NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/releases/tags/release-tag", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/releases/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) // make sure release is deleted - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/releases/tags/release-tag", owner.Name, repo.GroupID, repo.Name). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/releases/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNotFound) // delete release tag too - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%d/%s/tags/release-tag", owner.Name, repo.GroupID, repo.Name). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) } @@ -406,7 +406,7 @@ func TestAPIUploadAssetRelease(t *testing.T) { bufLargeBytes := bytes.Repeat([]byte{' '}, 2*1024*1024) release := createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") - assetURL := fmt.Sprintf("/api/v1/repos/%s/%d/%s/releases/%d/assets", owner.Name, repo.GroupID, repo.Name, release.ID) + assetURL := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/%d/assets", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, release.ID) t.Run("multipart/form-data", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/api_repo_archive_test.go b/tests/integration/api_repo_archive_test.go index cb6382687a..ce64440343 100644 --- a/tests/integration/api_repo_archive_test.go +++ b/tests/integration/api_repo_archive_test.go @@ -30,13 +30,13 @@ func TestAPIDownloadArchive(t *testing.T) { session := loginUser(t, user2.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master.zip", user2.Name, repo.GroupID, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master.zip", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 320) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master.tar.gz", user2.Name, repo.GroupID, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master.tar.gz", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) @@ -52,13 +52,13 @@ func TestAPIDownloadArchive(t *testing.T) { // The locked URL should give the same bytes as the non-locked one assert.Equal(t, bs, bs2) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master.bundle", user2.Name, repo.GroupID, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master.bundle", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 382) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/archive/master", user2.Name, repo.GroupID, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusBadRequest) t.Run("GitHubStyle", testAPIDownloadArchiveGitHubStyle) @@ -73,13 +73,13 @@ func testAPIDownloadArchiveGitHubStyle(t *testing.T) { session := loginUser(t, user2.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/zipball/master", user2.Name, repo.GroupID, repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/zipball/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 320) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/tarball/master", user2.Name, repo.GroupID, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/tarball/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) @@ -95,7 +95,7 @@ func testAPIDownloadArchiveGitHubStyle(t *testing.T) { // The locked URL should give the same bytes as the non-locked one assert.Equal(t, bs, bs2) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%d/%s/bundle/master", user2.Name, repo.GroupID, repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/bundle/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) diff --git a/tests/integration/api_repo_avatar_test.go b/tests/integration/api_repo_avatar_test.go index 6db35b349d..f1a2e1deab 100644 --- a/tests/integration/api_repo_avatar_test.go +++ b/tests/integration/api_repo_avatar_test.go @@ -40,7 +40,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: base64.StdEncoding.EncodeToString(avatar), } - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name), &opts). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -49,7 +49,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: "Invalid", } - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name), &opts). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusBadRequest) @@ -64,7 +64,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: base64.StdEncoding.EncodeToString(text), } - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name), &opts). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusInternalServerError) } @@ -76,7 +76,7 @@ func TestAPIDeleteRepoAvatar(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/avatar", repo.OwnerName, repo.GroupID, repo.Name)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } diff --git a/tests/integration/api_repo_collaborator_test.go b/tests/integration/api_repo_collaborator_test.go index ac6f4b245a..f0b3eafd89 100644 --- a/tests/integration/api_repo_collaborator_test.go +++ b/tests/integration/api_repo_collaborator_test.go @@ -32,7 +32,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { testCtx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeWriteRepository) t.Run("RepoOwnerShouldBeOwner", func(t *testing.T) { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, repo2Owner.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, repo2Owner.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -44,7 +44,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithReadAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeRead)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -56,7 +56,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithWriteAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithWriteAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeWrite)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -68,7 +68,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithAdminAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithAdminAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeAdmin)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -78,7 +78,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { }) t.Run("CollaboratorNotFound", func(t *testing.T) { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, "non-existent-user"). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "non-existent-user"). AddTokenAuth(testCtx.Token) MakeRequest(t, req, http.StatusNotFound) }) @@ -95,7 +95,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { _session := loginUser(t, user5.Name) _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) @@ -107,7 +107,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { session := loginUser(t, user5.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name).AddTokenAuth(token) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user5.Name).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) repoCollPerm := DecodeJSON(t, resp, &api.RepoCollaboratorPermission{}) @@ -122,7 +122,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { _session := loginUser(t, user5.Name) _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user5.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) @@ -138,7 +138,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { _session := loginUser(t, user10.Name) _testCtx := NewAPITestContext(t, user10.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/collaborators/%s/permission", repo2Owner.Name, repo2.GroupID, repo2.Name, user11.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user11.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go index 362e4ddab4..4f6294fa10 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -150,7 +150,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.BranchName = branch fileID++ treePath := fmt.Sprintf("new/file%d.txt", fileID) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -184,7 +184,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.NewBranchName = "new_branch" fileID++ treePath := fmt.Sprintf("new/file%d.txt", fileID) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -201,7 +201,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.Message = "" fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusCreated) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -211,7 +211,7 @@ func TestAPICreateFile(t *testing.T) { // Test trying to create a file that already exists, should fail createFileOptions = getCreateFileOptions() treePath = "README.md" - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := &context.APIError{ @@ -225,7 +225,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &createFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -233,14 +233,14 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &createFileOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &createFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &createFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -248,7 +248,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &createFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -256,14 +256,14 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &createFileOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &createFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) diff --git a/tests/integration/api_repo_file_delete_test.go b/tests/integration/api_repo_file_delete_test.go index 45bdb9ee31..a5b05ee754 100644 --- a/tests/integration/api_repo_file_delete_test.go +++ b/tests/integration/api_repo_file_delete_test.go @@ -64,7 +64,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions := getDeleteFileOptions() deleteFileOptions.BranchName = branch - req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). + req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -79,7 +79,7 @@ func TestAPIDeleteFile(t *testing.T) { deleteFileOptions := getDeleteFileOptions() deleteFileOptions.BranchName = repo1.DefaultBranch deleteFileOptions.NewBranchName = "new_branch" - req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). + req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -93,7 +93,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() deleteFileOptions.Message = "" - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -106,7 +106,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() deleteFileOptions.SHA = "badsha" - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) @@ -115,7 +115,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &deleteFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -124,7 +124,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &deleteFileOptions) + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &deleteFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -132,7 +132,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -141,7 +141,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(org3, repo3, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -150,7 +150,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(org3, repo3, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &deleteFileOptions) + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &deleteFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -158,7 +158,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_file_update_test.go b/tests/integration/api_repo_file_update_test.go index 02274c8c34..e3c25090fb 100644 --- a/tests/integration/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -133,7 +133,7 @@ func TestAPIUpdateFile(t *testing.T) { createFile(user2, repo1, treePath) updateFileOptions := getUpdateFileOptions() updateFileOptions.BranchName = branch - req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). + req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -163,7 +163,7 @@ func TestAPIUpdateFile(t *testing.T) { fileID++ treePath := fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) - req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). + req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -192,7 +192,7 @@ func TestAPIUpdateFile(t *testing.T) { createFile(user2, repo1, treePath) updateFileOptions.FromPath = treePath treePath = "rename/" + treePath - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -210,7 +210,7 @@ func TestAPIUpdateFile(t *testing.T) { fileID++ treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -224,7 +224,7 @@ func TestAPIUpdateFile(t *testing.T) { updateFileOptions = getUpdateFileOptions() correctSHA := updateFileOptions.SHA updateFileOptions.SHA = "badsha" - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := &context.APIError{ @@ -239,7 +239,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &updateFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -248,7 +248,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &updateFileOptions) + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &updateFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -256,7 +256,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &updateFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -265,7 +265,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(org3, repo3, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &updateFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -274,7 +274,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(org3, repo3, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath), &updateFileOptions) + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &updateFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -282,7 +282,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_files_change_test.go b/tests/integration/api_repo_files_change_test.go index 5e3de83357..48660f5f63 100644 --- a/tests/integration/api_repo_files_change_test.go +++ b/tests/integration/api_repo_files_change_test.go @@ -90,7 +90,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo1.GroupID, repo1.Name), &changeFilesOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name), &changeFilesOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -141,7 +141,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[2].Path = deleteTreePath createFile(user2, repo1, updateTreePath) createFile(user2, repo1, deleteTreePath) - url := fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo1.GroupID, repo1.Name) + url := fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name) req := NewRequestWithJSON(t, "POST", url, &changeFilesOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) @@ -311,7 +311,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo16.GroupID, repo16.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &changeFilesOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -326,7 +326,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo16.GroupID, repo16.Name), &changeFilesOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &changeFilesOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -340,7 +340,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo16.GroupID, repo16.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &changeFilesOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -355,7 +355,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", org3.Name, repo3.GroupID, repo3.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), &changeFilesOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -370,7 +370,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", org3.Name, repo3.GroupID, repo3.Name), &changeFilesOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), &changeFilesOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -384,7 +384,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/contents", user2.Name, repo1.GroupID, repo1.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name), &changeFilesOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_files_get_test.go b/tests/integration/api_repo_files_get_test.go index 4320b130a8..d0ff792ba0 100644 --- a/tests/integration/api_repo_files_get_test.go +++ b/tests/integration/api_repo_files_get_test.go @@ -94,13 +94,13 @@ func TestAPIGetRequestedFiles(t *testing.T) { t.Run("PermissionCheck", func(t *testing.T) { filesOptions := &api.GetFilesOptions{Files: []string{"README.md"}} // Test accessing private ref with user token that does not have access - should fail - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/file-contents", user2.Name, repo16.GroupID, repo16.Name), &filesOptions).AddTokenAuth(token4) + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/file-contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &filesOptions).AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/file-contents", user2.Name, repo16.GroupID, repo16.Name), &filesOptions).AddTokenAuth(token2) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/file-contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &filesOptions).AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/file-contents", org3.Name, repo3.GroupID, repo3.Name), &filesOptions).AddTokenAuth(token2) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/file-contents", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), &filesOptions).AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) }) diff --git a/tests/integration/api_repo_get_contents_list_test.go b/tests/integration/api_repo_get_contents_list_test.go index 57e51b20ce..49923cde56 100644 --- a/tests/integration/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -92,7 +92,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is default ref ref := repo1.DefaultBranch refType := "branch" - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) resp := MakeRequest(t, req, http.StatusOK) contentsListResponse := DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -103,7 +103,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // No ref refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", user2.Name, repo1.GroupID, repo1.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -114,7 +114,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is the branch we created above in setup ref = newBranch refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -128,7 +128,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is the new tag we created above in setup ref = newTag refType = "tag" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -142,7 +142,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is a commit ref = commitID refType = "commit" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -151,21 +151,21 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // Test file contents a file with a bad ref ref = "badref" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/?ref=%s", user2.Name, repo1.GroupID, repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) MakeRequest(t, req, http.StatusNotFound) // Test accessing private ref with user token that does not have access - should fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", user2.Name, repo16.GroupID, repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", user2.Name, repo16.GroupID, repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/", org3.Name, repo3.GroupID, repo3.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/api_repo_get_contents_test.go b/tests/integration/api_repo_get_contents_test.go index f69e8d7359..325192eabb 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -96,14 +96,14 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { /*** END SETUP ***/ // not found - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/no-such/file.md", user2.Name, repo1.GroupID, repo1.Name) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/no-such/file.md", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name) resp := MakeRequest(t, req, http.StatusNotFound) assert.Contains(t, resp.Body.String(), "object does not exist [id: , rel_path: no-such]") // ref is default ref ref := repo1.DefaultBranch refType := "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse := DecodeJSON(t, resp, &api.ContentsResponse{}) lastCommit, _ := gitRepo.GetCommitByPath("README.md") @@ -112,7 +112,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // No ref refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo1.GroupID, repo1.Name, treePath) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) expectedContentsResponse = getExpectedContentsResponseForContents(repo1.DefaultBranch, refType, lastCommit.ID.String()) @@ -121,7 +121,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is the branch we created above in setup ref = newBranch refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) branchCommit, _ := gitRepo.GetBranchCommit(ref) @@ -132,7 +132,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is the new tag we created above in setup ref = newTag refType = "tag" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) tagCommit, _ := gitRepo.GetTagCommit(ref) @@ -143,7 +143,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is a commit ref = commitID refType = "commit" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) expectedContentsResponse = getExpectedContentsResponseForContents(ref, refType, commitID) @@ -151,21 +151,21 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // Test file contents a file with a bad ref ref = "badref" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s?ref=%s", user2.Name, repo1.GroupID, repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) MakeRequest(t, req, http.StatusNotFound) // Test accessing private ref with user token that does not have access - should fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s", user2.Name, repo16.GroupID, repo16.Name, treePath). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/readme.md", user2.Name, repo16.GroupID, repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/readme.md", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/contents/%s", org3.Name, repo3.GroupID, repo3.Name, treePath). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/api_repo_git_blobs_test.go b/tests/integration/api_repo_git_blobs_test.go index 1bf14ba468..3d45c5770f 100644 --- a/tests/integration/api_repo_git_blobs_test.go +++ b/tests/integration/api_repo_git_blobs_test.go @@ -35,7 +35,7 @@ func TestAPIReposGitBlobs(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) // Test a public repo that anyone can GET the blob of - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo1.GroupID, repo1.Name, repo1ReadmeSHA) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, repo1ReadmeSHA) resp := MakeRequest(t, req, http.StatusOK) gitBlobResponse := DecodeJSON(t, resp, &api.GitBlobResponse{}) assert.NotNil(t, gitBlobResponse) @@ -43,30 +43,30 @@ func TestAPIReposGitBlobs(t *testing.T) { assert.Equal(t, expectedContent, *gitBlobResponse.Content) // Tests a private repo with no token so will fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo16.GroupID, repo16.Name, repo16ReadmeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, repo16ReadmeSHA) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo16.GroupID, repo16.Name, repo16ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, repo16ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using bad sha - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", user2.Name, repo1.GroupID, repo1.Name, badSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, badSHA) MakeRequest(t, req, http.StatusBadRequest) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3.GroupID, repo3.Name, repo3ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3.GroupID, repo3.Name, repo3ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/%s", org3.Name, repo3.GroupID, repo3.Name, repo3ReadmeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3ReadmeSHA) MakeRequest(t, req, http.StatusNotFound) // Login as User4. @@ -74,6 +74,6 @@ func TestAPIReposGitBlobs(t *testing.T) { token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) // Test using org repo "org3/repo3" where user4 is a NOT collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/blobs/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.GroupID, repo3.Name, token4) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, token4) MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_repo_git_hook_test.go b/tests/integration/api_repo_git_hook_test.go index 811b2dc835..4a1b5a2be4 100644 --- a/tests/integration/api_repo_git_hook_test.go +++ b/tests/integration/api_repo_git_hook_test.go @@ -37,7 +37,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHooks := DecodeJSON(t, resp, []*api.GitHook{}) @@ -62,7 +62,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHooks := DecodeJSON(t, resp, []*api.GitHook{}) @@ -81,7 +81,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) @@ -95,7 +95,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHook := DecodeJSON(t, resp, &api.GitHook{}) @@ -110,7 +110,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) @@ -135,7 +135,7 @@ echo "TestGitHookScript" assert.True(t, apiGitHook.IsActive) assert.Equal(t, testHookContent, apiGitHook.Content) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiGitHook2 := DecodeJSON(t, resp, &api.GitHook{}) @@ -151,7 +151,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) req := NewRequestWithJSON(t, "PATCH", urlStr, &api.EditGitHookOption{ Content: testHookContent, }).AddTokenAuth(token) @@ -168,11 +168,11 @@ echo "TestGitHookScript" session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHook2 := DecodeJSON(t, resp, &api.GitHook{}) @@ -188,7 +188,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/hooks/git/pre-receive", owner.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_git_tags_test.go b/tests/integration/api_repo_git_tags_test.go index c72a9df8a4..50d35b132e 100644 --- a/tests/integration/api_repo_git_tags_test.go +++ b/tests/integration/api_repo_git_tags_test.go @@ -44,7 +44,7 @@ func TestAPIGitTags(t *testing.T) { aTag, _ := gitRepo.GetTag(aTagName) // SHOULD work for annotated tags - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/tags/%s", user.Name, repo.GroupID, repo.Name, aTag.ID.String()). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/tags/%s", user.Name, maybeGroupSegment(repo.GroupID), repo.Name, aTag.ID.String()). AddTokenAuth(token) res := MakeRequest(t, req, http.StatusOK) @@ -59,7 +59,7 @@ func TestAPIGitTags(t *testing.T) { assert.Equal(t, repo.APIURL()+"/git/tags/"+aTag.ID.String(), tag.URL) // Should NOT work for lightweight tags - badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/tags/%s", user.Name, repo.GroupID, repo.Name, commit.ID.String()). + badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/tags/%s", user.Name, maybeGroupSegment(repo.GroupID), repo.Name, commit.ID.String()). AddTokenAuth(token) MakeRequest(t, badReq, http.StatusBadRequest) } @@ -72,14 +72,14 @@ func TestAPIDeleteTagByName(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/tags/delete-tag", owner.Name, repo.GroupID, repo.Name)). + req := NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/tags/delete-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) // Make sure that actual releases can't be deleted outright createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") - req = NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%d/%s/tags/release-tag", owner.Name, repo.GroupID, repo.Name)). + req = NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusConflict) } diff --git a/tests/integration/api_repo_git_trees_test.go b/tests/integration/api_repo_git_trees_test.go index 8f0cd9d773..b3c8e12251 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -55,26 +55,26 @@ func TestAPIReposGitTrees(t *testing.T) { "master", // Branch repo1TreeSHA, // Tag } { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", user2.Name, repo16.GroupID, repo16.Name, ref) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, ref) MakeRequest(t, req, http.StatusNotFound) } // Test using access token for a private repo that the user of the token owns - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", user2.Name, repo16.GroupID, repo16.Name, repo16TreeSHA). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, repo16TreeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using bad sha - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", user2.Name, repo1.GroupID, repo1.Name, badSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, badSHA) MakeRequest(t, req, http.StatusBadRequest) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", org3.Name, repo3.GroupID, repo3.Name, repo3TreeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3TreeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/%s", org3.Name, repo3.GroupID, repo3.Name, repo3TreeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3TreeSHA) MakeRequest(t, req, http.StatusNotFound) // Login as User4. @@ -82,6 +82,6 @@ func TestAPIReposGitTrees(t *testing.T) { token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) // Test using org repo "org3/repo3" where user4 is a NOT collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/git/trees/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.GroupID, repo3.Name, token4) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, token4) MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_repo_hook_test.go b/tests/integration/api_repo_hook_test.go index c53f9ad939..e487d016a5 100644 --- a/tests/integration/api_repo_hook_test.go +++ b/tests/integration/api_repo_hook_test.go @@ -27,7 +27,7 @@ func TestAPICreateHook(t *testing.T) { // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/%s", owner.Name, repo.GroupID, repo.Name, "hooks"), api.CreateHookOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, "hooks"), api.CreateHookOption{ Type: "gitea", Config: api.CreateHookOptionConfig{ "content_type": "json", diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 8c38625c6d..2aa233388c 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -80,66 +80,66 @@ func TestAPISearchRepo(t *testing.T) { }{ { name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{ - nil: {count: 36}, - user: {count: 36}, - user2: {count: 36}, - }, + nil: {count: 36}, + user: {count: 36}, + user2: {count: 36}, + }, }, { name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesDefault", requestURL: "/api/v1/repos/search?default&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "big_test_"), expectedResults: expectedResults{ - nil: {count: 7, repoName: "big_test_"}, - user: {count: 7, repoName: "big_test_"}, - user2: {count: 7, repoName: "big_test_"}, - }, + nil: {count: 7, repoName: "big_test_"}, + user: {count: 7, repoName: "big_test_"}, + user2: {count: 7, repoName: "big_test_"}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "user2/big_test_"), expectedResults: expectedResults{ - user2: {count: 2, repoName: "big_test_"}, - }, + user2: {count: 2, repoName: "big_test_"}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user.ID), expectedResults: expectedResults{ - nil: {count: 5}, - user: {count: 9, includesPrivate: true}, - user2: {count: 6, includesPrivate: true}, - }, + nil: {count: 5}, + user: {count: 9, includesPrivate: true}, + user2: {count: 6, includesPrivate: true}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser2", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user2.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 2, includesPrivate: true}, - user2: {count: 2, includesPrivate: true}, - user4: {count: 1}, - }, + nil: {count: 1}, + user: {count: 2, includesPrivate: true}, + user2: {count: 2, includesPrivate: true}, + user4: {count: 1}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser3", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", org3.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 4, includesPrivate: true}, - user2: {count: 3, includesPrivate: true}, - org3: {count: 4, includesPrivate: true}, - }, + nil: {count: 1}, + user: {count: 4, includesPrivate: true}, + user2: {count: 3, includesPrivate: true}, + org3: {count: 4, includesPrivate: true}, + }, }, { name: "RepositoriesOwnedByOrganization", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", orgUser.ID), expectedResults: expectedResults{ - nil: {count: 1, repoOwnerID: orgUser.ID}, - user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, - user2: {count: 1, repoOwnerID: orgUser.ID}, - }, + nil: {count: 1, repoOwnerID: orgUser.ID}, + user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, + user2: {count: 1, repoOwnerID: orgUser.ID}, + }, }, {name: "RepositoriesAccessibleAndRelatedToUser4", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user4.ID), expectedResults: expectedResults{ nil: {count: 3}, @@ -553,7 +553,7 @@ func TestAPIRepoTransfer(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) session = loginUser(t, user.Name) token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer", repo.OwnerName, repo.GroupID, repo.Name), &api.TransferRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &api.TransferRepoOption{ NewOwner: testCase.newOwner, TeamIDs: testCase.teams, }).AddTokenAuth(token) @@ -584,7 +584,7 @@ func transfer(t *testing.T) *repo_model.Repository { DecodeJSON(t, resp, apiRepo) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer", repo.OwnerName, repo.GroupID, repo.Name), &api.TransferRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &api.TransferRepoOption{ NewOwner: "user4", }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) @@ -600,7 +600,7 @@ func TestAPIAcceptTransfer(t *testing.T) { // try to accept with not authorized user session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/reject", repo.OwnerName, repo.GroupID, repo.Name)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/reject", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -613,7 +613,7 @@ func TestAPIAcceptTransfer(t *testing.T) { session = loginUser(t, "user4") token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/accept", repo.OwnerName, repo.GroupID, repo.Name)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/accept", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusAccepted) apiRepo := new(api.Repository) @@ -629,7 +629,7 @@ func TestAPIRejectTransfer(t *testing.T) { // try to reject with not authorized user session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/reject", repo.OwnerName, repo.GroupID, repo.Name)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/reject", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -642,7 +642,7 @@ func TestAPIRejectTransfer(t *testing.T) { session = loginUser(t, "user4") token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/transfer/reject", repo.OwnerName, repo.GroupID, repo.Name)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/reject", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiRepo := new(api.Repository) @@ -661,7 +661,7 @@ func TestAPIGenerateRepo(t *testing.T) { // user repo := new(api.Repository) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/generate", templateRepo.OwnerName, templateRepo.GroupID, templateRepo.Name), &api.GenerateRepoOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/generate", templateRepo.OwnerName, maybeGroupSegment(templateRepo.GroupID), templateRepo.Name), &api.GenerateRepoOption{ Owner: user.Name, Name: "new-repo", Description: "test generate repo", @@ -674,7 +674,7 @@ func TestAPIGenerateRepo(t *testing.T) { assert.Equal(t, "new-repo", repo.Name) // org - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/generate", templateRepo.OwnerName, templateRepo.GroupID, templateRepo.Name), &api.GenerateRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/generate", templateRepo.OwnerName, maybeGroupSegment(templateRepo.GroupID), templateRepo.Name), &api.GenerateRepoOption{ Owner: "org3", Name: "new-repo", Description: "test generate repo", @@ -694,7 +694,7 @@ func TestAPIRepoGetReviewers(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/reviewers", user.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/reviewers", user.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) reviewers := DecodeJSON(t, resp, []*api.User{}) @@ -710,7 +710,7 @@ func TestAPIRepoGetAssignees(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%d/%s/assignees", user.Name, repo.GroupID, repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/assignees", user.Name, maybeGroupSegment(repo.GroupID), repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) assignees := DecodeJSON(t, resp, []*api.User{}) diff --git a/tests/integration/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go index ae50566d84..76fe09905f 100644 --- a/tests/integration/api_repo_topic_test.go +++ b/tests/integration/api_repo_topic_test.go @@ -88,28 +88,28 @@ func TestAPIRepoTopic(t *testing.T) { token2 := getUserToken(t, user2.Name, auth_model.AccessTokenScopeWriteRepository) // Test read topics using login - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/topics", user2.Name, repo2.GroupID, repo2.Name)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/topics", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name)). AddTokenAuth(token2) res := MakeRequest(t, req, http.StatusOK) topics := DecodeJSON(t, res, &api.TopicName{}) assert.ElementsMatch(t, []string{"topicname1", "topicname2"}, topics.TopicNames) // Test delete a topic - req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "Topicname1"). + req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "Topicname1"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // Test add an existing topic - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "Golang"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "Golang"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // Test add a topic - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "topicName3"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "topicName3"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) - url := fmt.Sprintf("/api/v1/repos/%s/%d/%s/topics", user2.Name, repo2.GroupID, repo2.Name) + url := fmt.Sprintf("/api/v1/repos/%s/%s%s/topics", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name) // Test read topics using token req = NewRequest(t, "GET", url). @@ -162,12 +162,12 @@ func TestAPIRepoTopic(t *testing.T) { MakeRequest(t, req, http.StatusUnprocessableEntity) // Test add a topic when there is already maximum - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "t26"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "t26"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) // Test delete a topic that repo doesn't have - req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%d/%s/topics/%s", user2.Name, repo2.GroupID, repo2.Name, "Topicname1"). + req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "Topicname1"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNotFound) @@ -175,14 +175,14 @@ func TestAPIRepoTopic(t *testing.T) { token4 := getUserToken(t, user4.Name, auth_model.AccessTokenScopeWriteRepository) // Test read topics with write access - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/topics", org3.Name, repo3.GroupID, repo3.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/topics", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name)). AddTokenAuth(token4) res = MakeRequest(t, req, http.StatusOK) topics = DecodeJSON(t, res, &api.TopicName{}) assert.Empty(t, topics.TopicNames) // Test add a topic to repo with write access (requires repo admin access) - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%d/%s/topics/%s", org3.Name, repo3.GroupID, repo3.Name, "topicName"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, "topicName"). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) } diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index fc120270bc..a2bd567d45 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -121,11 +121,8 @@ func testEditorActionPostRequestError(t *testing.T, session *TestSession, reques func testEditorActionEdit(t *testing.T, session *TestSession, groupID int64, user, repo, editorAction, branch, filePath string, params map[string]string) *httptest.ResponseRecorder { params["tree_path"] = util.IfZero(params["tree_path"], filePath) newBranchName := util.Iif(params["commit_choice"] == "direct", branch, params["new_branch_name"]) - var groupSegment string - if groupID > 0 { - groupSegment = fmt.Sprintf("%d/", groupID) - } - resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s%s/%s/%s/%s", user, groupSegment, repo, editorAction, branch, filePath), params) + + resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s/%s%s/%s/%s", user, maybeWebGroupSegment(groupID), repo, editorAction, branch, filePath), params) assert.Equal(t, http.StatusOK, resp.Code) assert.NotEmpty(t, test.RedirectURL(resp)) req := NewRequest(t, "GET", "/"+path.Join(user, repo, "raw/branch", newBranchName, params["tree_path"])) diff --git a/tests/integration/eventsource_test.go b/tests/integration/eventsource_test.go index 3aaa941958..47caf7f767 100644 --- a/tests/integration/eventsource_test.go +++ b/tests/integration/eventsource_test.go @@ -70,7 +70,7 @@ func TestEventSourceManagerRun(t *testing.T) { assert.Len(t, apiNL, 2) lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 <- only Notification 4 is in this filter ... - req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%d/%s/notifications?last_read_at=%s", user2.Name, repo1.GroupID, repo1.Name, lastReadAt)). + req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?last_read_at=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, lastReadAt)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusResetContent) diff --git a/tests/integration/migrate_test.go b/tests/integration/migrate_test.go index 613c5b9aca..cbd425c608 100644 --- a/tests/integration/migrate_test.go +++ b/tests/integration/migrate_test.go @@ -99,7 +99,7 @@ func TestMigrateGiteaForm(t *testing.T) { migratedRepoName := "otherrepo" req = NewRequestWithValues(t, "POST", link, map[string]string{ "service": fmt.Sprintf("%d", structs.GiteaService), - "clone_addr": fmt.Sprintf("%s%s/%s", u, ownerName, repoName), + "clone_addr": fmt.Sprintf("%s/%s%s", u, ownerName, repoName), "auth_token": token, "issues": "on", "repo_name": migratedRepoName, diff --git a/tests/integration/mirror_push_test.go b/tests/integration/mirror_push_test.go index ef38846d62..398cd48b38 100644 --- a/tests/integration/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -49,7 +49,7 @@ func testMirrorPush(t *testing.T, u *url.URL) { session := loginUser(t, user.Name) - pushMirrorURL := fmt.Sprintf("%s%s/%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name)) + pushMirrorURL := fmt.Sprintf("%s/%s%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name)) testCreatePushMirror(t, session, user.Name, srcRepo.Name, pushMirrorURL, user.LowerName, userPassword, "0") mirrors, _, err := repo_model.GetPushMirrorsByRepoID(t.Context(), srcRepo.ID, db.ListOptions{}) diff --git a/tests/integration/privateactivity_test.go b/tests/integration/privateactivity_test.go index d67e1ff04f..a7dfb332d3 100644 --- a/tests/integration/privateactivity_test.go +++ b/tests/integration/privateactivity_test.go @@ -35,7 +35,7 @@ func testPrivateActivityDoSomethingForActionEntries(t *testing.T) { session := loginUser(t, privateActivityTestUser) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%d/%s/issues?state=all", owner.Name, repoBefore.GroupID, repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues?state=all", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateIssueOption{ Body: "test", Title: "test", diff --git a/tests/integration/repo_generate_test.go b/tests/integration/repo_generate_test.go index be4d5a036b..e91ee2a1e7 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -61,7 +61,7 @@ func testRepoGenerate(t *testing.T, session *TestSession, templateID, templateOw body := fmt.Sprintf(`# %s Readme Owner: %s Link: /%s/%s -Clone URL: %s%s/%s.git`, +Clone URL: %s/%s%s.git`, generateRepoName, strings.ToUpper(generateOwnerName), generateOwnerName, diff --git a/tests/integration/repo_merge_upstream_test.go b/tests/integration/repo_merge_upstream_test.go index efeff817f6..c4eb63653e 100644 --- a/tests/integration/repo_merge_upstream_test.go +++ b/tests/integration/repo_merge_upstream_test.go @@ -40,7 +40,7 @@ func TestRepoMergeUpstream(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) // create a fork - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%d/%s/forks", baseUser.Name, baseRepo.GroupID, baseRepo.Name), &api.CreateForkOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/forks", baseUser.Name, maybeGroupSegment(baseRepo.GroupID), baseRepo.Name), &api.CreateForkOption{ Name: new("test-repo-fork"), }).AddTokenAuth(token) MakeRequest(t, req, http.StatusAccepted) diff --git a/tests/integration/utils.go b/tests/integration/utils.go new file mode 100644 index 0000000000..38cf18d991 --- /dev/null +++ b/tests/integration/utils.go @@ -0,0 +1,18 @@ +package integration + +import "fmt" + +func maybeGroupSegment(gid int64) string { + if gid > 0 { + return fmt.Sprintf("%d/", gid) + } + return "" +} + +func maybeWebGroupSegment(gid int64) string { + gs := maybeGroupSegment(gid) + if gs != "" { + return "group/" + gs + } + return "" +} From 759ece951a307f3517b78f8cdd94724f1d84a7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 20:42:24 -0500 Subject: [PATCH 128/218] fix artifact download endpoint urls --- routers/api/v1/repo/action.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index de912258ad..246b6febd9 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -1947,7 +1947,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/%d/%s/actions/artifacts/%d/zip/raw", url.PathEscape(repo.OwnerName), repo.GroupID, 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 { From 2f8d95c1646f4481a86ea16439c30dfa8fcdd4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 21:17:26 -0500 Subject: [PATCH 129/218] add missing copyright --- tests/integration/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/utils.go b/tests/integration/utils.go index 38cf18d991..7e64ce1319 100644 --- a/tests/integration/utils.go +++ b/tests/integration/utils.go @@ -1,3 +1,6 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package integration import "fmt" From b14092fe1c6afb63ac715ab456f2a7cec2c301d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 21:57:31 -0500 Subject: [PATCH 130/218] fix `maybeGroupSegment` func, run formatter --- tests/integration/api_repo_test.go | 72 +++++++++++++++--------------- tests/integration/editor_test.go | 2 +- tests/integration/utils.go | 10 +---- 3 files changed, 38 insertions(+), 46 deletions(-) diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 2aa233388c..c43cb71a24 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -80,66 +80,66 @@ func TestAPISearchRepo(t *testing.T) { }{ { name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{ - nil: {count: 36}, - user: {count: 36}, - user2: {count: 36}, - }, + nil: {count: 36}, + user: {count: 36}, + user2: {count: 36}, + }, }, { name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesDefault", requestURL: "/api/v1/repos/search?default&private=false", expectedResults: expectedResults{ - nil: {count: 10}, - user: {count: 10}, - user2: {count: 10}, - }, + nil: {count: 10}, + user: {count: 10}, + user2: {count: 10}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "big_test_"), expectedResults: expectedResults{ - nil: {count: 7, repoName: "big_test_"}, - user: {count: 7, repoName: "big_test_"}, - user2: {count: 7, repoName: "big_test_"}, - }, + nil: {count: 7, repoName: "big_test_"}, + user: {count: 7, repoName: "big_test_"}, + user2: {count: 7, repoName: "big_test_"}, + }, }, { name: "RepositoriesByName", requestURL: fmt.Sprintf("/api/v1/repos/search?q=%s&private=false", "user2/big_test_"), expectedResults: expectedResults{ - user2: {count: 2, repoName: "big_test_"}, - }, + user2: {count: 2, repoName: "big_test_"}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user.ID), expectedResults: expectedResults{ - nil: {count: 5}, - user: {count: 9, includesPrivate: true}, - user2: {count: 6, includesPrivate: true}, - }, + nil: {count: 5}, + user: {count: 9, includesPrivate: true}, + user2: {count: 6, includesPrivate: true}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser2", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user2.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 2, includesPrivate: true}, - user2: {count: 2, includesPrivate: true}, - user4: {count: 1}, - }, + nil: {count: 1}, + user: {count: 2, includesPrivate: true}, + user2: {count: 2, includesPrivate: true}, + user4: {count: 1}, + }, }, { name: "RepositoriesAccessibleAndRelatedToUser3", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", org3.ID), expectedResults: expectedResults{ - nil: {count: 1}, - user: {count: 4, includesPrivate: true}, - user2: {count: 3, includesPrivate: true}, - org3: {count: 4, includesPrivate: true}, - }, + nil: {count: 1}, + user: {count: 4, includesPrivate: true}, + user2: {count: 3, includesPrivate: true}, + org3: {count: 4, includesPrivate: true}, + }, }, { name: "RepositoriesOwnedByOrganization", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", orgUser.ID), expectedResults: expectedResults{ - nil: {count: 1, repoOwnerID: orgUser.ID}, - user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, - user2: {count: 1, repoOwnerID: orgUser.ID}, - }, + nil: {count: 1, repoOwnerID: orgUser.ID}, + user: {count: 2, repoOwnerID: orgUser.ID, includesPrivate: true}, + user2: {count: 1, repoOwnerID: orgUser.ID}, + }, }, {name: "RepositoriesAccessibleAndRelatedToUser4", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user4.ID), expectedResults: expectedResults{ nil: {count: 3}, diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index a2bd567d45..89159846e7 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -122,7 +122,7 @@ func testEditorActionEdit(t *testing.T, session *TestSession, groupID int64, use params["tree_path"] = util.IfZero(params["tree_path"], filePath) newBranchName := util.Iif(params["commit_choice"] == "direct", branch, params["new_branch_name"]) - resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s/%s%s/%s/%s", user, maybeWebGroupSegment(groupID), repo, editorAction, branch, filePath), params) + resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s/%s%s/%s/%s", user, maybeGroupSegment(groupID), repo, editorAction, branch, filePath), params) assert.Equal(t, http.StatusOK, resp.Code) assert.NotEmpty(t, test.RedirectURL(resp)) req := NewRequest(t, "GET", "/"+path.Join(user, repo, "raw/branch", newBranchName, params["tree_path"])) diff --git a/tests/integration/utils.go b/tests/integration/utils.go index 7e64ce1319..166720fc88 100644 --- a/tests/integration/utils.go +++ b/tests/integration/utils.go @@ -7,15 +7,7 @@ import "fmt" func maybeGroupSegment(gid int64) string { if gid > 0 { - return fmt.Sprintf("%d/", gid) - } - return "" -} - -func maybeWebGroupSegment(gid int64) string { - gs := maybeGroupSegment(gid) - if gs != "" { - return "group/" + gs + return fmt.Sprintf("group/%d/", gid) } return "" } From 88fe681a5d8ccfe475f1ae5dff719a064043d6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 22:39:12 -0500 Subject: [PATCH 131/218] fix unique constraints for repos and subgroups --- models/migrations/v1_26/v324.go | 1 + models/repo/repo.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index 4dfd3040b6..5c67ed5998 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -9,6 +9,7 @@ func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error { type Repository struct { LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"` GroupID int64 `xorm:"UNIQUE(g) INDEX DEFAULT 0"` + OwnerID int64 `xorm:"UNIQUE(s) UNIQUE(g) index"` GroupSortOrder int } _, err := x.SyncWithOptions(xorm.SyncOptions{ diff --git a/models/repo/repo.go b/models/repo/repo.go index e1dd93cbaa..bfc64cb2a8 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -153,7 +153,7 @@ 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) UNIQUE(g) INDEX NOT NULL"` From 7ae082c7f9ea7e39a74156561b513faef7e5a44a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 22:47:50 -0500 Subject: [PATCH 132/218] fix helm package test --- tests/integration/api_packages_helm_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/api_packages_helm_test.go b/tests/integration/api_packages_helm_test.go index c86bf267b1..02df4ae906 100644 --- a/tests/integration/api_packages_helm_test.go +++ b/tests/integration/api_packages_helm_test.go @@ -159,7 +159,7 @@ dependencies: assert.Len(t, cv.Maintainers, 1) assert.Equal(t, packageAuthor, cv.Maintainers[0].Name) assert.Len(t, cv.Dependencies, 1) - assert.ElementsMatch(t, []string{fmt.Sprintf("%s/%s%s", setting.AppURL, url[1:], filename)}, cv.URLs) + assert.ElementsMatch(t, []string{fmt.Sprintf("%s%s/%s", setting.AppURL, url[1:], filename)}, cv.URLs) assert.Equal(t, url, result.ServerInfo.ContextPath) }) From db7da61b7423bf2bda713ccc1a00bc7f51661968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 22:50:00 -0500 Subject: [PATCH 133/218] sync csv test with upstream --- modules/csv/csv_test.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/csv/csv_test.go b/modules/csv/csv_test.go index 403c91cacf..5ea9718466 100644 --- a/modules/csv/csv_test.go +++ b/modules/csv/csv_test.go @@ -259,7 +259,7 @@ a,"quoted ""text"" with new lines in second column",c`, expectedText: `col1,col2,col3 -a,c`, +a,,c`, }, // case 2 - quoted text with escaped quotes in last column { @@ -279,9 +279,9 @@ a,bb,c,d,ee ,"f f" a,b,"c "" c",d,e,f`, - expectedText: `a,c,d,f + expectedText: `a,,c,d,,f a,bb,c,d,ee , -a,b,d,e,f`, +a,b,,d,e,f`, }, // case 4 - csv with pipes and quotes { @@ -394,17 +394,17 @@ f" | 4.56 | 789`, // In the previous bestScore algorithm, this would have picked comma as the delimiter, but now it should guess tab { csv: `c1 c2 c3 c4 c5 c6 -v,k,x,v ym,f,oa,qn,uqijh,n,s,wvygpo uj,kt,j,w,i,fvv,tm,f,ddt,b,mwt,e,t,teq,rd,p,a e,wfuae,t,h,q,im,ix,y h,mrlu,l,dz,ff,zi,af,emh ,gov,bmfelvb,axp,f,u,i,cni,x,z,v,sh,w,jo,m,h -k,ohf,pgr,tde,m,s te,ek,v,ic,kqc,dv,w,oi,j,w,gojjr,ug,l,j,zl g,qziq,bcajx,zfow,ka,j,re,ohbc k,nzm,qm,ts,auf th,elb,lx,l,q,e,qf asbr,z,k,y,tltobga -g,m,bu,el h,l,jwi,o,wge,fy,rure,c,g,lcxu,fxte,uns,cl,s,o,t,h,rsoy,f bq,s,uov,z,ikkhgyg,sabs,c,hzue mc,b,j,t,n sp,mn,m,t,dysi,eq,pigb,rfa,z w,rfli,sg,o,wjjjf,f,wxdzfk,x,t,p,zy,p,mg,r,l,h -e,ewbkc,nugd,jj,sf,ih,i,n,jo,b,poem,kw,q,i,x,t,e,uug,k j,xm,sch,ux,h,fb,f,pq,mh,f,v,oba,w,h,v,eiz,yzd,o,a,c,e,dhp,q a,pbef,epc,k,rdpuw,cw k,j,e,d xf,dz,sviv,w,sqnzew,t,b v,yg,f,cq,ti,g,m,ta,hm,ym,ii,hxy,p,z,r,e,ga,sfs,r,p,l,aar,w,kox,j +v,k,x,v ym,f,oa,qn,uqijh,n,s,wvygpo uj,kt,j,w,i,fvv,tm,f,ddt,b,mwt,e,t,teq,rd,p,a e,wfuae,t,h,q,im,ix,y h,mrlu,l,dz,ff,zi,af,emh ,gov,bmfelvb,axp,f,u,i,cni,x,z,v,sh,w,jo,,m,h +k,ohf,pgr,tde,m,s te,ek,,v,,ic,kqc,dv,w,oi,j,w,gojjr,ug,,l,j,zl g,qziq,bcajx,zfow,ka,j,re,ohbc k,nzm,qm,ts,auf th,elb,lx,l,q,e,qf asbr,z,k,y,tltobga +g,m,bu,el h,l,jwi,o,wge,fy,rure,c,g,lcxu,fxte,uns,cl,s,o,t,h,rsoy,f bq,s,uov,z,ikkhgyg,,sabs,c,hzue mc,b,,j,t,n sp,mn,,m,t,dysi,eq,pigb,rfa,z w,rfli,sg,,o,wjjjf,f,wxdzfk,x,t,p,zy,p,mg,r,l,h +e,ewbkc,nugd,jj,sf,ih,i,n,jo,b,poem,kw,q,i,x,t,e,uug,k j,xm,sch,ux,h,,fb,f,pq,,mh,,f,v,,oba,w,h,v,eiz,yzd,o,a,c,e,dhp,q a,pbef,epc,k,rdpuw,cw k,j,e,d xf,dz,sviv,w,sqnzew,t,b v,yg,f,cq,ti,g,m,ta,hm,ym,ii,hxy,p,z,r,e,ga,sfs,r,p,l,aar,w,kox,j l,d,v,pp,q,j,bxip,w,i,im,qa,o e,o h,w,a,a,qzj,nt,qfn,ut,fvhu,ts hu,q,g,p,q,ofpje,fsqa,frp,p,vih,j,w,k,jx, ln,th,ka,l,b,vgk,rv,hkx rj,v,y,cwm,rao,e,l,wvr,ptc,lm,yg,u,k,i,b,zk,b,gv,fls velxtnhlyuysbnlchosqlhkozkdapjaueexjwrndwb nglvnv kqiv pbshwlmcexdzipopxjyrxhvjalwp pydvipwlkkpdvbtepahskwuornbsb qwbacgq -l,y,u,bf,y,m,eals,n,cop,h,g,vs,jga,opt x,b,zwmn,hh,b,n,pdj,t,d px yn,vtd,u,y,b,ps,yo,qqnem,mxg,m,al,rd,c,k,d,q,f ilxdxa,m,y,p,p,y,prgmg,q,n,etj,k,ns b,pl,z,jq,hk -p,gc jn,mzr,bw sb,e,r,dy,ur,wzy,r,c,n,yglr,jbdu,r,pqk,k q,d,,p,l,euhl,dc,rwh,t,tq,z,h,p,s,t,x,fugr,h wi,zxb,jcig,o,t,k mfh,ym,h,e,p,cnvx,uv,zx,x,pq,blt,v,r,u,tr,g,g,xt -nri,p,t,if,y,ptlqq a,i w,ovli,um,w,f,re,k,sb,w,jy,zf i,g,p,q,mii,nr,jm,cc i,szl,k,eg,l,d ,ah,w,b,vh -,sh,wx,mn,xm,u,d,yy,u,t,m,j,s,b ogadq,g,y,y,i,h,ln,jda,g,cz,s,rv,r,s,s,le,r, y,nu,f,nagj o,h,adfy,o,nf,ns,gvsvnub,k,b,xyz v,h,g,ef,y,gb c,x,cw,x,go,h,t,x,cu,u,qgrqzrcmn,kq,cd,g,rejp,zcq -skxg,t,vay,d,wug,d,xg,sexc rt g,ag,mjq,fjnyji,iwa,m,ml,b,ua,b,qjxeoc be,s,sh,n,jbzxs,g,n,i,h,y,r,be,mfo,u,p cw,r,u,zn,eg,r,yac,m,l,edkr,ha,x,g,b,c,tg,c j,ye,u,ejd,maj,ea,bm,u,iy`, +l,y,u,bf,y,m,eals,n,cop,h,g,vs,jga,opt x,b,zwmn,hh,b,n,pdj,t,d px yn,vtd,u,y,b,ps,yo,qqnem,mxg,m,al,rd,c,k,d,q,f ilxdxa,m,y,,p,p,y,prgmg,q,n,etj,k,ns b,pl,z,jq,hk +p,gc jn,mzr,bw sb,e,r,dy,ur,wzy,r,c,n,yglr,jbdu,r,pqk,k q,d,,,p,l,euhl,dc,rwh,t,tq,z,h,p,s,t,x,fugr,h wi,zxb,jcig,o,t,k mfh,ym,h,e,p,cnvx,uv,zx,x,pq,blt,v,r,u,tr,g,g,xt +nri,p,,t,if,,y,ptlqq a,i w,ovli,um,w,f,re,k,sb,w,jy,zf i,g,p,q,mii,nr,jm,cc i,szl,k,eg,l,d ,ah,w,b,vh +,,sh,wx,mn,xm,u,d,yy,u,t,m,j,s,b ogadq,g,y,y,i,h,ln,jda,g,cz,s,rv,r,s,s,le,r, y,nu,f,nagj o,h,,adfy,o,nf,ns,gvsvnub,k,b,xyz v,h,g,ef,y,gb c,x,cw,x,go,h,t,x,cu,u,qgrqzrcmn,kq,cd,g,rejp,zcq +skxg,t,vay,d,wug,d,xg,sexc rt g,ag,mjq,fjnyji,iwa,m,ml,b,ua,b,qjxeoc be,s,sh,n,jbzxs,g,n,i,h,y,r,be,mfo,u,p cw,r,,u,zn,eg,r,yac,m,l,edkr,ha,x,g,b,c,tg,c j,ye,u,ejd,maj,ea,bm,u,iy`, expectedDelimiter: '\t', }, // case 13 - a CSV with more than 10 lines and since we only use the first 10 lines, it should still get the delimiter as semicolon From cf7e7d820a98047043bece9bfe1dc45fe251438a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 23:08:23 -0500 Subject: [PATCH 134/218] add GroupID field to IssueMeta struct --- modules/structs/issue.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 From c1f01275330728c150983218a5af66ab8e99521a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 23:13:27 -0500 Subject: [PATCH 135/218] fix issue dependency tests --- routers/api/v1/repo/issue_dependency.go | 2 +- tests/integration/api_issue_dependency_test.go | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/routers/api/v1/repo/issue_dependency.go b/routers/api/v1/repo/issue_dependency.go index 2bbe947e8c..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, ctx.PathParamInt64("group_id")) + 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/tests/integration/api_issue_dependency_test.go b/tests/integration/api_issue_dependency_test.go index fc2615be42..e537fc1bdb 100644 --- a/tests/integration/api_issue_dependency_test.go +++ b/tests/integration/api_issue_dependency_test.go @@ -50,9 +50,10 @@ func TestAPICreateIssueDependencyCrossRepoPermission(t *testing.T) { url := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/dependencies", "user2", "repo1", targetIssue.Index) dependencyMeta := &api.IssueMeta{ - Owner: "org3", - Name: "repo3", - Index: dependencyIssue.Index, + Owner: "org3", + Name: "repo3", + GroupID: 129, + Index: dependencyIssue.Index, } user40 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 40}) @@ -111,9 +112,10 @@ func TestAPIDeleteIssueDependencyCrossRepoPermission(t *testing.T) { url := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/dependencies", "user2", "repo1", targetIssue.Index) dependencyMeta := &api.IssueMeta{ - Owner: "org3", - Name: "repo3", - Index: dependencyIssue.Index, + Owner: "org3", + Name: "repo3", + GroupID: 129, + Index: dependencyIssue.Index, } user40 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 40}) From 599891a581b523ace58d85569a83abdc8b2d747f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 23:14:37 -0500 Subject: [PATCH 136/218] add team-related routes for repos in subgroups --- routers/api/v1/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 5999705588..4d3ef85292 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1756,6 +1756,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). From 9565ab41d3e348159d5229dcaf681091a666dbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 23:35:00 -0500 Subject: [PATCH 137/218] fix repository renaming --- services/repository/transfer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/repository/transfer.go b/services/repository/transfer.go index c36fcb1f4b..def2d7e62a 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -376,7 +376,7 @@ 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, 0))); err != nil { + repo_model.StorageRepo(repo_model.RelativePath(repo.OwnerName, newRepoName, repo.GroupID))); err != nil { return fmt.Errorf("rename repository directory: %w", err) } From 1e54b33c02433c2874a86d410a099cfa02115897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 00:09:32 -0500 Subject: [PATCH 138/218] fix more tests --- tests/integration/api_repo_branch_test.go | 10 +++++----- tests/integration/api_repo_edit_test.go | 4 ++-- tests/integration/api_repo_file_diffpatch_test.go | 4 ++-- tests/integration/editor_test.go | 2 +- tests/integration/issue_test.go | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/integration/api_repo_branch_test.go b/tests/integration/api_repo_branch_test.go index 2438db72c5..ea9b036bbf 100644 --- a/tests/integration/api_repo_branch_test.go +++ b/tests/integration/api_repo_branch_test.go @@ -31,7 +31,7 @@ func TestAPIRepoBranchesPlain(t *testing.T) { // public only token should be forbidden publicOnlyToken := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopePublicOnly, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches", repo3.Name)) // a plain repo + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches", maybeGroupSegment(repo3.GroupID), repo3.Name)) // a plain repo MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(publicOnlyToken), http.StatusForbidden) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -45,7 +45,7 @@ func TestAPIRepoBranchesPlain(t *testing.T) { assert.Equal(t, "test_branch", branches[0].Name) assert.Equal(t, "master", branches[1].Name) - link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches/test_branch", repo3.Name)) + link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches/test_branch", maybeGroupSegment(repo3.GroupID), repo3.Name)) MakeRequest(t, NewRequest(t, "GET", link2.String()).AddTokenAuth(publicOnlyToken), http.StatusForbidden) resp = MakeRequest(t, NewRequest(t, "GET", link2.String()).AddTokenAuth(token), http.StatusOK) @@ -79,7 +79,7 @@ func TestAPIRepoBranchesPlain(t *testing.T) { assert.Equal(t, "test_branch2", branches[1].Name) assert.Equal(t, "master", branches[2].Name) - link3, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches/test_branch2", repo3.Name)) + link3, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches/test_branch2", maybeGroupSegment(repo3.GroupID), repo3.Name)) MakeRequest(t, NewRequest(t, "DELETE", link3.String()), http.StatusNotFound) MakeRequest(t, NewRequest(t, "DELETE", link3.String()).AddTokenAuth(publicOnlyToken), http.StatusForbidden) @@ -96,7 +96,7 @@ func TestAPIRepoBranchesMirror(t *testing.T) { session := loginUser(t, user1.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches", repo5.Name)) // a mirror repo + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches", maybeGroupSegment(repo5.GroupID), repo5.Name)) // a mirror repo resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) @@ -107,7 +107,7 @@ func TestAPIRepoBranchesMirror(t *testing.T) { assert.Equal(t, "test_branch", branches[0].Name) assert.Equal(t, "master", branches[1].Name) - link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches/test_branch", repo5.Name)) + link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches/test_branch", maybeGroupSegment(repo5.GroupID), repo5.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link2.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) diff --git a/tests/integration/api_repo_edit_test.go b/tests/integration/api_repo_edit_test.go index e37b214fa8..c9516c1b22 100644 --- a/tests/integration/api_repo_edit_test.go +++ b/tests/integration/api_repo_edit_test.go @@ -400,11 +400,11 @@ func TestAPIRepoEdit(t *testing.T) { // Test using org repo "org3/repo3" where user2 is a collaborator origRepoEditOption = getRepoEditOptionFromRepo(repo3) repoEditOption = getNewRepoEditOption(origRepoEditOption) - req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s", org3.Name, repo3.Name), &repoEditOption). + req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/group/%d/%s", org3.Name, repo3.GroupID, repo3.Name), &repoEditOption). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // reset repo in db - req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s", org3.Name, *repoEditOption.Name), &origRepoEditOption). + req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/group/%d/%s", org3.Name, repo3.GroupID, *repoEditOption.Name), &origRepoEditOption). AddTokenAuth(token2) _ = MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/api_repo_file_diffpatch_test.go b/tests/integration/api_repo_file_diffpatch_test.go index 928ea3bfb8..e1aa0860d3 100644 --- a/tests/integration/api_repo_file_diffpatch_test.go +++ b/tests/integration/api_repo_file_diffpatch_test.go @@ -72,12 +72,12 @@ func TestAPIApplyDiffPatchFileOptions(t *testing.T) { MakeRequest(t, req, http.StatusCreated) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/diffpatch", org3.Name, repo3.Name), getApplyDiffPatchFileOptions()). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/diffpatch", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), getApplyDiffPatchFileOptions()). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) // Test using org repo "org3/repo3" with no user token - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/diffpatch", org3.Name, repo3.Name), getApplyDiffPatchFileOptions()) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/diffpatch", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), getApplyDiffPatchFileOptions()) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index 89159846e7..e83ac15b88 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -122,7 +122,7 @@ func testEditorActionEdit(t *testing.T, session *TestSession, groupID int64, use params["tree_path"] = util.IfZero(params["tree_path"], filePath) newBranchName := util.Iif(params["commit_choice"] == "direct", branch, params["new_branch_name"]) - resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s/%s%s/%s/%s", user, maybeGroupSegment(groupID), repo, editorAction, branch, filePath), params) + resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s%s/%s/%s/%s", user, maybeGroupSegment(groupID), repo, editorAction, branch, filePath), params) assert.Equal(t, http.StatusOK, resp.Code) assert.NotEmpty(t, test.RedirectURL(resp)) req := NewRequest(t, "GET", "/"+path.Join(user, repo, "raw/branch", newBranchName, params["tree_path"])) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index ba15f8962e..50a2d8b389 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -445,19 +445,19 @@ func TestIssueRedirect(t *testing.T) { session := loginUser(t, "user2") // Test external tracker where style not set (shall default numeric) - req := NewRequest(t, "GET", "/org26/repo_external_tracker/issues/1") + req := NewRequest(t, "GET", "/org26/group/49/repo_external_tracker/issues/1") resp := session.MakeRequest(t, req, http.StatusSeeOther) assert.Equal(t, "https://tracker.com/org26/repo_external_tracker/issues/1", test.RedirectURL(resp)) // Test external tracker with numeric style - req = NewRequest(t, "GET", "/org26/repo_external_tracker_numeric/issues/1") + req = NewRequest(t, "GET", "/org26/group/53/repo_external_tracker_numeric/issues/1") resp = session.MakeRequest(t, req, http.StatusSeeOther) assert.Equal(t, "https://tracker.com/org26/repo_external_tracker_numeric/issues/1", test.RedirectURL(resp)) // Test external tracker with alphanumeric style (for a pull request) req = NewRequest(t, "GET", "/org26/repo_external_tracker_alpha/issues/1") resp = session.MakeRequest(t, req, http.StatusSeeOther) - assert.Equal(t, "/org26/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) + assert.Equal(t, "/org26/group/41/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) // test to check that the PR redirection works if the issue unit is disabled // repo1 is a normal repository with issue unit enabled, visit issue 2(which is a pull request) From f7660594f702a30bc251ec5e77a398fa47f6f9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 00:27:40 -0500 Subject: [PATCH 139/218] fix go-get import paths --- routers/web/goget.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/routers/web/goget.go b/routers/web/goget.go index 9321375c00..be4fd9dd6f 100644 --- a/routers/web/goget.go +++ b/routers/web/goget.go @@ -23,7 +23,7 @@ func goGet(ctx *context.Context) { return } - parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 5) + parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 6) if len(parts) < 3 { return @@ -31,7 +31,8 @@ func goGet(ctx *context.Context) { var group string ownerName := parts[1] repoName := parts[2] - if len(parts) > 3 { + if len(parts) > 4 { + repoName = parts[4] group = parts[3] } @@ -62,9 +63,9 @@ func goGet(ctx *context.Context) { } prefix := setting.AppURL + url.PathEscape(ownerName) if group != "" { - prefix = path.Join(prefix, group) + prefix = prefix + "/" + group } - prefix = path.Join(prefix, url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName)) + prefix = prefix + "/" + path.Join(url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName)) appURL, _ := url.Parse(setting.AppURL) From bc449a8caf19edac58493d51963e4515a181d0d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 00:35:19 -0500 Subject: [PATCH 140/218] update swagger definitions --- templates/swagger/v1_groups.json | 25222 ++++++++++++++--------------- templates/swagger/v1_json.tmpl | 5 + 2 files changed, 12616 insertions(+), 12611 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 0a73b3e46f..667fbf96da 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,15 +1,14 @@ { "paths": { - "/repos/{owner}/group/{group_id}/{repo}/collaborators": { - "get": { - "operationId": "repoListCollaborators", + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { + "post": { "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "type": "string", @@ -18,47 +17,57 @@ "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" - }, { "required": true, - "in": "path", - "description": "group ID of the repo", + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path" + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/UserList" + "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" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List a repository's collaborators" + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "/repos/{owner}/group/{group_id}/{repo}/commits": { "get": { - "operationId": "getWorkflowRuns", + "tags": [ + "repository" + ], + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", "parameters": [ { "type": "string", @@ -68,53 +77,73 @@ "required": true }, { + "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { "type": "string", - "description": "workflow event name", - "name": "event", + "description": "SHA or branch to start listing commits from (usually 'master')", + "name": "sha", "in": "query" }, { - "description": "workflow branch", - "name": "branch", + "type": "string", + "description": "filepath of a file/dir", + "name": "path", + "in": "query" + }, + { + "format": "date-time", + "description": "Only commits after this date will be returned (ISO 8601 format)", + "name": "since", "in": "query", "type": "string" }, { "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", + "format": "date-time", + "description": "Only commits before this date will be returned (ISO 8601 format)", + "name": "until", "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" - }, - { - "description": "page size of results", - "name": "limit", "in": "query", - "type": "integer" + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat" + }, + { + "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" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "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" }, { "in": "path", @@ -127,169 +156,28 @@ ], "responses": { "200": { - "$ref": "#/responses/WorkflowRunsList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/CommitList" }, "404": { "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" } }, "produces": [ "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all runs for a repository run" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "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 - }, - { - "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" - }, - "name": "body", - "in": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { + "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { "get": { - "summary": "Get a commit's diff or patch", - "operationId": "repoDownloadCommitDiffOrPatch", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "sha", - "in": "path", - "required": true, - "type": "string", - "description": "SHA of the commit to get" - }, - { - "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" + "description": "GPG armored public key", + "schema": { + "type": "string" + } } }, "produces": [ @@ -297,11 +185,145 @@ ], "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } ] } }, "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "get": { + "tags": [ + "issue" + ], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a label", + "operationId": "issueDeleteLabel" + }, "patch": { + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, "consumes": [ "application/json" ], @@ -315,26 +337,26 @@ "operationId": "issueEditLabel", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "integer", "format": "int64", "description": "id of the label to edit", - "name": "id" + "name": "id", + "in": "path", + "required": true }, { "name": "body", @@ -351,153 +373,69 @@ "type": "integer", "format": "int64" } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Label" - } - } - }, - "get": { - "operationId": "issueGetLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a single label" - }, - "delete": { - "operationId": "issueDeleteLabel", + "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": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", "required": true }, { - "description": "name of the repo", - "name": "repo", - "in": "path", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + }, + "name": "body", + "in": "body" }, { - "name": "id", - "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "id of the label to delete" - }, - { + "in": "path", + "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/FileResponse" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "tags": [ - "issue" - ], - "summary": "Delete a label" + "consumes": [ + "application/json" + ] } }, "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { "delete": { - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], "responses": { "404": { "$ref": "#/responses/notFound" @@ -520,19 +458,9 @@ ], "tags": [ "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { - "get": { - "produces": [ - "application/json" ], - "tags": [ - "issue" - ], - "summary": "List a repository's issues", - "operationId": "issueListIssues", + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", "parameters": [ { "type": "string", @@ -542,140 +470,19 @@ "required": true }, { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "whether issue is open or closed", - "name": "state", - "in": "query", - "enum": [ - "closed", - "open", - "all" - ], - "type": "string" - }, - { - "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" - }, - { - "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" - }, - { - "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" - }, - { - "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" - }, - { - "in": "query", - "type": "string", - "description": "Only show items which were created by the given user", - "name": "created_by" - }, - { - "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" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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": { - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueOption" - } + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path" }, { "required": true, @@ -685,149 +492,26 @@ "type": "integer", "format": "int64" } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" ] } }, - "/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", + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { "parameters": [ { + "type": "string", "description": "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" + "required": true }, { "required": true, "type": "string", - "description": "name of branch/tag/commit", - "name": "ref", + "description": "name of the repo", + "name": "repo", "in": "path" }, - { - "name": "sort", - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { - "get": { - "tags": [ - "issue" - ], - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, { "type": "integer", "format": "int64", @@ -837,12 +521,82 @@ "required": true }, { + "required": true, + "type": "integer", "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", + "description": "id of time to delete", + "name": "id", + "in": "path" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/forks": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { "in": "path", "required": true, - "type": "integer" + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" }, { "type": "integer", @@ -855,125 +609,42 @@ ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/RepositoryList" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" ] }, - "delete": { - "produces": [ - "application/json" - ], + "post": { "tags": [ - "issue" + "repository" ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment", + "summary": "Fork a repository", + "operationId": "createFork", "parameters": [ { - "description": "owner of the repo", + "description": "owner of the repo to fork", "name": "owner", "in": "path", "required": true, "type": "string" }, { - "description": "name of the repo", - "name": "repo", "in": "path", "required": true, - "type": "string" - }, - { - "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", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "patch": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", - "parameters": [ - { - "description": "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" - }, - { - "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 + "type": "string", + "description": "name of the repo to fork", + "name": "repo" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditAttachmentOptions" + "$ref": "#/definitions/CreateForkOption" } }, { @@ -986,28 +657,30 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." }, "422": { "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" } - } + }, + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { "get": { - "tags": [ - "issue" - ], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline", + "operationId": "listWorkflowJobs", "parameters": [ { "type": "string", @@ -1017,45 +690,155 @@ "required": true }, { - "type": "string", - "description": "name of the repo", - "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" }, { "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", "in": "path" }, + { + "description": "Name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, { "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", + "description": "Filter by target base branch of the pull request", + "name": "base_branch", + "in": "query" + }, + { + "type": "string", + "default": "open", + "description": "State of pull request", + "name": "state", + "in": "query", + "enum": [ + "open", + "closed", + "all" + ] + }, + { + "enum": [ + "oldest", + "recentupdate", + "recentclose", + "leastupdate", + "mostcomment", + "leastcomment", + "priority" + ], + "type": "string", + "description": "Type of sort", + "name": "sort", "in": "query" }, { "type": "integer", - "description": "page number of results to return (1-based)", + "format": "int64", + "description": "ID of the milestone", + "name": "milestone", + "in": "query" + }, + { + "description": "Label IDs", + "name": "labels", + "in": "query", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi" + }, + { + "type": "string", + "description": "Filter by pull request author", + "name": "poster", + "in": "query" + }, + { + "description": "Page number of results to return (1-based)", "name": "page", - "in": "query" + "in": "query", + "minimum": 1, + "type": "integer", + "default": 1 }, { "type": "integer", - "description": "page size of results", + "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" + "in": "query", + "minimum": 0 }, { "format": "int64", @@ -1067,191 +850,26 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TimelineList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { - "operationId": "issueStartStopWatch", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Start stopwatch on an issue." - } - }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "post": { - "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { + "500": { "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/PullRequestList" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a commit status", - "operationId": "repoCreateStatus", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] + } }, - "get": { + "post": { + "operationId": "repoCreatePullRequest", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "name": "repo", @@ -1261,258 +879,117 @@ "description": "name of the repo" }, { - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ] - }, - { - "description": "type of state", - "name": "state", - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommitStatusList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "summary": "Edit a wiki page", - "operationId": "repoEditWikiPage", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" - }, - { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body" + "$ref": "#/definitions/CreatePullRequestOption" + } }, { - "name": "group_id", - "type": "integer", - "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, "423": { "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/PullRequest" } }, "consumes": [ "application/json" ], - "tags": [ - "repository" - ] - } - }, - "/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", + "summary": "Create a pull request" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "SHA of the commit to get", + "name": "sha" + }, + { + "name": "diffType", + "in": "path", + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch" + }, + { + "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}/reviews/{id}/comments": { + "get": { "parameters": [ { "name": "owner", @@ -1522,58 +999,66 @@ "description": "owner of the repo" }, { - "description": "name of the repository", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { - "type": "integer", - "description": "id of the job", - "name": "job_id", + "description": "index of the pull request", + "name": "index", "in": "path", - "required": true - }, - { - "format": "int64", "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "id", "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review" + }, + { "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "description": "output blob content" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/PullReviewCommentList" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/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", + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { + "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" + "required": true }, { "in": "path", @@ -1583,12 +1068,278 @@ "name": "repo" }, { - "name": "index", - "in": "path", - "required": true, + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "index of the pull request" + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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}/actions/artifacts/{artifact_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific artifact for a workflow run", + "operationId": "getArtifact", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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}/reviewers": { + "get": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that can be requested to review in this repo" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { + "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", @@ -1598,6 +1349,14 @@ "in": "path", "required": true }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } + }, { "description": "group ID of the repo", "name": "group_id", @@ -1608,6 +1367,9 @@ } ], "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, "403": { "$ref": "#/responses/forbidden" }, @@ -1616,18 +1378,142 @@ }, "422": { "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "put": { + "tags": [ + "issue" + ], + "summary": "Lock an issue", + "operationId": "issueLockIssue", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" }, - "200": { - "$ref": "#/responses/PullReview" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/LockIssueOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { "get": { "responses": { "200": { - "$ref": "#/responses/LicensesList" + "$ref": "#/responses/RepoIssueConfig" }, "404": { "$ref": "#/responses/notFound" @@ -1639,48 +1525,116 @@ "tags": [ "repository" ], - "summary": "Get repo licenses", - "operationId": "repoGetLicenses", + "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": "owner of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "in": "path", - "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path", + "description": "group ID of the repo" } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { "put": { + "operationId": "updateRepoSecret", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repository", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Update a repo-level variable", - "operationId": "updateRepoVariable", + "summary": "Create or Update a secret value in a repository" + }, + "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 repo", + "description": "owner of the repository", "name": "owner", "in": "path", "required": true @@ -1693,18 +1647,80 @@ "required": true }, { - "name": "variablename", + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "description": "delete one secret of the repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { "in": "path", "required": true, "type": "string", - "description": "name of the variable" + "description": "sha of the commit", + "name": "sha" }, { - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - }, - "name": "body", - "in": "body" + "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" + }, + { + "name": "per_page", + "in": "query", + "type": "integer", + "description": "number of items per page" }, { "name": "group_id", @@ -1722,30 +1738,140 @@ "404": { "$ref": "#/responses/notFound" }, - "201": { - "description": "response when updating a repo-level variable" - }, - "204": { - "description": "response when updating a repo-level variable" + "200": { + "$ref": "#/responses/GitTreeResponse" } - } - }, - "post": { + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path" + }, + { + "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": { + "operationId": "updateRepoVariable", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a repo-level variable" + }, + "post": { "summary": "Create a repo-level variable", "operationId": "createRepoVariable", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "type": "string", @@ -1769,12 +1895,12 @@ } }, { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { @@ -1790,7 +1916,13 @@ "500": { "$ref": "#/responses/error" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] }, "delete": { "produces": [ @@ -1803,25 +1935,25 @@ "operationId": "deleteRepoVariable", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repository" }, { + "required": true, "type": "string", "description": "name of the variable", "name": "variablename", - "in": "path", - "required": true + "in": "path" }, { "required": true, @@ -1833,6 +1965,9 @@ } ], "responses": { + "204": { + "description": "response when deleting a variable" + }, "400": { "$ref": "#/responses/error" }, @@ -1844,126 +1979,11 @@ }, "201": { "description": "response when deleting a variable" - }, - "204": { - "description": "response when deleting a variable" - } - } - }, - "get": { - "operationId": "getRepoVariable", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repo-level variable" - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" - }, - "404": { - "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { "get": { "produces": [ "application/json" @@ -1971,135 +1991,8 @@ "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "operationId": "repoSubmitPullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an pull request" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview", + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", "parameters": [ { "type": "string", @@ -2116,20 +2009,83 @@ "description": "name of the repo" }, { + "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" + }, + { + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query", + "type": "boolean" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "index of the pull request", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Note" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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 }, { - "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "id of the review", - "name": "id" + "description": "the new position", + "name": "position", + "in": "path" }, { "description": "group ID of the repo", @@ -2140,6 +2096,205 @@ "in": "path" } ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the Git hooks in a repository", + "operationId": "repoListGitHooks" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all artifacts for a repository", + "operationId": "getArtifacts" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "format": "int64", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], "responses": { "404": { "$ref": "#/responses/notFound" @@ -2153,36 +2308,33 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "/repos/{owner}/group/{group_id}/{repo}/topics": { "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "type": "string", - "description": "name of the repository", + "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" + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" }, { "type": "integer", @@ -2191,12 +2343,12 @@ "in": "query" }, { + "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path", - "description": "group ID of the repo" + "in": "path" } ], "responses": { @@ -2204,31 +2356,75 @@ "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/TopicNames" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { + }, + "produces": [ + "application/json" + ] + }, + "put": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Returns the issue config for a repo", - "operationId": "repoGetIssueConfig", + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "get": { "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { "name": "repo", @@ -2237,57 +2433,6 @@ "type": "string", "description": "name of the repo" }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfig" - }, - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "team name", - "name": "team" - }, { "required": true, "in": "path", @@ -2299,132 +2444,7 @@ ], "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "team name", - "name": "team", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "team name", - "name": "team", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/ReferenceList" }, "404": { "$ref": "#/responses/notFound" @@ -2436,8 +2456,20 @@ "tags": [ "repository" ], - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs" + } + }, + "/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", @@ -2454,26 +2486,34 @@ "name": "repo" }, { + "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path", - "description": "group ID of the repo" + "in": "path" } - ] + ], + "responses": { + "200": { + "description": "ssh public key", + "schema": { + "type": "string" + } + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", + "summary": "Delete a hook in a repository", + "operationId": "repoDeleteHook", "parameters": [ { "description": "owner of the repo", @@ -2483,36 +2523,162 @@ "type": "string" }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { - "type": "string", - "description": "sha of the commit", - "name": "sha", + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", "in": "path", "required": true }, { - "type": "boolean", - "description": "show all directories and files", - "name": "recursive", - "in": "query" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "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": "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": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true, "type": "integer", - "description": "number of items per page", - "name": "per_page", - "in": "query" + "format": "int64" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + }, + "name": "body" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the hook to get" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { "required": true, @@ -2525,34 +2691,33 @@ ], "responses": { "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/IssueTemplates" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", + "summary": "Get available issue templates for a repository", + "operationId": "repoGetIssueTemplates" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/file-contents": { + "get": { + "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 + "required": true, + "type": "string" }, { "type": "string", @@ -2561,38 +2726,18 @@ "in": "path", "required": true }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - } - }, - "post": { - "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 + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query" }, { "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", + "name": "body", + "in": "query" }, { "description": "group ID of the repo", @@ -2605,27 +2750,33 @@ ], "responses": { "200": { - "$ref": "#/responses/RegistrationToken" + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" } }, + "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.", "produces": [ "application/json" ], "tags": [ "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "operationId": "repoGetRepoPermissions", + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Get the metadata and contents of requested files", + "operationId": "repoGetFileContentsPost", "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo" }, { "type": "string", @@ -2635,11 +2786,18 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "username of the collaborator whose permissions are to be obtained", - "name": "collaborator" + "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", @@ -2650,6 +2808,270 @@ "name": "group_id" } ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "description": "id of the tag protect to get", + "name": "id", + "in": "path" + }, + { + "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": { + "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "operationId": "repoGetRepoPermissions", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" @@ -2670,31 +3092,95 @@ "summary": "Get repository permissions for a user" } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { "get": { - "operationId": "repoCheckCollaborator", + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", "required": true, "type": "string" }, { "type": "string", - "description": "username of the user to check for being a collaborator", - "name": "collaborator", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, + { + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since" + }, + { + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, { "description": "group ID of the repo", "name": "group_id", @@ -2705,14 +3191,8 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/RegistrationToken" } }, "produces": [ @@ -2720,73 +3200,55 @@ ], "tags": [ "repository" - ], - "summary": "Check if a user is a collaborator of a repository" + ] }, - "put": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", + "summary": "Get a repository's actions runner registration token", + "operationId": "repoCreateRunnerRegistrationToken", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" - }, - { - "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/RegistrationToken" } } - }, - "delete": { - "operationId": "repoDeleteCollaborator", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues": { + "get": { + "tags": [ + "issue" + ], + "summary": "List a repository's issues", + "operationId": "issueListIssues", "parameters": [ { "type": "string", @@ -2796,18 +3258,94 @@ "required": true }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" + }, + { + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" }, { "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator", - "in": "path", - "required": true + "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" + }, + { + "name": "type", + "in": "query", + "enum": [ + "issues", + "pulls" + ], + "type": "string", + "description": "filter by type (issues / pulls) if set" + }, + { + "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" + }, + { + "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "description": "Only show items which were created by the given user", + "name": "created_by", + "in": "query", + "type": "string" + }, + { + "type": "string", + "description": "Only show items for which the given user is assigned", + "name": "assigned_by", + "in": "query" + }, + { + "in": "query", + "type": "string", + "description": "Only show items in which the given user was mentioned", + "name": "mentioned_by" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "type": "integer", @@ -2819,148 +3357,20 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" } }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a collaborator from a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { - "get": { - "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 - }, - { - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - }, "produces": [ "application/json" ] }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ] - }, - "patch": { - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment", + "post": { + "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueCreateIssue", "parameters": [ { "in": "path", @@ -2977,27 +3387,166 @@ "required": true }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } }, { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", + "required": true + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } + "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" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" }, { "format": "int64", @@ -3008,336 +3557,160 @@ "type": "integer" } ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment" + }, + "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 + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "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 + }, + { + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit" + }, + { + "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" + "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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}/issues/comments/{id}/reactions": { + "/repos/{owner}/group/{group_id}/{repo}/releases": { "get": { - "operationId": "issueGetCommentReactions", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a list of reactions from a comment of an issue" - }, - "post": { - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "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 - }, - { - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content", - "in": "body" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "operationId": "acceptRepoTransfer", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to transfer" - }, - { - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "Accept a repo transfer" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { - "post": { - "responses": { - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Reaction" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction", + "summary": "List a repo's releases", + "operationId": "repoListReleases", "parameters": [ { "type": "string", @@ -3347,140 +3720,29 @@ "required": true }, { - "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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" - } - ] - }, - "delete": { - "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 + "name": "repo" }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft", + "in": "query" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" + "type": "boolean", + "description": "filter (exclude / include) pre-releases", + "name": "pre-release", + "in": "query" }, { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "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 - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "query", "type": "integer", "description": "page number of results to return (1-based)", - "name": "page" + "name": "page", + "in": "query" }, { "type": "integer", @@ -3489,25 +3751,83 @@ "in": "query" }, { - "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/ReleaseList" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/Release" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] } }, "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { @@ -3522,35 +3842,29 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "name": "repo", "in": "path", "required": true }, { + "in": "path", + "required": true, + "type": "string", + "description": "id of the workflow", + "name": "workflow_id" + }, + { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, @@ -3562,6 +3876,12 @@ }, "204": { "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" } }, "produces": [ @@ -3573,1471 +3893,13 @@ "summary": "Enable a workflow" } }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get revisions of a wiki page", - "operationId": "repoGetWikiPageRevisions" - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "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": { - "tags": [ - "repository" - ], - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - }, - "name": "body", - "in": "body", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags": { - "get": { - "operationId": "repoListTags", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results, default maximum page size is 50" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's tags" - }, - "post": { - "responses": { - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "get": { - "tags": [ - "repository" - ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "description": "User is not watching this repo or repo do not exist" - } - } - }, - "put": { - "parameters": [ - { - "type": "string", - "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": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "repository" - ], - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription" - }, - "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 - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { - "delete": { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueTemplates" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { - "get": { - "operationId": "repoValidateIssueConfig", - "parameters": [ - { - "description": "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Returns the validation information for a issue config" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { - "get": { - "summary": "Get the tag of a repository by tag name", - "operationId": "repoGetTag", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "name of tag", - "name": "tag", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repository's tag by name", - "operationId": "repoDeleteTag", - "parameters": [ - { - "description": "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" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of tag to delete", - "name": "tag" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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}/push_mirrors/{name}": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "remote name of push mirror", - "name": "name" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "deletes a push mirror from a repository by remoteName", - "operationId": "repoDeletePushMirror", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/issues/{index}/subscriptions/check": { - "get": { - "tags": [ - "issue" - ], - "summary": "Check if user is subscribed to an issue", - "operationId": "issueCheckSubscription", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List the hooks in a repository", - "operationId": "repoListHooks" - }, - "post": { - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/TasksList" - } - }, - "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" - } - ] - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the key to get", - "name": "id", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/ActionWorkflowList" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "get": { - "summary": "Get an issue", - "operationId": "issueGetIssue", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to get" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to delete" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { "patch": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "201": { - "$ref": "#/responses/Issue" - } - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to edit" - }, - { - "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" - } - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "compare two branches or commits", - "name": "basehead" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Compare" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get all wiki pages", - "operationId": "repoGetWikiPages", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "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" - }, - { - "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}/issues/{index}/subscriptions": { - "get": { + "summary": "Edit a comment", + "operationId": "issueEditComment", "parameters": [ { "description": "owner of the repo", @@ -5046,187 +3908,6 @@ "required": true, "type": "string" }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "run", - "in": "path", - "required": true, - "type": "integer", - "description": "runid of the workflow run" - }, - { - "description": "name of the artifact", - "name": "name", - "in": "query", - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a Git hook", - "operationId": "repoGetGitHook" - }, - "delete": { - "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 - }, { "name": "repo", "in": "path", @@ -5235,11 +3916,19 @@ "description": "name of the repo" }, { - "required": true, - "type": "string", - "description": "id of the hook to get", + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", "name": "id", - "in": "path" + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } }, { "type": "integer", @@ -5251,147 +3940,41 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ] }, - "patch": { - "operationId": "repoEditGitHook", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a Git hook in a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ + "consumes": [ "application/json" ], - "tags": [ - "repository" - ], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds" - } - }, - "/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", + "summary": "Get a comment", + "operationId": "issueGetComment", "parameters": [ { "type": "string", @@ -5401,22 +3984,14 @@ "required": true }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "id of the label to remove", + "description": "id of the comment", "name": "id", "in": "path", "required": true, @@ -5433,6 +4008,9 @@ } ], "responses": { + "200": { + "$ref": "#/responses/Comment" + }, "204": { "$ref": "#/responses/empty" }, @@ -5441,15 +4019,10 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { - "post": { + }, + "delete": { "parameters": [ { "description": "owner of the repo", @@ -5466,154 +4039,12 @@ "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchProtectionPriories" - } - }, - { + "in": "path", + "required": true, "type": "integer", "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update the priorities of branch protections for a repository.", - "operationId": "repoUpdateBranchProtectionPriories" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times": { - "get": { - "operationId": "repoTrackedTimes", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "user", - "in": "query", - "type": "string", - "description": "optional filter by user (available for issue managers)" - }, - { - "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" - }, - { - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's tracked times" - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "description": "id of comment to delete", + "name": "id" }, { "description": "group ID of the repo", @@ -5625,119 +4056,47 @@ } ], "responses": { - "200": { - "$ref": "#/responses/GitHookList" - }, "404": { "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { - "get": { - "summary": "Get signing-key.gpg for given repository", - "operationId": "repoSigningKey", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "204": { + "$ref": "#/responses/empty" }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } + "403": { + "$ref": "#/responses/forbidden" } }, - "produces": [ - "text/plain" - ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { - "tags": [ - "repository" + "issue" ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] + "summary": "Delete a comment", + "operationId": "issueDeleteComment" } }, "/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": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { + "required": true, + "type": "string", "description": "name of the repository", "name": "repo", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { "type": "string", @@ -5765,4412 +4124,45 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow job for a workflow run", - "operationId": "getWorkflowJob" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned pull requests", - "operationId": "repoListPinnedPullRequests" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "part or full name of the ref", - "name": "ref", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { - "get": { - "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 - }, - { - "description": "base of the pull request to get", - "name": "base", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "head of the pull request to get", - "name": "head", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { - "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" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { - "get": { - "summary": "Lists all artifacts for a repository", - "operationId": "getArtifacts", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "type": "string", - "description": "name of the artifact", - "name": "name", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ArtifactsList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { - "get": { - "tags": [ - "issue" - ], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", - "parameters": [ - { - "required": true, - "type": "string", - "description": "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" - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query" - }, - { - "name": "before", - "in": "query", - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned." - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Comment" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues" - } - }, - "/repos/{owner}/group/{group_id}/{repo}": { - "get": { - "operationId": "repoGet", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repository", - "operationId": "repoDelete", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to delete", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo to delete", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo to edit", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to edit" - }, - { - "schema": { - "$ref": "#/definitions/EditRepoOption" - }, - "description": "Properties of a repo that you can edit", - "name": "body", - "in": "body" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a repository's properties. Only fields that are set will be changed.", - "operationId": "repoEdit" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { - "get": { - "tags": [ - "issue" - ], - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "user", - "in": "query", - "type": "string", - "description": "optional filter by user (available for issue managers)" - }, - { - "name": "since", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" - }, - { - "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": "string" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddTimeOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - }, - "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 - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", - "name": "draft" - }, - { - "in": "query", - "type": "boolean", - "description": "filter (exclude / include) pre-releases", - "name": "pre-release" - }, - { - "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": { - "summary": "Create a release", - "operationId": "repoCreateRelease", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { - "get": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "in": "query", - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat" - }, - { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" - }, - { - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results (ignored if used with 'path')", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitBlobResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "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" - }, - { - "type": "string", - "description": "filter by milestone name", - "name": "name", - "in": "query" - }, - { - "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" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "responses": { - "201": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateMilestoneOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "the milestone to get, identified by ID and if not available by name", - "name": "id" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": { - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents": { - "get": { - "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" - } - }, - "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." - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "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}/branch_protections": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a branch protections for a repository", - "operationId": "repoCreateBranchProtection", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path" - }, - { - "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" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query", - "type": "boolean" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommitList" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to test", - "name": "id" - }, - { - "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { - "delete": { - "operationId": "issueDeleteComment", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a comment" - }, - "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 - }, - { - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a comment", - "operationId": "issueGetComment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a comment", - "operationId": "issueDeleteCommentDeprecated", - "deprecated": true - }, - "patch": { - "summary": "Edit a comment", - "operationId": "issueEditCommentDeprecated", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "deprecated": true - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "filepath of file to get", - "name": "filepath", - "in": "path", - "required": true - }, - { - "name": "ref", - "in": "query", - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch." - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { - "get": { - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { - "post": { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopStopWatch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { - "patch": { - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch" - }, - { - "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": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch protection for the repository", - "operationId": "repoDeleteBranchProtection", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { - "post": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "summary": "Remove an issue dependency", - "operationId": "issueRemoveIssueDependencies", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "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" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "get": { - "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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { - "delete": { - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to delete" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "patch": { - "operationId": "repoEditRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the release to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReleaseOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a release" - }, - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release to get", - "name": "id", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release", - "operationId": "repoGetRelease" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "string", - "description": "tag name of the release to get", - "name": "tag", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release by tag name", - "operationId": "repoGetReleaseByTag" - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "tag name of the release to delete", - "name": "tag", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to sync", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo to sync", - "name": "repo", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Return all users that have write access and can be assigned to issues", - "operationId": "repoGetAssignees", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/CombinedStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's combined status, by branch/tag/commit reference", - "operationId": "repoGetCombinedStatusByRef", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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 - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/octet-stream" - ], - "tags": [ - "repository" - ], - "summary": "Get a file from a repository", - "operationId": "repoGetRawFile" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "description": "ssh public key", - "schema": { - "type": "string" - } - } - }, - "produces": [ - "text/plain" - ], - "tags": [ - "repository" - ], - "summary": "Get signing-key.pub for given repository", - "operationId": "repoSigningKeySSH" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" - } - } - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "string", - "description": "index of the issue" - }, - { - "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": { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "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 - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/IssueList" - } - } - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a release attachment", - "operationId": "repoDeleteReleaseAttachment", - "parameters": [ - { - "description": "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" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "302": { - "description": "redirect to the blob download" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/pulls/{index}/merge": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged" - }, - "post": { - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergePullRequestOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a pull request" - }, - "delete": { - "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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", - "name": "index" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { - "delete": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" - } - } - }, - "put": { - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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" - } - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a label to an issue", - "operationId": "issueAddLabel", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } } } }, "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { "get": { + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], "responses": { "200": { "$ref": "#/responses/AttachmentList" @@ -10184,40 +4176,6 @@ ], "tags": [ "repository" - ], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } ] }, "post": { @@ -10232,25 +4190,25 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "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" + "required": true }, { - "in": "query", - "type": "string", "description": "name of the attachment", - "name": "name" + "name": "name", + "in": "query", + "type": "string" }, { "type": "file", @@ -10259,12 +4217,12 @@ "in": "formData" }, { - "type": "integer", - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { @@ -10293,107 +4251,42 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/transfer": { - "post": { - "parameters": [ - { - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer" - } - }, "/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": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", + "name": "owner", "in": "path", "required": true }, { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", "description": "index of the pull request to get", "name": "index", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { - "description": "how to update pull request", - "name": "style", - "in": "query", "enum": [ "merge", "rebase" ], - "type": "string" + "type": "string", + "description": "how to update pull request", + "name": "style", + "in": "query" }, { "format": "int64", @@ -10405,12 +4298,6 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, "409": { "$ref": "#/responses/error" }, @@ -10419,96 +4306,166 @@ }, "200": { "$ref": "#/responses/empty" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { - "get": { - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "403": { + "$ref": "#/responses/forbidden" }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { "404": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path" + }, + { + "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" + } + }, "tags": [ "issue" ], - "summary": "List comment's attachments" + "summary": "Delete a comment" }, - "post": { + "patch": { + "operationId": "issueEditCommentDeprecated", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "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" + } + ], + "produces": [ + "application/json" + ], + "summary": "Edit a comment", + "deprecated": true, "responses": { "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, - "413": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Comment" }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" } }, "consumes": [ - "multipart/form-data" + "application/json" ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Create a comment attachment", - "operationId": "issueCreateIssueCommentAttachment", + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment", "parameters": [ { "type": "string", @@ -10518,111 +4475,113 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "required": true, "type": "integer", "format": "int64", "description": "id of the comment", "name": "id", - "in": "path" - }, - { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "required": true, - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData" + "in": "path", + "required": true }, { "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id" + }, + { "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true - } - ] - } - }, - "/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" - }, - { - "in": "query", "required": true, - "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/ContentsListResponse" + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } } }, - "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`.", + "delete": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment" + }, + "patch": { + "tags": [ + "issue" + ], + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", "parameters": [ { "description": "owner of the repo", @@ -10639,19 +4598,116 @@ "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": "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", - "required": true, "schema": { - "$ref": "#/definitions/GetFilesOptions" + "$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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { + "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" + } + }, + "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 + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "required": true, + "type": "string", + "description": "username of the user to subscribe the issue to", + "name": "user", + "in": "path" + }, { "required": true, "in": "path", @@ -10660,136 +4716,25 @@ "type": "integer", "format": "int64" } - ], + ] + }, + "delete": { "responses": { + "304": { + "description": "User can only subscribe itself if he is no admin" + }, "404": { "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/ContentsListResponse" - } - } - } - }, - "/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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" + "description": "Already unsubscribed" }, - { - "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 - }, - { - "schema": { - "$ref": "#/definitions/EditDeadlineOption" - }, - "name": "body", - "in": "body" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" + "description": "Successfully Unsubscribed" } }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List issue's attachments", - "operationId": "issueListIssueAttachments" - }, - "post": { "consumes": [ - "multipart/form-data" + "application/json" ], "produces": [ "application/json" @@ -10797,85 +4742,8 @@ "tags": [ "issue" ], - "summary": "Create an issue attachment", - "operationId": "issueCreateIssueAttachment", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "name of the attachment", - "name": "name", - "in": "query", - "type": "string" - }, - { - "name": "attachment", - "in": "formData", - "required": true, - "type": "file", - "description": "attachment to upload" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's forks", - "operationId": "listForks", + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", "parameters": [ { "name": "owner", @@ -10885,11 +4753,62 @@ "description": "owner of the repo" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "username of the user to unsubscribe from an issue", + "name": "user" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true, + "type": "integer" }, { "type": "integer", @@ -10904,74 +4823,96 @@ "in": "query" }, { + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query", + "type": "boolean" + }, + { + "name": "files", + "in": "query", + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')" + }, + { + "name": "group_id", "type": "integer", "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/RepositoryList" + "$ref": "#/responses/CommitList" }, "404": { "$ref": "#/responses/notFound" } - } - }, + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { "post": { - "summary": "Fork a repository", - "operationId": "createFork", + "summary": "Update the priorities of branch protections for a repository.", + "operationId": "repoUpdateBranchProtectionPriories", "parameters": [ { - "description": "owner of the repo to fork", + "required": true, + "type": "string", + "description": "owner of the repo", "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, "type": "string" }, { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to fork" - }, - { + "in": "body", "schema": { - "$ref": "#/definitions/CreateForkOption" + "$ref": "#/definitions/UpdateBranchProtectionPriories" }, - "name": "body", - "in": "body" + "name": "body" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" }, - "409": { - "description": "The repository with the same name already exists." - }, "422": { "$ref": "#/responses/validationError" }, - "202": { - "$ref": "#/responses/Repository" + "423": { + "$ref": "#/responses/repoArchivedError" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -10982,14 +4923,18 @@ }, "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { "get": { + "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 + "required": true, + "type": "string" }, { "type": "string", @@ -10999,12 +4944,12 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get" }, { "type": "string", @@ -11031,18 +4976,18 @@ "in": "query" }, { + "type": "integer", "description": "page size of results", "name": "limit", - "in": "query", - "type": "integer" + "in": "query" }, { - "name": "group_id", - "type": "integer", "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { @@ -11053,22 +4998,436 @@ "$ref": "#/responses/notFound" } }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "base of the pull request to get", + "name": "base" + }, + { + "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" + } + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get changed files for a pull request" + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { - "get": { + "/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 + }, + { + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "Transfer Options", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { + "delete": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", + "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" + } + ] + }, + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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}/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's keys", + "operationId": "repoListKeys", "parameters": [ { "name": "owner", @@ -11085,18 +5444,16 @@ "required": true }, { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the provided time are returned.", - "name": "since", + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", "in": "query" }, { - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", "in": "query", "type": "string", - "format": "date-time" + "description": "fingerprint of the key", + "name": "fingerprint" }, { "type": "integer", @@ -11110,6 +5467,1549 @@ "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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { + "get": { + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReview", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoSubmitPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request" + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { + "post": { + "summary": "Sync all push mirrored repository", + "operationId": "repoPushMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo to sync", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + }, + "post": { + "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" + }, + { + "required": true, + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + } + }, + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a comment attachment" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "get": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + }, + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to edit", + "name": "index", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "get": { + "summary": "Get repo licenses", + "operationId": "repoGetLicenses", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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 + }, + { + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "tags": [ + "repository" + ], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to sync" + }, + { + "required": true, + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List all reviews for a pull request" + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a review to an 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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + }, + "name": "body", + "in": "body", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "tags": [ + "issue" + ], + "summary": "Make the issue in the url depend on the issue in the form.", + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "index of the issue", + "name": "index" + }, + { + "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}/raw/{filepath}": { + "get": { + "operationId": "repoGetRawFile", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "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" + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "name": "ref", + "in": "query" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "schema": { + "type": "file" + }, + "description": "Returns raw file content." + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level runners", + "operationId": "getRepoRunners", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone" + }, + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "the milestone to edit, identified by ID and if not available by name", + "name": "id" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Milestone" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Issue" + } + } + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issues that are blocked by this issue", + "operationId": "issueListBlocks", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, { "in": "path", "description": "group ID of the repo", @@ -11118,21 +7018,8 @@ "format": "int64", "required": true } - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + }, "post": { "parameters": [ { @@ -11150,28 +7037,323 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", + "type": "string", + "description": "index of the issue", "name": "index", "in": "path", "required": true }, { - "description": "id of the review", - "name": "id", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { + "get": { + "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.", + "operationId": "repoGetContentsExt", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + }, + { + "name": "includes", + "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." + }, + { + "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" + } + }, + "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" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "get": { + "parameters": [ + { + "type": "string", + "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": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "description": "User is not watching this repo or repo do not exist" + } + }, + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription" + }, + "put": { + "tags": [ + "repository" + ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": [ + { + "description": "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 pull request", + "name": "index", "in": "path", "required": true, "type": "integer", "format": "int64" }, { - "name": "body", - "in": "body", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - } + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" }, { "type": "integer", @@ -11183,6 +7365,9 @@ } ], "responses": { + "422": { + "$ref": "#/responses/validationError" + }, "200": { "$ref": "#/responses/PullReview" }, @@ -11191,210 +7376,19 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Dismiss a review for a pull request", - "operationId": "repoDismissPullReview" - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Commit" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { - "put": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "string", - "description": "name of the topic to add", - "name": "topic", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ] - } - }, "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { "get": { - "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": "owner of the repo" + "required": true }, { "in": "path", @@ -11417,10 +7411,10 @@ "in": "query" }, { - "type": "integer", - "description": "page number of results to return (1-based)", "name": "page", - "in": "query" + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" }, { "description": "page size of results", @@ -11428,6 +7422,370 @@ "in": "query", "type": "integer" }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a workflow run", + "operationId": "listWorkflowRunJobs" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "operationId": "repoCreateWikiPage", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/WikiPage" + } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a wiki page" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { + "get": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitStatusList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path" + }, + { + "description": "type of sort", + "name": "sort", + "in": "query", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string" + }, + { + "type": "string", + "description": "type of state", + "name": "state", + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ] + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "sha", + "in": "path", + "required": true, + "type": "string", + "description": "sha of the commit" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "required": true, + "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" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true, + "type": "string" + }, { "required": true, "in": "path", @@ -11438,26 +7796,21 @@ } ], "responses": { + "204": { + "description": "runner has been deleted" + }, "400": { "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJobsList" } - }, + } + }, + "get": { "produces": [ "application/json" ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { - "get": { "tags": [ "repository" ], @@ -11504,216 +7857,47 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete an 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 - }, - { - "description": "id of the runner", - "name": "runner_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "description": "runner has been deleted" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } } } }, - "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { "get": { - "tags": [ - "repository" - ], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", + "operationId": "issueGetCommentReactions", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "branch to get", - "name": "branch", - "in": "path", "required": true }, { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", "type": "integer", "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/Branch" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "branch to delete", - "name": "branch", - "in": "path" - }, - { - "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": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the branch", - "name": "branch" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" + "$ref": "#/responses/ReactionList" }, "403": { "$ref": "#/responses/forbidden" @@ -11729,13 +7913,540 @@ "application/json" ], "tags": [ - "repository" + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue" + }, + "post": { + "operationId": "issuePostCommentReaction", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to a comment of an issue" + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a reaction from a comment of an issue", + "operationId": "issueDeleteCommentReaction", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { + "post": { + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { "get": { - "operationId": "repoListTagProtection", + "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 + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ReactionList" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "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/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to transfer" + }, + { + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/issues/{index}/stopwatch/start": { + "post": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot start a stopwatch again if it already exists" + }, + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch", "parameters": [ { "type": "string", @@ -11751,6 +8462,156 @@ "type": "string", "description": "name of the repo" }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "put": { + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "topic", + "in": "path", + "required": true, + "type": "string", + "description": "name of the topic to add" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "topic", + "in": "path", + "required": true, + "type": "string", + "description": "name of the topic to delete" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { + "post": { + "operationId": "repoMergeUpstream", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + } + }, { "type": "integer", "format": "int64", @@ -11762,7 +8623,13 @@ ], "responses": { "200": { - "$ref": "#/responses/TagProtectionList" + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ @@ -11771,17 +8638,751 @@ "tags": [ "repository" ], - "summary": "List tag protections for a repository" - }, - "post": { + "summary": "Merge a branch from upstream" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection", + "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": { + "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" + } + }, + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "type": "string", + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun" + }, + "delete": { + "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": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "description": "No Content" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a workflow run" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { + "operationId": "repoListTeams", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's teams" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "all", + "in": "query", + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false" + }, + { + "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" + }, + { + "name": "subject-type", + "in": "query", + "type": "array", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "filter notifications by subject type" + }, + { + "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" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "consumes": [ + "application/json" + ] + }, + "put": { + "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 + }, + { + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "in": "query", + "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": "array", + "items": { + "type": "string" + } + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { + "delete": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "patch": { + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "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 + }, + { + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { + "get": { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "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 + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateRepoAvatarOption" + }, + "name": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete avatar" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "get": { "parameters": [ { "required": true, @@ -11797,6 +9398,636 @@ "in": "path", "required": true }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflow" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { + "get": { + "operationId": "repoListStatusesByRef", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses, by branch/tag/commit reference" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { + "get": { + "operationId": "repoListActivityFeeds", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's activity feeds" + } + }, + "/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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { + "get": { + "responses": { + "302": { + "description": "redirect to the blob download" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "description": "id of the artifact", + "name": "artifact_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "name": "job_id", + "in": "path", + "required": true, + "type": "integer", + "description": "id of the job" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "description": "output blob content" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Downloads the job logs for a workflow run", + "operationId": "downloadActionsRunJobLogs" + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "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 + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { + "get": { + "summary": "Gets the tag object of an annotated tag (not lightweight tags)", + "operationId": "GetAnnotatedTag", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { + "get": { + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "deprecated": true, + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "username of the user whose tracked times are to be listed", + "name": "user", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List tag protections for a repository", + "operationId": "repoListTagProtection", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + } + }, + "post": { + "parameters": [ + { + "type": "string", + "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", @@ -11814,6 +10045,9 @@ } ], "responses": { + "422": { + "$ref": "#/responses/validationError" + }, "423": { "$ref": "#/responses/repoArchivedError" }, @@ -11823,6 +10057,1558 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "get": { + "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" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results, default maximum page size is 50" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's action tasks" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "name": "event", + "in": "query", + "type": "string", + "description": "workflow event name" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all runs for a repository run", + "operationId": "getWorkflowRuns" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "pageName", + "in": "path", + "required": true, + "type": "string", + "description": "name of the page" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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": { + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true, + "type": "string" + }, + { + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body", + "in": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "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" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "string", + "description": "name of tag", + "name": "tag", + "in": "path" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "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 + }, + { + "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": "string" + }, + { + "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}/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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators": { + "get": { + "operationId": "repoListCollaborators", + "parameters": [ + { + "description": "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" + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment" + }, + "patch": { + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "get": { + "parameters": [ + { + "description": "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", + "format": "int64" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { + "get": { + "operationId": "repoGetContents", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path" + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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." + }, + "put": { + "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 + }, + { + "name": "filepath", + "in": "path", + "required": true, + "type": "string", + "description": "path of the file to update" + }, + { + "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": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileResponse" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "path of the file to create", + "name": "filepath", + "in": "path", + "required": true + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + }, + "name": "body", + "in": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "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": "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 + }, + { + "required": true, + "type": "string", + "description": "path of the file to delete", + "name": "filepath", + "in": "path" + }, + { + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + }, + "name": "body", + "in": "body", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "get": { + "operationId": "repoGetRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Release" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release" + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "description": "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" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Check if a team is assigned to a repository", + "operationId": "repoCheckTeam", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "405": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a team to a repository", + "operationId": "repoAddTeam", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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}/issue_config/validate": { + "get": { + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the validation information for a issue config" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { + "patch": { + "summary": "Rename a branch", + "operationId": "repoRenameBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "name of the branch", + "name": "branch", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" }, @@ -11832,40 +11618,44 @@ }, "consumes": [ "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo", + "name": "owner" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" - }, - { "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" + "required": true }, { - "required": true, "type": "string", - "description": "username of the user to subscribe the issue to", - "name": "user", - "in": "path" + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -11878,56 +11668,90 @@ ], "responses": { "200": { - "description": "Already subscribed" - }, - "201": { - "description": "Successfully Subscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" + "$ref": "#/responses/Branch" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription" + } }, "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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 + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], "responses": { - "200": { - "description": "Already unsubscribed" + "423": { + "$ref": "#/responses/repoArchivedError" }, - "201": { - "description": "Successfully Unsubscribed" + "204": { + "$ref": "#/responses/empty" }, - "304": { - "description": "User can only subscribe itself if he is no admin" + "403": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ + "produces": [ "application/json" - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + } + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", + "summary": "Lists all artifacts for a repository run", + "operationId": "getArtifactsOfRun", "parameters": [ { "type": "string", @@ -11937,24 +11761,59 @@ "required": true }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repository", + "name": "repo" }, { "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", + "description": "runid of the workflow run", + "name": "run", "in": "path", "required": true }, { + "description": "name of the artifact", + "name": "name", + "in": "query", + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "get": { + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "in": "path", + "required": true, "type": "string", - "description": "username of the user to unsubscribe from an issue", - "name": "user", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "remote name of push mirror", + "name": "name", "in": "path", "required": true }, @@ -11966,12 +11825,248 @@ "in": "path", "description": "group ID of the repo" } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "get": { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { - "get": { - "operationId": "repoDownloadPullDiffOrPatch", + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + }, + "patch": { + "operationId": "repoEditBranchProtection", "parameters": [ { "required": true, @@ -11981,36 +12076,217 @@ "in": "path" }, { + "required": true, + "type": "string", + "description": "name of the repo", "name": "repo", + "in": "path" + }, + { + "name": "name", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of protected branch" }, { - "name": "index", - "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", - "description": "index of the pull request to get" + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a branch protections for a repository. Only fields that are set will be changed" + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection", + "parameters": [ { + "name": "owner", "in": "path", "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + "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" + "in": "query", + "type": "boolean" }, { "description": "group ID of the repo", @@ -12028,23 +12304,809 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "text/plain" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request diff or patch" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/branches": { + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { "get": { + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/octet-stream" + ], "tags": [ "repository" ], - "summary": "List a repository's branches", - "operationId": "repoListBranches", + "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 + }, + { + "name": "filepath", + "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" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + } + }, + "post": { + "operationId": "repoCreateBranchProtection", + "parameters": [ + { + "description": "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" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch protections for a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "get": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "ref", + "in": "path", + "required": true, + "type": "string", + "description": "name of branch/tag/commit" + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { + "post": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on", + "name": "index", + "in": "path" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { + "get": { + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "responses": { + "201": { + "$ref": "#/responses/Comment" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { + "get": { + "operationId": "ActionsListRepositoryWorkflows", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflowList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List repository workflows" + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "tag", + "in": "path", + "required": true, + "type": "string", + "description": "tag name of the release to get" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "tags": [ + "repository" + ], + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "get": { + "operationId": "issueTrackedTimes", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's tracked times" + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/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", @@ -12060,6 +13122,474 @@ "name": "repo", "in": "path" }, + { + "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}/pulls/{index}/merge": { + "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" + } + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + }, + "get": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "204": { + "description": "pull request has been merged" + }, + "404": { + "description": "pull request has not been merged" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WatchInfo" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { + "operationId": "GetBlob", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the blob of a repository." + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "post": { + "tags": [ + "issue" + ], + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" + } + }, + "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 + }, { "in": "query", "type": "integer", @@ -12072,6 +13602,159 @@ "name": "limit", "in": "query" }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { + "post": { + "operationId": "ActionsDispatchWorkflow", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a workflow dispatch event" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { + "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" + }, { "format": "int64", "required": true, @@ -12088,9 +13771,15 @@ }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] }, "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -12101,25 +13790,25 @@ "operationId": "repoCreateBranch", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { + "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateBranchRepoOption" - }, - "name": "body" + } }, { "description": "group ID of the repo", @@ -12131,6 +13820,9 @@ } ], "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, "201": { "$ref": "#/responses/Branch" }, @@ -12142,1066 +13834,44 @@ }, "409": { "description": "The branch with the same name already exists." - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's stargazers", - "operationId": "repoListStargazers", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/MergeUpstreamResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a branch from upstream", - "operationId": "repoMergeUpstream" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { - "get": { - "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" - }, - { - "name": "includes", - "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." - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsExtResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { - "put": { - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileResponse" - }, - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - } - }, - "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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } - }, - "delete": { - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "path of the file to delete", - "name": "filepath" - }, - { - "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": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Artifact" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific artifact for a workflow run", - "operationId": "getArtifact", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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" - } - ] - }, - "delete": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Deletes a specific artifact for a workflow run" - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "key_id", - "in": "query", - "type": "integer", - "description": "the key_id to search for" - }, - { - "description": "fingerprint of the key", - "name": "fingerprint", - "in": "query", - "type": "string" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "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": { - "operationId": "repoCreateKey", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add a key to a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" - } - }, - "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" - }, - { - "default": "open", - "description": "State of pull request", - "name": "state", - "in": "query", - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - }, - { - "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" - }, - { - "collectionFormat": "multi", - "description": "Label IDs", - "name": "labels", - "in": "query", - "type": "array", - "items": { - "format": "int64", - "type": "integer" - } - }, - { - "type": "string", - "description": "Filter by pull request author", - "name": "poster", - "in": "query" - }, - { - "name": "page", - "in": "query", - "minimum": 1, - "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)" - }, - { - "type": "integer", - "description": "Page size of results", - "name": "limit", - "in": "query", - "minimum": 0 - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "post": { - "operationId": "repoCreatePullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific tag protection for the repository", - "operationId": "repoGetTagProtection", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "id of the tag protect to get", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { "patch": { - "tags": [ - "repository" - ], - "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditTagProtection", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id" - }, - { - "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" + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "412": { + "$ref": "#/responses/error" } }, "consumes": [ "application/json" ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get the merged pull request of the commit", - "operationId": "repoGetCommitPullRequest", + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssue", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -13211,102 +13881,285 @@ "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "index of the issue to edit", + "name": "index", + "in": "path", + "required": true }, { "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" + "$ref": "#/definitions/EditIssueOption" }, "name": "body" }, { + "name": "group_id", + "type": "integer", + "format": "int64", "required": true, "in": "path", + "description": "group ID of the repo" + } + ] + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue", + "operationId": "issueGetIssue", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ] + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/FileResponse" + "$ref": "#/responses/AttachmentList" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + } + } + }, + "post": { + "responses": { + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" }, "423": { "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" } }, "consumes": [ + "multipart/form-data" + ], + "produces": [ "application/json" ], + "tags": [ + "issue" + ], + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "description": "name of the attachment", + "name": "name", + "in": "query", + "type": "string" + }, + { + "required": true, + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", + "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": "owner of the repo" + "required": true }, { - "name": "repo", - "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { "type": "integer", @@ -13320,160 +14173,6 @@ "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" - } - }, - "produces": [ - "application/json" - ] - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Replace list of topics for a repository", - "operationId": "repoUpdateTopics", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/RepoTopicOptions" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - } - } - }, - "/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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to unpin", - "name": "index", - "in": "path" - }, { "format": "int64", "required": true, @@ -13484,11 +14183,60 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/HookList" }, - "403": { - "$ref": "#/responses/forbidden" + "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 + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + }, + "name": "body" + }, + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" @@ -13496,13 +14244,10 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { - "tags": [ - "repository" - ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow", + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "get": { + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", "parameters": [ { "name": "owner", @@ -13511,388 +14256,6 @@ "type": "string", "description": "owner of the repo" }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "workflow_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the workflow" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { - "get": { - "tags": [ - "repository" - ], - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { - "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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "operationId": "updateRepoSecret", - "parameters": [ - { - "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create or Update a secret value in a repository" - }, - "delete": { - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "type": "string", - "description": "id of the run", - "name": "run", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowRun" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a workflow run", - "operationId": "deleteActionRun", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, { "in": "path", "required": true, @@ -13901,579 +14264,10 @@ "name": "repo" }, { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - }, - "name": "body", - "in": "body" - }, - { - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { - "operationId": "repoGetArchive", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get an archive of a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/octet-stream" - ], - "tags": [ - "repository" - ], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - }, - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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 - }, - { - "schema": { - "$ref": "#/definitions/EditPullRequestOption" - }, - "name": "body", - "in": "body" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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": { - "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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to delete" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "patch": { - "operationId": "repoEditHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the hook" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a hook in a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "query", "type": "integer", "description": "page number of results to return (1-based)", - "name": "page" + "name": "page", + "in": "query" }, { "in": "query", @@ -14481,371 +14275,6 @@ "description": "page size of results", "name": "limit" }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/UserList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateActionWorkflowDispatch" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - }, - { - "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", - "name": "status-types", - "in": "query", - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "type": "string", - "description": "Status to mark notifications as. Defaults to read.", - "name": "to-status", - "in": "query" - }, - { - "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": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - } - }, - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "notification" - ], - "summary": "List users's notification threads on a specific repo", - "operationId": "notifyGetRepoList", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "boolean", - "description": "If true, show notifications marked as read. Default value is false", - "name": "all" - }, - { - "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" - }, - { - "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" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "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" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { - "get": { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets" - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "a git ref or commit sha", - "name": "sha", - "in": "path" - }, - { - "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" - }, { "format": "int64", "required": true, @@ -14855,176 +14284,6 @@ "type": "integer" } ], - "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "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" - } - }, - "consumes": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "post": { - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "get": { - "operationId": "repoListPushMirrors", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], "responses": { "200": { "$ref": "#/responses/PushMirrorList" @@ -15044,8 +14303,749 @@ ], "tags": [ "repository" + ] + }, + "post": { + "consumes": [ + "application/json" ], - "summary": "Get all push mirrors of the repository" + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pageName", + "in": "path", + "required": true, + "type": "string", + "description": "name of the page" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "filepath of file to get", + "name": "filepath" + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "success" + }, + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "username of the user to check for being a collaborator", + "name": "collaborator", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "username of the user to add or update as a collaborator", + "name": "collaborator", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + }, + "name": "body" + }, + { + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add or Update a collaborator to a repository", + "operationId": "repoAddCollaborator" + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones": { + "get": { + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "state", + "in": "query", + "type": "string", + "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"" + }, + { + "type": "string", + "description": "filter by milestone name", + "name": "name", + "in": "query" + }, + { + "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" + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's opened milestones" + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + }, + "name": "body" + }, + { + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet" + }, + "delete": { + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to delete", + "name": "owner" + }, + { + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 + }, + { + "description": "name of the repo to edit", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + }, + { + "type": "integer", + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } } } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 83973fec1a..688d6a44c1 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -42335,6 +42335,11 @@ "description": "IssueMeta basic issue information", "type": "object", "properties": { + "group_id": { + "type": "integer", + "format": "int64", + "x-go-name": "GroupID" + }, "index": { "type": "integer", "format": "int64", From 224dd4c624d173439b4be3cd883339ad660fcd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 19:39:54 -0500 Subject: [PATCH 141/218] fix hook url --- modules/private/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/private/hook.go b/modules/private/hook.go index 0a65e0adf3..65146fef62 100644 --- a/modules/private/hook.go +++ b/modules/private/hook.go @@ -121,7 +121,7 @@ func HookProcReceive(ctx context.Context, ownerName, repoName string, groupID in // SetDefaultBranch will set the default branch to the provided branch for the provided repository 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", + reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/set-default-branch/%s/%s%s/%s", url.PathEscape(ownerName), genGroupSegment(groupID), url.PathEscape(repoName), From 724e15d431ac57379a324f65de2123fbc6b00768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 20:55:51 -0500 Subject: [PATCH 142/218] add missing serv route --- routers/private/internal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/private/internal.go b/routers/private/internal.go index 9af8d62dee..abae96cbbe 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -74,6 +74,7 @@ func Routes() *web.Router { r.Post("/hook/set-default-branch/{owner}/{repo}/{branch}", RepoAssignment, SetDefaultBranch) r.Get("/serv/none/{keyid}", ServNoCommand) r.Get("/serv/command/{keyid}/{owner}/{repo}", ServCommand) + r.Get("/serv/command/{keyid}/{owner}/group/{group_id}/{repo}", ServCommand) r.Post("/manager/shutdown", Shutdown) r.Post("/manager/restart", Restart) r.Post("/manager/reload-templates", ReloadTemplates) From 95ef475690f085151c0e8827cea0cc55f07eda27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 21:19:41 -0500 Subject: [PATCH 143/218] set hooks to be executable --- .../migration/lfs-test.git/hooks/post-checkout | 0 .../migration/lfs-test.git/hooks/post-commit | 0 .../migration/lfs-test.git/hooks/post-merge | 0 .../gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push | 0 .../gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive | 0 .../org3/129/repo3.git/hooks/post-receive.d/gitea | 0 .../gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive | 0 .../org3/129/repo3.git/hooks/pre-receive.d/gitea | 0 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update | 0 .../org3/129/repo3.git/hooks/update.d/gitea | 0 .../gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive | 0 .../org3/139/repo5.git/hooks/post-receive.d/gitea | 0 .../gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive | 0 .../org3/139/repo5.git/hooks/pre-receive.d/gitea | 0 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update | 0 .../org3/139/repo5.git/hooks/update.d/gitea | 0 .../org42/106/search-by-path.git/hooks/post-receive | 0 .../org42/106/search-by-path.git/hooks/post-receive.d/gitea | 0 .../org42/106/search-by-path.git/hooks/pre-receive | 0 .../org42/106/search-by-path.git/hooks/pre-receive.d/gitea | 0 .../org42/106/search-by-path.git/hooks/proc-receive | 0 .../org42/106/search-by-path.git/hooks/proc-receive.d/gitea | 0 .../org42/106/search-by-path.git/hooks/update | 0 .../org42/106/search-by-path.git/hooks/update.d/gitea | 0 .../gitea-repositories-meta/user27/repo49.git/hooks/post-receive | 0 .../user27/repo49.git/hooks/post-receive.d/gitea | 0 tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive | 0 .../user27/repo49.git/hooks/pre-receive.d/gitea | 0 tests/gitea-repositories-meta/user27/repo49.git/hooks/update | 0 .../user27/repo49.git/hooks/update.d/gitea | 0 .../user27/template1.git/hooks/post-receive | 0 .../user27/template1.git/hooks/post-receive.d/gitea | 0 .../user27/template1.git/hooks/pre-receive | 0 .../user27/template1.git/hooks/pre-receive.d/gitea | 0 tests/gitea-repositories-meta/user27/template1.git/hooks/update | 0 .../user27/template1.git/hooks/update.d/gitea | 0 36 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout mode change 100644 => 100755 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit mode change 100644 => 100755 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge mode change 100644 => 100755 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push mode change 100644 => 100755 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update mode change 100644 => 100755 tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update mode change 100644 => 100755 tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update mode change 100644 => 100755 tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive mode change 100644 => 100755 tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive mode change 100644 => 100755 tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/user27/repo49.git/hooks/update mode change 100644 => 100755 tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive mode change 100644 => 100755 tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive mode change 100644 => 100755 tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea mode change 100644 => 100755 tests/gitea-repositories-meta/user27/template1.git/hooks/update mode change 100644 => 100755 tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org3/129/repo3.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org3/139/repo5.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/proc-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org42/106/search-by-path.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/update b/tests/gitea-repositories-meta/user27/template1.git/hooks/update old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea old mode 100644 new mode 100755 From 2b7a30604fe4d48d8642541961c414c747dbefed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 24 Nov 2025 21:33:22 -0500 Subject: [PATCH 144/218] reorder serv routes --- routers/private/internal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/private/internal.go b/routers/private/internal.go index abae96cbbe..0072419c20 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -73,8 +73,8 @@ func Routes() *web.Router { 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}/{repo}", ServCommand) 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) r.Post("/manager/reload-templates", ReloadTemplates) From 168775fb9692b24f8f2337544437c027c1e9728a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 17:41:46 -0500 Subject: [PATCH 145/218] fix permissions on some test repos --- .../gitea-repositories-meta/user27/repo49.git/hooks/post-receive | 0 .../user27/repo49.git/hooks/post-receive.d/gitea | 0 tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive | 0 .../user27/repo49.git/hooks/pre-receive.d/gitea | 0 tests/gitea-repositories-meta/user27/repo49.git/hooks/update | 0 .../user27/repo49.git/hooks/update.d/gitea | 0 .../user27/template1.git/hooks/post-receive | 0 .../user27/template1.git/hooks/post-receive.d/gitea | 0 .../user27/template1.git/hooks/pre-receive | 0 .../user27/template1.git/hooks/pre-receive.d/gitea | 0 tests/gitea-repositories-meta/user27/template1.git/hooks/update | 0 .../user27/template1.git/hooks/update.d/gitea | 0 12 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive mode change 100755 => 100644 tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea mode change 100755 => 100644 tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive mode change 100755 => 100644 tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea mode change 100755 => 100644 tests/gitea-repositories-meta/user27/repo49.git/hooks/update mode change 100755 => 100644 tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea mode change 100755 => 100644 tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive mode change 100755 => 100644 tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea mode change 100755 => 100644 tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive mode change 100755 => 100644 tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea mode change 100755 => 100644 tests/gitea-repositories-meta/user27/template1.git/hooks/update mode change 100755 => 100644 tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/update b/tests/gitea-repositories-meta/user27/template1.git/hooks/update old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea old mode 100755 new mode 100644 From 2f1e951d11fe9932b3438abcec2084221a3fc3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 18:05:01 -0500 Subject: [PATCH 146/218] fix more tests --- tests/integration/issue_test.go | 4 ++-- tests/integration/mirror_push_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 50a2d8b389..3b733e4a2b 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -455,9 +455,9 @@ func TestIssueRedirect(t *testing.T) { assert.Equal(t, "https://tracker.com/org26/repo_external_tracker_numeric/issues/1", test.RedirectURL(resp)) // Test external tracker with alphanumeric style (for a pull request) - req = NewRequest(t, "GET", "/org26/repo_external_tracker_alpha/issues/1") + req = NewRequest(t, "GET", "/org26/group/41/repo_external_tracker_alpha/issues/1") resp = session.MakeRequest(t, req, http.StatusSeeOther) - assert.Equal(t, "/org26/group/41/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) + assert.Equal(t, "/org26/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) // test to check that the PR redirection works if the issue unit is disabled // repo1 is a normal repository with issue unit enabled, visit issue 2(which is a pull request) diff --git a/tests/integration/mirror_push_test.go b/tests/integration/mirror_push_test.go index 398cd48b38..ef38846d62 100644 --- a/tests/integration/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -49,7 +49,7 @@ func testMirrorPush(t *testing.T, u *url.URL) { session := loginUser(t, user.Name) - pushMirrorURL := fmt.Sprintf("%s/%s%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name)) + pushMirrorURL := fmt.Sprintf("%s%s/%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name)) testCreatePushMirror(t, session, user.Name, srcRepo.Name, pushMirrorURL, user.LowerName, userPassword, "0") mirrors, _, err := repo_model.GetPushMirrorsByRepoID(t.Context(), srcRepo.ID, db.ListOptions{}) From 1e4b87c21d4200164efb1df476c4ebee31dc0210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 19:10:12 -0500 Subject: [PATCH 147/218] use a custom ordered map to create group swagger mixin --- Makefile | 3 +- build_tools/swagger/main.go | 145 +- templates/swagger/v1_groups.json | 15053 +---------------------------- templates/swagger/v1_json.tmpl | 15048 ---------------------------- 4 files changed, 126 insertions(+), 30123 deletions(-) diff --git a/Makefile b/Makefile index af4b85bdf7..8bcd4c3947 100644 --- a/Makefile +++ b/Makefile @@ -208,8 +208,7 @@ fmt: ## format the Go and template code .PHONY: fmt-check fmt-check: fmt - @shopt -s extglob; \ - diff=$$(git diff --color=always $(GO_SOURCES) $(shell find templates -type f -not -name "v1_groups.json") $(WEB_DIRS)); \ + @diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \ if [ -n "$$diff" ]; then \ echo "Please run 'make fmt' and commit the result:"; \ printf "%s" "$${diff}"; \ diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index 927157e17e..71a23717cf 100644 --- a/build_tools/swagger/main.go +++ b/build_tools/swagger/main.go @@ -5,6 +5,8 @@ package main import ( + "bytes" + "iter" "log" "os" "path/filepath" @@ -13,11 +15,100 @@ import ( "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) (bool, any) { + if _, ok := o.indices[key]; ok { + return true, o.Pairs[o.indices[key]].Value + } + return false, nil +} + +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) + } + } +} + +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 +} + +func innerConvert(it any) any { + switch v := it.(type) { + case map[string]any: + return mapToOrderedMap(v) + case []any: + for i := range v { + v[i] = innerConvert(v[i]) + } + return v + default: + return v + } +} + +func mapToOrderedMap(m map[string]any) OrderedMap { + var om OrderedMap + om.indices = make(map[string]int) + i := 0 + for k, v := range m { + om.Pairs = append(om.Pairs, Pair{k, innerConvert(v)}) + om.indices[k] = i + i++ + } + return om +} + var rxPath = regexp.MustCompile(`(?m)^(/repos/\{owner})/(\{repo})`) -func generatePaths(root string) map[string]any { - pathData := make(map[string]any) - endpoints := make(map[string]any) +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) @@ -31,38 +122,50 @@ func generatePaths(root string) map[string]any { if err != nil { log.Fatal(err) } - paths := raw["paths"].(map[string]any) - for k, v := range paths { + paths := mapToOrderedMap(raw["paths"].(map[string]any)) + 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.(map[string]any) + methodMap := v.(OrderedMap) - for method, methodSpec := range methodMap { - specMap := methodSpec.(map[string]any) - params := specMap["parameters"].([]any) - params = append(params, map[string]any{ - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - }) + for method, methodSpec := range methodMap.Iter() { + specMap := methodSpec.(OrderedMap) + var params []OrderedMap + has, aparams := 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 - (methodMap[method].(map[string]any))["parameters"] = params + specMap.Set("parameters", params) + methodMap.Set(method, specMap) + //(methodMap[method].(map[string]any))["parameters"] = params } - endpoints[nk] = methodMap + endpoints.Set(nk, methodMap) } - pathData["paths"] = endpoints + pathData.Set("paths", endpoints) return pathData } -func writeMapToFile(filename string, data map[string]any) { +func writeMapToFile(filename string, data *OrderedMap) { bytes, err := json.MarshalIndent(data, "", " ") if err != nil { log.Fatal(err) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 667fbf96da..0967ef424b 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,15052 +1 @@ -{ - "paths": { - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopStopWatch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "format": "date-time", - "description": "Only commits after this date will be returned (ISO 8601 format)", - "name": "since", - "in": "query", - "type": "string" - }, - { - "type": "string", - "format": "date-time", - "description": "Only commits before this date will be returned (ISO 8601 format)", - "name": "until", - "in": "query" - }, - { - "in": "query", - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat" - }, - { - "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" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "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" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { - "get": { - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } - } - }, - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { - "get": { - "tags": [ - "issue" - ], - "summary": "Get a single label", - "operationId": "issueGetLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label", - "operationId": "issueDeleteLabel" - }, - "patch": { - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a label", - "operationId": "issueEditLabel", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - }, - "name": "body", - "in": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/FileResponse" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { - "delete": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot cancel a non-existent stopwatch" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" - } - }, - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { - "delete": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of time to delete", - "name": "id", - "in": "path" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete specific tracked time", - "operationId": "issueDeleteTime" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repository's forks", - "operationId": "listForks", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Fork a repository", - "operationId": "createFork", - "parameters": [ - { - "description": "owner of the repo to fork", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to fork", - "name": "repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { - "get": { - "operationId": "listWorkflowJobs", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pull requests", - "operationId": "repoListPullRequests", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "Name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "Filter by target base branch of the pull request", - "name": "base_branch", - "in": "query" - }, - { - "type": "string", - "default": "open", - "description": "State of pull request", - "name": "state", - "in": "query", - "enum": [ - "open", - "closed", - "all" - ] - }, - { - "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" - }, - { - "description": "Label IDs", - "name": "labels", - "in": "query", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "multi" - }, - { - "type": "string", - "description": "Filter by pull request author", - "name": "poster", - "in": "query" - }, - { - "description": "Page number of results to return (1-based)", - "name": "page", - "in": "query", - "minimum": 1, - "type": "integer", - "default": 1 - }, - { - "type": "integer", - "description": "Page size of results", - "name": "limit", - "in": "query", - "minimum": 0 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/PullRequestList" - } - } - }, - "post": { - "operationId": "repoCreatePullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePullRequestOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/PullRequest" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a pull request" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "SHA of the commit to get", - "name": "sha" - }, - { - "name": "diffType", - "in": "path", - "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch" - }, - { - "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}/reviews/{id}/comments": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReviewComments" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { - "summary": "List a repo's pinned pull requests", - "operationId": "repoListPinnedPullRequests", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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}/actions/artifacts/{artifact_id}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific artifact for a workflow run", - "operationId": "getArtifact", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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}/reviewers": { - "get": { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Return all users that can be requested to review in this repo" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { - "tags": [ - "issue" - ], - "summary": "Lock an issue", - "operationId": "issueLockIssue", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/LockIssueOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfig" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "operationId": "updateRepoSecret", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repository", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create or Update a secret value in a repository" - }, - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha" - }, - { - "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" - }, - { - "name": "per_page", - "in": "query", - "type": "integer", - "description": "number of items per page" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/GitTreeResponse" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path" - }, - { - "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": { - "operationId": "updateRepoVariable", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a repo-level variable" - }, - "post": { - "summary": "Create a repo-level variable", - "operationId": "createRepoVariable", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "required": true, - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "description": "response when deleting a variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ActionVariable" - }, - "201": { - "description": "response when deleting a variable" - } - } - } - }, - "/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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - }, - { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query", - "type": "boolean" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Note" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position", - "in": "path" - }, - { - "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}/hooks/git": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List the Git hooks in a repository", - "operationId": "repoListGitHooks" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all artifacts for a repository", - "operationId": "getArtifacts" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "format": "int64", - "description": "id of the key to get", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the key to delete", - "name": "id", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TopicNames" - } - }, - "produces": [ - "application/json" - ] - }, - "put": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Replace list of topics for a repository", - "operationId": "repoUpdateTopics" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs" - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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}/hooks/{id}": { - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a hook in a repository", - "operationId": "repoDeleteHook", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to delete", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "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 - }, - { - "description": "index of the hook", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - }, - "name": "body" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Hook" - } - } - }, - "get": { - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to get" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueTemplates" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { - "get": { - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContents", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "required": true, - "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body", - "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" - } - }, - "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.", - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - ] - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "description": "id of the tag protect to get", - "name": "id", - "in": "path" - }, - { - "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": { - "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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditTagProtectionOption" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "operationId": "repoGetRepoPermissions", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repository permissions for a user" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the provided time are returned.", - "name": "since" - }, - { - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoCreateRunnerRegistrationToken", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { - "get": { - "tags": [ - "issue" - ], - "summary": "List a repository's issues", - "operationId": "issueListIssues", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "name": "type", - "in": "query", - "enum": [ - "issues", - "pulls" - ], - "type": "string", - "description": "filter by type (issues / pulls) if set" - }, - { - "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" - }, - { - "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "description": "Only show items which were created by the given user", - "name": "created_by", - "in": "query", - "type": "string" - }, - { - "type": "string", - "description": "Only show items for which the given user is assigned", - "name": "assigned_by", - "in": "query" - }, - { - "in": "query", - "type": "string", - "description": "Only show items in which the given user was mentioned", - "name": "mentioned_by" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueCreateIssue", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times": { - "get": { - "parameters": [ - { - "type": "string", - "description": "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" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's tracked times", - "operationId": "repoTrackedTimes" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment" - }, - "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 - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "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 - }, - { - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit" - }, - { - "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}/releases": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont 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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReleaseList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Create a release", - "operationId": "repoCreateRelease", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateReleaseOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/Release" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { - "put": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the workflow", - "name": "workflow_id" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Enable a workflow" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { - "patch": { - "tags": [ - "issue" - ], - "summary": "Edit a comment", - "operationId": "issueEditComment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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": { - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a comment", - "operationId": "issueDeleteComment" - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "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}/releases/{id}/assets": { - "get": { - "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 - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "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 - }, - { - "description": "name of the attachment", - "name": "name", - "in": "query", - "type": "string" - }, - { - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "multipart/form-data", - "application/octet-stream" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { - "post": { - "summary": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { - "operationId": "issueDeleteCommentDeprecated", - "deprecated": true, - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path" - }, - { - "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" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a comment" - }, - "patch": { - "operationId": "issueEditCommentDeprecated", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "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" - } - ], - "produces": [ - "application/json" - ], - "summary": "Edit a comment", - "deprecated": true, - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id" - }, - { - "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": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment" - }, - "patch": { - "tags": [ - "issue" - ], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { - "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" - } - }, - "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 - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "required": true, - "type": "string", - "description": "username of the user to subscribe the issue to", - "name": "user", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "delete": { - "responses": { - "304": { - "description": "User can only subscribe itself if he is no admin" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "Already unsubscribed" - }, - "201": { - "description": "Successfully Unsubscribed" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "username of the user to unsubscribe from an issue", - "name": "user" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query", - "type": "boolean" - }, - { - "name": "files", - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { - "post": { - "summary": "Update the priorities of branch protections for a repository.", - "operationId": "repoUpdateBranchProtectionPriories", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchProtectionPriories" - }, - "name": "body" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get" - }, - { - "type": "string", - "description": "skip to given file", - "name": "skip-to", - "in": "query" - }, - { - "name": "whitespace", - "in": "query", - "enum": [ - "ignore-all", - "ignore-change", - "ignore-eol", - "show-all" - ], - "type": "string", - "description": "whitespace behavior" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ChangedFileList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "base of the pull request to get", - "name": "base" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead" - } - }, - "/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 - }, - { - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "Transfer Options", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TransferRepoOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { - "delete": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "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" - } - ] - }, - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" - } - } - }, - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a label to an issue", - "operationId": "issueAddLabel" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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}/keys": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's keys", - "operationId": "repoListKeys", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "in": "query", - "type": "string", - "description": "fingerprint of the key", - "name": "fingerprint" - }, - { - "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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "201": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { - "get": { - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReview", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "operationId": "repoSubmitPullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an pull request" - }, - "delete": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { - "post": { - "summary": "Sync all push mirrored repository", - "operationId": "repoPushMirrorSync", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to sync", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo to sync", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - }, - "post": { - "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" - }, - { - "required": true, - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - } - }, - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a comment attachment" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPageList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - }, - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to edit", - "name": "index", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditPullRequestOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/licenses": { - "get": { - "summary": "Get repo licenses", - "operationId": "repoGetLicenses", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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 - }, - { - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { - "tags": [ - "repository" - ], - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to sync" - }, - { - "required": true, - "type": "string", - "description": "name of the repo to sync", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List all reviews for a pull request" - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a review to an 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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - }, - "name": "body", - "in": "body", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "tags": [ - "issue" - ], - "summary": "Make the issue in the url depend on the issue in the form.", - "operationId": "issueCreateIssueDependencies", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove an issue dependency", - "operationId": "issueRemoveIssueDependencies", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index" - }, - { - "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}/raw/{filepath}": { - "get": { - "operationId": "repoGetRawFile", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "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" - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "name": "ref", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "schema": { - "type": "file" - }, - "description": "Returns raw file content." - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/octet-stream" - ], - "tags": [ - "repository" - ], - "summary": "Get a file from a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repo-level runners", - "operationId": "getRepoRunners", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone" - }, - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "the milestone to edit, identified by ID and if not available by name", - "name": "id" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditMilestoneOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Milestone" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Issue" - } - } - }, - "get": { - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List issues that are blocked by this issue", - "operationId": "issueListBlocks", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - }, - "post": { - "parameters": [ - { - "type": "string", - "description": "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" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { - "get": { - "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.", - "operationId": "repoGetContentsExt", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - }, - { - "name": "includes", - "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." - }, - { - "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" - } - }, - "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" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "get": { - "parameters": [ - { - "type": "string", - "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": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "description": "User is not watching this repo or repo do not exist" - } - }, - "tags": [ - "repository" - ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription" - }, - "put": { - "tags": [ - "repository" - ], - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "part or full name of the ref", - "name": "ref", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": [ - { - "description": "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 pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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" - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a workflow run", - "operationId": "listWorkflowRunJobs" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "operationId": "repoCreateWikiPage", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/WikiPage" - } - }, - "consumes": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a wiki page" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommitStatusList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" - }, - { - "description": "type of sort", - "name": "sort", - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string" - }, - { - "type": "string", - "description": "type of state", - "name": "state", - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ] - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Create a commit status", - "operationId": "repoCreateStatus", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "sha", - "in": "path", - "required": true, - "type": "string", - "description": "sha of the commit" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Repository" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer", - "parameters": [ - { - "required": true, - "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" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete an repo-level runner", - "operationId": "deleteRepoRunner", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "id of the runner", - "name": "runner_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "description": "runner has been deleted" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the runner", - "name": "runner_id", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunner" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "get": { - "operationId": "issueGetCommentReactions", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a list of reactions from a comment of an issue" - }, - "post": { - "operationId": "issuePostCommentReaction", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to a comment of an issue" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove a reaction from a comment of an issue", - "operationId": "issueDeleteCommentReaction", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { - "post": { - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { - "get": { - "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 - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ReactionList" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "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/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to transfer" - }, - { - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/issues/{index}/stopwatch/start": { - "post": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot start a stopwatch again if it already exists" - }, - "201": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" - } - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { - "put": { - "summary": "Add a topic to a repository", - "operationId": "repoAddTopic", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "topic", - "in": "path", - "required": true, - "type": "string", - "description": "name of the topic to add" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "topic", - "in": "path", - "required": true, - "type": "string", - "description": "name of the topic to delete" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "422": { - "$ref": "#/responses/invalidTopicsError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { - "operationId": "repoMergeUpstream", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/MergeUpstreamResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a branch from upstream" - } - }, - "/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": { - "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" - } - }, - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "type": "string", - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun" - }, - "delete": { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "description": "No Content" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a workflow run" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { - "operationId": "repoListTeams", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's teams" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "all", - "in": "query", - "type": "boolean", - "description": "If true, show notifications marked as read. Default value is false" - }, - { - "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" - }, - { - "name": "subject-type", - "in": "query", - "type": "array", - "items": { - "enum": [ - "issue", - "pull", - "commit", - "repository" - ], - "type": "string" - }, - "collectionFormat": "multi", - "description": "filter notifications by subject type" - }, - { - "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" - }, - { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "consumes": [ - "application/json" - ] - }, - "put": { - "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 - }, - { - "description": "If true, mark all notifications on this repo. Default value is false", - "name": "all", - "in": "query", - "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": "array", - "items": { - "type": "string" - } - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "delete": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "patch": { - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a Git hook in a repository", - "operationId": "repoEditGitHook", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "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 - }, - { - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { - "get": { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "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 - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" - }, - "name": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "operationId": "repoDeleteAvatar", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete avatar" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/ActionWorkflow" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { - "get": { - "operationId": "repoListStatusesByRef", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref" - }, - { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query" - }, - { - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string", - "description": "type of state", - "name": "state" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses, by branch/tag/commit reference" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { - "get": { - "operationId": "repoListActivityFeeds", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's activity feeds" - } - }, - "/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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Compare" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { - "get": { - "responses": { - "302": { - "description": "redirect to the blob download" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "description": "id of the artifact", - "name": "artifact_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "name": "job_id", - "in": "path", - "required": true, - "type": "integer", - "description": "id of the job" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "description": "output blob content" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Downloads the job logs for a workflow run", - "operationId": "downloadActionsRunJobLogs" - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "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 - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { - "get": { - "summary": "Gets the tag object of an annotated tag (not lightweight tags)", - "operationId": "GetAnnotatedTag", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { - "get": { - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "username of the user whose tracked times are to be listed", - "name": "user", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List tag protections for a repository", - "operationId": "repoListTagProtection", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" - } - } - }, - "post": { - "parameters": [ - { - "type": "string", - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/TagProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { - "get": { - "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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results, default maximum page size is 50" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/TasksList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's action tasks" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" - }, - { - "name": "event", - "in": "query", - "type": "string", - "description": "workflow event name" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all runs for a repository run", - "operationId": "getWorkflowRuns" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "pageName", - "in": "path", - "required": true, - "type": "string", - "description": "name of the page" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ] - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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": { - "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "name of the page", - "name": "pageName", - "in": "path", - "required": true, - "type": "string" - }, - { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "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" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "string", - "description": "name of tag", - "name": "tag", - "in": "path" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "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 - }, - { - "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": "string" - }, - { - "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}/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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators": { - "get": { - "operationId": "repoListCollaborators", - "parameters": [ - { - "description": "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" - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's collaborators" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { - "delete": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment" - }, - "patch": { - "tags": [ - "issue" - ], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "get": { - "parameters": [ - { - "description": "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", - "format": "int64" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { - "get": { - "operationId": "repoGetContents", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "path of the dir, file, symlink or submodule in the repo", - "name": "filepath", - "in": "path" - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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." - }, - "put": { - "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 - }, - { - "name": "filepath", - "in": "path", - "required": true, - "type": "string", - "description": "path of the file to update" - }, - { - "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": { - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileResponse" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a file in a repository", - "operationId": "repoCreateFile", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "path of the file to create", - "name": "filepath", - "in": "path", - "required": true - }, - { - "required": true, - "schema": { - "$ref": "#/definitions/CreateFileOptions" - }, - "name": "body", - "in": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "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": "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 - }, - { - "required": true, - "type": "string", - "description": "path of the file to delete", - "name": "filepath", - "in": "path" - }, - { - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - }, - "name": "body", - "in": "body", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { - "get": { - "operationId": "repoGetRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to get", - "name": "id" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Release" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release" - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a release", - "operationId": "repoDeleteRelease", - "parameters": [ - { - "description": "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" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release to delete", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "patch": { - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Check if a team is assigned to a repository", - "operationId": "repoCheckTeam", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": { - "405": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add a team to a repository", - "operationId": "repoAddTeam", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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}/issue_config/validate": { - "get": { - "operationId": "repoValidateIssueConfig", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Returns the validation information for a issue config" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { - "patch": { - "summary": "Rename a branch", - "operationId": "repoRenameBranch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "name of the branch", - "name": "branch", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - } - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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 - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path", - "required": true - }, - { - "description": "name of the artifact", - "name": "name", - "in": "query", - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { - "get": { - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "remote name of push mirror", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { - "get": { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "description": "name of protected branch", - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - }, - "patch": { - "operationId": "repoEditBranchProtection", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a branch protections for a repository. Only fields that are set will be changed" - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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 - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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 - }, - { - "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", - "name": "binary", - "in": "query", - "type": "boolean" - }, - { - "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}/media/{filepath}": { - "get": { - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "filepath", - "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" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - } - }, - "post": { - "operationId": "repoCreateBranchProtection", - "parameters": [ - { - "description": "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" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a branch protections for a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { - "get": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "ref", - "in": "path", - "required": true, - "type": "string", - "description": "name of branch/tag/commit" - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { - "post": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to create or update a deadline on", - "name": "index", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditDeadlineOption" - } - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { - "get": { - "summary": "List all comments on an issue", - "operationId": "issueGetComments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "in": "query", - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "responses": { - "201": { - "$ref": "#/responses/Comment" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { - "get": { - "operationId": "ActionsListRepositoryWorkflows", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/ActionWorkflowList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List repository workflows" - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "tag", - "in": "path", - "required": true, - "type": "string", - "description": "tag name of the release to get" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "string", - "description": "tag name of the release to delete", - "name": "tag", - "in": "path", - "required": true - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "tags": [ - "repository" - ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { - "get": { - "operationId": "issueTrackedTimes", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List an issue's tracked times" - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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}/pulls/{index}/merge": { - "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" - } - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", - "name": "index", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - }, - "get": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "204": { - "description": "pull request has been merged" - }, - "404": { - "description": "pull request has not been merged" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { - "get": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WatchInfo" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { - "get": { - "operationId": "GetBlob", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true, - "type": "string" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitBlobResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets the blob of a repository." - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "post": { - "tags": [ - "issue" - ], - "summary": "Create a label", - "operationId": "issueCreateLabel", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" - } - }, - "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 - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { - "post": { - "operationId": "ActionsDispatchWorkflow", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a workflow dispatch event" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches": { - "get": { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a branch", - "operationId": "repoCreateBranch", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "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." - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "patch": { - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - } - }, - "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 - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueOption" - }, - "name": "body" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - }, - "get": { - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue", - "operationId": "issueGetIssue", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue to get", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ] - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - } - ] - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "post": { - "responses": { - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create an issue attachment", - "operationId": "issueCreateIssueAttachment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "description": "name of the attachment", - "name": "name", - "in": "query", - "type": "string" - }, - { - "required": true, - "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" - } - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "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 - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateHookOption" - }, - "name": "body" - }, - { - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "get": { - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { - "get": { - "summary": "Get revisions of a wiki page", - "operationId": "repoGetWikiPageRevisions", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "pageName", - "in": "path", - "required": true, - "type": "string", - "description": "name of the page" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "filepath of file to get", - "name": "filepath" - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", - "in": "query" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "200": { - "description": "success" - }, - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "username of the user to check for being a collaborator", - "name": "collaborator", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "username of the user to add or update as a collaborator", - "name": "collaborator", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - }, - "name": "body" - }, - { - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator" - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/TimelineList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones": { - "get": { - "operationId": "issueGetMilestonesList", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "state", - "in": "query", - "type": "string", - "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"" - }, - { - "type": "string", - "description": "filter by milestone name", - "name": "name", - "in": "query" - }, - { - "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" - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get all of a repository's opened milestones" - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateMilestoneOption" - }, - "name": "body" - }, - { - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository", - "operationId": "repoGet" - }, - "delete": { - "summary": "Delete a repository", - "operationId": "repoDelete", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to delete", - "name": "owner" - }, - { - "description": "name of the repo to delete", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "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 - }, - { - "description": "name of the repo to edit", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "Properties of a repo that you can edit", - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditRepoOption" - } - }, - { - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - } - } -} +{} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 688d6a44c1..51ced3ad91 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4956,15054 +4956,6 @@ } } }, - "/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": "integer", - "format": "int64", - "description": "group ID of the repo", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationTokenMixin0", - "parameters": [ - { - "type": "string", - "description": "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" - } - } - }, - "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 an 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": "#/definitions/ActionRunner" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete an 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" - } - } - } - }, - "/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": "string", - "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}/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/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": "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}/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": "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" - } - } - }, - "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": { - "200": { - "$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": { - "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": { - "200": { - "$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/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}/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" - }, - "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 an 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 an 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 dont 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": [ From bc48d5dea7a852324523ee5d6f13faf43cb801ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 20:12:14 -0500 Subject: [PATCH 148/218] fix repo api url --- models/repo/repo.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/repo/repo.go b/models/repo/repo.go index bfc64cb2a8..530a498ce4 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -389,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. From 1eeb1aa70bb4dbe8b10df38d78a609cb82b01816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 20:12:59 -0500 Subject: [PATCH 149/218] fix remaining tests --- tests/integration/issue_test.go | 2 +- tests/integration/org_test.go | 28 +++++++-------- tests/integration/pull_comment_test.go | 2 +- tests/integration/pull_compare_test.go | 4 +-- tests/integration/pull_create_test.go | 8 ++--- tests/integration/pull_merge_test.go | 36 +++++++++---------- tests/integration/pull_review_test.go | 2 +- tests/integration/pull_status_test.go | 6 ++-- tests/integration/repo_activity_test.go | 2 +- tests/integration/repo_branch_test.go | 2 +- tests/integration/repo_fork_test.go | 14 ++++---- tests/integration/repo_generate_test.go | 2 +- tests/integration/repo_test.go | 16 ++++----- tests/integration/repo_webhook_test.go | 2 +- tests/integration/timetracking_test.go | 10 +++--- .../workflow_run_api_check_test.go | 2 +- 16 files changed, 69 insertions(+), 69 deletions(-) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 3b733e4a2b..0f3280285a 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -457,7 +457,7 @@ func TestIssueRedirect(t *testing.T) { // Test external tracker with alphanumeric style (for a pull request) req = NewRequest(t, "GET", "/org26/group/41/repo_external_tracker_alpha/issues/1") resp = session.MakeRequest(t, req, http.StatusSeeOther) - assert.Equal(t, "/org26/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) + assert.Equal(t, "/org26/group/41/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) // test to check that the PR redirection works if the issue unit is disabled // repo1 is a normal repository with issue unit enabled, visit issue 2(which is a pull request) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index e34bc60635..c2d6990a2a 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -70,27 +70,27 @@ func testLimitedOrg(t *testing.T) { // not logged-in user req := NewRequest(t, "GET", "/limited_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/231/public_repo_on_limited_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/limited_org/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/221/private_repo_on_limited_org") MakeRequest(t, req, http.StatusNotFound) // login non-org member user session := loginUser(t, "user2") req = NewRequest(t, "GET", "/limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/group/231/public_repo_on_limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/group/221/private_repo_on_limited_org") session.MakeRequest(t, req, http.StatusNotFound) // site admin session = loginUser(t, "user1") req = NewRequest(t, "GET", "/limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/group/231/public_repo_on_limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/group/221/private_repo_on_limited_org") session.MakeRequest(t, req, http.StatusOK) } @@ -98,36 +98,36 @@ func testPrivateOrg(t *testing.T) { // not logged-in user req := NewRequest(t, "GET", "/privated_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") MakeRequest(t, req, http.StatusNotFound) // login non-org member user session := loginUser(t, "user2") req = NewRequest(t, "GET", "/privated_org") session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) // non-org member who is collaborator on repo in private org session = loginUser(t, "user4") req = NewRequest(t, "GET", "/privated_org") session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") // colab of this repo + req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") // colab of this repo session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) // site admin session = loginUser(t, "user1") req = NewRequest(t, "GET", "/privated_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/pull_comment_test.go b/tests/integration/pull_comment_test.go index b1beb22b1e..e9eb1762cd 100644 --- a/tests/integration/pull_comment_test.go +++ b/tests/integration/pull_comment_test.go @@ -100,7 +100,7 @@ func TestPullComment(t *testing.T) { session := loginUser(t, "user1") testCreateBranch(t, session, "user2", "repo1", "branch/master", "test-branch/rebase", http.StatusSeeOther) testCreateBranch(t, session, "user2", "repo1", "branch/master", "test-branch/retarget", http.StatusSeeOther) - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") t.Run("RebaseComment", func(t *testing.T) { testPullCommentRebase(t, u, session) }) t.Run("RetargetComment", func(t *testing.T) { testPullCommentRetarget(t, u, session) }) diff --git a/tests/integration/pull_compare_test.go b/tests/integration/pull_compare_test.go index 9f2b947f65..6d15af4943 100644 --- a/tests/integration/pull_compare_test.go +++ b/tests/integration/pull_compare_test.go @@ -59,7 +59,7 @@ func TestPullCompare(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) testEditFile(t, session, 0, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "master1", "This is a pull title") @@ -96,7 +96,7 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) { // user4 forks repo3 user4Session := loginUser(t, "user4") forkedRepoName := "user4-forked-repo3" - testRepoFork(t, user4Session, repo3.OwnerName, repo3.Name, "user4", forkedRepoName, "") + testRepoFork(t, user4Session, repo3.OwnerName, repo3.Name, 0, "user4", forkedRepoName, "") forkedRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user4", Name: forkedRepoName}) assert.True(t, forkedRepo.IsPrivate) diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index 86a7b4750f..2bd5d36ceb 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -137,7 +137,7 @@ func testPullCreateFailure(t *testing.T, session *TestSession, baseRepoOwner, ba func TestPullCreate(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo1.NumPulls) @@ -198,7 +198,7 @@ func TestPullBranchDelete(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) testEditFile(t, session, 0, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master1", "This is a pull title") @@ -234,7 +234,7 @@ Check if pull request can be created from base to the fork repository. func TestPullCreatePrFromBaseToFork(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { sessionFork := loginUser(t, "user1") - testRepoFork(t, sessionFork, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, sessionFork, 0, "user2", "repo1", "user1", "repo1", "") // Edit base repository sessionBase := loginUser(t, "user2") @@ -345,7 +345,7 @@ func TestCreatePullRequestFromNestedOrgForks(t *testing.T) { func TestPullCreateParallel(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { sessionFork := loginUser(t, "user1") - testRepoFork(t, sessionFork, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, sessionFork, 0, "user2", "repo1", "user1", "repo1", "") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo1.NumPulls) diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index 041e2436ba..0ef6e5bc76 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -117,7 +117,7 @@ func TestPullMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -149,7 +149,7 @@ func TestPullRebase(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -181,7 +181,7 @@ func TestPullRebaseMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -213,7 +213,7 @@ func TestPullSquash(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") @@ -234,7 +234,7 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") @@ -272,7 +272,7 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { func TestPullCleanUpAfterMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -318,7 +318,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { func TestCantMergeWorkInProgress(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "[wip] This is a pull title") @@ -334,7 +334,7 @@ func TestCantMergeWorkInProgress(t *testing.T) { func TestCantMergeConflict(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") @@ -376,7 +376,7 @@ func TestCantMergeConflict(t *testing.T) { func TestCantMergeUnrelated(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") // Now we want to create a commit on a branch that is totally unrelated to our current head @@ -468,7 +468,7 @@ func TestCantMergeUnrelated(t *testing.T) { func TestFastForwardOnlyMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "update", "README.md", "Hello, World 2\n") // Use API to create a pr from update to master @@ -589,7 +589,7 @@ func TestFastForwardOnlyMergeWithRequiredSignedCommits(t *testing.T) { func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "diverging", "README.md", "Hello, World diverged\n") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World 2\n") @@ -627,7 +627,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing testEditFileToNewBranch(t, session, 0, "user2", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n(Edited - TestPullRetargetOnCleanup - child PR)") respBasePR := testPullCreate(t, session, "user2", "repo1", true, "master", "base-pr", "Base Pull Request") @@ -663,7 +663,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n(Edited - TestPullDontRetargetChildOnWrongRepo - child PR)") @@ -703,7 +703,7 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { func TestPullRequestMergedWithNoPermissionDeleteBranch(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user4") - testRepoFork(t, session, "user2", "repo1", "user4", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user4", "repo1", "") testEditFileToNewBranch(t, session, 0, "user4", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") respBasePR := testPullCreate(t, session, "user4", "repo1", false, "master", "base-pr", "Base Pull Request") @@ -728,7 +728,7 @@ func TestPullMergeIndexerNotifier(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { // create a pull request session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") createPullResp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "Indexer notifier test pull") @@ -790,7 +790,7 @@ func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) forkedName := "repo1-1" - testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", forkedName, "") testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", forkedName, false, "master", "master", "Indexer notifier test pull") @@ -873,7 +873,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { forkUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 5}) forkSession := loginUser(t, "user5") forkedName := "repo1-fork" - testRepoFork(t, forkSession, "user2", "repo1", forkUser.Name, forkedName, "") + testRepoFork(t, forkSession, 0, "user2", "repo1", forkUser.Name, forkedName, "") testEditFile(t, forkSession, 0, forkUser.Name, forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, forkSession, forkUser.Name, forkedName, false, "master", "master", "Indexer notifier test pull") @@ -1060,7 +1060,7 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { // create a pull request session := loginUser(t, "user1") // FIXME: don't use admin user for testing forkedName := "repo1-1" - testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", forkedName, "") testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", forkedName, false, "master", "master", "Indexer notifier test pull") diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index 9579976d8d..b13b36e322 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -220,7 +220,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { user2Session := loginUser(t, "user2") // Have user1 create a fork of repo1. - testRepoFork(t, user1Session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, user1Session, 0, "user2", "repo1", "user1", "repo1", "") t.Run("Submit approve/reject review on merged PR", func(t *testing.T) { // Create a merged PR (made by user1) in the upstream repo1. diff --git a/tests/integration/pull_status_test.go b/tests/integration/pull_status_test.go index 272d21a29b..7cdf4ea36e 100644 --- a/tests/integration/pull_status_test.go +++ b/tests/integration/pull_status_test.go @@ -28,7 +28,7 @@ import ( func TestPullCreate_CommitStatus(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "status1", "README.md", "status1") req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", @@ -116,7 +116,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { // so we need to have this meta commit also in develop branch. onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "status1", "README.md", "status1") testEditFile(t, session, 0, "user1", "repo1", "status1", "README.md", "# repo1\n\nDescription for repo1") @@ -140,7 +140,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { func TestPullCreate_EmptyChangesWithSameCommits(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "status1", http.StatusSeeOther) req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", map[string]string{ diff --git a/tests/integration/repo_activity_test.go b/tests/integration/repo_activity_test.go index 0d2c4a44b7..ee79cfcd39 100644 --- a/tests/integration/repo_activity_test.go +++ b/tests/integration/repo_activity_test.go @@ -22,7 +22,7 @@ func TestRepoActivity(t *testing.T) { session := loginUser(t, "user1") // Create PRs (1 merged & 2 proposed) - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") diff --git a/tests/integration/repo_branch_test.go b/tests/integration/repo_branch_test.go index 5c2b7864b9..967d336a8f 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -241,7 +241,7 @@ func TestRecentlyPushedNewBranches(t *testing.T) { prepareRecentlyPushedBranchSpecialTest(t, user12Session, repo10, repo10) // create a fork repo in public org - testRepoFork(t, user12Session, repo10.OwnerName, repo10.Name, "org25", "org25_fork_repo10", repo10.DefaultBranch) + testRepoFork(t, user12Session, 0, repo10.Name, "org25", "org25_fork_repo10", repo10.DefaultBranch, repo10.OwnerName) orgPublicForkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerID: 25, Name: "org25_fork_repo10"}) prepareRepoPR(t, user12Session, user12Session, repo10, orgPublicForkRepo) prepareRecentlyPushedBranchTest(t, user12Session, repo10, orgPublicForkRepo) diff --git a/tests/integration/repo_fork_test.go b/tests/integration/repo_fork_test.go index fd6a0eac7a..34a3641b10 100644 --- a/tests/integration/repo_fork_test.go +++ b/tests/integration/repo_fork_test.go @@ -21,15 +21,15 @@ import ( "github.com/stretchr/testify/assert" ) -func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkOwnerName, forkRepoName, forkBranch string) *httptest.ResponseRecorder { +func testRepoFork(t *testing.T, session *TestSession, groupID int64, repoName, forkOwnerName, forkRepoName, forkBranch, ownerName string) *httptest.ResponseRecorder { forkOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: forkOwnerName}) // Step0: check the existence of the to-fork repo - req := NewRequestf(t, "GET", "/%s/%s", forkOwnerName, forkRepoName) + req := NewRequestf(t, "GET", "/%s/%s%s", forkOwnerName, maybeGroupSegment(groupID), forkRepoName) session.MakeRequest(t, req, http.StatusNotFound) // Step1: go to the main page of repo - req = NewRequestf(t, "GET", "/%s/%s", ownerName, repoName) + req = NewRequestf(t, "GET", "/%s/%s%s", ownerName, maybeGroupSegment(groupID), repoName) resp := session.MakeRequest(t, req, http.StatusOK) // Step2: click the fork button @@ -63,13 +63,13 @@ func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkO func TestRepoFork(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") - testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") } func TestRepoForkToOrg(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") - testRepoFork(t, session, "user2", "repo1", "org3", "repo1", "") + testRepoFork(t, session, 0, "user2", "repo1", "org3", "repo1", "") // Check that no more forking is allowed as user2 owns repository // and org3 organization that owner user2 is also now has forked this repository @@ -93,7 +93,7 @@ func TestForkListLimitedAndPrivateRepos(t *testing.T) { ownerTeam1, err := org_model.OrgFromUser(limitedOrg).GetOwnerTeam(t.Context()) assert.NoError(t, err) assert.NoError(t, org_service.AddTeamMember(t.Context(), ownerTeam1, user1)) - testRepoFork(t, user1Sess, "user2", "repo1", limitedOrg.Name, "repo1", "") + testRepoFork(t, user1Sess, 0, "user2", "repo1", limitedOrg.Name, "repo1", "") // fork to a private org user4Sess := loginUser(t, "user4") @@ -103,7 +103,7 @@ func TestForkListLimitedAndPrivateRepos(t *testing.T) { ownerTeam2, err := org_model.OrgFromUser(privateOrg).GetOwnerTeam(t.Context()) assert.NoError(t, err) assert.NoError(t, org_service.AddTeamMember(t.Context(), ownerTeam2, user4)) - testRepoFork(t, user4Sess, "user2", "repo1", privateOrg.Name, "repo1", "") + testRepoFork(t, user4Sess, 0, "user2", "repo1", privateOrg.Name, "repo1", "") t.Run("Anonymous", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/repo_generate_test.go b/tests/integration/repo_generate_test.go index e91ee2a1e7..b1ade20202 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -61,7 +61,7 @@ func testRepoGenerate(t *testing.T, session *TestSession, templateID, templateOw body := fmt.Sprintf(`# %s Readme Owner: %s Link: /%s/%s -Clone URL: %s/%s%s.git`, +Clone URL: %s/%s.git`, generateRepoName, strings.ToUpper(generateOwnerName), generateOwnerName, diff --git a/tests/integration/repo_test.go b/tests/integration/repo_test.go index d88f44873a..4c77c7ea0e 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -64,7 +64,7 @@ func testViewRepoPublic(t *testing.T) { assert.True(t, repoTopics.HasClass("repo-topic")) assert.True(t, repoSummary.HasClass("repository-menu")) - req = NewRequest(t, "GET", "/org3/repo3") + req = NewRequest(t, "GET", "/org3/group/129/repo3") MakeRequest(t, req, http.StatusNotFound) session = loginUser(t, "user1") @@ -74,7 +74,7 @@ func testViewRepoPublic(t *testing.T) { func testViewRepoWithCache(t *testing.T) { defer tests.PrintCurrentTest(t)() testView := func(t *testing.T) { - req := NewRequest(t, "GET", "/org3/repo3") + req := NewRequest(t, "GET", "/org3/group/129/repo3") session := loginUser(t, "user2") resp := session.MakeRequest(t, req, http.StatusOK) @@ -145,11 +145,11 @@ func testViewRepoWithCache(t *testing.T) { func testViewRepoPrivate(t *testing.T) { defer tests.PrintCurrentTest(t)() - req := NewRequest(t, "GET", "/org3/repo3") + req := NewRequest(t, "GET", "/org3/group/129/repo3") MakeRequest(t, req, http.StatusNotFound) t.Run("OrgMemberAccess", func(t *testing.T) { - req = NewRequest(t, "GET", "/org3/repo3") + req = NewRequest(t, "GET", "/org3/group/129/repo3") session := loginUser(t, "user4") resp := session.MakeRequest(t, req, http.StatusOK) assert.Contains(t, resp.Body.String(), `
Public Access`) // remove "anonymous read" - req = NewRequest(t, "POST", "/org3/repo3/settings/public_access") + req = NewRequest(t, "POST", "/org3/group/129/repo3/settings/public_access") session.MakeRequest(t, req, http.StatusSeeOther) // try to "anonymous read" (not found) - req = NewRequest(t, "GET", "/org3/repo3") + req = NewRequest(t, "GET", "/org3/group/129/repo3") MakeRequest(t, req, http.StatusNotFound) }) } diff --git a/tests/integration/repo_webhook_test.go b/tests/integration/repo_webhook_test.go index 455da3d610..9f37a46e9f 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -225,7 +225,7 @@ func Test_WebhookFork(t *testing.T) { testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "fork") // 2. trigger the webhook - testRepoFork(t, session, "user2", "repo1", "user1", "repo1-fork", "master") + testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1-fork", "master") // 3. validate the webhook is triggered assert.Equal(t, "fork", triggeredEvent) diff --git a/tests/integration/timetracking_test.go b/tests/integration/timetracking_test.go index e4d8927856..6e32a97186 100644 --- a/tests/integration/timetracking_test.go +++ b/tests/integration/timetracking_test.go @@ -20,23 +20,23 @@ func TestViewTimetrackingControls(t *testing.T) { t.Run("Exist", func(t *testing.T) { defer tests.PrintCurrentTest(t)() session := loginUser(t, "user2") - testViewTimetrackingControls(t, session, "user2", "repo1", "1", true) + testViewTimetrackingControls(t, session, 0, "repo1", "1", true, "user2") }) t.Run("Non-exist", func(t *testing.T) { defer tests.PrintCurrentTest(t)() session := loginUser(t, "user5") - testViewTimetrackingControls(t, session, "user2", "repo1", "1", false) + testViewTimetrackingControls(t, session, 0, "repo1", "1", false, "user2") }) t.Run("Disabled", func(t *testing.T) { defer tests.PrintCurrentTest(t)() session := loginUser(t, "user2") - testViewTimetrackingControls(t, session, "org3", "repo3", "1", false) + testViewTimetrackingControls(t, session, 129, "repo3", "1", false, "org3") }) } -func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo, issue string, canTrackTime bool) { +func testViewTimetrackingControls(t *testing.T, session *TestSession, groupID int64, repo, issue string, canTrackTime bool, user string) { req := NewRequest(t, "GET", "/"+path.Join(user, repo, "issues", issue)) resp := session.MakeRequest(t, req, http.StatusOK) @@ -45,7 +45,7 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo AssertHTMLElement(t, htmlDoc, ".issue-start-time", canTrackTime) AssertHTMLElement(t, htmlDoc, ".issue-add-time", canTrackTime) - issueLink := "/" + path.Join(user, repo, "issues", issue) + issueLink := "/" + path.Join(user, maybeGroupSegment(groupID), repo, "issues", issue) reqStart := NewRequest(t, "POST", path.Join(issueLink, "times", "stopwatch", "start")) if canTrackTime { session.MakeRequest(t, reqStart, http.StatusOK) diff --git a/tests/integration/workflow_run_api_check_test.go b/tests/integration/workflow_run_api_check_test.go index d7390b3ac1..d8e42c7846 100644 --- a/tests/integration/workflow_run_api_check_test.go +++ b/tests/integration/workflow_run_api_check_test.go @@ -27,7 +27,7 @@ func TestAPIWorkflowRun(t *testing.T) { testAPIWorkflowRunBasic(t, "/api/v1/orgs/org3/actions", "User1", 802, auth_model.AccessTokenScopeReadOrganization, auth_model.AccessTokenScopeReadRepository) }) t.Run("RepoRuns", func(t *testing.T) { - testAPIWorkflowRunBasic(t, "/api/v1/repos/org3/repo5/actions", "User2", 802, auth_model.AccessTokenScopeReadRepository) + testAPIWorkflowRunBasic(t, "/api/v1/repos/org3/group/139/repo5/actions", "User2", 802, auth_model.AccessTokenScopeReadRepository) }) } From 40d80eccede3defb4478f1ec4d27157f7c9ab644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 20:24:36 -0500 Subject: [PATCH 150/218] update swagger definitions --- templates/swagger/v1_groups.json | 15053 ++++++++++++++++++++++++++++- templates/swagger/v1_json.tmpl | 15048 ++++++++++++++++++++++++++++ 2 files changed, 30100 insertions(+), 1 deletion(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 0967ef424b..58acc29dc9 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1 +1,15052 @@ -{} +{ + "paths": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/WorkflowJob" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow job for a workflow run", + "operationId": "getWorkflowJob", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { + "post": { + "tags": [ + "repository" + ], + "summary": "Update the priorities of branch protections for a repository.", + "operationId": "repoUpdateBranchProtectionPriories", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "patch": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "description": "the milestone to edit, identified by ID and if not available by name" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone" + }, + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "parameters": [ + { + "type": "string", + "description": "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" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "runner_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the runner" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner" + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "runner_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the runner" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { + "operationId": "repoApplyDiffPatch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Apply diff patch to repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { + "delete": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview" + }, + "get": { + "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 + }, + { + "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" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request", + "operationId": "repoSubmitPullReview", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "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" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to sync" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { + "get": { + "operationId": "repoGetNote", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "a git ref or commit sha", + "name": "sha" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a note corresponding to a single commit from a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch" + } + }, + "/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" + }, + { + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query", + "type": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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}/issues/comments": { + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommentList" + } + }, + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { + "tags": [ + "repository" + ], + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + } + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoCreateRunnerRegistrationToken" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { + "put": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "team name", + "name": "team" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 + }, + { + "description": "team name", + "name": "team", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + } + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "description": "name of the artifact", + "name": "name", + "in": "query", + "type": "string" + }, + { + "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}/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a hook", + "operationId": "repoGetHook", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the hook to delete" + }, + { + "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": { + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { + "summary": "Test a push webhook", + "operationId": "repoTestHook", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "deprecated": true, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of comment to delete" + }, + { + "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" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated" + }, + "patch": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Comment" + } + }, + "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 + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit" + }, + { + "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" + } + ] + } + }, + "/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}/tag_protections": { + "post": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/TagProtection" + } + }, + "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" + } + ] + }, + "get": { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level runners", + "operationId": "getRepoRunners" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "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": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "name": "filepath", + "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." + }, + { + "type": "string", + "description": "the name of the commit/branch/tag, default to the repository’s default branch.", + "name": "ref", + "in": "query" + }, + { + "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" + }, + { + "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": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "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": { + "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set", + "operationId": "repoUpdateFile", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "string", + "description": "path of the file to update", + "name": "filepath", + "in": "path", + "required": true + }, + { + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + }, + "name": "body" + }, + { + "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" + }, + "200": { + "$ref": "#/responses/FileResponse" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "post": { + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + ] + }, + "delete": { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "post": { + "operationId": "repoCreateHook", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { + "delete": { + "parameters": [ + { + "type": "string", + "description": "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge" + }, + "get": { + "responses": { + "204": { + "description": "pull request has been merged" + }, + "404": { + "description": "pull request has not been merged" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + ] + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { + "get": { + "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" + } + } + }, + "produces": [ + "text/plain" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer": { + "post": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer" + } + }, + "/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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "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" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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" + } + } + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref", + "in": "query", + "type": "string" + }, + { + "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": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "type": "string", + "description": "type of state", + "name": "state", + "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ] + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "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": { + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "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": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "issue", + "pull", + "commit", + "repository" + ] + }, + "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" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "consumes": [ + "application/json" + ] + }, + "put": { + "tags": [ + "notification" + ], + "summary": "Mark notification threads as read, pinned or unread on a specific repo", + "operationId": "notifyReadRepoList", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "query", + "type": "string", + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all" + }, + { + "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": "array" + }, + { + "description": "Status to mark notifications as. Defaults to read.", + "name": "to-status", + "in": "query", + "type": "string" + }, + { + "name": "last_read_at", + "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." + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { + "operationId": "repoGetWikiPageRevisions", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WikiCommitList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get revisions of a wiki page" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { + "get": { + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflowList" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List repository workflows", + "operationId": "ActionsListRepositoryWorkflows", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "operationId": "repoGetRepoPermissions", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repository permissions for a user" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "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" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment" + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path" + }, + { + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment" + }, + "patch": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + }, + { + "type": "string", + "default": "open", + "description": "State of pull request", + "name": "state", + "in": "query", + "enum": [ + "open", + "closed", + "all" + ] + }, + { + "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" + }, + { + "name": "labels", + "in": "query", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi", + "description": "Label IDs" + }, + { + "description": "Filter by pull request author", + "name": "poster", + "in": "query", + "type": "string" + }, + { + "name": "page", + "in": "query", + "minimum": 1, + "type": "integer", + "default": 1, + "description": "Page number of results to return (1-based)" + }, + { + "name": "limit", + "in": "query", + "minimum": 0, + "type": "integer", + "description": "Page size of results" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePullRequestOption" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "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" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "tags": [ + "repository" + ], + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "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", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/branches/{branch}": { + "patch": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the branch", + "name": "branch" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + ] + }, + "delete": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "branch to delete", + "name": "branch" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/issues/{index}/pin": { + "post": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + ] + }, + "delete": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "tags": [ + "issue" + ], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of issue to unpin" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "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" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "tags": [ + "repository" + ], + "summary": "Update a repo-level variable", + "operationId": "updateRepoVariable", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + }, + "name": "body" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "operationId": "createRepoVariable", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repo-level variable" + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/issue_config/validate": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the validation information for a issue config", + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content" + }, + { + "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" + } + } + }, + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions" + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to a comment of an issue", + "operationId": "issuePostCommentReaction", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + } + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" + }, + { + "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": { + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue attachment" + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path" + }, + { + "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": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment" + }, + "patch": { + "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 + }, + { + "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, + "type": "integer" + }, + { + "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": { + "404": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LicensesList" + } + }, + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/reviewers": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "get": { + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection" + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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": { + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "get": { + "operationId": "repoGetIssueConfig", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/RepoIssueConfig" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the issue config for a repo" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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}/keys": { + "post": { + "operationId": "repoCreateKey", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a key to a repository" + }, + "get": { + "operationId": "repoListKeys", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "the key_id to search for", + "name": "key_id", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's keys" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path" + }, + { + "in": "query", + "type": "boolean", + "description": "show all directories and files", + "name": "recursive" + }, + { + "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" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/GitTreeResponse" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tree of a repository." + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { + "post": { + "tags": [ + "repository" + ], + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "name": "attachment", + "in": "formData", + "type": "file", + "description": "attachment to upload" + }, + { + "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" + } + }, + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/AttachmentList" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + }, + { + "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": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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": { + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/UserList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "description": "filepath of a file/dir", + "name": "path", + "in": "query", + "type": "string" + }, + { + "description": "Only commits after this date will be returned (ISO 8601 format)", + "name": "since", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "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" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "type": "integer", + "description": "page size of results (ignored if used with 'path')", + "name": "limit", + "in": "query" + }, + { + "name": "not", + "in": "query", + "type": "string", + "description": "commits that match the given specifier will not be listed." + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "get": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "index of the issue", + "name": "index" + }, + { + "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": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unblock the issue given in the body by the issue in path" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "put": { + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "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 + }, + { + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a topic from a repository" + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "success" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get changed files for a pull request", + "operationId": "repoGetPullRequestFiles", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" + }, + { + "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" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment" + }, + "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 + }, + { + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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", + "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 release attachment", + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/Attachment" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "tags": [ + "repository" + ], + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { + "get": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository" + }, + { + "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": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Artifact" + } + }, + "produces": [ + "application/json" + ] + }, + "delete": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the artifact", + "name": "artifact_id" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Deletes a specific artifact for a workflow run", + "operationId": "deleteArtifact" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "get": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path", + "required": true + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "success" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + "get": { + "tags": [ + "issue" + ], + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "operationId": "issueListIssueDependencies", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/IssueList" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "string", + "description": "index of the issue" + }, + { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Make the issue in the url depend on the issue in the form." + }, + "delete": { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove an issue dependency" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "remote name of push mirror", + "name": "name", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "deletes a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "remote name of the pushMirror", + "name": "name", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "operationId": "issueDeleteLabel", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a label" + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a label", + "operationId": "issueEditLabel", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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}/pulls/{index}/requested_reviewers": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "create review requests for a pull request", + "operationId": "repoCreatePullReviewRequests", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + }, + "name": "body", + "in": "body", + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "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": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a workflow run", + "operationId": "deleteActionRun" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's branches", + "operationId": "repoListBranches", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "post": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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": { + "409": { + "description": "The branch with the same name already exists." + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Branch" + }, + "403": { + "description": "The branch is archived or a mirror." + }, + "404": { + "description": "The old branch does not exist." + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch", + "operationId": "repoCreateBranch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "get": { + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/IssueList" + } + }, + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "put": { + "tags": [ + "repository" + ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + } + }, + "get": { + "parameters": [ + { + "type": "string", + "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" + } + }, + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "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 + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue" + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "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}/languages": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "302": { + "description": "redirect to the blob download" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue", + "operationId": "issueGetIssue", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete an issue", + "operationId": "issueDelete" + }, + "patch": { + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + } + }, + "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 + }, + { + "format": "int64", + "description": "index of the issue to edit", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "get": { + "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 + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path" + }, + { + "name": "diffType", + "in": "path", + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch" + }, + { + "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" + } + }, + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request diff or patch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { + "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 + }, + { + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + }, + { + "name": "verification", + "in": "query", + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')" + }, + { + "in": "query", + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commits for a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "get": { + "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 + }, + { + "description": "tag name of the release to get", + "name": "tag", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "tag name of the release to delete", + "name": "tag" + }, + { + "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": { + "summary": "Get a release", + "operationId": "repoGetRelease", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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" + } + }, + "tags": [ + "repository" + ], + "summary": "Delete a release", + "operationId": "repoDeleteRelease" + }, + "patch": { + "summary": "Update a release", + "operationId": "repoEditRelease", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "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 + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a wiki page" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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": { + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/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": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path" + }, + { + "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}/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 + }, + { + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path" + }, + { + "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": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a Git hook in a repository" + }, + "patch": { + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { + "put": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "delete": { + "responses": { + "204": { + "description": "delete one secret of the repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { + "put": { + "summary": "Enable a workflow", + "operationId": "ActionsEnableWorkflow", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the workflow" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues": { + "get": { + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + }, + { + "name": "q", + "in": "query", + "type": "string", + "description": "search string" + }, + { + "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" + }, + { + "name": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format" + }, + { + "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" + }, + { + "name": "assigned_by", + "in": "query", + "type": "string", + "description": "Only show items for which the given user is assigned" + }, + { + "in": "query", + "type": "string", + "description": "Only show items in which the given user was mentioned", + "name": "mentioned_by" + }, + { + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueCreateIssue", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "patch": { + "operationId": "repoEditPullRequest", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "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." + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request", + "operationId": "repoGetPullRequest", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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" + } + } + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "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" + }, + { + "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}/pulls/{index}/reviews": { + "get": { + "operationId": "repoListPullReviews", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List all reviews for a pull request" + }, + "post": { + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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" + } + ] + } + }, + "/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 + }, + { + "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" + }, + { + "description": "type of sort", + "name": "sort", + "in": "query", + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" + }, + { + "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" + }, + { + "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}/milestones": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "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}": { + "get": { + "summary": "Get a repository", + "operationId": "repoGet", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "delete": { + "parameters": [ + { + "description": "owner of the repo to delete", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository", + "operationId": "repoDelete" + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo to edit", + "name": "owner" + }, + { + "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/runs/{run}/artifacts": { + "get": { + "tags": [ + "repository" + ], + "summary": "Lists all artifacts for a repository run", + "operationId": "getArtifactsOfRun", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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 + }, + { + "name": "name", + "in": "query", + "type": "string", + "description": "name of the artifact" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "get": { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ] + }, + "put": { + "summary": "Add or Update a collaborator to a repository", + "operationId": "repoAddCollaborator", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 + }, + { + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/file-contents": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + ] + }, + "post": { + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "in": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", + "name": "ref" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue", + "name": "index", + "in": "path", + "required": true + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin" + } + }, + "/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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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/{index}/reviews/{id}/comments": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" + }, + { + "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": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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}/commits/{ref}/status": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { + "get": { + "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 + }, + { + "name": "filepath", + "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" + }, + { + "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" + } + }, + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "get": { + "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 + }, + { + "required": true, + "type": "integer", + "description": "id of the job", + "name": "job_id", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Downloads the job logs for a workflow run", + "operationId": "downloadActionsRunJobLogs" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { + "get": { + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/AttachmentList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "summary": "Create a comment attachment", + "operationId": "issueCreateIssueCommentAttachment", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "put": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Lock an issue", + "operationId": "issueLockIssue" + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "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" + } + ] + }, + "post": { + "operationId": "issuePostIssueReaction", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to an issue" + }, + "delete": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags", + "operationId": "repoListTags" + }, + "post": { + "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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/forks": { + "get": { + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "required": true, + "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" + }, + { + "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": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { + "get": { + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "get": { + "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" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a repository", + "operationId": "listWorkflowJobs" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + "get": { + "summary": "Get available issue templates for a repository", + "operationId": "repoGetIssueTemplates", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { + "post": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + }, + "name": "body" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "get": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + }, + "name": "body", + "in": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { + "post": { + "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 + }, + { + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query", + "type": "string" + }, + { + "name": "since", + "in": "query", + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" + }, + { + "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": "string" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + ] + }, + "delete": { + "operationId": "repoDeleteTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "string", + "description": "name of tag to delete", + "name": "tag", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository's tag by name" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { + "delete": { + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName" + }, + { + "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" + } + }, + "tags": [ + "repository" + ] + }, + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path" + }, + { + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body", + "in": "body" + }, + { + "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" + } + } + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "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" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { + "get": { + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "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": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WikiPageList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection" + }, + "post": { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { + "patch": { + "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 + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + }, + "name": "body", + "in": "body" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + }, + "consumes": [ + "application/json" + ] + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection", + "parameters": [ + { + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of protected branch", + "name": "name" + }, + { + "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": { + "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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of protected branch", + "name": "name" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch protection for the repository" + } + }, + "/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", + "in": "query" + }, + { + "in": "query", + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification" + }, + { + "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}/releases": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/ReleaseList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft", + "in": "query" + }, + { + "type": "boolean", + "description": "filter (exclude / include) pre-releases", + "name": "pre-release", + "in": "query" + }, + { + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" + }, + { + "in": "query", + "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + }, + "post": { + "operationId": "repoCreateRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a release" + } + }, + "/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/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": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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}/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 + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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": { + "responses": { + "304": { + "description": "User can only subscribe itself if he is no admin" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "description": "Already unsubscribed" + }, + "201": { + "description": "Successfully Unsubscribed" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's activity feeds", + "operationId": "repoListActivityFeeds", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "name": "repo", + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "description": "the date of the activities to be found", + "name": "date", + "in": "query", + "type": "string", + "format": "date" + }, + { + "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}/issues/{index}/timeline": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query", + "type": "string", + "format": "date-time" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "get": { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment", + "operationId": "issueGetComment" + }, + "delete": { + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" + }, + { + "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" + } + }, + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteComment" + }, + "patch": { + "parameters": [ + { + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit" + }, + { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditComment" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { + "get": { + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "deprecated": true, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo" + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "required": true, + "type": "string", + "description": "username of the user whose tracked times are to be listed", + "name": "user", + "in": "path" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { + "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" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "get": { + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" + }, + { + "name": "run", + "in": "path", + "required": true, + "type": "integer", + "description": "runid of the workflow run" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a workflow run", + "operationId": "listWorkflowRunJobs" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + "get": { + "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" + } + } + }, + "produces": [ + "text/plain" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { + "post": { + "summary": "Create a workflow dispatch event", + "operationId": "ActionsDispatchWorkflow", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "type": "string", + "description": "id of the workflow" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateActionWorkflowDispatch" + } + }, + { + "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" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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 + }, + { + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "description": "page size of results", + "name": "limit", + "in": "query", + "type": "integer" + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] + } + }, + "/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 + }, + { + "in": "path", + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true + }, + { + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch", + "name": "diffType", + "in": "path" + }, + { + "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}/issues/{index}/comments": { + "get": { + "tags": [ + "issue" + ], + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "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" + }, + { + "in": "query", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before" + }, + { + "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" + } + }, + "produces": [ + "application/json" + ] + }, + "post": { + "parameters": [ + { + "type": "string", + "description": "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 + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + }, + "name": "body" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "summary": "Check if user is subscribed to an issue", + "operationId": "issueCheckSubscription", + "parameters": [ + { + "in": "path", + "required": true, + "type": "string", + "description": "owner of the repo", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" + }, + { + "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" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + } + } +} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 51ced3ad91..688d6a44c1 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4956,6 +4956,15054 @@ } } }, + "/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": "integer", + "format": "int64", + "description": "group ID of the repo", + "name": "group_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationTokenMixin0", + "parameters": [ + { + "type": "string", + "description": "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" + } + } + }, + "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 an 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": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete an 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" + } + } + } + }, + "/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": "string", + "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}/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/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": "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}/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": "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" + } + } + }, + "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": { + "200": { + "$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": { + "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": { + "200": { + "$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/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}/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" + }, + "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 an 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 an 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 dont 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": [ From 1347cb9a73506a41d7fe7a6fb8c7ac85f825c9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 20:26:52 -0500 Subject: [PATCH 151/218] fix remaining tests --- tests/integration/compare_test.go | 2 +- tests/integration/pull_compare_test.go | 2 +- tests/integration/pull_create_test.go | 2 +- tests/integration/pull_review_test.go | 2 +- tests/integration/repo_branch_test.go | 2 +- tests/integration/repo_fork_test.go | 2 +- tests/integration/repo_generate_test.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go index c2cc3b43f6..1f237c1ce2 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -175,7 +175,7 @@ func TestCompareCodeExpand(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session = loginUser(t, user2.Name) - testRepoFork(t, session, user1.Name, repo.Name, user2.Name, "test_blob_excerpt-fork", "") + testRepoFork(t, session, repo.GroupID, user1.Name, repo.Name, user2.Name, "test_blob_excerpt-fork", "") testCreateBranch(t, session, user2.Name, "test_blob_excerpt-fork", "branch/main", "forked-branch", http.StatusSeeOther) testEditFile(t, session, repo.GroupID, user2.Name, "test_blob_excerpt-fork", "forked-branch", "README.md", strings.Repeat("a\n", 15)+"CHANGED\n"+strings.Repeat("a\n", 15)) diff --git a/tests/integration/pull_compare_test.go b/tests/integration/pull_compare_test.go index 6d15af4943..95cf457799 100644 --- a/tests/integration/pull_compare_test.go +++ b/tests/integration/pull_compare_test.go @@ -96,7 +96,7 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) { // user4 forks repo3 user4Session := loginUser(t, "user4") forkedRepoName := "user4-forked-repo3" - testRepoFork(t, user4Session, repo3.OwnerName, repo3.Name, 0, "user4", forkedRepoName, "") + testRepoFork(t, user4Session, repo3.GroupID, repo3.OwnerName, repo3.Name, "user4", forkedRepoName, "") forkedRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user4", Name: forkedRepoName}) assert.True(t, forkedRepo.IsPrivate) diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index 2bd5d36ceb..ebeb8d5608 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -427,7 +427,7 @@ func TestCreatePullWhenBlocked(t *testing.T) { // Setup // User1 forks repo1 from User2 sessionFork := loginUser(t, ForkOwner) - testRepoFork(t, sessionFork, RepoOwner, "repo1", ForkOwner, "forkrepo1", "") + testRepoFork(t, sessionFork, 0, RepoOwner, "repo1", ForkOwner, "forkrepo1", "") // 1. User2 blocks user1 // sessionBase := loginUser(t, "user2") diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index b13b36e322..5da4b71801 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -220,7 +220,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { user2Session := loginUser(t, "user2") // Have user1 create a fork of repo1. - testRepoFork(t, user1Session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, user1Session, 0, "repo1", "user1", "repo1", "user2", "") t.Run("Submit approve/reject review on merged PR", func(t *testing.T) { // Create a merged PR (made by user1) in the upstream repo1. diff --git a/tests/integration/repo_branch_test.go b/tests/integration/repo_branch_test.go index 967d336a8f..3bfe75aac1 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -241,7 +241,7 @@ func TestRecentlyPushedNewBranches(t *testing.T) { prepareRecentlyPushedBranchSpecialTest(t, user12Session, repo10, repo10) // create a fork repo in public org - testRepoFork(t, user12Session, 0, repo10.Name, "org25", "org25_fork_repo10", repo10.DefaultBranch, repo10.OwnerName) + testRepoFork(t, user12Session, repo10.GroupID, repo10.OwnerName, repo10.Name, "org25", "org25_fork_repo10", repo10.DefaultBranch) orgPublicForkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerID: 25, Name: "org25_fork_repo10"}) prepareRepoPR(t, user12Session, user12Session, repo10, orgPublicForkRepo) prepareRecentlyPushedBranchTest(t, user12Session, repo10, orgPublicForkRepo) diff --git a/tests/integration/repo_fork_test.go b/tests/integration/repo_fork_test.go index 34a3641b10..88968a0415 100644 --- a/tests/integration/repo_fork_test.go +++ b/tests/integration/repo_fork_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" ) -func testRepoFork(t *testing.T, session *TestSession, groupID int64, repoName, forkOwnerName, forkRepoName, forkBranch, ownerName string) *httptest.ResponseRecorder { +func testRepoFork(t *testing.T, session *TestSession, groupID int64, ownerName, repoName, forkOwnerName, forkRepoName, forkBranch string) *httptest.ResponseRecorder { forkOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: forkOwnerName}) // Step0: check the existence of the to-fork repo diff --git a/tests/integration/repo_generate_test.go b/tests/integration/repo_generate_test.go index b1ade20202..be4d5a036b 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -61,7 +61,7 @@ func testRepoGenerate(t *testing.T, session *TestSession, templateID, templateOw body := fmt.Sprintf(`# %s Readme Owner: %s Link: /%s/%s -Clone URL: %s/%s.git`, +Clone URL: %s%s/%s.git`, generateRepoName, strings.ToUpper(generateOwnerName), generateOwnerName, From 268e8bc56555fbff42935b567a342ee46355ec80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 21:20:29 -0500 Subject: [PATCH 152/218] fix repo api url --- models/repo/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo/repo.go b/models/repo/repo.go index 530a498ce4..3610b0cc1b 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -391,7 +391,7 @@ func (repo *Repository) APIURL(ctxOpt ...context.Context) string { ctx := util.OptionalArg(ctxOpt, context.TODO()) var groupSegment string if repo.GroupID > 0 { - groupSegment = fmt.Sprintf("group/%d", repo.GroupID) + 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)) } From 1a6788d32733f70f7168b47194ca26d868e677b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 21:20:42 -0500 Subject: [PATCH 153/218] fix a couple more tests --- tests/integration/org_test.go | 4 +++- tests/integration/pull_review_test.go | 2 +- tests/integration/repo_watch_test.go | 2 +- tests/integration/timetracking_test.go | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index c2d6990a2a..5141f6a938 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -154,6 +154,8 @@ func testOrgRestrictedUser(t *testing.T) { // public_repo_on_private_org is a public repo on privated_org repoName := "public_repo_on_private_org" + repoGroup := 340 + // user29 is a restricted user who is not a member of the organization restrictedUser := "user29" @@ -164,7 +166,7 @@ func testOrgRestrictedUser(t *testing.T) { req := NewRequest(t, "GET", "/"+orgName) restrictedSession.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", fmt.Sprintf("/%s/%s", orgName, repoName)) + req = NewRequest(t, "GET", fmt.Sprintf("/%s/group/%d/%s", orgName, repoGroup, repoName)) restrictedSession.MakeRequest(t, req, http.StatusNotFound) // Therefore create a read-only team diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index 5da4b71801..0383bcd6d6 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -220,7 +220,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { user2Session := loginUser(t, "user2") // Have user1 create a fork of repo1. - testRepoFork(t, user1Session, 0, "repo1", "user1", "repo1", "user2", "") + testRepoFork(t, user1Session, 0, "user1", "repo1", "user2", "repo1", "") t.Run("Submit approve/reject review on merged PR", func(t *testing.T) { // Create a merged PR (made by user1) in the upstream repo1. diff --git a/tests/integration/repo_watch_test.go b/tests/integration/repo_watch_test.go index 48cdaceebf..e3ca8c1796 100644 --- a/tests/integration/repo_watch_test.go +++ b/tests/integration/repo_watch_test.go @@ -18,7 +18,7 @@ func TestRepoWatch(t *testing.T) { setting.Service.AutoWatchOnChanges = true session := loginUser(t, "user2") unittest.AssertNotExistsBean(t, &repo_model.Watch{UserID: 2, RepoID: 3}) - testEditFile(t, session, 0, "org3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n") + testEditFile(t, session, 129, "org3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n") unittest.AssertExistsAndLoadBean(t, &repo_model.Watch{UserID: 2, RepoID: 3, Mode: repo_model.WatchModeAuto}) }) } diff --git a/tests/integration/timetracking_test.go b/tests/integration/timetracking_test.go index 6e32a97186..cb16f9bb49 100644 --- a/tests/integration/timetracking_test.go +++ b/tests/integration/timetracking_test.go @@ -37,7 +37,7 @@ func TestViewTimetrackingControls(t *testing.T) { } func testViewTimetrackingControls(t *testing.T, session *TestSession, groupID int64, repo, issue string, canTrackTime bool, user string) { - req := NewRequest(t, "GET", "/"+path.Join(user, repo, "issues", issue)) + req := NewRequest(t, "GET", "/"+path.Join(user, maybeGroupSegment(groupID), repo, "issues", issue)) resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) From 610dac951731927f4d67588f7abcb5e07a4f2289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 21:34:22 -0500 Subject: [PATCH 154/218] update swagger tool unmarshal json directly into ordered map --- build_tools/swagger/main.go | 176 +- templates/swagger/v1_groups.json | 26094 ++++++++++++++--------------- 2 files changed, 13191 insertions(+), 13079 deletions(-) diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index 71a23717cf..c8e9882bde 100644 --- a/build_tools/swagger/main.go +++ b/build_tools/swagger/main.go @@ -6,6 +6,9 @@ package main import ( "bytes" + encjson "encoding/json" //nolint:depguard // this package wraps it + "errors" + "fmt" "iter" "log" "os" @@ -25,11 +28,11 @@ type OrderedMap struct { indices map[string]int } -func (o OrderedMap) Get(key string) (bool, any) { +func (o OrderedMap) Get(key string) (any, bool) { if _, ok := o.indices[key]; ok { - return true, o.Pairs[o.indices[key]].Value + return o.Pairs[o.indices[key]].Value, true } - return false, nil + return nil, false } func (o *OrderedMap) Set(key string, value any) { @@ -49,6 +52,135 @@ func (o OrderedMap) Iter() iter.Seq2[string, any] { } } +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, nil + } + + 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 { + 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 @@ -74,32 +206,6 @@ func (o OrderedMap) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } -func innerConvert(it any) any { - switch v := it.(type) { - case map[string]any: - return mapToOrderedMap(v) - case []any: - for i := range v { - v[i] = innerConvert(v[i]) - } - return v - default: - return v - } -} - -func mapToOrderedMap(m map[string]any) OrderedMap { - var om OrderedMap - om.indices = make(map[string]int) - i := 0 - for k, v := range m { - om.Pairs = append(om.Pairs, Pair{k, innerConvert(v)}) - om.indices[k] = i - i++ - } - return om -} - var rxPath = regexp.MustCompile(`(?m)^(/repos/\{owner})/(\{repo})`) func generatePaths(root string) *OrderedMap { @@ -117,12 +223,18 @@ func generatePaths(root string) *OrderedMap { if err != nil { log.Fatal(err) } - raw := make(map[string]any) + raw := OrderedMap{ + indices: make(map[string]int), + } err = json.Unmarshal(swaggerBytes, &raw) if err != nil { log.Fatal(err) } - paths := mapToOrderedMap(raw["paths"].(map[string]any)) + 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}` @@ -135,7 +247,7 @@ func generatePaths(root string) *OrderedMap { for method, methodSpec := range methodMap.Iter() { specMap := methodSpec.(OrderedMap) var params []OrderedMap - has, aparams := specMap.Get("parameters") + aparams, has := specMap.Get("parameters") if !has { continue } diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 58acc29dc9..01da0e65db 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,12 +1,15 @@ { "paths": { - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { - "delete": { - "tags": [ - "issue" + "/repos/{owner}/group/{group_id}/{repo}": { + "get": { + "produces": [ + "application/json" ], - "summary": "Delete specific tracked time", - "operationId": "issueDeleteTime", + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet", "parameters": [ { "type": "string", @@ -16,26 +19,10 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" - }, - { - "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 }, { @@ -48,40 +35,396 @@ } ], "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" }, - "204": { - "$ref": "#/responses/empty" + "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" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/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": { - "responses": { - "200": { - "$ref": "#/responses/WorkflowJob" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], @@ -92,11 +435,11 @@ "operationId": "getWorkflowJob", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { "type": "string", @@ -120,305 +463,91 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { - "post": { - "tags": [ - "repository" - ], - "summary": "Update the priorities of branch protections for a repository.", - "operationId": "repoUpdateBranchProtectionPriories", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "patch": { - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "description": "the milestone to edit, identified by ID and if not available by name" - }, - { - "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" + "$ref": "#/responses/WorkflowJob" }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone" - }, - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } } - }, - "delete": { - "parameters": [ - { - "type": "string", - "description": "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" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { - "get": { + "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, + "required": true + }, + { "type": "string", - "description": "owner of the repo" + "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", @@ -428,11 +557,138 @@ "required": true }, { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "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" + } + } + }, + "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 an 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, - "type": "string", - "description": "id of the runner" + "required": true }, { "description": "group ID of the repo", @@ -453,17 +709,17 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner" - }, - "delete": { + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", "parameters": [ { "type": "string", @@ -473,18 +729,18 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { + "type": "string", + "description": "id of the runner", "name": "runner_id", "in": "path", - "required": true, - "type": "string", - "description": "id of the runner" + "required": true }, { "description": "group ID of the repo", @@ -505,493 +761,9 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete an repo-level runner", - "operationId": "deleteRepoRunner" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { - "operationId": "repoApplyDiffPatch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Apply diff patch to repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { - "delete": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview" - }, - "get": { - "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 - }, - { - "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" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an pull request", - "operationId": "repoSubmitPullReview", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "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" - } } } }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to sync" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { - "get": { - "tags": [ - "repository" - ], - "summary": "Gets the blob of a repository.", - "operationId": "GetBlob", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { - "get": { - "operationId": "repoGetNote", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "a git ref or commit sha", - "name": "sha" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a note corresponding to a single commit from a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Start stopwatch on an issue.", - "operationId": "issueStartStopWatch" - } - }, "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { "get": { "produces": [ @@ -1042,10 +814,10 @@ "in": "query" }, { + "type": "string", "description": "triggering sha of the workflow run", "name": "head_sha", - "in": "query", - "type": "string" + "in": "query" }, { "type": "integer", @@ -1054,10 +826,10 @@ "in": "query" }, { - "name": "limit", - "in": "query", "type": "integer", - "description": "page size of results" + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -1081,121 +853,7 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommentList" - } - }, - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { - "get": { - "tags": [ - "repository" - ], - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { "get": { "produces": [ "application/json" @@ -1203,39 +861,8 @@ "tags": [ "repository" ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - } - }, - "post": { + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun", "parameters": [ { "type": "string", @@ -1245,230 +872,130 @@ "required": true }, { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoCreateRunnerRegistrationToken" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { - "put": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "team name", - "name": "team" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "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 - }, - { - "description": "team name", - "name": "team", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - } - } - }, - "/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 - }, - { - "in": "path", - "required": true, "type": "string", "description": "name of the repository", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { + "type": "string", + "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", - "type": "string" + "in": "query" }, { "description": "group ID of the repo", @@ -1492,6 +1019,4013 @@ } } }, + "/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/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" + } + }, + { + "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}/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 + }, + { + "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" + } + } + }, + "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": [ @@ -1504,26 +5038,26 @@ "operationId": "repoGetHook", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "type": "integer", "format": "int64", "description": "id of the hook to get", "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "description": "group ID of the repo", @@ -1568,12 +5102,12 @@ "required": true }, { - "name": "id", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "id of the hook to delete" + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -1594,14 +5128,6 @@ } }, "patch": { - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], @@ -1612,26 +5138,26 @@ "operationId": "repoEditHook", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { + "type": "integer", + "format": "int64", "description": "index of the hook", "name": "id", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { "name": "body", @@ -1648,27 +5174,41 @@ "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": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "integer", @@ -1700,47 +5240,490 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { - "deprecated": true, + ], + "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": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", - "in": "path", "required": true }, { - "name": "id", + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", - "required": true, + "required": true + }, + { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "id of comment to delete" + "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", @@ -1761,15 +5744,63 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "Delete a comment", - "operationId": "issueDeleteCommentDeprecated" - }, - "patch": { + "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" }, @@ -1779,10 +5810,1431 @@ "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/Comment" + "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": { + "200": { + "$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": { + "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" ], @@ -1818,12 +7270,12 @@ "required": true }, { - "name": "id", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "id of the comment to edit" + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true }, { "name": "body", @@ -1840,7 +7292,2427 @@ "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": { + "200": { + "$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}": { @@ -1903,6136 +9775,7 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { - "post": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/TagProtection" - } - }, - "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" - } - ] - }, - "get": { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repo-level runners", - "operationId": "getRepoRunners" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/TasksList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's action tasks", - "operationId": "ListActionTasks" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "name": "filepath", - "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." - }, - { - "type": "string", - "description": "the name of the commit/branch/tag, default to the repository’s default branch.", - "name": "ref", - "in": "query" - }, - { - "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" - }, - { - "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": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "path of the dir, file, symlink or submodule in the repo", - "name": "filepath", - "in": "path" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "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": { - "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set", - "operationId": "repoUpdateFile", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "string", - "description": "path of the file to update", - "name": "filepath", - "in": "path", - "required": true - }, - { - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateFileOptions" - }, - "name": "body" - }, - { - "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" - }, - "200": { - "$ref": "#/responses/FileResponse" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "post": { - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a file in a repository", - "operationId": "repoCreateFile", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - ] - }, - "delete": { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "post": { - "operationId": "repoCreateHook", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a hook" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { - "delete": { - "parameters": [ - { - "type": "string", - "description": "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge" - }, - "get": { - "responses": { - "204": { - "description": "pull request has been merged" - }, - "404": { - "description": "pull request has not been merged" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { - "get": { - "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" - } - } - }, - "produces": [ - "text/plain" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer": { - "post": { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer" - } - }, - "/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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a label", - "operationId": "issueCreateLabel", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - }, - "name": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "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" - } - } - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", - "in": "query", - "type": "string" - }, - { - "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": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "type": "string", - "description": "type of state", - "name": "state", - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ] - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "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": { - "tags": [ - "repository" - ], - "summary": "Create a commit status", - "operationId": "repoCreateStatus", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "notification" - ], - "summary": "List users's notification threads on a specific repo", - "operationId": "notifyGetRepoList", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - }, - { - "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": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "issue", - "pull", - "commit", - "repository" - ] - }, - "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "consumes": [ - "application/json" - ] - }, - "put": { - "tags": [ - "notification" - ], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "query", - "type": "string", - "description": "If true, mark all notifications on this repo. Default value is false", - "name": "all" - }, - { - "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": "array" - }, - { - "description": "Status to mark notifications as. Defaults to read.", - "name": "to-status", - "in": "query", - "type": "string" - }, - { - "name": "last_read_at", - "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." - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { - "get": { - "operationId": "repoGetWikiPageRevisions", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WikiCommitList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get revisions of a wiki page" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { - "get": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/ActionWorkflowList" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List repository workflows", - "operationId": "ActionsListRepositoryWorkflows", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "operationId": "repoGetRepoPermissions", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repository permissions for a user" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "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" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment" - }, - "delete": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path" - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment" - }, - "patch": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", - "in": "path" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repo's pull requests", - "operationId": "repoListPullRequests", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - }, - { - "type": "string", - "default": "open", - "description": "State of pull request", - "name": "state", - "in": "query", - "enum": [ - "open", - "closed", - "all" - ] - }, - { - "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" - }, - { - "name": "labels", - "in": "query", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "multi", - "description": "Label IDs" - }, - { - "description": "Filter by pull request author", - "name": "poster", - "in": "query", - "type": "string" - }, - { - "name": "page", - "in": "query", - "minimum": 1, - "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)" - }, - { - "name": "limit", - "in": "query", - "minimum": 0, - "type": "integer", - "description": "Page size of results" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a pull request", - "operationId": "repoCreatePullRequest", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePullRequestOption" - }, - "name": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "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" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "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", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/branches/{branch}": { - "patch": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the branch", - "name": "branch" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "get": { - "responses": { - "200": { - "$ref": "#/responses/Branch" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - ] - }, - "delete": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "branch to delete", - "name": "branch" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/issues/{index}/pin": { - "post": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "tags": [ - "issue" - ], - "summary": "Pin an Issue", - "operationId": "pinIssue", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - ] - }, - "delete": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "tags": [ - "issue" - ], - "summary": "Unpin an Issue", - "operationId": "unpinIssue", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to unpin" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "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" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "description": "id of the key to delete", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { - "get": { - "tags": [ - "repository" - ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repo-level variable", - "operationId": "getRepoVariable", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "tags": [ - "repository" - ], - "summary": "Update a repo-level variable", - "operationId": "updateRepoVariable", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - }, - "name": "body" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "operationId": "createRepoVariable", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a repo-level variable" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/issue_config/validate": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Returns the validation information for a issue config", - "operationId": "repoValidateIssueConfig", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" - }, - { - "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" - } - } - }, - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a list of reactions from a comment of an issue", - "operationId": "issueGetCommentReactions" - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - } - } - }, - "/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "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": { - "operationId": "issueCreateIssueAttachment", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create an issue attachment" - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path" - }, - { - "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": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment" - }, - "patch": { - "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 - }, - { - "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, - "type": "integer" - }, - { - "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": { - "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit an issue attachment" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/licenses": { - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LicensesList" - } - }, - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/reviewers": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Return all users that can be requested to review in this repo", - "operationId": "repoGetReviewers" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { - "get": { - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific tag protection for the repository", - "operationId": "repoGetTagProtection" - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "patch": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "id of protected tag", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { - "operationId": "repoGetIssueConfig", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/RepoIssueConfig" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Returns the issue config for a repo" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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}/keys": { - "post": { - "operationId": "repoCreateKey", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add a key to a repository" - }, - "get": { - "operationId": "repoListKeys", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "the key_id to search for", - "name": "key_id", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's keys" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer", - "parameters": [ - { - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" - }, - { - "in": "query", - "type": "boolean", - "description": "show all directories and files", - "name": "recursive" - }, - { - "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" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets the tree of a repository." - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { - "post": { - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { - "post": { - "tags": [ - "repository" - ], - "summary": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "name": "attachment", - "in": "formData", - "type": "file", - "description": "attachment to upload" - }, - { - "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" - } - }, - "consumes": [ - "multipart/form-data", - "application/octet-stream" - ], - "produces": [ - "application/json" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/AttachmentList" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - }, - { - "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": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/UserList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a list of all commits from a repository", - "operationId": "repoGetAllCommits", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "description": "filepath of a file/dir", - "name": "path", - "in": "query", - "type": "string" - }, - { - "description": "Only commits after this date will be returned (ISO 8601 format)", - "name": "since", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "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" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "type": "integer", - "description": "page size of results (ignored if used with 'path')", - "name": "limit", - "in": "query" - }, - { - "name": "not", - "in": "query", - "type": "string", - "description": "commits that match the given specifier will not be listed." - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { - "get": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "index of the issue", - "name": "index" - }, - { - "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": { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unblock the issue given in the body by the issue in path" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { - "put": { - "summary": "Add a topic to a repository", - "operationId": "repoAddTopic", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "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 - }, - { - "description": "name of the topic to delete", - "name": "topic", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a topic from a repository" - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "filepath of file to get", - "name": "filepath", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index" - }, - { - "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" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { - "get": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment" - }, - "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 - }, - { - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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", - "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 release attachment", - "operationId": "repoEditReleaseAttachment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/Attachment" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "tags": [ - "repository" - ], - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "get": { - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" - }, - { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Artifact" - } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Deletes a specific artifact for a workflow run", - "operationId": "deleteArtifact" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "in": "path", - "required": true - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { - "get": { - "tags": [ - "issue" - ], - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "operationId": "issueListIssueDependencies", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/IssueList" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "operationId": "issueCreateIssueDependencies", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "string", - "description": "index of the issue" - }, - { - "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": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Make the issue in the url depend on the issue in the form." - }, - "delete": { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove an issue dependency" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "remote name of push mirror", - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "delete": { - "tags": [ - "repository" - ], - "summary": "deletes a push mirror from a repository by remoteName", - "operationId": "repoDeletePushMirror", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "remote name of the pushMirror", - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "string", - "description": "part or full name of the ref", - "name": "ref", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a single label", - "operationId": "issueGetLabel", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "operationId": "issueDeleteLabel", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label" - }, - "patch": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a label", - "operationId": "issueEditLabel", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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}/pulls/{index}/requested_reviewers": { + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { "post": { "produces": [ "application/json" @@ -8040,15 +9783,15 @@ "tags": [ "repository" ], - "summary": "create review requests for a pull request", - "operationId": "repoCreatePullReviewRequests", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -8057,697 +9800,11 @@ "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": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" - }, - { - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - }, - "name": "body", - "in": "body", - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "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": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a workflow run", - "operationId": "deleteActionRun" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { - "delete": { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's branches", - "operationId": "repoListBranches", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - }, - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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": { - "409": { - "description": "The branch with the same name already exists." - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Branch" - }, - "403": { - "description": "The branch is archived or a mirror." - }, - "404": { - "description": "The old branch does not exist." - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a branch", - "operationId": "repoCreateBranch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/IssueList" - } - }, - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "put": { - "tags": [ - "repository" - ], - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - } - }, - "get": { - "parameters": [ - { - "type": "string", - "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" - } - }, - "tags": [ - "repository" - ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": { - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" + "$ref": "#/definitions/MergeUpstreamRequest" } }, { @@ -8761,2069 +9818,7 @@ ], "responses": { "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "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 - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a label to an issue" - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "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}/languages": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repository", - "name": "repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "302": { - "description": "redirect to the blob download" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get an issue", - "operationId": "issueGetIssue", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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": { - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "tags": [ - "issue" - ], - "summary": "Delete an issue", - "operationId": "issueDelete" - }, - "patch": { - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - } - }, - "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 - }, - { - "format": "int64", - "description": "index of the issue to edit", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { - "get": { - "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 - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path" - }, - { - "name": "diffType", - "in": "path", - "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch" - }, - { - "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" - } - }, - "produces": [ - "text/plain" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request diff or patch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "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 - }, - { - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - }, - { - "name": "verification", - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')" - }, - { - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get commits for a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopStopWatch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { - "get": { - "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 - }, - { - "description": "tag name of the release to get", - "name": "tag", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "tag name of the release to delete", - "name": "tag" - }, - { - "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": { - "summary": "Get a release", - "operationId": "repoGetRelease", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the release to get", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the release to delete", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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" - } - }, - "tags": [ - "repository" - ], - "summary": "Delete a release", - "operationId": "repoDeleteRelease" - }, - "patch": { - "summary": "Update a release", - "operationId": "repoEditRelease", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "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 - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a wiki page" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update avatar", - "operationId": "repoUpdateAvatar", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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": { - "summary": "Delete avatar", - "operationId": "repoDeleteAvatar", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/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": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path" - }, - { - "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}/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 - }, - { - "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path" - }, - { - "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": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a Git hook in a repository" - }, - "patch": { - "summary": "Edit a Git hook in a repository", - "operationId": "repoEditGitHook", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - }, - "delete": { - "responses": { - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { - "put": { - "summary": "Enable a workflow", - "operationId": "ActionsEnableWorkflow", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "name": "workflow_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the workflow" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { - "get": { - "summary": "List a repository's issues", - "operationId": "issueListIssues", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - }, - { - "name": "q", - "in": "query", - "type": "string", - "description": "search string" - }, - { - "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" - }, - { - "name": "since", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format" - }, - { - "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" - }, - { - "name": "assigned_by", - "in": "query", - "type": "string", - "description": "Only show items for which the given user is assigned" - }, - { - "in": "query", - "type": "string", - "description": "Only show items in which the given user was mentioned", - "name": "mentioned_by" - }, - { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueCreateIssue", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { - "patch": { - "operationId": "repoEditPullRequest", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "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." - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request", - "operationId": "repoGetPullRequest", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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" - } - } - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "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" - }, - { - "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}/pulls/{index}/reviews": { - "get": { - "operationId": "repoListPullReviews", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List all reviews for a pull request" - }, - "post": { - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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" - } - ] - } - }, - "/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 - }, - { - "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" - }, - { - "description": "type of sort", - "name": "sort", - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string" - }, - { - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string", - "description": "type of state", - "name": "state", - "in": "query" - }, - { - "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" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" + "$ref": "#/responses/MergeUpstreamResponse" }, "400": { "$ref": "#/responses/error" @@ -10836,14 +9831,6 @@ }, "/repos/{owner}/group/{group_id}/{repo}/milestones": { "get": { - "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], @@ -10854,11 +9841,11 @@ "operationId": "issueGetMilestonesList", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -10886,10 +9873,10 @@ "in": "query" }, { + "type": "integer", "description": "page size of results", "name": "limit", - "in": "query", - "type": "integer" + "in": "query" }, { "description": "group ID of the repo", @@ -10899,7 +9886,15 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } }, "post": { "consumes": [ @@ -10954,10 +9949,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}": { + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { "get": { - "summary": "Get a repository", - "operationId": "repoGet", + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", "parameters": [ { "type": "string", @@ -10967,11 +9968,18 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "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", @@ -10984,35 +9992,41 @@ ], "responses": { "200": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } }, "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", "parameters": [ { - "description": "owner of the repo to delete", + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "name of the repo to delete", + "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", @@ -11023,55 +10037,53 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repository", - "operationId": "repoDelete" + } }, "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Edit a repository's properties. Only fields that are set will be changed.", - "operationId": "repoEdit", + "summary": "Update a milestone", + "operationId": "issueEditMilestone", "parameters": [ { - "in": "path", - "required": true, "type": "string", - "description": "owner of the repo to edit", - "name": "owner" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repo to edit", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "description": "Properties of a repo that you can edit", + "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/EditRepoOption" + "$ref": "#/definitions/EditMilestoneOption" } }, { @@ -11085,55 +10097,39 @@ ], "responses": { "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun", + "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo to sync", "name": "repo", "in": "path", "required": true }, - { - "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path", - "required": true - }, - { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the artifact" - }, { "description": "group ID of the repo", "name": "group_id", @@ -11145,144 +10141,27 @@ ], "responses": { "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { - "get": { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { "$ref": "#/responses/empty" - } - }, - "produces": [ - "application/json" - ] - }, - "put": { - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" }, - { - "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": { "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a collaborator from a repository", - "operationId": "repoDeleteCollaborator", + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", "parameters": [ { "type": "string", @@ -11298,13 +10177,6 @@ "in": "path", "required": true }, - { - "description": "username of the collaborator to delete", - "name": "collaborator", - "in": "path", - "required": true, - "type": "string" - }, { "description": "group ID of the repo", "name": "group_id", @@ -11315,37 +10187,28 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { + "/repos/{owner}/group/{group_id}/{repo}/notifications": { "get": { - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.", + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "notification" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContents", + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", "parameters": [ { "type": "string", @@ -11355,24 +10218,69 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref", + "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", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body", - "in": "query", - "required": true + "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", @@ -11382,26 +10290,25 @@ "required": true, "in": "path" } - ] - }, - "post": { + ], "responses": { "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/NotificationThreadList" } - }, - "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`.", + } + }, + "put": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "notification" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", + "summary": "Mark notification threads as read, pinned or unread on a specific repo", + "operationId": "notifyReadRepoList", "parameters": [ { "type": "string", @@ -11418,62 +10325,33 @@ "required": true }, { - "in": "query", "type": "string", - "description": "The name of the commit/branch/tag. Default to the repository’s default branch.", - "name": "ref" + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "in": "query" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GetFilesOptions" - } + "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" }, { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "parameters": [ - { - "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "Status to mark notifications as. Defaults to read.", + "name": "to-status", + "in": "query" }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue", - "name": "index", - "in": "path", - "required": true - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position", - "in": "path" + "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", @@ -11485,21 +10363,193 @@ } ], "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" }, - "204": { - "$ref": "#/responses/empty" + "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" } - }, - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin" + } } }, "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { @@ -11521,11 +10571,11 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { "description": "group ID of the repo", @@ -11546,1261 +10596,30 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReviewComments", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "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 - }, - { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, - { - "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": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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}/commits/{ref}/status": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/CombinedStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { - "get": { - "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 - }, - { - "name": "filepath", - "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" - }, - { - "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" - } - }, - "produces": [ - "application/octet-stream" - ], - "tags": [ - "repository" - ], - "summary": "Get a file from a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { - "get": { - "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 - }, - { - "required": true, - "type": "integer", - "description": "id of the job", - "name": "job_id", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Downloads the job logs for a workflow run", - "operationId": "downloadActionsRunJobLogs" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { - "get": { - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/AttachmentList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "post": { - "summary": "Create a comment attachment", - "operationId": "issueCreateIssueCommentAttachment", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Lock an issue", - "operationId": "issueLockIssue" - }, - "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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a list reactions of an issue", - "operationId": "issueGetIssueReactions", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "page", - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "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" - } - ] - }, - "post": { - "operationId": "issuePostIssueReaction", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a reaction to an issue" - }, - "delete": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" - }, - { - "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": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's tags", - "operationId": "repoListTags" - }, - "post": { - "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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repository's forks", - "operationId": "listForks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Fork a repository", - "operationId": "createFork", - "parameters": [ - { - "required": true, - "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" - }, - { - "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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { - "get": { - "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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { - "get": { - "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" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { - "get": { - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates", - "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - }, - "name": "body" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a branch from upstream", - "operationId": "repoMergeUpstream" - } - }, "/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": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -12832,22 +10651,648 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { + "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/PullReview" + "$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}/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" + }, + "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" @@ -12858,7 +11303,386 @@ "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 an 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 an 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" ], @@ -12876,19 +11700,19 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "name": "index", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request" + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true }, { "type": "integer", @@ -12899,45 +11723,12 @@ "required": true }, { + "name": "body", + "in": "body", "required": true, "schema": { "$ref": "#/definitions/DismissPullReviewOptions" - }, - "name": "body", - "in": "body" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { - "post": { - "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 - }, - { - "description": "name of the repo to sync", - "name": "repo", - "in": "path", - "required": true, - "type": "string" + } }, { "description": "group ID of the repo", @@ -12950,279 +11741,30 @@ ], "responses": { "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/PullReview" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/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 - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "optional filter by user (available for issue managers)", - "name": "user", - "in": "query", - "type": "string" - }, - { - "name": "since", - "in": "query", - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format" - }, - { - "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": "string" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "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 - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "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" - } - ] - }, - "delete": { - "operationId": "repoDeleteTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "required": true, - "type": "string", - "description": "name of tag to delete", - "name": "tag", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" }, "422": { "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a repository's tag by name" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { - "delete": { - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" - }, - { - "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" - } - }, - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a wiki page", - "operationId": "repoEditWikiPage", + "summary": "Cancel to dismiss a review for a pull request", + "operationId": "repoUnDismissPullReview", "parameters": [ { "type": "string", @@ -13232,81 +11774,25 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" - }, - { - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" - }, - { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" - }, - { - "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" - } - } - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", - "parameters": [ - { - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" - }, - { "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "type": "string", - "description": "name of the page", - "name": "pageName", + "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 }, @@ -13321,25 +11807,108 @@ ], "responses": { "200": { - "$ref": "#/responses/WikiPage" + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { - "get": { - "summary": "Get all wiki pages", - "operationId": "repoGetWikiPages", + "/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, + "required": true + }, + { "type": "string", - "description": "owner of the repo" + "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", @@ -13370,67 +11939,32 @@ } ], "responses": { + "200": { + "$ref": "#/responses/PushMirrorList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WikiPageList" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection" + } }, "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Create a branch protections for a repository", - "operationId": "repoCreateBranchProtection", + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", "parameters": [ { "type": "string", @@ -13450,7 +11984,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" + "$ref": "#/definitions/CreatePushMirrorOption" } }, { @@ -13463,69 +11997,46 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" + "200": { + "$ref": "#/responses/PushMirror" }, - "201": { - "$ref": "#/responses/BranchProtection" + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { - "patch": { + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditBranchProtection", + "summary": "Sync all push mirrored repository", + "operationId": "repoPushMirrorSync", "parameters": [ { "type": "string", - "description": "owner of the repo", + "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": "string", - "description": "name of the repo" - }, - { - "type": "string", - "description": "name of protected branch", - "name": "name", - "in": "path", "required": true }, - { - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - }, - "name": "body", - "in": "body" - }, { "description": "group ID of the repo", "name": "group_id", @@ -13536,23 +12047,22 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, "200": { - "$ref": "#/responses/BranchProtection" + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ] - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { "get": { "produces": [ "application/json" @@ -13560,15 +12070,15 @@ "tags": [ "repository" ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection", + "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" + "required": true }, { "type": "string", @@ -13578,11 +12088,11 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of protected branch", - "name": "name" + "description": "remote name of push mirror", + "name": "name", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -13595,7 +12105,13 @@ ], "responses": { "200": { - "$ref": "#/responses/BranchProtection" + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -13603,7 +12119,14 @@ } }, "delete": { - "operationId": "repoDeleteBranchProtection", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "deletes a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", "parameters": [ { "type": "string", @@ -13620,11 +12143,11 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of protected branch", - "name": "name" + "description": "remote name of the pushMirror", + "name": "name", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -13639,67 +12162,51 @@ "204": { "$ref": "#/responses/empty" }, + "400": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch protection for the repository" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { "get": { "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ "repository" ], - "summary": "Get a single commit from a repository", - "operationId": "repoGetSingleCommit", + "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": "owner of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" - }, - { - "description": "a git ref or commit sha", - "name": "sha", + "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat", - "in": "query" + "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 }, { - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification" - }, - { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repository’s default branch", + "name": "ref", "in": "query" }, { @@ -13713,27 +12220,19 @@ ], "responses": { "200": { - "$ref": "#/responses/Commit" + "description": "Returns raw file content.", + "schema": { + "type": "file" + } }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } } }, "/repos/{owner}/group/{group_id}/{repo}/releases": { "get": { - "responses": { - "200": { - "$ref": "#/responses/ReleaseList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], @@ -13751,11 +12250,11 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "boolean", @@ -13770,16 +12269,16 @@ "in": "query" }, { - "name": "page", - "in": "query", "type": "integer", - "description": "page number of results to return (1-based)" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "in": "query", "type": "integer", "description": "page size of results", - "name": "limit" + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -13789,9 +12288,27 @@ "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": [ { @@ -13802,11 +12319,11 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "name": "body", @@ -13837,20 +12354,10 @@ "422": { "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a release" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { "get": { "produces": [ "application/json" @@ -13858,8 +12365,8 @@ "tags": [ "repository" ], - "summary": "List the Git hooks in a repository", - "operationId": "repoListGitHooks", + "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", + "operationId": "repoGetLatestRelease", "parameters": [ { "type": "string", @@ -13869,137 +12376,10 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" - }, - { - "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}/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": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "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}/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 - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "type": "string", - "description": "username of the user to subscribe the issue to", - "name": "user", - "in": "path", "required": true }, { @@ -14013,13 +12393,58 @@ ], "responses": { "200": { - "description": "Already subscribed" + "$ref": "#/responses/Release" }, - "201": { - "description": "Successfully Subscribed" + "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 }, - "304": { - "description": "User can only subscribe itself if he is no admin" + { + "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" @@ -14027,220 +12452,11 @@ } }, "delete": { - "responses": { - "304": { - "description": "User can only subscribe itself if he is no admin" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "Already unsubscribed" - }, - "201": { - "description": "Successfully Unsubscribed" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { - "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "name": "repo", - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" - }, - { - "description": "the date of the activities to be found", - "name": "date", - "in": "query", - "type": "string", - "format": "date" - }, - { - "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}/issues/{index}/timeline": { - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true, - "type": "string" - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query", - "type": "string", - "format": "date-time" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs", + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", "parameters": [ { "type": "string", @@ -14256,53 +12472,13 @@ "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" - } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { - "get": { - "parameters": [ { "type": "string", - "description": "owner of the repo", - "name": "owner", + "description": "tag name of the release to delete", + "name": "tag", "in": "path", "required": true }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer" - }, { "description": "group ID of the repo", "name": "group_id", @@ -14313,51 +12489,94 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Comment" - }, "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a comment", - "operationId": "issueGetComment" - }, - "delete": { + "summary": "Get a release", + "operationId": "repoGetRelease", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "integer", "format": "int64", - "description": "id of comment to delete", + "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 @@ -14375,48 +12594,54 @@ "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a comment", - "operationId": "issueDeleteComment" + } }, "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a release", + "operationId": "repoEditRelease", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "name": "id", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "id of the comment to edit" + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditIssueCommentOption" + "$ref": "#/definitions/EditReleaseOption" } }, { @@ -14429,22 +12654,257 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$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" ], @@ -14452,38 +12912,47 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit a comment", - "operationId": "issueEditComment" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { - "get": { - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "required": true, - "type": "string", - "description": "username of the user whose tracked times are to be listed", - "name": "user", - "in": "path" + "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", @@ -14495,34 +12964,28 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "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" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { "tags": [ "repository" ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers", "parameters": [ { "type": "string", @@ -14549,19 +13012,24 @@ ], "responses": { "200": { - "$ref": "#/responses/TeamList" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "/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", @@ -14571,36 +13039,11 @@ "required": true }, { - "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", - "in": "path" - }, - { - "name": "run", "in": "path", - "required": true, - "type": "integer", - "description": "runid of the workflow run" - }, - { - "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" + "required": true }, { "description": "group ID of the repo", @@ -14613,27 +13056,19 @@ ], "responses": { "200": { - "$ref": "#/responses/WorkflowJobsList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" + "description": "GPG armored public key", + "schema": { + "type": "string" + } } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a workflow run", - "operationId": "listWorkflowRunJobs" + } } }, "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { "get": { + "produces": [ + "text/plain" + ], "tags": [ "repository" ], @@ -14670,43 +13105,195 @@ "type": "string" } } - }, - "produces": [ - "text/plain" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { - "post": { - "summary": "Create a workflow dispatch event", - "operationId": "ActionsDispatchWorkflow", + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "name": "workflow_id", - "in": "path", + "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": "id of the workflow" + "description": "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/CreateActionWorkflowDispatch" + "$ref": "#/definitions/CreateStatusOption" } }, { @@ -14719,48 +13306,28 @@ } ], "responses": { - "204": { - "description": "No Content" + "201": { + "$ref": "#/responses/CommitStatus" }, "400": { "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators": { + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repository's collaborators", - "operationId": "repoListCollaborators", + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", "parameters": [ { "type": "string", @@ -14770,11 +13337,11 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "integer", @@ -14783,64 +13350,10 @@ "in": "query" }, { + "type": "integer", "description": "page size of results", "name": "limit", - "in": "query", - "type": "integer" - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ] - } - }, - "/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 - }, - { - "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path", - "required": true - }, - { - "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch", - "name": "diffType", - "in": "path" + "in": "query" }, { "description": "group ID of the repo", @@ -14853,7 +13366,7 @@ ], "responses": { "200": { - "$ref": "#/responses/string" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" @@ -14861,72 +13374,13 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { + "/repos/{owner}/group/{group_id}/{repo}/subscription": { "get": { "tags": [ - "issue" + "repository" ], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "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" - }, - { - "in": "query", - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before" - }, - { - "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" - } - }, - "produces": [ - "application/json" - ] - }, - "post": { + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", "parameters": [ { "type": "string", @@ -14942,84 +13396,6 @@ "in": "path", "required": true }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - }, - "name": "body" - }, - { - "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" - } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { - "get": { - "summary": "Check if user is subscribed to an issue", - "operationId": "issueCheckSubscription", - "parameters": [ - { - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" - }, { "description": "group ID of the repo", "name": "group_id", @@ -15033,10 +13409,134 @@ "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" ], @@ -15044,8 +13544,1508 @@ "application/json" ], "tags": [ - "issue" - ] + "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" + } + } } } } From a392c2aa318ff6d00bb774c83d13991b02999d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 21:49:33 -0500 Subject: [PATCH 155/218] more test fixes --- tests/integration/editor_test.go | 2 +- tests/integration/pull_compare_test.go | 15 ++++++++------- tests/integration/pull_create_test.go | 19 ++++++++++--------- tests/integration/pull_review_test.go | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index e83ac15b88..c2ca0e8028 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -125,7 +125,7 @@ func testEditorActionEdit(t *testing.T, session *TestSession, groupID int64, use resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s%s/%s/%s/%s", user, maybeGroupSegment(groupID), repo, editorAction, branch, filePath), params) assert.Equal(t, http.StatusOK, resp.Code) assert.NotEmpty(t, test.RedirectURL(resp)) - req := NewRequest(t, "GET", "/"+path.Join(user, repo, "raw/branch", newBranchName, params["tree_path"])) + req := NewRequest(t, "GET", "/"+path.Join(user, maybeGroupSegment(groupID), repo, "raw/branch", newBranchName, params["tree_path"])) resp = session.MakeRequest(t, req, http.StatusOK) assert.Equal(t, params["content"], resp.Body.String()) return resp diff --git a/tests/integration/pull_compare_test.go b/tests/integration/pull_compare_test.go index 95cf457799..9308876929 100644 --- a/tests/integration/pull_compare_test.go +++ b/tests/integration/pull_compare_test.go @@ -103,13 +103,14 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) { // user4 creates a new branch and a PR testEditFileToNewBranch(t, user4Session, 0, "user4", forkedRepoName, "master", "user4/update-readme", "README.md", "Hello, World\n(Edited by user4)\n") resp := testPullCreateDirectly(t, user4Session, createPullRequestOptions{ - BaseRepoOwner: repo3.OwnerName, - BaseRepoName: repo3.Name, - BaseBranch: "master", - HeadRepoOwner: "user4", - HeadRepoName: forkedRepoName, - HeadBranch: "user4/update-readme", - Title: "PR for user4 forked repo3", + BaseRepoOwner: repo3.OwnerName, + BaseRepoName: repo3.Name, + BaseRepoGroupID: repo3.GroupID, + BaseBranch: "master", + HeadRepoOwner: "user4", + HeadRepoName: forkedRepoName, + HeadBranch: "user4/update-readme", + Title: "PR for user4 forked repo3", }) prURL := test.RedirectURL(resp) diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index ebeb8d5608..ceb0802de3 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -65,14 +65,15 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo string, toSel } type createPullRequestOptions struct { - BaseRepoOwner string - BaseRepoName string - BaseBranch string - HeadRepoOwner string - HeadRepoName string - HeadBranch string - Title string - ReviewerIDs string // comma-separated list of user IDs + BaseRepoOwner string + BaseRepoName string + BaseRepoGroupID int64 + BaseBranch string + HeadRepoOwner string + HeadRepoName string + HeadBranch string + Title string + ReviewerIDs string // comma-separated list of user IDs } func (opts createPullRequestOptions) IsValid() bool { @@ -93,7 +94,7 @@ func testPullCreateDirectly(t *testing.T, session *TestSession, opts createPullR headCompare = fmt.Sprintf("%s:%s", opts.HeadRepoOwner, opts.HeadBranch) } } - req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/compare/%s...%s", opts.BaseRepoOwner, opts.BaseRepoName, opts.BaseBranch, headCompare)) + req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s%s/compare/%s...%s", opts.BaseRepoOwner, maybeGroupSegment(opts.BaseRepoGroupID), opts.BaseRepoName, opts.BaseBranch, headCompare)) resp := session.MakeRequest(t, req, http.StatusOK) // Submit the form for creating the pull diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index 0383bcd6d6..b13b36e322 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -220,7 +220,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { user2Session := loginUser(t, "user2") // Have user1 create a fork of repo1. - testRepoFork(t, user1Session, 0, "user1", "repo1", "user2", "repo1", "") + testRepoFork(t, user1Session, 0, "user2", "repo1", "user1", "repo1", "") t.Run("Submit approve/reject review on merged PR", func(t *testing.T) { // Create a merged PR (made by user1) in the upstream repo1. From 5e24de17f751a4b051bb8ba820c0b5c4276036ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 22:19:42 -0500 Subject: [PATCH 156/218] fix permissions on web issue routes --- routers/web/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/web/web.go b/routers/web/web.go index 6253c48c3b..7e00d9d012 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1323,8 +1323,8 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("", repo.Issues) m.Get("/{index}", repo.ViewIssue) } - m.Group("/{username}/group/{group_id}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) - m.Group("/{username}/{reponame}/{type:issues}", issueViewFn, optSignIn, context.RepoAssignment, context.RequireUnitReader(unit.TypeIssues, unit.TypeExternalTracker)) + 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 editIssueFn := func() { // edit issues, pulls, labels, milestones, etc From 7187abcd3e53e61d5bd11bed188b205009d1026b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 22:33:04 -0500 Subject: [PATCH 157/218] fix org test --- tests/integration/org_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index 5141f6a938..c6ce28ba16 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -201,7 +201,7 @@ func testOrgRestrictedUser(t *testing.T) { req = NewRequest(t, "GET", "/"+orgName) restrictedSession.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", fmt.Sprintf("/%s/%s", orgName, repoName)) + req = NewRequest(t, "GET", fmt.Sprintf("/%s/%s%s", orgName, maybeGroupSegment(int64(repoGroup)), repoName)) restrictedSession.MakeRequest(t, req, http.StatusOK) } From ee6783625cba9e959f5fae9ca0b5a8ddd4542d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 25 Nov 2025 22:37:51 -0500 Subject: [PATCH 158/218] add group id to file comparison urls --- routers/web/repo/commit.go | 3 ++- routers/web/repo/compare.go | 33 +++++++++++++++++++++------------ routers/web/repo/pull.go | 2 +- 3 files changed, 24 insertions(+), 14 deletions(-) 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/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 { From 947a715b88a44170ec739f6e514cbb78bd79957f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 26 Nov 2025 08:49:18 -0500 Subject: [PATCH 159/218] fix more test urls --- tests/integration/org_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index c6ce28ba16..0776f788eb 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -70,9 +70,9 @@ func testLimitedOrg(t *testing.T) { // not logged-in user req := NewRequest(t, "GET", "/limited_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/limited_org/231/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/group/231/public_repo_on_limited_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/limited_org/221/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/group/221/private_repo_on_limited_org") MakeRequest(t, req, http.StatusNotFound) // login non-org member user From 504826a4fe57012ba019759c3c24485a28c58294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 26 Nov 2025 09:13:47 -0500 Subject: [PATCH 160/218] move test repo 21 to different subgroup --- models/fixtures/repository.yml | 2 +- .../org3/{144 => 129}/repo21.git/COMMIT_EDITMSG | 0 .../org3/{144 => 129}/repo21.git/HEAD | 0 .../org3/{144 => 129}/repo21.git/MERGE_RR | 0 .../org3/{144 => 129}/repo21.git/config | 0 .../org3/{144 => 129}/repo21.git/description | 0 .../org3/{144 => 129}/repo21.git/index | Bin .../org3/{144 => 129}/repo21.git/info/exclude | 0 .../org3/{144 => 129}/repo21.git/logs/HEAD | 0 .../{144 => 129}/repo21.git/logs/refs/heads/master | 0 .../3d/6e03e974fc3b3cfc74a4af56130015bea97a08 | Bin .../7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b | Bin .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin .../ef/0493b275aa2080237f676d2ef6559246f56636 | Bin .../org3/{144 => 129}/repo21.git/refs/heads/master | 0 15 files changed, 1 insertion(+), 1 deletion(-) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/HEAD (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/MERGE_RR (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/config (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/description (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/index (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/info/exclude (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/logs/HEAD (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 (100%) rename tests/gitea-repositories-meta/org3/{144 => 129}/repo21.git/refs/heads/master (100%) diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index e093552a2b..9079c14001 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -1054,7 +1054,7 @@ template_id: 0 size: 0 close_issues_via_commit_in_any_branch: false - group_id: 144 + group_id: 129 group_sort_order: 1 - id: 33 owner_id: 2 diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org3/129/repo21.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org3/129/repo21.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/HEAD b/tests/gitea-repositories-meta/org3/129/repo21.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/HEAD rename to tests/gitea-repositories-meta/org3/129/repo21.git/HEAD diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/MERGE_RR b/tests/gitea-repositories-meta/org3/129/repo21.git/MERGE_RR similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/MERGE_RR rename to tests/gitea-repositories-meta/org3/129/repo21.git/MERGE_RR diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/config b/tests/gitea-repositories-meta/org3/129/repo21.git/config similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/config rename to tests/gitea-repositories-meta/org3/129/repo21.git/config diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/description b/tests/gitea-repositories-meta/org3/129/repo21.git/description similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/description rename to tests/gitea-repositories-meta/org3/129/repo21.git/description diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/index b/tests/gitea-repositories-meta/org3/129/repo21.git/index similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/index rename to tests/gitea-repositories-meta/org3/129/repo21.git/index diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/info/exclude b/tests/gitea-repositories-meta/org3/129/repo21.git/info/exclude similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/info/exclude rename to tests/gitea-repositories-meta/org3/129/repo21.git/info/exclude diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/logs/HEAD b/tests/gitea-repositories-meta/org3/129/repo21.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/logs/HEAD rename to tests/gitea-repositories-meta/org3/129/repo21.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org3/129/repo21.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org3/129/repo21.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 b/tests/gitea-repositories-meta/org3/129/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 rename to tests/gitea-repositories-meta/org3/129/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b b/tests/gitea-repositories-meta/org3/129/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b rename to tests/gitea-repositories-meta/org3/129/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/tests/gitea-repositories-meta/org3/129/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 rename to tests/gitea-repositories-meta/org3/129/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 b/tests/gitea-repositories-meta/org3/129/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 rename to tests/gitea-repositories-meta/org3/129/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 diff --git a/tests/gitea-repositories-meta/org3/144/repo21.git/refs/heads/master b/tests/gitea-repositories-meta/org3/129/repo21.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org3/144/repo21.git/refs/heads/master rename to tests/gitea-repositories-meta/org3/129/repo21.git/refs/heads/master From 65a054743a1180972b5626f4020e8be69ad38f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 26 Nov 2025 09:14:10 -0500 Subject: [PATCH 161/218] fix org repo test --- tests/integration/org_test.go | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index 0776f788eb..4d24a5843c 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -41,25 +41,33 @@ func TestOrg(t *testing.T) { func testOrgRepos(t *testing.T) { var ( users = []string{"user1", "user2"} - cases = map[string][]string{ - "alphabetically": {"repo21", "repo3", "repo5"}, - "reversealphabetically": {"repo5", "repo3", "repo21"}, + cases = map[string]map[string][]string{ + "129": map[string][]string{ + "alphabetically": {"repo21", "repo3"}, + "reversealphabetically": {"repo3", "repo21"}, + }, + "139": map[string][]string{ + "alphabetically": {"repo5"}, + "reversealphabetically": {"repo5"}, + }, } ) for _, user := range users { t.Run(user, func(t *testing.T) { session := loginUser(t, user) - for sortBy, repos := range cases { - req := NewRequest(t, "GET", "/org3?sort="+sortBy) - resp := session.MakeRequest(t, req, http.StatusOK) + for group, groupCases := range cases { + for sortBy, repos := range groupCases { + req := NewRequest(t, "GET", "/org3/groups/"+group+"?sort="+sortBy) + resp := session.MakeRequest(t, req, http.StatusOK) - htmlDoc := NewHTMLParser(t, resp.Body) + htmlDoc := NewHTMLParser(t, resp.Body) - sel := htmlDoc.doc.Find("a.name") - assert.Len(t, repos, len(sel.Nodes)) - for i := range repos { - assert.Equal(t, repos[i], strings.TrimSpace(sel.Eq(i).Text())) + sel := htmlDoc.doc.Find("a.name") + assert.Len(t, repos, len(sel.Nodes)) + for i := range repos { + assert.Equal(t, repos[i], strings.TrimSpace(sel.Eq(i).Text())) + } } } }) From 886bdf7bc9a3ffa6d82c0cfe946f815f47d32fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 26 Nov 2025 14:33:00 -0500 Subject: [PATCH 162/218] revert changes to cases in `org_test.go` --- tests/integration/org_test.go | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index 4d24a5843c..0776f788eb 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -41,33 +41,25 @@ func TestOrg(t *testing.T) { func testOrgRepos(t *testing.T) { var ( users = []string{"user1", "user2"} - cases = map[string]map[string][]string{ - "129": map[string][]string{ - "alphabetically": {"repo21", "repo3"}, - "reversealphabetically": {"repo3", "repo21"}, - }, - "139": map[string][]string{ - "alphabetically": {"repo5"}, - "reversealphabetically": {"repo5"}, - }, + cases = map[string][]string{ + "alphabetically": {"repo21", "repo3", "repo5"}, + "reversealphabetically": {"repo5", "repo3", "repo21"}, } ) for _, user := range users { t.Run(user, func(t *testing.T) { session := loginUser(t, user) - for group, groupCases := range cases { - for sortBy, repos := range groupCases { - req := NewRequest(t, "GET", "/org3/groups/"+group+"?sort="+sortBy) - resp := session.MakeRequest(t, req, http.StatusOK) + for sortBy, repos := range cases { + req := NewRequest(t, "GET", "/org3?sort="+sortBy) + resp := session.MakeRequest(t, req, http.StatusOK) - htmlDoc := NewHTMLParser(t, resp.Body) + htmlDoc := NewHTMLParser(t, resp.Body) - sel := htmlDoc.doc.Find("a.name") - assert.Len(t, repos, len(sel.Nodes)) - for i := range repos { - assert.Equal(t, repos[i], strings.TrimSpace(sel.Eq(i).Text())) - } + sel := htmlDoc.doc.Find("a.name") + assert.Len(t, repos, len(sel.Nodes)) + for i := range repos { + assert.Equal(t, repos[i], strings.TrimSpace(sel.Eq(i).Text())) } } }) From 8713c235e9ca34891f5f3607fa62f2052f3ba8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 30 Nov 2025 15:43:17 -0500 Subject: [PATCH 163/218] add function to find teams a user is part of within a group --- models/group/group_team.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/models/group/group_team.go b/models/group/group_team.go index 102e567b3b..1e9804f2cb 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -59,7 +59,7 @@ func HasTeamGroup(ctx context.Context, orgID, teamID, groupID int64) bool { // 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 { + if access < perm.AccessModeWrite { canCreateIn = false } _, err := db.GetEngine(ctx).Insert(&RepoGroupTeam{ @@ -113,6 +113,15 @@ func FindGroupTeams(ctx context.Context, groupID int64) (gteams []*RepoGroupTeam Find(>eams) } +func FindUserGroupTeams(ctx context.Context, groupID int64, 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). From 5898c97302b60d06bde00d2cc476433eeda75745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 30 Nov 2025 15:44:31 -0500 Subject: [PATCH 164/218] update `GetUserRepoPermission` ensure we check the parent group's unit permissions as well --- models/perm/access/repo_permission.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index df0440f893..6b6c03094c 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -483,7 +483,7 @@ func GetIndividualUserRepoPermission(ctx context.Context, repo *repo_model.Repos return perm, nil } } - groupTeams, err := group_model.FindGroupTeams(ctx, repo.GroupID) + 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 @@ -498,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 From ed58ce50d627afd0a7cf891a0e0498a8fc1e868a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 30 Nov 2025 19:31:02 -0500 Subject: [PATCH 165/218] fix group team unit query --- models/group/group_team.go | 2 +- models/group/group_unit.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/group/group_team.go b/models/group/group_team.go index 1e9804f2cb..87def2efcd 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -26,7 +26,7 @@ type RepoGroupTeam struct { func (g *RepoGroupTeam) LoadGroupUnits(ctx context.Context) error { var err error - g.Units, err = GetUnitsByGroupID(ctx, g.GroupID) + g.Units, err = GetUnitsByGroupID(ctx, g.GroupID, g.TeamID) return err } diff --git a/models/group/group_unit.go b/models/group/group_unit.go index 716770f85e..f7a484d6e7 100644 --- a/models/group/group_unit.go +++ b/models/group/group_unit.go @@ -24,8 +24,8 @@ func (g *RepoGroupUnit) Unit() unit.Unit { return unit.Units[g.Type] } -func GetUnitsByGroupID(ctx context.Context, groupID int64) (units []*RepoGroupUnit, err error) { - return units, db.GetEngine(ctx).Where("group_id = ?", groupID).Find(&units) +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) { From 169f634e805ebf5b54e04c0dbdb6ce9d77a38b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 30 Nov 2025 21:19:18 -0500 Subject: [PATCH 166/218] fix failing tests --- models/group/group_team.go | 2 +- tests/integration/actions_trigger_test.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/models/group/group_team.go b/models/group/group_team.go index 87def2efcd..44c86e4b9a 100644 --- a/models/group/group_team.go +++ b/models/group/group_team.go @@ -113,7 +113,7 @@ func FindGroupTeams(ctx context.Context, groupID int64) (gteams []*RepoGroupTeam Find(>eams) } -func FindUserGroupTeams(ctx context.Context, groupID int64, userID int64) (gteams []*RepoGroupTeam, err error) { +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). diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index a73916f37a..6ccc69c864 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1764,13 +1764,13 @@ func TestPullRequestWithPathsRebase(t *testing.T) { repoName := "actions-pr-paths-rebase" apiRepo := createActionsTestRepo(t, token, repoName, false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - apiCtx := NewAPITestContext(t, "user2", repoName, auth_model.AccessTokenScopeWriteRepository) + apiCtx := NewAPITestContext(t, "user2", repoName, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) runner := newMockRunner() runner.registerAsRepoRunner(t, "user2", repoName, "mock-runner", []string{"ubuntu-latest"}, false) // init files and dirs - testCreateFile(t, session, "user2", repoName, repo.DefaultBranch, "", "dir1/dir1.txt", "1") - testCreateFile(t, session, "user2", repoName, repo.DefaultBranch, "", "dir2/dir2.txt", "2") + testCreateFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "", "dir1/dir1.txt", "1") + testCreateFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "", "dir2/dir2.txt", "2") wfFileContent := `name: ci on: pull_request: @@ -1782,10 +1782,10 @@ jobs: steps: - run: echo 'ci' ` - testCreateFile(t, session, "user2", repoName, repo.DefaultBranch, "", ".gitea/workflows/ci.yml", wfFileContent) + testCreateFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "", ".gitea/workflows/ci.yml", wfFileContent) // create a PR to modify "dir1/dir1.txt", the workflow will be triggered - testEditFileToNewBranch(t, session, "user2", repoName, repo.DefaultBranch, "update-dir1", "dir1/dir1.txt", "11") + testEditFileToNewBranch(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "update-dir1", "dir1/dir1.txt", "11") _, err := doAPICreatePullRequest(apiCtx, "user2", repoName, repo.DefaultBranch, "update-dir1")(t) assert.NoError(t, err) pr1Task := runner.fetchTask(t) @@ -1793,12 +1793,12 @@ jobs: assert.Equal(t, webhook_module.HookEventPullRequest, pr1Run.Event) // create a PR to modify "dir2/dir2.txt" then update main branch and rebase, the workflow will not be triggered - testEditFileToNewBranch(t, session, "user2", repoName, repo.DefaultBranch, "update-dir2", "dir2/dir2.txt", "22") + testEditFileToNewBranch(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "update-dir2", "dir2/dir2.txt", "22") apiPull, err := doAPICreatePullRequest(apiCtx, "user2", repoName, repo.DefaultBranch, "update-dir2")(t) runner.fetchNoTask(t) assert.NoError(t, err) // change the file in "dir1" - testEditFile(t, session, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") + testEditFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") // update by rebase req := NewRequest(t, "POST", fmt.Sprintf("/%s/%s/pulls/%d/update?style=rebase", "user2", repoName, apiPull.Index)) session.MakeRequest(t, req, http.StatusOK) From b76045170a5e2606e5f1818e15557ae3d3a27a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 1 Dec 2025 00:11:17 -0500 Subject: [PATCH 167/218] update test fixtures --- models/fixtures/repo_group.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/models/fixtures/repo_group.yml b/models/fixtures/repo_group.yml index 2c1f09ff34..c248870eaf 100644 --- a/models/fixtures/repo_group.yml +++ b/models/fixtures/repo_group.yml @@ -1513,7 +1513,7 @@ \#\# License Apache 2.0 - visibility: 2 + visibility: 0 avatar: "" parent_group_id: 44 sort_order: 2 @@ -3993,7 +3993,7 @@ \#\# License ISC - visibility: 1 + visibility: 0 avatar: "" parent_group_id: 123 sort_order: 1 @@ -4303,7 +4303,7 @@ \#\# License MIT - visibility: 1 + visibility: 0 avatar: "" parent_group_id: 127 sort_order: 3 @@ -10255,7 +10255,7 @@ \#\# License MIT - visibility: 2 + visibility: 0 avatar: "" parent_group_id: 0 sort_order: 43 @@ -10348,7 +10348,7 @@ \#\# License Apache 2.0 - visibility: 2 + visibility: 0 avatar: "" parent_group_id: 331 sort_order: 2 @@ -10534,7 +10534,7 @@ \#\# License ISC - visibility: 2 + visibility: 0 avatar: "" parent_group_id: 334 sort_order: 4 From 54b2b1c079988c7a1e31c0c51b5d4e647ee7311a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 19 Dec 2025 16:15:13 -0500 Subject: [PATCH 168/218] revert: fixture and test changes give all existing fixture repos a group id of 0 --- models/fixtures/repository.yml | 749 +++++++----------- models/fixtures/user.yml | 2 +- .../private_repo_on_limited_org.git/HEAD | 0 .../private_repo_on_limited_org.git/config | 0 .../74/8bf557dfc9c6457998b5118a6c8b2129f56c30 | Bin .../a5/46f86c7dd182592b96639045e176dde8df76ef | Bin .../b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 | Bin .../refs/heads/master | 0 .../public_repo_on_limited_org.git/HEAD | 0 .../public_repo_on_limited_org.git/config | 0 .../21/2f14c8b713de38bd0b3fb23bd288369b01668a | Bin .../90/e402c3937a4639725fcc59ca1f529e7dc8506f | Bin .../ed/d9c1000cd1444efd63e153e3554c8d5656bf65 | Bin .../refs/heads/master | 0 .../lfs-test.git/hooks/post-checkout | 0 .../migration/lfs-test.git/hooks/post-commit | 0 .../migration/lfs-test.git/hooks/post-merge | 0 .../migration/lfs-test.git/hooks/pre-push | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../HEAD | 0 .../config | 20 +- .../config.backup | 0 .../index | Bin .../logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../HEAD | 0 .../config | 20 +- .../config.backup | 0 .../index | Bin .../logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../repo_external_tracker_numeric.git/HEAD | 0 .../repo_external_tracker_numeric.git/config | 20 +- .../config.backup | 0 .../repo_external_tracker_numeric.git/index | Bin .../logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../org3/129/repo21.git/COMMIT_EDITMSG | 1 - .../org3/129/repo21.git/MERGE_RR | 0 .../org3/129/repo21.git/config | 6 - .../org3/129/repo21.git/description | 1 - .../org3/129/repo21.git/index | Bin 209 -> 0 bytes .../org3/129/repo21.git/info/exclude | 6 - .../org3/129/repo21.git/logs/HEAD | 1 - .../129/repo21.git/logs/refs/heads/master | 1 - .../3d/6e03e974fc3b3cfc74a4af56130015bea97a08 | Bin 345 -> 0 bytes .../7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b | Bin 87 -> 0 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 15 -> 0 bytes .../ef/0493b275aa2080237f676d2ef6559246f56636 | Bin 22 -> 0 bytes .../org3/129/repo21.git/refs/heads/master | 1 - .../org3/{129/repo21.git => repo3.git}/HEAD | 0 .../org3/{129 => }/repo3.git/config | 0 .../{129 => }/repo3.git/hooks/post-receive | 0 .../repo3.git/hooks/post-receive.d/gitea | 0 .../{129 => }/repo3.git/hooks/pre-receive | 0 .../repo3.git/hooks/pre-receive.d/gitea | 0 .../org3/{129 => }/repo3.git/hooks/update | 0 .../{129 => }/repo3.git/hooks/update.d/gitea | 0 .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin .../d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 | Bin .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin .../ec/f0db3c1ec806522de4b491fb9a3c7457398c61 | Bin .../ee/16d127df463aa491e08958120f2108b02468df | Bin .../{129 => }/repo3.git/refs/heads/master | 0 .../repo3.git/refs/heads/test_branch | 0 .../org3/{129/repo3.git => repo5.git}/HEAD | 0 .../org3/{139 => }/repo5.git/config | 0 .../{139 => }/repo5.git/hooks/post-receive | 0 .../repo5.git/hooks/post-receive.d/gitea | 0 .../{139 => }/repo5.git/hooks/pre-receive | 0 .../repo5.git/hooks/pre-receive.d/gitea | 0 .../org3/{139 => }/repo5.git/hooks/update | 0 .../{139 => }/repo5.git/hooks/update.d/gitea | 0 .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin .../d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 | Bin .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin .../ec/f0db3c1ec806522de4b491fb9a3c7457398c61 | Bin .../ee/16d127df463aa491e08958120f2108b02468df | Bin .../{139 => }/repo5.git/refs/heads/master | 0 .../repo5.git/refs/heads/test_branch | 0 .../139/repo5.git => org41/repo61.git}/HEAD | 0 .../org41/{90 => }/repo61.git/config | 0 .../org41/{90 => }/repo61.git/objects/.keep | 0 .../org41/{90 => }/repo61.git/refs/.keep | 0 .../{106 => }/search-by-path.git/GIT_COLA_MSG | 0 .../search-by-path.git}/HEAD | 0 .../org42/{106 => }/search-by-path.git/config | 0 .../{106 => }/search-by-path.git/description | 0 .../search-by-path.git/hooks/post-receive | 0 .../hooks/post-receive.d/gitea | 0 .../search-by-path.git/hooks/pre-receive | 0 .../hooks/pre-receive.d/gitea | 0 .../search-by-path.git/hooks/proc-receive | 0 .../hooks/proc-receive.d/gitea | 0 .../{106 => }/search-by-path.git/hooks/update | 0 .../search-by-path.git/hooks/update.d/gitea | 0 .../{106 => }/search-by-path.git/info/refs | 0 .../search-by-path.git/logs/refs/heads/master | 0 .../search-by-path.git/objects/info/packs | 0 ...76cf6e2b46bc816936ab69306fb10aea571.bitmap | Bin ...bef76cf6e2b46bc816936ab69306fb10aea571.idx | Bin ...ef76cf6e2b46bc816936ab69306fb10aea571.pack | Bin ...bef76cf6e2b46bc816936ab69306fb10aea571.rev | Bin .../{106 => }/search-by-path.git/packed-refs | 0 .../{106 => }/search-by-path.git/refs/.keep | 0 .../352/private_repo_on_private_org.git/HEAD | 1 - .../private_repo_on_private_org.git}/HEAD | 0 .../config | 0 .../6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 | Bin .../7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 | Bin .../b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 | Bin .../refs/heads/master | 0 .../public_repo_on_private_org.git/HEAD | 0 .../config | 0 .../04/f99c528b643b9175a4b156cdfc13aba6b43853 | Bin .../86/de16d8658f5c0a17ec6aa313871295d7072f78 | Bin .../bf/19fd4707acb403c4aca44f126ab69142ac59ce | Bin .../refs/heads/master | 0 tests/integration/actions_approve_test.go | 8 +- tests/integration/actions_concurrency_test.go | 137 ++-- tests/integration/actions_delete_run_test.go | 2 +- tests/integration/actions_inputs_test.go | 4 +- tests/integration/actions_job_test.go | 23 +- tests/integration/actions_job_token_test.go | 2 +- tests/integration/actions_log_test.go | 5 +- tests/integration/actions_rerun_test.go | 6 +- tests/integration/actions_schedule_test.go | 8 +- tests/integration/actions_trigger_test.go | 26 +- tests/integration/api_branch_test.go | 15 +- .../api_comment_attachment_test.go | 14 +- tests/integration/api_comment_test.go | 20 +- .../api_helper_for_declarative_test.go | 5 +- .../integration/api_issue_attachment_test.go | 12 +- tests/integration/api_issue_config_test.go | 2 +- .../integration/api_issue_dependency_test.go | 14 +- tests/integration/api_issue_label_test.go | 6 +- tests/integration/api_issue_lock_test.go | 4 +- tests/integration/api_issue_milestone_test.go | 12 +- tests/integration/api_issue_pin_test.go | 32 +- tests/integration/api_issue_reaction_test.go | 2 +- .../api_issue_subscription_test.go | 6 +- tests/integration/api_issue_test.go | 12 +- tests/integration/api_keys_test.go | 6 +- tests/integration/api_notification_test.go | 6 +- tests/integration/api_private_serv_test.go | 24 +- tests/integration/api_pull_commits_test.go | 2 +- tests/integration/api_pull_review_test.go | 76 +- tests/integration/api_pull_test.go | 54 +- .../api_releases_attachment_test.go | 2 +- tests/integration/api_releases_test.go | 24 +- tests/integration/api_repo_archive_test.go | 14 +- tests/integration/api_repo_avatar_test.go | 8 +- tests/integration/api_repo_branch_test.go | 10 +- .../integration/api_repo_collaborator_test.go | 28 +- tests/integration/api_repo_edit_test.go | 4 +- .../integration/api_repo_file_create_test.go | 22 +- .../integration/api_repo_file_delete_test.go | 20 +- .../api_repo_file_diffpatch_test.go | 4 +- tests/integration/api_repo_file_get_test.go | 2 +- .../integration/api_repo_file_update_test.go | 22 +- .../integration/api_repo_files_change_test.go | 16 +- tests/integration/api_repo_files_get_test.go | 6 +- .../api_repo_get_contents_list_test.go | 18 +- .../integration/api_repo_get_contents_test.go | 20 +- tests/integration/api_repo_git_blobs_test.go | 16 +- tests/integration/api_repo_git_hook_test.go | 20 +- tests/integration/api_repo_git_tags_test.go | 8 +- tests/integration/api_repo_git_trees_test.go | 12 +- tests/integration/api_repo_hook_test.go | 2 +- tests/integration/api_repo_lfs_test.go | 2 +- tests/integration/api_repo_test.go | 24 +- tests/integration/api_repo_topic_test.go | 18 +- tests/integration/compare_test.go | 8 +- tests/integration/editor_test.go | 25 +- tests/integration/eventsource_test.go | 2 +- tests/integration/git_general_test.go | 18 +- tests/integration/git_lfs_ssh_test.go | 2 +- tests/integration/git_misc_test.go | 4 +- tests/integration/git_push_test.go | 2 +- tests/integration/git_ssh_redirect_test.go | 8 +- tests/integration/gpg_ssh_git_test.go | 26 +- tests/integration/issue_test.go | 8 +- tests/integration/migrate_test.go | 2 +- tests/integration/oauth_test.go | 4 - tests/integration/org_count_test.go | 2 +- tests/integration/org_profile_test.go | 2 +- tests/integration/org_test.go | 34 +- tests/integration/privateactivity_test.go | 2 +- tests/integration/pull_comment_test.go | 10 +- tests/integration/pull_compare_test.go | 23 +- tests/integration/pull_create_test.go | 39 +- tests/integration/pull_merge_test.go | 123 ++- tests/integration/pull_review_test.go | 8 +- tests/integration/pull_status_test.go | 20 +- tests/integration/repo_activity_test.go | 10 +- tests/integration/repo_branch_test.go | 6 +- tests/integration/repo_commits_test.go | 4 +- tests/integration/repo_fork_test.go | 14 +- tests/integration/repo_merge_upstream_test.go | 2 +- tests/integration/repo_tag_test.go | 6 +- tests/integration/repo_test.go | 18 +- tests/integration/repo_watch_test.go | 2 +- tests/integration/repo_webhook_test.go | 88 +- tests/integration/ssh_key_test.go | 8 +- tests/integration/timetracking_test.go | 12 +- tests/integration/wiki_test.go | 2 +- .../workflow_run_api_check_test.go | 2 +- 236 files changed, 1009 insertions(+), 1233 deletions(-) rename tests/gitea-repositories-meta/limited_org/{221 => }/private_repo_on_limited_org.git/HEAD (100%) rename tests/gitea-repositories-meta/limited_org/{221 => }/private_repo_on_limited_org.git/config (100%) rename tests/gitea-repositories-meta/limited_org/{221 => }/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 (100%) rename tests/gitea-repositories-meta/limited_org/{221 => }/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef (100%) rename tests/gitea-repositories-meta/limited_org/{221 => }/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 (100%) rename tests/gitea-repositories-meta/limited_org/{221 => }/private_repo_on_limited_org.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/limited_org/{231 => }/public_repo_on_limited_org.git/HEAD (100%) rename tests/gitea-repositories-meta/limited_org/{231 => }/public_repo_on_limited_org.git/config (100%) rename tests/gitea-repositories-meta/limited_org/{231 => }/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a (100%) rename tests/gitea-repositories-meta/limited_org/{231 => }/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f (100%) rename tests/gitea-repositories-meta/limited_org/{231 => }/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 (100%) rename tests/gitea-repositories-meta/limited_org/{231 => }/public_repo_on_limited_org.git/refs/heads/master (100%) mode change 100755 => 100644 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout mode change 100755 => 100644 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit mode change 100755 => 100644 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge mode change 100755 => 100644 tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/COMMITMESSAGE (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/HEAD (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/config (94%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/config.backup (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/index (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/logs/HEAD (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/logs/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{41/repo_external_tracker_alpha.git => repo_external_tracker.git}/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/COMMITMESSAGE (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/HEAD (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/config (94%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/config.backup (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/index (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/logs/HEAD (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/logs/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{49/repo_external_tracker.git => repo_external_tracker_alpha.git}/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/COMMITMESSAGE (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/COMMIT_EDITMSG (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/HEAD (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/config (94%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/config.backup (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/index (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/logs/HEAD (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/logs/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/refs/heads/branch1 (100%) rename tests/gitea-repositories-meta/org26/{53 => }/repo_external_tracker_numeric.git/refs/heads/master (100%) delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/COMMIT_EDITMSG delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/MERGE_RR delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/config delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/description delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/index delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/info/exclude delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/logs/HEAD delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/logs/refs/heads/master delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/objects/7c/ff6d68255dfdc0aad670fc52e80f6d1dee5c6b delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/objects/ef/0493b275aa2080237f676d2ef6559246f56636 delete mode 100644 tests/gitea-repositories-meta/org3/129/repo21.git/refs/heads/master rename tests/gitea-repositories-meta/org3/{129/repo21.git => repo3.git}/HEAD (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/config (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/hooks/post-receive (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/hooks/post-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/hooks/pre-receive (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/hooks/pre-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/hooks/update (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/hooks/update.d/gitea (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/org3/{129 => }/repo3.git/refs/heads/test_branch (100%) rename tests/gitea-repositories-meta/org3/{129/repo3.git => repo5.git}/HEAD (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/config (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/hooks/post-receive (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/hooks/post-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/hooks/pre-receive (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/hooks/pre-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/hooks/update (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/hooks/update.d/gitea (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/objects/ee/16d127df463aa491e08958120f2108b02468df (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/org3/{139 => }/repo5.git/refs/heads/test_branch (100%) rename tests/gitea-repositories-meta/{org3/139/repo5.git => org41/repo61.git}/HEAD (100%) rename tests/gitea-repositories-meta/org41/{90 => }/repo61.git/config (100%) rename tests/gitea-repositories-meta/org41/{90 => }/repo61.git/objects/.keep (100%) rename tests/gitea-repositories-meta/org41/{90 => }/repo61.git/refs/.keep (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/GIT_COLA_MSG (100%) rename tests/gitea-repositories-meta/{org41/90/repo61.git => org42/search-by-path.git}/HEAD (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/config (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/description (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/post-receive (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/post-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/pre-receive (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/pre-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/proc-receive (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/proc-receive.d/gitea (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/update (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/hooks/update.d/gitea (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/info/refs (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/logs/refs/heads/master (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/objects/info/packs (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.bitmap (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.idx (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.pack (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/objects/pack/pack-a7bef76cf6e2b46bc816936ab69306fb10aea571.rev (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/packed-refs (100%) rename tests/gitea-repositories-meta/org42/{106 => }/search-by-path.git/refs/.keep (100%) delete mode 100644 tests/gitea-repositories-meta/privated_org/352/private_repo_on_private_org.git/HEAD rename tests/gitea-repositories-meta/{org42/106/search-by-path.git => privated_org/private_repo_on_private_org.git}/HEAD (100%) rename tests/gitea-repositories-meta/privated_org/{340/public_repo_on_private_org.git => private_repo_on_private_org.git}/config (100%) rename tests/gitea-repositories-meta/privated_org/{352 => }/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 (100%) rename tests/gitea-repositories-meta/privated_org/{352 => }/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 (100%) rename tests/gitea-repositories-meta/privated_org/{352 => }/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 (100%) rename tests/gitea-repositories-meta/privated_org/{352 => }/private_repo_on_private_org.git/refs/heads/master (100%) rename tests/gitea-repositories-meta/privated_org/{340 => }/public_repo_on_private_org.git/HEAD (100%) rename tests/gitea-repositories-meta/privated_org/{352/private_repo_on_private_org.git => public_repo_on_private_org.git}/config (100%) rename tests/gitea-repositories-meta/privated_org/{340 => }/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 (100%) rename tests/gitea-repositories-meta/privated_org/{340 => }/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 (100%) rename tests/gitea-repositories-meta/privated_org/{340 => }/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce (100%) rename tests/gitea-repositories-meta/privated_org/{340 => }/public_repo_on_private_org.git/refs/heads/master (100%) diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index 9079c14001..7048b5c2b1 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -1,10 +1,10 @@ -- id: 1 +# don't forget to add fixtures in repo_unit.yml +- + id: 1 owner_id: 2 owner_name: user2 lower_name: repo1 name: repo1 - description: "" - website: "" default_branch: master num_watches: 4 num_stars: 0 @@ -22,22 +22,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 2 + +- + id: 2 owner_id: 2 owner_name: user2 lower_name: repo2 name: repo2 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 1 @@ -55,22 +54,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: true group_id: 0 - group_sort_order: 0 -- id: 3 + +- + id: 3 owner_id: 3 owner_name: org3 lower_name: repo3 name: repo3 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -88,22 +86,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 129 - group_sort_order: 1 -- id: 4 + group_id: 0 + +- + id: 4 owner_id: 5 owner_name: user5 lower_name: repo4 name: repo4 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 1 @@ -123,23 +120,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 5 + +- + id: 5 owner_id: 3 owner_name: org3 lower_name: repo5 name: repo5 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -156,23 +151,22 @@ is_archived: false is_mirror: true status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 139 + group_id: 0 group_sort_order: 1 -- id: 6 + +- + id: 6 owner_id: 10 owner_name: user10 lower_name: repo6 name: repo6 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -189,23 +183,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 7 + +- + id: 7 owner_id: 10 owner_name: user10 lower_name: repo7 name: repo7 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -222,23 +214,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 8 + +- + id: 8 owner_id: 10 owner_name: user10 lower_name: repo8 name: repo8 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -255,23 +245,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 9 + +- + id: 9 owner_id: 11 owner_name: user11 lower_name: repo9 name: repo9 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -288,22 +276,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 10 + +- + id: 10 owner_id: 12 owner_name: user12 lower_name: repo10 name: repo10 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -321,22 +308,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 11 + +- + id: 11 owner_id: 13 owner_name: user13 lower_name: repo11 name: repo11 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -354,23 +340,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: true fork_id: 10 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 12 + +- + id: 12 owner_id: 14 owner_name: user14 lower_name: test_repo_12 name: test_repo_12 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -387,23 +371,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 13 + +- + id: 13 owner_id: 14 owner_name: user14 lower_name: test_repo_13 name: test_repo_13 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -420,23 +402,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 14 + +- + id: 14 owner_id: 14 owner_name: user14 lower_name: test_repo_14 name: test_repo_14 description: test_description_14 - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -453,22 +434,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 15 + +- + id: 15 owner_id: 2 owner_name: user2 lower_name: repo15 name: repo15 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -486,22 +466,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 16 + +- + id: 16 owner_id: 2 owner_name: user2 lower_name: repo16 name: repo16 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -519,23 +498,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 17 + +- + id: 17 owner_id: 15 owner_name: user15 lower_name: big_test_public_1 name: big_test_public_1 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -552,23 +529,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 18 + +- + id: 18 owner_id: 15 owner_name: user15 lower_name: big_test_public_2 name: big_test_public_2 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -585,23 +560,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 19 + +- + id: 19 owner_id: 15 owner_name: user15 lower_name: big_test_private_1 name: big_test_private_1 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -618,23 +591,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 20 + +- + id: 20 owner_id: 15 owner_name: user15 lower_name: big_test_private_2 name: big_test_private_2 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -651,23 +622,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 21 + +- + id: 21 owner_id: 16 owner_name: user16 lower_name: big_test_public_3 name: big_test_public_3 - description: "" - website: "" - default_branch: "" num_watches: 1 num_stars: 1 num_forks: 0 @@ -684,23 +653,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 22 + +- + id: 22 owner_id: 16 owner_name: user16 lower_name: big_test_private_3 name: big_test_private_3 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -717,23 +684,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 23 + +- + id: 23 owner_id: 17 owner_name: org17 lower_name: big_test_public_4 name: big_test_public_4 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -750,23 +715,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 313 - group_sort_order: 1 -- id: 24 + group_id: 0 + group_sort_order: 0 + +- + id: 24 owner_id: 17 owner_name: org17 lower_name: big_test_private_4 name: big_test_private_4 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -783,23 +747,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 318 + group_id: 0 group_sort_order: 1 -- id: 25 + +- + id: 25 owner_id: 20 owner_name: user20 lower_name: big_test_public_mirror_5 name: big_test_public_mirror_5 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -816,23 +779,21 @@ is_archived: false is_mirror: true status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 26 + +- + id: 26 owner_id: 20 owner_name: user20 lower_name: big_test_private_mirror_5 name: big_test_private_mirror_5 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -849,23 +810,21 @@ is_archived: false is_mirror: true status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 27 + +- + id: 27 owner_id: 19 owner_name: org19 lower_name: big_test_public_mirror_6 name: big_test_public_mirror_6 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 1 @@ -882,23 +841,22 @@ is_archived: false is_mirror: true status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 201 - group_sort_order: 1 -- id: 28 + group_id: 0 + group_sort_order: 0 + +- + id: 28 owner_id: 19 owner_name: org19 lower_name: big_test_private_mirror_6 name: big_test_private_mirror_6 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 1 @@ -915,23 +873,22 @@ is_archived: false is_mirror: true status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 188 + group_id: 0 group_sort_order: 1 -- id: 29 + +- + id: 29 owner_id: 20 owner_name: user20 lower_name: big_test_public_fork_7 name: big_test_public_fork_7 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -948,23 +905,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: true fork_id: 27 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 30 + +- + id: 30 owner_id: 20 owner_name: user20 lower_name: big_test_private_fork_7 name: big_test_private_fork_7 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -981,22 +936,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: true fork_id: 28 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 31 + +- + id: 31 owner_id: 2 owner_name: user2 lower_name: repo20 name: repo20 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1014,23 +968,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 32 + +- + id: 32 # org public repo owner_id: 3 owner_name: org3 lower_name: repo21 name: repo21 - description: "" - website: "" - default_branch: "" num_watches: 1 num_stars: 1 num_forks: 0 @@ -1047,22 +999,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 129 - group_sort_order: 1 -- id: 33 + group_id: 0 + group_sort_order: 2 + +- + id: 33 owner_id: 2 owner_name: user2 lower_name: utf8 name: utf8 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1080,23 +1032,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 34 + +- + id: 34 owner_id: 21 owner_name: user21 lower_name: golang name: golang - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1113,23 +1063,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 35 + +- + id: 35 owner_id: 21 owner_name: user21 lower_name: graphql name: graphql - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1146,22 +1094,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 36 + +- + id: 36 owner_id: 2 owner_name: user2 lower_name: commits_search_test name: commits_search_test - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1179,22 +1126,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 37 + +- + id: 37 owner_id: 2 owner_name: user2 lower_name: git_hooks_test name: git_hooks_test - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1212,22 +1158,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 38 + +- + id: 38 owner_id: 22 owner_name: limited_org lower_name: public_repo_on_limited_org name: public_repo_on_limited_org - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1245,22 +1190,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 231 - group_sort_order: 1 -- id: 39 + group_id: 0 + group_sort_order: 0 + +- + id: 39 owner_id: 22 owner_name: limited_org lower_name: private_repo_on_limited_org name: private_repo_on_limited_org - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1278,22 +1223,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 221 + group_id: 0 group_sort_order: 1 -- id: 40 + +- + id: 40 owner_id: 23 owner_name: privated_org lower_name: public_repo_on_private_org name: public_repo_on_private_org - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1311,22 +1256,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 340 - group_sort_order: 1 -- id: 41 + group_id: 0 + group_sort_order: 0 + +- + id: 41 owner_id: 23 owner_name: privated_org lower_name: private_repo_on_private_org name: private_repo_on_private_org - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1344,22 +1289,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 352 + group_id: 0 group_sort_order: 1 -- id: 42 + +- + id: 42 owner_id: 2 owner_name: user2 lower_name: glob name: glob - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1377,23 +1322,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 43 + +- + id: 43 owner_id: 26 owner_name: org26 lower_name: repo26 name: repo26 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1410,22 +1353,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 55 - group_sort_order: 1 -- id: 44 + group_id: 0 + group_sort_order: 0 + +- + id: 44 owner_id: 27 owner_name: user27 lower_name: template1 name: template1 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1443,23 +1386,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: true template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 45 + +- + id: 45 owner_id: 27 owner_name: user27 lower_name: template2 name: template2 - description: "" - website: "" - default_branch: "" num_watches: 0 num_stars: 0 num_forks: 0 @@ -1476,22 +1417,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: true template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 46 + +- + id: 46 owner_id: 26 owner_name: org26 lower_name: repo_external_tracker name: repo_external_tracker - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1509,22 +1449,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 49 + group_id: 0 group_sort_order: 1 -- id: 47 + +- + id: 47 owner_id: 26 owner_name: org26 lower_name: repo_external_tracker_numeric name: repo_external_tracker_numeric - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1542,22 +1482,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 53 - group_sort_order: 1 -- id: 48 + group_id: 0 + group_sort_order: 2 + +- + id: 48 owner_id: 26 owner_name: org26 lower_name: repo_external_tracker_alpha name: repo_external_tracker_alpha - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1575,22 +1515,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 41 - group_sort_order: 1 -- id: 49 + group_id: 0 + group_sort_order: 3 + +- + id: 49 owner_id: 27 owner_name: user27 lower_name: repo49 name: repo49 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1608,22 +1548,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 50 + +- + id: 50 owner_id: 30 owner_name: user30 lower_name: repo50 name: repo50 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1641,22 +1580,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 51 + +- + id: 51 owner_id: 30 owner_name: user30 lower_name: repo51 name: repo51 - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1674,22 +1612,21 @@ is_archived: true is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 52 + +- + id: 52 owner_id: 30 owner_name: user30 lower_name: empty name: empty - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -1707,187 +1644,100 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 53 + +- + id: 53 owner_id: 30 owner_name: user30 lower_name: renderer name: renderer - description: "" - website: "" default_branch: master - num_watches: 0 - num_stars: 0 - num_forks: 0 + is_archived: false + is_empty: false + is_private: false num_issues: 0 num_closed_issues: 0 num_pulls: 0 num_closed_pulls: 0 num_milestones: 0 num_closed_milestones: 0 + num_watches: 0 num_projects: 0 num_closed_projects: 0 - is_private: false - is_empty: false - is_archived: false - is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 54 + +- + id: 54 owner_id: 2 owner_name: user2 lower_name: lfs name: lfs - description: "" - website: "" default_branch: master - num_watches: 0 - num_stars: 0 - num_forks: 0 - num_issues: 0 - num_closed_issues: 0 - num_pulls: 0 - num_closed_pulls: 0 - num_milestones: 0 - num_closed_milestones: 0 - num_projects: 0 - num_closed_projects: 0 - is_private: true is_empty: false is_archived: false - is_mirror: false + is_private: true status: 0 - is_fsck_enabled: false - is_fork: false - fork_id: 0 - is_template: false - template_id: 0 - size: 0 - close_issues_via_commit_in_any_branch: false - group_id: 0 - group_sort_order: 0 -- id: 55 + +- + id: 55 owner_id: 2 owner_name: user2 lower_name: scoped_label name: scoped_label - description: "" - website: "" - default_branch: "" - num_watches: 0 - num_stars: 0 - num_forks: 0 - num_issues: 1 - num_closed_issues: 0 - num_pulls: 0 - num_closed_pulls: 0 - num_milestones: 0 - num_closed_milestones: 0 - num_projects: 0 - num_closed_projects: 0 - is_private: true is_empty: false is_archived: false - is_mirror: false + is_private: true + num_issues: 1 status: 0 - is_fsck_enabled: false - is_fork: false - fork_id: 0 - is_template: false - template_id: 0 - size: 0 - close_issues_via_commit_in_any_branch: false - group_id: 0 - group_sort_order: 0 -- id: 56 + +- + id: 56 owner_id: 2 owner_name: user2 lower_name: readme-test name: readme-test - description: "" - website: "" default_branch: master - num_watches: 0 - num_stars: 0 - num_forks: 0 - num_issues: 0 - num_closed_issues: 0 - num_pulls: 0 - num_closed_pulls: 0 - num_milestones: 0 - num_closed_milestones: 0 - num_projects: 0 - num_closed_projects: 0 - is_private: true is_empty: false is_archived: false - is_mirror: false + is_private: true status: 0 - is_fsck_enabled: false - is_fork: false - fork_id: 0 - is_template: false - template_id: 0 - size: 0 - close_issues_via_commit_in_any_branch: false - group_id: 0 - group_sort_order: 0 -- id: 57 + num_issues: 0 + +- + id: 57 owner_id: 2 owner_name: user2 lower_name: repo-release name: repo-release - description: "" - website: "" default_branch: main - num_watches: 0 - num_stars: 0 - num_forks: 0 - num_issues: 0 - num_closed_issues: 0 - num_pulls: 0 - num_closed_pulls: 0 - num_milestones: 0 - num_closed_milestones: 0 - num_projects: 0 - num_closed_projects: 0 - is_private: false is_empty: false is_archived: false - is_mirror: false + is_private: false status: 0 - is_fsck_enabled: false - is_fork: false - fork_id: 0 - is_template: false - template_id: 0 - size: 0 - close_issues_via_commit_in_any_branch: false - group_id: 0 - group_sort_order: 0 -- id: 58 + num_issues: 0 + +- + id: 58 # org public repo owner_id: 2 owner_name: user2 lower_name: commitsonpr name: commitsonpr - description: "" - website: "" default_branch: main num_watches: 0 num_stars: 0 @@ -1905,55 +1755,21 @@ is_archived: false is_mirror: false status: 0 + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 is_fsck_enabled: true - is_fork: false - fork_id: 0 - is_template: false - template_id: 0 - size: 0 close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 59 - owner_id: 2 - owner_name: user2 - lower_name: test_commit_revert - name: test_commit_revert - description: "" - website: "" - default_branch: main - num_watches: 0 - num_stars: 0 - num_forks: 0 - num_issues: 0 - num_closed_issues: 0 - num_pulls: 0 - num_closed_pulls: 0 - num_milestones: 0 - num_closed_milestones: 0 - num_projects: 0 - num_closed_projects: 0 - is_private: true - is_empty: false - is_archived: false - is_mirror: false - status: 0 - is_fsck_enabled: false - is_fork: false - fork_id: 0 - is_template: false - template_id: 0 - size: 0 - close_issues_via_commit_in_any_branch: false - group_id: 0 - group_sort_order: 0 -- id: 60 + +- + id: 60 owner_id: 40 owner_name: user40 lower_name: repo60 name: repo60 - description: "" - website: "" default_branch: main num_watches: 0 num_stars: 0 @@ -1971,22 +1787,21 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false group_id: 0 - group_sort_order: 0 -- id: 61 + +- + id: 61 owner_id: 41 owner_name: org41 lower_name: repo61 name: repo61 - description: "" - website: "" default_branch: main num_watches: 0 num_stars: 0 @@ -2004,22 +1819,22 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 90 - group_sort_order: 1 -- id: 62 + group_id: 0 + group_sort_order: 0 + +- + id: 62 owner_id: 42 owner_name: org42 lower_name: search-by-path name: search-by-path - description: "" - website: "" default_branch: master num_watches: 0 num_stars: 0 @@ -2037,14 +1852,14 @@ is_archived: false is_mirror: false status: 0 - is_fsck_enabled: true is_fork: false fork_id: 0 is_template: false template_id: 0 size: 0 + is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - group_id: 106 - group_sort_order: 1 + 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/fixtures/user.yml b/models/fixtures/user.yml index 1a7d1928df..1a33947e04 100644 --- a/models/fixtures/user.yml +++ b/models/fixtures/user.yml @@ -67,7 +67,7 @@ num_followers: 2 num_following: 1 num_stars: 2 - num_repos: 15 + num_repos: 14 num_teams: 0 num_members: 0 visibility: 0 diff --git a/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/HEAD b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/HEAD rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD diff --git a/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/config b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config similarity index 100% rename from tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/config rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config diff --git a/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 similarity index 100% rename from tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 diff --git a/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef similarity index 100% rename from tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef diff --git a/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 similarity index 100% rename from tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 diff --git a/tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/refs/heads/master b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/limited_org/221/private_repo_on_limited_org.git/refs/heads/master rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/HEAD b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/HEAD rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD diff --git a/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/config b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config similarity index 100% rename from tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/config rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config diff --git a/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a similarity index 100% rename from tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a diff --git a/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f similarity index 100% rename from tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f diff --git a/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 similarity index 100% rename from tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 diff --git a/tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/refs/heads/master b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/limited_org/231/public_repo_on_limited_org.git/refs/heads/master rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push old mode 100755 new mode 100644 diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config similarity index 94% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/config index 2768a2037e..48ee2884b4 100644 --- a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config @@ -1,10 +1,10 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - symlinks = false - ignorecase = true -[user] - name = user2 - email = user2@example.com +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[user] + name = user2 + email = user2@example.com diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config.backup b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/config.backup rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/index b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/index similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/index rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/index diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/41/repo_external_tracker_alpha.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config similarity index 94% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config index 2768a2037e..48ee2884b4 100644 --- a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config @@ -1,10 +1,10 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - symlinks = false - ignorecase = true -[user] - name = user2 - email = user2@example.com +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[user] + name = user2 + email = user2@example.com diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config.backup b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/config.backup rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/index b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/index rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/49/repo_external_tracker.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config similarity index 94% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config index 2768a2037e..48ee2884b4 100644 --- a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config @@ -1,10 +1,10 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - symlinks = false - ignorecase = true -[user] - name = user2 - email = user2@example.com +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true +[user] + name = user2 + email = user2@example.com diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config.backup b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/config.backup rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/index b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/index rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 diff --git a/tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master similarity index 100% rename from tests/gitea-repositories-meta/org26/53/repo_external_tracker_numeric.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org3/129/repo21.git/COMMIT_EDITMSG deleted file mode 100644 index b1b7161055..0000000000 --- a/tests/gitea-repositories-meta/org3/129/repo21.git/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -init diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/MERGE_RR b/tests/gitea-repositories-meta/org3/129/repo21.git/MERGE_RR deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/config b/tests/gitea-repositories-meta/org3/129/repo21.git/config deleted file mode 100644 index 8ad0b1bad6..0000000000 --- a/tests/gitea-repositories-meta/org3/129/repo21.git/config +++ /dev/null @@ -1,6 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = false - bare = false - logallrefupdates = true - ignorecase = true diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/description b/tests/gitea-repositories-meta/org3/129/repo21.git/description deleted file mode 100644 index 498b267a8c..0000000000 --- a/tests/gitea-repositories-meta/org3/129/repo21.git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/index b/tests/gitea-repositories-meta/org3/129/repo21.git/index deleted file mode 100644 index eac58b57f6425a14c06e461b8b88453b0d593b80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmZ?q402{*U|<5_Oy!PAT)aL4U|MC83s4LS8kfLWK$`tM%j8X^s}vfP>(g`fzJ*S5 z`)ZeMH=@ti=-gWT-LNAIr4A161n!V}bHD~W`&2{BbHx51N z37*KnSzJ<@mZn!yQNj=s 1763936413 -0500 commit (initial): init diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org3/129/repo21.git/logs/refs/heads/master deleted file mode 100644 index 0367c0feaa..0000000000 --- a/tests/gitea-repositories-meta/org3/129/repo21.git/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 3d6e03e974fc3b3cfc74a4af56130015bea97a08 ☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 1763936413 -0500 commit (initial): init diff --git a/tests/gitea-repositories-meta/org3/129/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 b/tests/gitea-repositories-meta/org3/129/repo21.git/objects/3d/6e03e974fc3b3cfc74a4af56130015bea97a08 deleted file mode 100644 index 3d62224f64023f98d592aa2a7e804c895b16feb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 345 zcmV-f0jB1au7JL^Pa(9w&*$G(*9dB`lVrh-tc%#8}~m^p(hra~x|6 z6m7(^YT)qtc6fOQy5vBkMa~5r_Rru(1#jG}$)l3>D)=G}`wuwJ+ELLKOWqbo^r~(u zQI+k2UxKV_s;O!nS%p&xOA?BY!vz1winLB2vJ_6g)wNx31QT}xzUPhz4QBSyM}Q!^ z4s6oB>yxfD_og#P3-NkthXt2?+TSX^pPOsLxvmlt^df)kl~dC1&3eB+f`m+KGBFj) z44bnd&UeXbh~1G{tGa{fa4=Z~)s2^Gsxzlgbe3$1WjgwLI|y1~sf03uv(>G&8>`;H rs7Y(HyZ2ejS{9@J+$5_AVK6i>Ff%bxC`wIC$xYSEO<{P?GI>+!Duo8+`t)4AZ=sXi tzNVQ$6&071rlskXRFp70oBL??ri<5{y}LEnl}Ft;^rR> "$GITHUB_OUTPUT" @@ -564,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' @@ -579,9 +580,9 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) // fetch wf1-job1 wf1Job1Task := runner1.fetchTask(t) @@ -609,7 +610,7 @@ jobs: assert.Equal(t, actions_model.StatusRunning, wf2Job2ActionJob.Status) // push workflow3 to trigger wf3-job1 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) // fetch wf3-job1 wf3Job1Task := runner1.fetchTask(t) _, wf3Job1ActionJob, _ := getTaskAndJobAndRunByTaskID(t, wf3Job1Task.Id) @@ -665,7 +666,7 @@ func TestMatrixConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) linuxRunner := newMockRunner() @@ -677,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' @@ -695,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' @@ -712,7 +713,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) job1WinTask := windowsRunner.fetchTask(t) job1LinuxTask := linuxRunner.fetchTask(t) @@ -726,7 +727,7 @@ jobs: assert.Equal(t, "job-os-linux", job1LinuxJob.ConcurrencyGroup) opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) job2DarwinTask := darwinRunner.fetchTask(t) _, job2DarwinJob, _ := getTaskAndJobAndRunByTaskID(t, job2DarwinTask.Id) assert.Equal(t, "wf2-job (darwin)", job2DarwinJob.Name) @@ -758,7 +759,7 @@ func TestWorkflowDispatchConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -794,7 +795,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // run the workflow with appVersion=v1.21 and cancel=false urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "workflow-dispatch-concurrency.yml") @@ -848,7 +849,7 @@ func TestWorkflowDispatchRerunAllJobsConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -884,7 +885,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // run the workflow with appVersion=v1.21 and cancel=false urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "workflow-dispatch-concurrency.yml") @@ -986,7 +987,7 @@ func TestWorkflowDispatchRerunSingleJobConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -1022,7 +1023,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // run the workflow with appVersion=v1.21 and cancel=false urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "workflow-dispatch-concurrency.yml") @@ -1125,7 +1126,7 @@ func TestScheduleConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -1148,7 +1149,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // fetch the task triggered by push task1 := runner.fetchTask(t) @@ -1227,7 +1228,7 @@ func TestWorkflowAndJobConcurrency(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner1 := newMockRunner() @@ -1237,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' @@ -1259,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' @@ -1281,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' @@ -1298,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' @@ -1316,7 +1317,7 @@ jobs: // push workflow 1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // fetch wf1-job1 and wf1-job2 w1j1Task := runner1.fetchTask(t) @@ -1332,7 +1333,7 @@ jobs: // push workflow 2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) // cannot fetch wf2-job1 and wf2-job2 because workflow-2 is blocked by workflow-1's concurrency group "workflow-group-1" runner1.fetchNoTask(t) runner2.fetchNoTask(t) @@ -1343,7 +1344,7 @@ jobs: // push workflow 3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) // cannot fetch wf3-job1 because it is blocked by wf1-job1's concurrency group "job-group-1" runner1.fetchNoTask(t) // query wf3-job1 from db and check its status @@ -1382,7 +1383,7 @@ jobs: // push workflow-4 opts4 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf4TreePath, wf4FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf4TreePath, opts4) + createWorkflowFile(t, token, user2.Name, repo.Name, wf4TreePath, opts4) // cannot fetch wf4-job1 because it is blocked by workflow-3's concurrency group "workflow-group-2" runner2.fetchNoTask(t) @@ -1416,7 +1417,7 @@ func TestCancelConcurrentRun(t *testing.T) { apiRepo := createActionsTestRepo(t, user2Token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user2APICtx)(t) runner := newMockRunner() @@ -1436,7 +1437,7 @@ jobs: - run: echo 'test' ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, repo.GroupID, wfTreePath, opts1) + createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, wfTreePath, opts1) // fetch and check the first task task1 := runner.fetchTask(t) @@ -1493,7 +1494,7 @@ func TestAbandonConcurrentRun(t *testing.T) { apiRepo := createActionsTestRepo(t, user2Token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(user2APICtx)(t) runner := newMockRunner() @@ -1501,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' @@ -1520,7 +1521,7 @@ jobs: wf2TreePath := ".gitea/workflows/workflow-2.yml" wf2FileContent := `name: Workflow-2 -on: +on: push: paths: - '.gitea/workflows/workflow-2.yml' @@ -1534,7 +1535,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, wf1TreePath, opts1) // fetch wf1-job1 w1j1Task := runner.fetchTask(t) @@ -1552,7 +1553,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf2TreePath, wf2FileContent) - createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, repo.GroupID, wf2TreePath, opts2) + createWorkflowFile(t, user2Token, repo.OwnerName, repo.Name, wf2TreePath, opts2) // query run2 from db and check its status run2 := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{RepoID: repo.ID, WorkflowID: "workflow-2.yml"}) @@ -1592,7 +1593,7 @@ func TestRunAndJobWithSameConcurrencyGroup(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-concurrency", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -1600,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' @@ -1614,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' @@ -1628,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' @@ -1643,7 +1644,7 @@ jobs: ` // push workflow1 opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // fetch run1 task := runner.fetchTask(t) _, job1, run1 := getTaskAndJobAndRunByTaskID(t, task.Id) @@ -1652,7 +1653,7 @@ jobs: // push workflow2 opts2 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf2TreePath, wf2FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf2TreePath, opts2) + createWorkflowFile(t, token, user2.Name, repo.Name, wf2TreePath, opts2) // cannot fetch run2 because run1 is still running runner.fetchNoTask(t) run2 := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{RepoID: repo.ID, WorkflowID: "concurrent-workflow-2.yml"}) @@ -1671,7 +1672,7 @@ jobs: // push workflow3 opts3 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wf3TreePath, wf3FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf3TreePath, opts3) + createWorkflowFile(t, token, user2.Name, repo.Name, wf3TreePath, opts3) // fetch run3 task3 := runner.fetchTask(t) _, job3, run3 := getTaskAndJobAndRunByTaskID(t, task3.Id) diff --git a/tests/integration/actions_delete_run_test.go b/tests/integration/actions_delete_run_test.go index 1f52b9b0cf..096921faac 100644 --- a/tests/integration/actions_delete_run_test.go +++ b/tests/integration/actions_delete_run_test.go @@ -120,7 +120,7 @@ jobs: runner.registerAsRepoRunner(t, user2.Name, apiRepo.Name, "mock-runner", []string{"ubuntu-latest"}, false) opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+testCase.treePath, testCase.fileContent) - createWorkflowFile(t, token, user2.Name, apiRepo.Name, apiRepo.GroupID, testCase.treePath, opts) + createWorkflowFile(t, token, user2.Name, apiRepo.Name, testCase.treePath, opts) var runID int64 for i := 0; i < len(testCase.outcomes); i++ { diff --git a/tests/integration/actions_inputs_test.go b/tests/integration/actions_inputs_test.go index 88fd4ff696..9e29be3432 100644 --- a/tests/integration/actions_inputs_test.go +++ b/tests/integration/actions_inputs_test.go @@ -26,7 +26,7 @@ func TestWorkflowWithInputsContext(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-inputs-context", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) wRunner := newMockRunner() @@ -57,7 +57,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create %s"+wf1TreePath, wf1FileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wf1TreePath, opts1) + createWorkflowFile(t, token, user2.Name, repo.Name, wf1TreePath, opts1) // run the workflow with os=windows urlStr := fmt.Sprintf("/%s/%s/actions/run?workflow=%s", user2.Name, repo.Name, "test-inputs-context.yml") diff --git a/tests/integration/actions_job_test.go b/tests/integration/actions_job_test.go index 22b4636525..3e1fd50eb5 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -144,7 +144,7 @@ jobs: t.Run("test "+tc.treePath, func(t *testing.T) { // create the workflow file opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - fileResp := createWorkflowFile(t, token, user2.Name, apiRepo.Name, apiRepo.GroupID, tc.treePath, opts) + fileResp := createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, opts) // fetch and execute task for i := 0; i < len(tc.outcomes); i++ { @@ -156,8 +156,7 @@ jobs: } // check result - - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/tasks", user2.Name, maybeGroupSegment(apiRepo.GroupID), apiRepo.Name)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/actions/tasks", user2.Name, apiRepo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) actionTaskRespAfter := DecodeJSON(t, resp, &api.ActionTaskResponse{}) @@ -326,7 +325,7 @@ jobs: for _, tc := range testCases { t.Run("test "+tc.treePath, func(t *testing.T) { opts := getWorkflowCreateFileOptions(user2, apiRepo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - createWorkflowFile(t, token, user2.Name, apiRepo.Name, apiRepo.GroupID, tc.treePath, opts) + createWorkflowFile(t, token, user2.Name, apiRepo.Name, tc.treePath, opts) for i := 0; i < len(tc.outcomes); i++ { task := runner.fetchTask(t) @@ -443,7 +442,7 @@ jobs: - run: echo %s `, workflowName, workflowName) opts := getWorkflowCreateFileOptions(user, apiRepo.DefaultBranch, "create workflow", wfContent) - createWorkflowFile(t, authToken, user.Name, apiRepo.Name, apiRepo.GroupID, wfTreePath, opts) + createWorkflowFile(t, authToken, user.Name, apiRepo.Name, wfTreePath, opts) return &runnerDisableEnableTestData{ repo: apiRepo, @@ -455,7 +454,7 @@ jobs: func triggerRunnerDisableEnableRun(t *testing.T, user *user_model.User, authToken string, repo *api.Repository, treePath string) { t.Helper() opts := getWorkflowCreateFileOptions(user, repo.DefaultBranch, "second push", "second run") - createWorkflowFile(t, authToken, user.Name, repo.Name, repo.GroupID, treePath, opts) + createWorkflowFile(t, authToken, user.Name, repo.Name, treePath, opts) } func getRepoRunnerID(t *testing.T, authToken, ownerName, repoName string) int64 { @@ -475,7 +474,7 @@ func TestActionsGiteaContext(t *testing.T) { apiBaseRepo := createActionsTestRepo(t, user2Token, "actions-gitea-context", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) runner := newMockRunner() runner.registerAsRepoRunner(t, baseRepo.OwnerName, baseRepo.Name, "mock-runner", []string{"ubuntu-latest"}, false) @@ -491,7 +490,7 @@ jobs: - run: echo 'test the pull' ` opts := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-patch.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -559,7 +558,7 @@ func TestActionsGiteaContextEphemeral(t *testing.T) { apiBaseRepo := createActionsTestRepo(t, user2Token, "actions-gitea-context", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) runner := newMockRunner() runner.registerAsRepoRunner(t, baseRepo.OwnerName, baseRepo.Name, "mock-runner", []string{"ubuntu-latest"}, true) @@ -583,7 +582,7 @@ jobs: - run: echo 'test the pull' ` opts := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts) // user2 creates a pull request doAPICreateFile(user2APICtx, "user2-patch.txt", &api.CreateFileOptions{ FileOptions: api.FileOptions{ @@ -734,8 +733,8 @@ func getWorkflowCreateFileOptions(u *user_model.User, branch, msg, content strin } } -func createWorkflowFile(t *testing.T, authToken, ownerName, repoName string, groupID int64, treePath string, opts *api.CreateFileOptions) *api.FileResponse { - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", ownerName, maybeGroupSegment(groupID), repoName, treePath), opts). +func createWorkflowFile(t *testing.T, authToken, ownerName, repoName, treePath string, opts *api.CreateFileOptions) *api.FileResponse { + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", ownerName, repoName, treePath), opts). AddTokenAuth(authToken) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) diff --git a/tests/integration/actions_job_token_test.go b/tests/integration/actions_job_token_test.go index 1bb0a1bd20..421dec17d9 100644 --- a/tests/integration/actions_job_token_test.go +++ b/tests/integration/actions_job_token_test.go @@ -417,7 +417,7 @@ jobs: - run: echo "test perms" ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, user2.Name, repo1.Name, repo1.GroupID, wfTreePath, opts) + createWorkflowFile(t, token, user2.Name, repo1.Name, wfTreePath, opts) task1 := runner1.fetchTask(t) task1Token := task1.Secrets["GITEA_TOKEN"] diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index 2d063bae27..4a48f865bc 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -167,7 +167,7 @@ jobs: // create the workflow file opts := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+tc.treePath, tc.fileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, tc.treePath, opts) + createWorkflowFile(t, token, user2.Name, repo.Name, tc.treePath, opts) // fetch and execute tasks for _, outcome := range tc.outcome { @@ -199,8 +199,7 @@ jobs: } // download task logs from API and check content - - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/jobs/%d/logs", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name, job.ID)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/actions/jobs/%d/logs", user2.Name, repo.Name, job.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) logTextLines = strings.Split(strings.TrimSpace(resp.Body.String()), "\n") diff --git a/tests/integration/actions_rerun_test.go b/tests/integration/actions_rerun_test.go index 3612e1e35a..eb3786fd23 100644 --- a/tests/integration/actions_rerun_test.go +++ b/tests/integration/actions_rerun_test.go @@ -40,7 +40,7 @@ func TestActionsRerun(t *testing.T) { apiRepo := createActionsTestRepo(t, token, "actions-rerun", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) runner := newMockRunner() @@ -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' @@ -65,7 +65,7 @@ jobs: ` opts := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create"+wfTreePath, wfFileContent) - createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wfTreePath, opts) + createWorkflowFile(t, token, user2.Name, repo.Name, wfTreePath, opts) // fetch and exec job1 job1Task := runner.fetchTask(t) diff --git a/tests/integration/actions_schedule_test.go b/tests/integration/actions_schedule_test.go index 6609819328..43c44ede55 100644 --- a/tests/integration/actions_schedule_test.go +++ b/tests/integration/actions_schedule_test.go @@ -88,7 +88,7 @@ jobs: assert.NoError(t, err) // merge pull request - testPullMerge(t, testContext.Session, repo.OwnerName, repo.Name, repo.GroupID, strconv.FormatInt(apiPull.Index, 10), MergeOptions{ + testPullMerge(t, testContext.Session, repo.OwnerName, repo.Name, strconv.FormatInt(apiPull.Index, 10), MergeOptions{ Style: mergeStyle, }) @@ -164,7 +164,7 @@ func testScheduleUpdateMirrorSync(t *testing.T) { assert.True(t, mirrorRepo.IsMirror) mirrorRepo, err = repo_service.MigrateRepositoryGitData(t.Context(), user, mirrorRepo, opts, nil) assert.NoError(t, err) - mirrorContext := NewAPITestContext(t, user.Name, mirrorRepo.Name, mirrorRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) + mirrorContext := NewAPITestContext(t, user.Name, mirrorRepo.Name, auth_model.AccessTokenScopeWriteRepository) // enable actions unit for mirror repo assert.False(t, mirrorRepo.UnitEnabled(t.Context(), unit_model.TypeActions)) @@ -238,7 +238,7 @@ func doTestScheduleUpdate(t *testing.T, updateTrigger scheduleUpdateTrigger) { apiRepo := createActionsTestRepo(t, token, "actions-schedule", false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) assert.NoError(t, repo.LoadAttributes(t.Context())) - httpContext := NewAPITestContext(t, user2.Name, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, user2.Name, repo.Name, auth_model.AccessTokenScopeWriteRepository) defer doAPIDeleteRepository(httpContext)(t) wfTreePath := ".gitea/workflows/actions-schedule.yml" @@ -254,7 +254,7 @@ jobs: ` opts1 := getWorkflowCreateFileOptions(user2, repo.DefaultBranch, "create "+wfTreePath, wfFileContent) - apiFileResp := createWorkflowFile(t, token, user2.Name, repo.Name, repo.GroupID, wfTreePath, opts1) + apiFileResp := createWorkflowFile(t, token, user2.Name, repo.Name, wfTreePath, opts1) actionSchedule := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionSchedule{RepoID: repo.ID, CommitSHA: apiFileResp.Commit.SHA}) scheduleSpec := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionScheduleSpec{RepoID: repo.ID, ScheduleID: actionSchedule.ID}) diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 6ccc69c864..e7a3cd7b4f 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -61,7 +61,7 @@ func TestPullRequestTargetEvent(t *testing.T) { assert.NotEmpty(t, baseRepo) // add user4 as the collaborator - ctx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithReadAccess", doAPIAddCollaborator(ctx, "user4", perm.AccessModeRead)) // create the forked repo @@ -487,7 +487,7 @@ func TestPullRequestCommitStatusEvent(t *testing.T) { assert.NotEmpty(t, repo) // add user4 as the collaborator - ctx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithReadAccess", doAPIAddCollaborator(ctx, "user4", perm.AccessModeRead)) // add the workflow file to the repo @@ -1542,7 +1542,7 @@ func TestClosePullRequestWithPath(t *testing.T) { // create the base repo apiBaseRepo := createActionsTestRepo(t, user2Token, "close-pull-request-with-path", false) baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiBaseRepo.ID}) - user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) + user2APICtx := NewAPITestContext(t, baseRepo.OwnerName, baseRepo.Name, auth_model.AccessTokenScopeWriteRepository) // init the workflow wfTreePath := ".gitea/workflows/pull.yml" @@ -1560,17 +1560,17 @@ jobs: - run: echo 'Hello World' ` opts1 := getWorkflowCreateFileOptions(user2, baseRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, wfTreePath, opts1) + createWorkflowFile(t, user2Token, baseRepo.OwnerName, baseRepo.Name, wfTreePath, opts1) // user4 forks the repo - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/forks", baseRepo.OwnerName, maybeGroupSegment(baseRepo.GroupID), baseRepo.Name), + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks", baseRepo.OwnerName, baseRepo.Name), &api.CreateForkOption{ Name: new("close-pull-request-with-path-fork"), }).AddTokenAuth(user4Token) resp := MakeRequest(t, req, http.StatusAccepted) apiForkRepo := DecodeJSON(t, resp, &api.Repository{}) forkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiForkRepo.ID}) - user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, forkRepo.GroupID, auth_model.AccessTokenScopeWriteRepository) + user4APICtx := NewAPITestContext(t, user4.Name, forkRepo.Name, auth_model.AccessTokenScopeWriteRepository) // user4 creates a pull request to add file "app/main.go" doAPICreateFile(user4APICtx, "app/main.go", &api.CreateFileOptions{ @@ -1764,13 +1764,13 @@ func TestPullRequestWithPathsRebase(t *testing.T) { repoName := "actions-pr-paths-rebase" apiRepo := createActionsTestRepo(t, token, repoName, false) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - apiCtx := NewAPITestContext(t, "user2", repoName, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + apiCtx := NewAPITestContext(t, "user2", repoName, auth_model.AccessTokenScopeWriteRepository) runner := newMockRunner() runner.registerAsRepoRunner(t, "user2", repoName, "mock-runner", []string{"ubuntu-latest"}, false) // init files and dirs - testCreateFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "", "dir1/dir1.txt", "1") - testCreateFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "", "dir2/dir2.txt", "2") + testCreateFile(t, session, "user2", repoName, repo.DefaultBranch, "", "dir1/dir1.txt", "1") + testCreateFile(t, session, "user2", repoName, repo.DefaultBranch, "", "dir2/dir2.txt", "2") wfFileContent := `name: ci on: pull_request: @@ -1782,10 +1782,10 @@ jobs: steps: - run: echo 'ci' ` - testCreateFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "", ".gitea/workflows/ci.yml", wfFileContent) + testCreateFile(t, session, "user2", repoName, repo.DefaultBranch, "", ".gitea/workflows/ci.yml", wfFileContent) // create a PR to modify "dir1/dir1.txt", the workflow will be triggered - testEditFileToNewBranch(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "update-dir1", "dir1/dir1.txt", "11") + testEditFileToNewBranch(t, session, "user2", repoName, repo.DefaultBranch, "update-dir1", "dir1/dir1.txt", "11") _, err := doAPICreatePullRequest(apiCtx, "user2", repoName, repo.DefaultBranch, "update-dir1")(t) assert.NoError(t, err) pr1Task := runner.fetchTask(t) @@ -1793,12 +1793,12 @@ jobs: assert.Equal(t, webhook_module.HookEventPullRequest, pr1Run.Event) // create a PR to modify "dir2/dir2.txt" then update main branch and rebase, the workflow will not be triggered - testEditFileToNewBranch(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "update-dir2", "dir2/dir2.txt", "22") + testEditFileToNewBranch(t, session, "user2", repoName, repo.DefaultBranch, "update-dir2", "dir2/dir2.txt", "22") apiPull, err := doAPICreatePullRequest(apiCtx, "user2", repoName, repo.DefaultBranch, "update-dir2")(t) runner.fetchNoTask(t) assert.NoError(t, err) // change the file in "dir1" - testEditFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") + testEditFile(t, session, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") // update by rebase req := NewRequest(t, "POST", fmt.Sprintf("/%s/%s/pulls/%d/update?style=rebase", "user2", repoName, apiPull.Index)) session.MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/api_branch_test.go b/tests/integration/api_branch_test.go index e023524438..d67ba98f7c 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -111,7 +111,7 @@ func TestAPICreateBranch(t *testing.T) { func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { username := "user2" - ctx := NewAPITestContext(t, username, "my-noo-repo", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, username, "my-noo-repo", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) giteaURL.Path = ctx.GitPath() t.Run("CreateRepo", doAPICreateRepository(ctx, false)) @@ -162,15 +162,14 @@ func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { for _, test := range testCases { session := ctx.Session t.Run(test.NewBranch, func(t *testing.T) { - testAPICreateBranch(t, session, 0, "user2", "my-noo-repo", test.OldBranch, test.NewBranch, test.ExpectedHTTPStatus) + testAPICreateBranch(t, session, "user2", "my-noo-repo", test.OldBranch, test.NewBranch, test.ExpectedHTTPStatus) }) } } -func testAPICreateBranch(t testing.TB, session *TestSession, groupID int64, user, repo, oldBranch, newBranch string, status int) bool { +func testAPICreateBranch(t testing.TB, session *TestSession, user, repo, oldBranch, newBranch string, status int) bool { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - - req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+maybeGroupSegment(groupID)+repo+"/branches", &api.CreateBranchRepoOption{ + req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+repo+"/branches", &api.CreateBranchRepoOption{ BranchName: newBranch, OldBranchName: oldBranch, }).AddTokenAuth(token) @@ -278,7 +277,7 @@ func TestAPIUpdateBranchReference(t *testing.T) { defer tests.PrepareTestEnv(t)() onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { - ctx := NewAPITestContext(t, "user2", "update-branch", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", "update-branch", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) giteaURL.Path = ctx.GitPath() var defaultBranch string @@ -421,10 +420,10 @@ func TestAPICreateBranchWithSyncBranches(t *testing.T) { assert.NoError(t, err) onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { - ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) giteaURL.Path = ctx.GitPath() - testAPICreateBranch(t, ctx.Session, 0, "user2", "repo1", "", "new_branch", http.StatusCreated) + testAPICreateBranch(t, ctx.Session, "user2", "repo1", "", "new_branch", http.StatusCreated) }) branches, err = db.Find[git_model.Branch](t.Context(), git_model.FindBranchOptions{ diff --git a/tests/integration/api_comment_attachment_test.go b/tests/integration/api_comment_attachment_test.go index b70808cd0a..657b1637ac 100644 --- a/tests/integration/api_comment_attachment_test.go +++ b/tests/integration/api_comment_attachment_test.go @@ -36,17 +36,17 @@ func TestAPIGetCommentAttachment(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) }) session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusOK) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) @@ -70,7 +70,7 @@ func TestAPIListCommentAttachments(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d/assets", repoOwner.Name, repo.Name, comment.ID). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) @@ -103,7 +103,7 @@ func TestAPICreateCommentAttachment(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/assets", repoOwner.Name, repo.Name, comment.ID), body). AddTokenAuth(token). SetHeader("Content-Type", writer.FormDataContentType()) resp := session.MakeRequest(t, req, http.StatusCreated) @@ -133,7 +133,7 @@ func TestAPICreateCommentAttachmentWithUnallowedFile(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/assets", repoOwner.Name, repo.Name, comment.ID), body). AddTokenAuth(token). SetHeader("Content-Type", writer.FormDataContentType()) @@ -196,7 +196,7 @@ func TestAPIDeleteCommentAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID, attachment.ID)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/assets/%d", repoOwner.Name, repo.Name, comment.ID, attachment.ID)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusNoContent) diff --git a/tests/integration/api_comment_test.go b/tests/integration/api_comment_test.go index b6b302c4e6..138d1d2e9b 100644 --- a/tests/integration/api_comment_test.go +++ b/tests/integration/api_comment_test.go @@ -30,7 +30,7 @@ func TestAPIListRepoComments(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments", repoOwner.Name, repo.Name)) req := NewRequest(t, "GET", link.String()) resp := MakeRequest(t, req, http.StatusOK) @@ -75,7 +75,7 @@ func TestAPIListIssueComments(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/%d/comments", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/%d/comments", repoOwner.Name, repo.Name, issue.Index). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -112,7 +112,7 @@ func TestAPICreateComment(t *testing.T) { issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/comments", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), map[string]string{ + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/comments", repo.OwnerName, repo.Name, issue.Index), map[string]string{ "body": commentBody, }).AddTokenAuth(getUserToken(t, user34.Name, auth_model.AccessTokenScopeWriteRepository)) MakeRequest(t, req, http.StatusForbidden) @@ -125,7 +125,7 @@ func TestAPICreateComment(t *testing.T) { issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 13}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/comments", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), map[string]string{ + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/comments", repo.OwnerName, repo.Name, issue.Index), map[string]string{ "body": commentBody, }).AddTokenAuth(getUserToken(t, user34.Name, auth_model.AccessTokenScopeWriteRepository)) MakeRequest(t, req, http.StatusForbidden) @@ -141,9 +141,9 @@ func TestAPIGetComment(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeReadIssue) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID) MakeRequest(t, req, http.StatusOK) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -179,7 +179,7 @@ func TestAPIGetSystemUserComment(t *testing.T) { }) assert.NoError(t, err) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID) resp := MakeRequest(t, req, http.StatusOK) apiComment := DecodeJSON(t, resp, &api.Comment{}) @@ -245,13 +245,13 @@ func TestAPIDeleteComment(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) }) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/issues/comments/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/comments/%d", repoOwner.Name, repo.Name, comment.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -267,7 +267,7 @@ func TestAPIListIssueTimeline(t *testing.T) { repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) // make request - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/issues/%d/timeline", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/%d/timeline", repoOwner.Name, repo.Name, issue.Index) resp := MakeRequest(t, req, http.StatusOK) // check if lens of list returned by API and diff --git a/tests/integration/api_helper_for_declarative_test.go b/tests/integration/api_helper_for_declarative_test.go index 0911d55da5..77ce392b4b 100644 --- a/tests/integration/api_helper_for_declarative_test.go +++ b/tests/integration/api_helper_for_declarative_test.go @@ -29,10 +29,9 @@ type APITestContext struct { Token string Username string ExpectedCode int - GroupID int64 } -func NewAPITestContext(t *testing.T, username, reponame string, groupID int64, scope ...auth.AccessTokenScope) APITestContext { +func NewAPITestContext(t *testing.T, username, reponame string, scope ...auth.AccessTokenScope) APITestContext { session := loginUser(t, username) if len(scope) == 0 { // FIXME: legacy logic: no scope means all @@ -42,7 +41,6 @@ func NewAPITestContext(t *testing.T, username, reponame string, groupID int64, s return APITestContext{ Session: session, Token: token, - GroupID: groupID, Username: username, Reponame: reponame, } @@ -62,7 +60,6 @@ func doAPICreateRepository(ctx APITestContext, empty bool, callback ...func(*tes Template: true, Gitignores: "", License: "WTFPL", - GroupID: ctx.GroupID, Readme: "Default", } req := NewRequestWithJSON(t, "POST", "/api/v1/user/repos", createRepoOption). diff --git a/tests/integration/api_issue_attachment_test.go b/tests/integration/api_issue_attachment_test.go index 2f79d70af7..3475c37ee4 100644 --- a/tests/integration/api_issue_attachment_test.go +++ b/tests/integration/api_issue_attachment_test.go @@ -32,7 +32,7 @@ func TestAPIGetIssueAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index, attachment.ID)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets/%d", repoOwner.Name, repo.Name, issue.Index, attachment.ID)). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) apiAttachment := DecodeJSON(t, resp, &api.Attachment{}) @@ -51,7 +51,7 @@ func TestAPIListIssueAttachments(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets", repoOwner.Name, repo.Name, issue.Index)). AddTokenAuth(token) resp := session.MakeRequest(t, req, http.StatusOK) apiAttachment := DecodeJSON(t, resp, []api.Attachment{}) @@ -80,7 +80,7 @@ func TestAPICreateIssueAttachment(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets", repoOwner.Name, repo.Name, issue.Index), body). AddTokenAuth(token) req.Header.Add("Content-Type", writer.FormDataContentType()) resp := session.MakeRequest(t, req, http.StatusCreated) @@ -110,7 +110,7 @@ func TestAPICreateIssueAttachmentWithUnallowedFile(t *testing.T) { err = writer.Close() assert.NoError(t, err) - req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index), body). + req := NewRequestWithBody(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets", repoOwner.Name, repo.Name, issue.Index), body). AddTokenAuth(token) req.Header.Add("Content-Type", writer.FormDataContentType()) @@ -152,7 +152,7 @@ func TestAPIEditIssueAttachmentWithUnallowedFile(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) filename := "file.bad" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index, attachment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets/%d", repoOwner.Name, repo.Name, issue.Index, attachment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "name": filename, }).AddTokenAuth(token) @@ -171,7 +171,7 @@ func TestAPIDeleteIssueAttachment(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index, attachment.ID)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/assets/%d", repoOwner.Name, repo.Name, issue.Index, attachment.ID)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusNoContent) diff --git a/tests/integration/api_issue_config_test.go b/tests/integration/api_issue_config_test.go index 79606df66a..31dfa9ce92 100644 --- a/tests/integration/api_issue_config_test.go +++ b/tests/integration/api_issue_config_test.go @@ -149,7 +149,7 @@ func TestAPIRepoValidateIssueConfig(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 49}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issue_config/validate", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issue_config/validate", owner.Name, repo.Name) t.Run("Valid", func(t *testing.T) { req := NewRequest(t, "GET", urlStr) diff --git a/tests/integration/api_issue_dependency_test.go b/tests/integration/api_issue_dependency_test.go index e537fc1bdb..fc2615be42 100644 --- a/tests/integration/api_issue_dependency_test.go +++ b/tests/integration/api_issue_dependency_test.go @@ -50,10 +50,9 @@ func TestAPICreateIssueDependencyCrossRepoPermission(t *testing.T) { url := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/dependencies", "user2", "repo1", targetIssue.Index) dependencyMeta := &api.IssueMeta{ - Owner: "org3", - Name: "repo3", - GroupID: 129, - Index: dependencyIssue.Index, + Owner: "org3", + Name: "repo3", + Index: dependencyIssue.Index, } user40 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 40}) @@ -112,10 +111,9 @@ func TestAPIDeleteIssueDependencyCrossRepoPermission(t *testing.T) { url := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/dependencies", "user2", "repo1", targetIssue.Index) dependencyMeta := &api.IssueMeta{ - Owner: "org3", - Name: "repo3", - GroupID: 129, - Index: dependencyIssue.Index, + Owner: "org3", + Name: "repo3", + Index: dependencyIssue.Index, } user40 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 40}) diff --git a/tests/integration/api_issue_label_test.go b/tests/integration/api_issue_label_test.go index 38ecffe882..0e522d3e83 100644 --- a/tests/integration/api_issue_label_test.go +++ b/tests/integration/api_issue_label_test.go @@ -26,7 +26,7 @@ func TestAPIModifyLabels(t *testing.T) { owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/labels", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/labels", owner.Name, repo.Name) // CreateLabel req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateLabelOption{ @@ -60,7 +60,7 @@ func TestAPIModifyLabels(t *testing.T) { assert.Len(t, apiLabels, 2) // GetLabel - singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/labels/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, dbLabel.ID) + singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%s/labels/%d", owner.Name, repo.Name, dbLabel.ID) req = NewRequest(t, "GET", singleURLStr). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -124,7 +124,7 @@ func TestAPIAddIssueLabelsWithLabelNames(t *testing.T) { token := getTokenForLoggedInUser(t, user1Session, auth_model.AccessTokenScopeWriteIssue) // add the org label and the repo label to the issue - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/labels", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/labels", owner.Name, repo.Name, issue.Index) req := NewRequestWithJSON(t, "POST", urlStr, &api.IssueLabelsOption{ Labels: []any{repoLabel.Name, orgLabel.Name}, }).AddTokenAuth(token) diff --git a/tests/integration/api_issue_lock_test.go b/tests/integration/api_issue_lock_test.go index 724b73d2f3..47b1f2cf0d 100644 --- a/tests/integration/api_issue_lock_test.go +++ b/tests/integration/api_issue_lock_test.go @@ -27,7 +27,7 @@ func TestAPILockIssue(t *testing.T) { assert.False(t, issueBefore.IsLocked) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/lock", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/lock", owner.Name, repo.Name, issueBefore.Index) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) @@ -50,7 +50,7 @@ func TestAPILockIssue(t *testing.T) { issueBefore := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/lock", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/lock", owner.Name, repo.Name, issueBefore.Index) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) diff --git a/tests/integration/api_issue_milestone_test.go b/tests/integration/api_issue_milestone_test.go index a20970db82..7f16db163d 100644 --- a/tests/integration/api_issue_milestone_test.go +++ b/tests/integration/api_issue_milestone_test.go @@ -34,7 +34,7 @@ func TestAPIIssuesMilestone(t *testing.T) { // update values of issue milestoneState := "closed" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, milestone.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%d", owner.Name, repo.Name, milestone.ID) req := NewRequestWithJSON(t, "PATCH", urlStr, structs.EditMilestoneOption{ State: &milestoneState, }).AddTokenAuth(token) @@ -48,7 +48,7 @@ func TestAPIIssuesMilestone(t *testing.T) { apiMilestone2 := DecodeJSON(t, resp, &structs.Milestone{}) assert.EqualValues(t, "closed", apiMilestone2.State) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name), structs.CreateMilestoneOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/milestones", owner.Name, repo.Name), structs.CreateMilestoneOption{ Title: "wow", Description: "closed one", State: "closed", @@ -59,27 +59,27 @@ func TestAPIIssuesMilestone(t *testing.T) { assert.Equal(t, structs.StateClosed, apiMilestone.State) assert.Nil(t, apiMilestone.Deadline) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones?state=%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, "all")). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones?state=%s", owner.Name, repo.Name, "all")). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestones := DecodeJSON(t, resp, []structs.Milestone{}) assert.Len(t, apiMilestones, 4) assert.Nil(t, apiMilestones[0].Deadline) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, apiMilestones[2].Title)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%s", owner.Name, repo.Name, apiMilestones[2].Title)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestone = DecodeJSON(t, resp, &structs.Milestone{}) assert.Equal(t, apiMilestones[2], *apiMilestone) - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones?state=%s&name=%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, "all", "milestone2")). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones?state=%s&name=%s", owner.Name, repo.Name, "all", "milestone2")). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiMilestones = DecodeJSON(t, resp, []structs.Milestone{}) assert.Len(t, apiMilestones, 1) assert.Equal(t, int64(2), apiMilestones[0].ID) - req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/milestones/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, apiMilestone.ID)). + req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%d", owner.Name, repo.Name, apiMilestone.ID)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } diff --git a/tests/integration/api_issue_pin_test.go b/tests/integration/api_issue_pin_test.go index f1f5bab269..47026449d7 100644 --- a/tests/integration/api_issue_pin_test.go +++ b/tests/integration/api_issue_pin_test.go @@ -32,12 +32,12 @@ func TestAPIPinIssue(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) @@ -56,23 +56,23 @@ func TestAPIUnpinIssue(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) // Unpin the Issue - req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is no longer pinned - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI = DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 0, issueAPI.PinOrder) @@ -92,34 +92,34 @@ func TestAPIMoveIssuePin(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the first Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the first Issue is pinned at position 1 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) resp := MakeRequest(t, req, http.StatusOK) issueAPI := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI.PinOrder) // Pin the second Issue - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue2.Index)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue2.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Move the first Issue to position 2 - req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin/2", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin/2", repo.OwnerName, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the first Issue is pinned at position 2 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI3 := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 2, issueAPI3.PinOrder) // Check if the second Issue is pinned at position 1 - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue2.Index)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", repo.OwnerName, repo.Name, issue2.Index)) resp = MakeRequest(t, req, http.StatusOK) issueAPI4 := DecodeJSON(t, resp, &api.Issue{}) assert.Equal(t, 1, issueAPI4.PinOrder) @@ -138,12 +138,12 @@ func TestAPIListPinnedIssues(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) // Pin the Issue - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/pin", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, issue.Index)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/pin", repo.OwnerName, repo.Name, issue.Index)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // Check if the Issue is in the List - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/pinned", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/pinned", repo.OwnerName, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) issueList := DecodeJSON(t, resp, []api.Issue{}) @@ -158,7 +158,7 @@ func TestAPIListPinnedPullrequests(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/pinned", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/pulls/pinned", repo.OwnerName, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) prList := DecodeJSON(t, resp, []api.PullRequest{}) @@ -171,7 +171,7 @@ func TestAPINewPinAllowed(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/new_pin_allowed", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/new_pin_allowed", owner.Name, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) newPinsAllowed := DecodeJSON(t, resp, &api.NewIssuePinsAllowed{}) diff --git a/tests/integration/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go index 1ce1ef083c..503caf8a72 100644 --- a/tests/integration/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -119,7 +119,7 @@ func TestAPICommentReactions(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/comments/%d/reactions", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, comment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/reactions", repoOwner.Name, repo.Name, comment.ID) req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{ Reaction: "+1", }).AddTokenAuth(token) diff --git a/tests/integration/api_issue_subscription_test.go b/tests/integration/api_issue_subscription_test.go index 0980a80643..3862a13894 100644 --- a/tests/integration/api_issue_subscription_test.go +++ b/tests/integration/api_issue_subscription_test.go @@ -36,7 +36,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription := func(issue *issues_model.Issue, isWatching bool) { issueRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/subscriptions/check", issueRepo.OwnerName, maybeGroupSegment(issueRepo.GroupID), issueRepo.Name, issue.Index)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/check", issueRepo.OwnerName, issueRepo.Name, issue.Index)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) wi := new(api.WatchInfo) @@ -56,7 +56,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription(issue5, false) issue1Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue1.RepoID}) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/subscriptions/%s", issue1Repo.OwnerName, maybeGroupSegment(issue1Repo.GroupID), issue1Repo.Name, issue1.Index, owner.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s", issue1Repo.OwnerName, issue1Repo.Name, issue1.Index, owner.Name) req := NewRequest(t, "DELETE", urlStr). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) @@ -68,7 +68,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { testSubscription(issue1, false) issue5Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue5.RepoID}) - urlStr = fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d/subscriptions/%s", issue5Repo.OwnerName, maybeGroupSegment(issue5Repo.GroupID), issue5Repo.Name, issue5.Index, owner.Name) + urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s", issue5Repo.OwnerName, issue5Repo.Name, issue5.Index, owner.Name) req = NewRequest(t, "PUT", urlStr). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go index 2c9a6c2432..e1708e90aa 100644 --- a/tests/integration/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -44,7 +44,7 @@ func testAPIListIssues(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repo.Name)) link.RawQuery = url.Values{"token": {token}, "state": {"all"}}.Encode() resp := MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) @@ -91,7 +91,7 @@ func testAPIListIssuesPublicOnly(t *testing.T) { session := loginUser(t, owner1.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner1.Name, maybeGroupSegment(repo1.GroupID), repo1.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner1.Name, repo1.Name)) link.RawQuery = url.Values{"state": {"all"}}.Encode() req := NewRequest(t, "GET", link.String()).AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -101,7 +101,7 @@ func testAPIListIssuesPublicOnly(t *testing.T) { session = loginUser(t, owner2.Name) token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadIssue) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner2.Name, repo2.Name)) link.RawQuery = url.Values{"state": {"all"}}.Encode() req = NewRequest(t, "GET", link.String()).AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -119,7 +119,7 @@ func testAPICreateIssue(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repoBefore.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateIssueOption{ Body: body, Title: title, @@ -167,7 +167,7 @@ func testAPICreateIssueParallel(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repoBefore.Name) var wg sync.WaitGroup for i := range 10 { @@ -218,7 +218,7 @@ func testAPIEditIssue(t *testing.T) { body := "new content!" title := "new title from api set" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues/%d", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name, issueBefore.Index) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d", owner.Name, repoBefore.Name, issueBefore.Index) req := NewRequestWithJSON(t, "PATCH", urlStr, api.EditIssueOption{ State: &issueState, RemoveDeadline: &removeDeadline, diff --git a/tests/integration/api_keys_test.go b/tests/integration/api_keys_test.go index c6e42716bc..7ea273ac16 100644 --- a/tests/integration/api_keys_test.go +++ b/tests/integration/api_keys_test.go @@ -55,7 +55,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - keysURL := fmt.Sprintf("/api/v1/repos/%s/%s%s/keys", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + keysURL := fmt.Sprintf("/api/v1/repos/%s/%s/keys", repoOwner.Name, repo.Name) rawKeyBody := api.CreateKeyOption{ Title: "read-only", Key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", @@ -75,7 +75,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { // Using the ID of a key that does not belong to the repository must fail { - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/keys/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, newDeployKey.ID)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/keys/%d", repoOwner.Name, repo.Name, newDeployKey.ID)). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) @@ -94,7 +94,7 @@ func TestCreateReadWriteDeployKey(t *testing.T) { session := loginUser(t, repoOwner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - keysURL := fmt.Sprintf("/api/v1/repos/%s/%s%s/keys", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + keysURL := fmt.Sprintf("/api/v1/repos/%s/%s/keys", repoOwner.Name, repo.Name) rawKeyBody := api.CreateKeyOption{ Title: "read-write", Key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", diff --git a/tests/integration/api_notification_test.go b/tests/integration/api_notification_test.go index 2dfac39402..275521572d 100644 --- a/tests/integration/api_notification_test.go +++ b/tests/integration/api_notification_test.go @@ -62,7 +62,7 @@ func TestAPINotification(t *testing.T) { assert.False(t, apiNL[2].Pinned) // -- GET /repos/{owner}/{repo}/notifications -- - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?status-types=unread", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?status-types=unread", user2.Name, repo1.Name)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiNL = DecodeJSON(t, resp, []api.NotificationThread{}) @@ -71,7 +71,7 @@ func TestAPINotification(t *testing.T) { assert.EqualValues(t, 4, apiNL[0].ID) // -- GET /repos/{owner}/{repo}/notifications -- multiple status-types - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?status-types=unread&status-types=pinned", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?status-types=unread&status-types=pinned", user2.Name, repo1.Name)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiNL = DecodeJSON(t, resp, []api.NotificationThread{}) @@ -125,7 +125,7 @@ func TestAPINotification(t *testing.T) { assert.Len(t, apiNL, 2) lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 <- only Notification 4 is in this filter ... - req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?last_read_at=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, lastReadAt)). + req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?last_read_at=%s", user2.Name, repo1.Name, lastReadAt)). AddTokenAuth(token) MakeRequest(t, req, http.StatusResetContent) diff --git a/tests/integration/api_private_serv_test.go b/tests/integration/api_private_serv_test.go index 446aac99ea..43bf9c02ad 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", 0, perm.AccessModeWrite, "git-upload-pack", "") + results, extra := private.ServCommand(ctx, 1, "user2", "repo1", 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", 0, perm.AccessModeWrite, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, 1, "user15", "big_test_private_1", 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", 0, perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, 1, "user15", "big_test_private_1", 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", 0, perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, 1, "user15", "big_test_public_1", 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", 0, perm.AccessModeWrite, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, 1, "user15", "big_test_public_1", 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", 0, perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", 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", 0, perm.AccessModeWrite, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", 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", 0, perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", 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", 0, perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_public_1", 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", 0, perm.AccessModeWrite, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", 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", 0, perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", 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", 0, perm.AccessModeWrite, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", 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_pull_commits_test.go b/tests/integration/api_pull_commits_test.go index c064250dfd..fd077b1e7c 100644 --- a/tests/integration/api_pull_commits_test.go +++ b/tests/integration/api_pull_commits_test.go @@ -23,7 +23,7 @@ func TestAPIPullCommits(t *testing.T) { assert.NoError(t, pr.LoadIssue(t.Context())) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pr.HeadRepoID}) - req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/commits", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pr.Index) + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/commits", repo.OwnerName, repo.Name, pr.Index) resp := MakeRequest(t, req, http.StatusOK) commits := DecodeJSON(t, resp, []*api.Commit{}) diff --git a/tests/integration/api_pull_review_test.go b/tests/integration/api_pull_review_test.go index 4a1b4f5fc2..c1ab87405b 100644 --- a/tests/integration/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -41,7 +41,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test ListPullReviews session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index). + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -65,13 +65,13 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.True(t, reviews[5].Official) // test GetPullReview - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, reviews[3].ID). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, reviews[3].ID). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review := DecodeJSON(t, resp, &api.PullReview{}) assert.Equal(t, reviews[3], review) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, reviews[5].ID). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, reviews[5].ID). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review = DecodeJSON(t, resp, &api.PullReview{}) @@ -79,7 +79,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test GetPullReviewComments comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: 7}) - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d/comments", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, 10). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d/comments", repo.OwnerName, repo.Name, pullIssue.Index, 10). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) reviewComments := DecodeJSON(t, resp, []*api.PullReviewComment{}) @@ -91,7 +91,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, comment.HTMLURL(t.Context()), reviewComments[0].HTMLURL) // test CreatePullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "body1", // Event: "" # will result in PENDING Comments: []api.CreatePullReviewComment{ @@ -120,7 +120,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, 3, review.CodeCommentsCount) // test SubmitPullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID), &api.SubmitPullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, review.ID), &api.SubmitPullReviewOptions{ Event: "APPROVED", Body: "just two nits", }).AddTokenAuth(token) @@ -131,7 +131,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.Equal(t, 3, review.CodeCommentsCount) // test dismiss review - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d/dismissals", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID), &api.DismissPullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/dismissals", repo.OwnerName, repo.Name, pullIssue.Index, review.ID), &api.DismissPullReviewOptions{ Message: "test", }).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) @@ -140,7 +140,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.True(t, review.Dismissed) // test dismiss review - req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d/undismissals", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID)). + req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/undismissals", repo.OwnerName, repo.Name, pullIssue.Index, review.ID)). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) review = DecodeJSON(t, resp, &api.PullReview{}) @@ -148,7 +148,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.False(t, review.Dismissed) // test DeletePullReview - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "just a comment", Event: "COMMENT", }).AddTokenAuth(token) @@ -156,12 +156,12 @@ func testAPIPullReviewGeneral(t *testing.T) { review = DecodeJSON(t, resp, &api.PullReview{}) assert.EqualValues(t, "COMMENT", review.State) assert.Equal(t, 0, review.CodeCommentsCount) - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/pulls/%d/reviews/%d", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index, review.ID). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d", repo.OwnerName, repo.Name, pullIssue.Index, review.ID). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // test CreatePullReview Comment without body but with comments - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ // Body: "", Event: "COMMENT", Comments: []api.CreatePullReviewComment{ @@ -188,7 +188,7 @@ func testAPIPullReviewGeneral(t *testing.T) { // test CreatePullReview Comment with body but without comments commentBody := "This is a body of the comment." - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: commentBody, Event: "COMMENT", Comments: []api.CreatePullReviewComment{}, @@ -202,7 +202,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.False(t, commentReview.Dismissed) // test CreatePullReview Comment without body and no comments - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Body: "", Event: "COMMENT", Comments: []api.CreatePullReviewComment{}, @@ -218,7 +218,7 @@ func testAPIPullReviewGeneral(t *testing.T) { assert.NoError(t, pullIssue12.LoadAttributes(t.Context())) repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue12.RepoID}) - req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index). + req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews", repo3.OwnerName, repo3.Name, pullIssue12.Index). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) reviews = DecodeJSON(t, resp, []*api.PullReview{}) @@ -246,19 +246,19 @@ func TestAPIPullReviewRequest(t *testing.T) { // Test add Review Request session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com", "user8"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // poster of pr can't be reviewer - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user1"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) // test user not exist - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"testOther"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) @@ -267,18 +267,18 @@ func TestAPIPullReviewRequest(t *testing.T) { session2 := loginUser(t, "user4") token2 := getTokenForLoggedInUser(t, session2, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4"}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // doer is not admin - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -289,12 +289,12 @@ func TestAPIPullReviewRequest(t *testing.T) { pull21Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue21.RepoID}) // repo60 user38Session := loginUser(t, "user38") user38Token := getTokenForLoggedInUser(t, user38Session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com"}, }).AddTokenAuth(user38Token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user4@example.com"}, }).AddTokenAuth(user38Token) MakeRequest(t, req, http.StatusNoContent) @@ -302,12 +302,12 @@ func TestAPIPullReviewRequest(t *testing.T) { // the poster of the PR can add/remove a review request user39Session := loginUser(t, "user39") user39Token := getTokenForLoggedInUser(t, user39Session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(user39Token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, maybeGroupSegment(pull21Repo.GroupID), pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull21Repo.OwnerName, pull21Repo.Name, pullIssue21.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user8"}, }).AddTokenAuth(user39Token) MakeRequest(t, req, http.StatusNoContent) @@ -316,12 +316,12 @@ func TestAPIPullReviewRequest(t *testing.T) { pullIssue22 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 22}) assert.NoError(t, pullIssue22.LoadAttributes(t.Context())) pull22Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue22.RepoID}) // repo61 - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, maybeGroupSegment(pull22Repo.GroupID), pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user38"}, }).AddTokenAuth(user39Token) // user39 is from a team with read permission on pull requests unit MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, maybeGroupSegment(pull22Repo.GroupID), pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", pull22Repo.OwnerName, pull22Repo.Name, pullIssue22.Index), &api.PullReviewRequestOptions{ Reviewers: []string{"user38"}, }).AddTokenAuth(user39Token) // user39 is from a team with read permission on pull requests unit MakeRequest(t, req, http.StatusNoContent) @@ -332,35 +332,35 @@ func TestAPIPullReviewRequest(t *testing.T) { repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue12.RepoID}) // Test add Team Review Request - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"team1", "owners"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // Test add Team Review Request to not allowned - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"test_team"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) // Test add Team Review Request to not exist - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"not_exist_team"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) // Test Remove team Review Request - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{ TeamReviewers: []string{"team1"}, }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) // empty request test - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) - req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo3.OwnerName, maybeGroupSegment(repo3.GroupID), repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). + req = NewRequestWithJSON(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo3.OwnerName, repo3.Name, pullIssue12.Index), &api.PullReviewRequestOptions{}). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } @@ -453,7 +453,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { token8 := getTokenForLoggedInUser(t, session8, auth_model.AccessTokenScopeWriteRepository) // user2 request user8 - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -463,7 +463,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 0, 1, 1, false) // user2 request user8 again, it is expected to be ignored - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -473,7 +473,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 0, 1, 1, false) // user8 reviews it as accept - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "APPROVED", Body: "lgtm", }).AddTokenAuth(token8) @@ -489,7 +489,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { assert.NoError(t, err) // user2 request user8 again - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/requested_reviewers", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName}, }).AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -509,7 +509,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 1, 0, 1, false) // add a new valid approval - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "APPROVED", Body: "lgtm", }).AddTokenAuth(token8) @@ -520,7 +520,7 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { pullIssue.ID, user8.ID, 1, 0, 2, true) // now add a change request witch should dismiss the approval - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/reviews", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews", repo.OwnerName, repo.Name, pullIssue.Index), &api.CreatePullReviewOptions{ Event: "REQUEST_CHANGES", Body: "please change XYZ", }).AddTokenAuth(token8) diff --git a/tests/integration/api_pull_test.go b/tests/integration/api_pull_test.go index 924730a5db..4bc419e5e4 100644 --- a/tests/integration/api_pull_test.go +++ b/tests/integration/api_pull_test.go @@ -41,9 +41,9 @@ func TestAPIViewPulls(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) + ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls?state=all", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls?state=all", owner.Name, repo.Name). AddTokenAuth(ctx.Token) resp := ctx.Session.MakeRequest(t, req, http.StatusOK) @@ -149,9 +149,9 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) + ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls/master/branch2", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/master/branch2", owner.Name, repo.Name). AddTokenAuth(ctx.Token) resp := ctx.Session.MakeRequest(t, req, http.StatusOK) @@ -160,7 +160,7 @@ func TestAPIViewPullsByBaseHead(t *testing.T) { assert.EqualValues(t, 3, pull.Index) assert.EqualValues(t, 2, pull.ID) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/pulls/master/branch-not-exist", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/master/branch-not-exist", owner.Name, repo.Name). AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusNotFound) } @@ -181,7 +181,7 @@ func TestAPIMergePullWIP(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d/merge", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, pr.Index), &forms.MergePullRequestForm{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge", owner.Name, repo.Name, pr.Index), &forms.MergePullRequestForm{ MergeMessageField: pr.Issue.Title, Do: string(repo_model.MergeStyleMerge), }).AddTokenAuth(token) @@ -193,7 +193,7 @@ func TestAPIMergePull(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - apiCtx := NewAPITestContext(t, repo.OwnerName, repo.Name, repo.GroupID, auth_model.AccessTokenScopeWriteRepository) + apiCtx := NewAPITestContext(t, repo.OwnerName, repo.Name, auth_model.AccessTokenScopeWriteRepository) checkBranchExists := func(t *testing.T, branchName string, status int) { req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/branches/%s", owner.Name, repo.Name, branchName)).AddTokenAuth(apiCtx.Token) @@ -271,7 +271,7 @@ func TestAPICreatePullSuccess(t *testing.T) { session := loginUser(t, owner11.Name) prTitle := "test pull request title " + time.Now().String() token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &api.CreatePullRequestOption{ Head: owner11.Name + ":master", Base: "master", Title: prTitle, @@ -305,15 +305,15 @@ func TestAPICreatePullBasePermission(t *testing.T) { AllowMaintainerEdit: new(false), } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to base repo - ctx := NewAPITestContext(t, repo10.OwnerName, repo10.Name, repo10.GroupID, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo10.OwnerName, repo10.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaborator", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) // create again - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) // Also test that AllowMaintainerEdit is set to false, the default "true" case is covered by TestAPICreatePullSuccess @@ -338,18 +338,18 @@ func TestAPICreatePullHeadPermission(t *testing.T) { Base: "master", Title: "create a failure pr", } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with read permission - ctx := NewAPITestContext(t, repo11.OwnerName, repo11.Name, repo11.GroupID, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo11.OwnerName, repo11.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("AddUser4AsCollaboratorWithRead", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeRead)) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) // add user4 to be a collaborator to head repo with write permission t.Run("AddUser4AsCollaboratorWithWrite", doAPIAddCollaborator(ctx, user4.Name, perm.AccessModeWrite)) - req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &opts).AddTokenAuth(token) + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &opts).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) } @@ -361,7 +361,7 @@ func TestAPICreatePullSameRepoSuccess(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner.Name, repo.Name), &api.CreatePullRequestOption{ Head: owner.Name + ":pr-to-update", Base: "master", Title: "successfully create a PR between branches of the same repository", @@ -392,7 +392,7 @@ func TestAPICreatePullWithFieldsSuccess(t *testing.T) { Labels: []int64{5}, } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), opts). + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), opts). AddTokenAuth(token) res := MakeRequest(t, req, http.StatusCreated) @@ -425,7 +425,7 @@ func TestAPICreatePullWithFieldsFailure(t *testing.T) { Base: "master", } - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), opts). + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusUnprocessableEntity) opts.Title = "is required" @@ -451,7 +451,7 @@ func TestAPIEditPull(t *testing.T) { session := loginUser(t, owner10.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) title := "create a success pr" - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name), &api.CreatePullRequestOption{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &api.CreatePullRequestOption{ Head: "develop", Base: "master", Title: title, @@ -462,7 +462,7 @@ func TestAPIEditPull(t *testing.T) { newTitle := "edit a this pr" newBody := "edited body" - req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name, apiPull.Index), &api.EditPullRequestOption{ + req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, apiPull.Index), &api.EditPullRequestOption{ Base: "feature/1", Title: newTitle, Body: &newBody, @@ -478,7 +478,7 @@ func TestAPIEditPull(t *testing.T) { unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: pull.Issue.ID, OldTitle: title, NewTitle: newTitle}) unittest.AssertExistsAndLoadBean(t, &issues_model.ContentHistory{IssueID: pull.Issue.ID, ContentText: newBody, IsFirstCreated: false}) - req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s%s/pulls/%d", owner10.Name, maybeGroupSegment(repo10.GroupID), repo10.Name, pull.Index), &api.EditPullRequestOption{ + req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, pull.Index), &api.EditPullRequestOption{ Base: "not-exist", }).AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) @@ -562,14 +562,14 @@ func TestAPICommitPullRequest(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - ctx := NewAPITestContext(t, "user2", repo.Name, repo.GroupID, auth_model.AccessTokenScopeReadRepository) + ctx := NewAPITestContext(t, "user2", repo.Name, auth_model.AccessTokenScopeReadRepository) mergedCommitSHA := "1a8823cd1a9549fde083f992f6b9b87a7ab74fb3" - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/commits/%s/pull", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/commits/%s/pull", owner.Name, repo.Name, mergedCommitSHA).AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusOK) invalidCommitSHA := "abcd1234abcd1234abcd1234abcd1234abcd1234" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/commits/%s/pull", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, invalidCommitSHA).AddTokenAuth(ctx.Token) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/commits/%s/pull", owner.Name, repo.Name, invalidCommitSHA).AddTokenAuth(ctx.Token) ctx.Session.MakeRequest(t, req, http.StatusNotFound) } @@ -578,7 +578,7 @@ func TestAPIViewPullFilesWithHeadRepoDeleted(t *testing.T) { baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) - ctx := NewAPITestContext(t, "user1", baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeAll) + ctx := NewAPITestContext(t, "user1", baseRepo.Name, auth_model.AccessTokenScopeAll) doAPIForkRepository(ctx, "user2")(t) @@ -635,7 +635,7 @@ func TestAPIViewPullFilesWithHeadRepoDeleted(t *testing.T) { assert.NoError(t, err) pr := convert.ToAPIPullRequest(t.Context(), pullRequest, user1) - ctx = NewAPITestContext(t, "user2", baseRepo.Name, baseRepo.GroupID, auth_model.AccessTokenScopeAll) + ctx = NewAPITestContext(t, "user2", baseRepo.Name, auth_model.AccessTokenScopeAll) doAPIGetPullFiles(ctx, pr, func(t *testing.T, files []*api.ChangedFile) { if assert.Len(t, files, 1) { assert.Equal(t, "file_1.txt", files[0].Filename) @@ -648,7 +648,7 @@ func TestAPIViewPullFilesWithHeadRepoDeleted(t *testing.T) { })(t) // delete the head repository of the pull request - forkCtx := NewAPITestContext(t, "user1", forkedRepo.Name, forkedRepo.GroupID, auth_model.AccessTokenScopeAll) + forkCtx := NewAPITestContext(t, "user1", forkedRepo.Name, auth_model.AccessTokenScopeAll) doAPIDeleteRepository(forkCtx)(t) doAPIGetPullFiles(ctx, pr, func(t *testing.T, files []*api.ChangedFile) { diff --git a/tests/integration/api_releases_attachment_test.go b/tests/integration/api_releases_attachment_test.go index 663f7c4df1..f6698fbb5e 100644 --- a/tests/integration/api_releases_attachment_test.go +++ b/tests/integration/api_releases_attachment_test.go @@ -31,7 +31,7 @@ func testAPIEditReleaseAttachmentWithUnallowedFile(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) filename := "file.bad" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/%d/assets/%d", repoOwner.Name, maybeGroupSegment(repo.GroupID), repo.Name, release.ID, attachment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/%d/assets/%d", repoOwner.Name, repo.Name, release.ID, attachment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "name": filename, }).AddTokenAuth(token) diff --git a/tests/integration/api_releases_test.go b/tests/integration/api_releases_test.go index 4b8392321d..7135f2ca36 100644 --- a/tests/integration/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -46,7 +46,7 @@ func testAPIListReleasesWithWriteToken(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/releases", user2.Name, repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) apiReleases := DecodeJSON(t, resp, []*api.Release{}) if assert.Len(t, apiReleases, 3) { @@ -155,7 +155,7 @@ func testAPIGetDraftRelease(t *testing.T) { } func createNewReleaseUsingAPI(t *testing.T, token string, owner *user_model.User, repo *repo_model.Repository, name, target, title, desc string) *api.Release { - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases", owner.Name, repo.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateReleaseOption{ TagName: name, Title: title, @@ -198,7 +198,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) { newRelease := createNewReleaseUsingAPI(t, token, owner, repo, "v0.0.1", target, "v0.0.1", "test") - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/%d", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, newRelease.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/%d", owner.Name, repo.Name, newRelease.ID) req := NewRequest(t, "GET", urlStr). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) @@ -244,7 +244,7 @@ func TestAPICreateProtectedTagRelease(t *testing.T) { commit, err := gitRepo.GetBranchCommit("master") assert.NoError(t, err) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &api.CreateReleaseOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/releases", repo.OwnerName, repo.Name), &api.CreateReleaseOption{ TagName: "v0.0.1", Title: "v0.0.1", IsDraft: false, @@ -291,7 +291,7 @@ func TestAPICreateReleaseGivenInvalidTarget(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases", owner.Name, repo.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateReleaseOption{ TagName: "i-point-to-an-invalid-target", Title: "Invalid Target", @@ -305,7 +305,7 @@ func testAPIGetLatestRelease(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/latest", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/releases/latest", owner.Name, repo.Name)) resp := MakeRequest(t, req, http.StatusOK) release := DecodeJSON(t, resp, &api.Release{}) @@ -319,7 +319,7 @@ func testAPIGetReleaseByTag(t *testing.T) { tag := "v1.1" - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/tags/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, tag)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s", owner.Name, repo.Name, tag)) resp := MakeRequest(t, req, http.StatusOK) release := DecodeJSON(t, resp, &api.Release{}) @@ -328,7 +328,7 @@ func testAPIGetReleaseByTag(t *testing.T) { nonexistingtag := "nonexistingtag" - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/tags/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, nonexistingtag)) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s", owner.Name, repo.Name, nonexistingtag)) resp = MakeRequest(t, req, http.StatusNotFound) err := DecodeJSON(t, resp, &api.APIError{}) @@ -378,17 +378,17 @@ func TestAPIDeleteReleaseByTagName(t *testing.T) { createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") // delete release - req := NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/releases/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/releases/tags/release-tag", owner.Name, repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) // make sure release is deleted - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/releases/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/releases/tags/release-tag", owner.Name, repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNotFound) // delete release tag too - req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s%s/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/tags/release-tag", owner.Name, repo.Name). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) } @@ -406,7 +406,7 @@ func TestAPIUploadAssetRelease(t *testing.T) { bufLargeBytes := bytes.Repeat([]byte{' '}, 2*1024*1024) release := createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") - assetURL := fmt.Sprintf("/api/v1/repos/%s/%s%s/releases/%d/assets", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, release.ID) + assetURL := fmt.Sprintf("/api/v1/repos/%s/%s/releases/%d/assets", owner.Name, repo.Name, release.ID) t.Run("multipart/form-data", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/api_repo_archive_test.go b/tests/integration/api_repo_archive_test.go index ce64440343..97c2c0d54b 100644 --- a/tests/integration/api_repo_archive_test.go +++ b/tests/integration/api_repo_archive_test.go @@ -30,13 +30,13 @@ func TestAPIDownloadArchive(t *testing.T) { session := loginUser(t, user2.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master.zip", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master.zip", user2.Name, repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 320) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master.tar.gz", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master.tar.gz", user2.Name, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) @@ -52,13 +52,13 @@ func TestAPIDownloadArchive(t *testing.T) { // The locked URL should give the same bytes as the non-locked one assert.Equal(t, bs, bs2) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master.bundle", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master.bundle", user2.Name, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 382) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/archive/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/archive/master", user2.Name, repo.Name)) MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusBadRequest) t.Run("GitHubStyle", testAPIDownloadArchiveGitHubStyle) @@ -73,13 +73,13 @@ func testAPIDownloadArchiveGitHubStyle(t *testing.T) { session := loginUser(t, user2.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/zipball/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/zipball/master", user2.Name, repo.Name)) resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) assert.Len(t, bs, 320) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/tarball/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/tarball/master", user2.Name, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) @@ -95,7 +95,7 @@ func testAPIDownloadArchiveGitHubStyle(t *testing.T) { // The locked URL should give the same bytes as the non-locked one assert.Equal(t, bs, bs2) - link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s%s/bundle/master", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name)) + link, _ = url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/bundle/master", user2.Name, repo.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) diff --git a/tests/integration/api_repo_avatar_test.go b/tests/integration/api_repo_avatar_test.go index f1a2e1deab..e4d0e06d00 100644 --- a/tests/integration/api_repo_avatar_test.go +++ b/tests/integration/api_repo_avatar_test.go @@ -40,7 +40,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: base64.StdEncoding.EncodeToString(avatar), } - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &opts). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) @@ -49,7 +49,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: "Invalid", } - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &opts). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusBadRequest) @@ -64,7 +64,7 @@ func TestAPIUpdateRepoAvatar(t *testing.T) { Image: base64.StdEncoding.EncodeToString(text), } - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &opts). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name), &opts). AddTokenAuth(token) MakeRequest(t, req, http.StatusInternalServerError) } @@ -76,7 +76,7 @@ func TestAPIDeleteRepoAvatar(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/avatar", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). + req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/avatar", repo.OwnerName, repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) } diff --git a/tests/integration/api_repo_branch_test.go b/tests/integration/api_repo_branch_test.go index ea9b036bbf..2438db72c5 100644 --- a/tests/integration/api_repo_branch_test.go +++ b/tests/integration/api_repo_branch_test.go @@ -31,7 +31,7 @@ func TestAPIRepoBranchesPlain(t *testing.T) { // public only token should be forbidden publicOnlyToken := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopePublicOnly, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches", maybeGroupSegment(repo3.GroupID), repo3.Name)) // a plain repo + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches", repo3.Name)) // a plain repo MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(publicOnlyToken), http.StatusForbidden) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -45,7 +45,7 @@ func TestAPIRepoBranchesPlain(t *testing.T) { assert.Equal(t, "test_branch", branches[0].Name) assert.Equal(t, "master", branches[1].Name) - link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches/test_branch", maybeGroupSegment(repo3.GroupID), repo3.Name)) + link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches/test_branch", repo3.Name)) MakeRequest(t, NewRequest(t, "GET", link2.String()).AddTokenAuth(publicOnlyToken), http.StatusForbidden) resp = MakeRequest(t, NewRequest(t, "GET", link2.String()).AddTokenAuth(token), http.StatusOK) @@ -79,7 +79,7 @@ func TestAPIRepoBranchesPlain(t *testing.T) { assert.Equal(t, "test_branch2", branches[1].Name) assert.Equal(t, "master", branches[2].Name) - link3, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches/test_branch2", maybeGroupSegment(repo3.GroupID), repo3.Name)) + link3, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches/test_branch2", repo3.Name)) MakeRequest(t, NewRequest(t, "DELETE", link3.String()), http.StatusNotFound) MakeRequest(t, NewRequest(t, "DELETE", link3.String()).AddTokenAuth(publicOnlyToken), http.StatusForbidden) @@ -96,7 +96,7 @@ func TestAPIRepoBranchesMirror(t *testing.T) { session := loginUser(t, user1.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches", maybeGroupSegment(repo5.GroupID), repo5.Name)) // a mirror repo + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches", repo5.Name)) // a mirror repo resp := MakeRequest(t, NewRequest(t, "GET", link.String()).AddTokenAuth(token), http.StatusOK) bs, err := io.ReadAll(resp.Body) assert.NoError(t, err) @@ -107,7 +107,7 @@ func TestAPIRepoBranchesMirror(t *testing.T) { assert.Equal(t, "test_branch", branches[0].Name) assert.Equal(t, "master", branches[1].Name) - link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s%s/branches/test_branch", maybeGroupSegment(repo5.GroupID), repo5.Name)) + link2, _ := url.Parse(fmt.Sprintf("/api/v1/repos/org3/%s/branches/test_branch", repo5.Name)) resp = MakeRequest(t, NewRequest(t, "GET", link2.String()).AddTokenAuth(token), http.StatusOK) bs, err = io.ReadAll(resp.Body) assert.NoError(t, err) diff --git a/tests/integration/api_repo_collaborator_test.go b/tests/integration/api_repo_collaborator_test.go index f0b3eafd89..f5474b1ed8 100644 --- a/tests/integration/api_repo_collaborator_test.go +++ b/tests/integration/api_repo_collaborator_test.go @@ -29,10 +29,10 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { user11 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 11}) user34 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 34}) - testCtx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeWriteRepository) + testCtx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, auth_model.AccessTokenScopeWriteRepository) t.Run("RepoOwnerShouldBeOwner", func(t *testing.T) { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, repo2Owner.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, repo2Owner.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -44,7 +44,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithReadAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeRead)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -56,7 +56,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithWriteAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithWriteAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeWrite)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -68,7 +68,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("CollaboratorWithAdminAccess", func(t *testing.T) { t.Run("AddUserAsCollaboratorWithAdminAccess", doAPIAddCollaborator(testCtx, user4.Name, perm.AccessModeAdmin)) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user4.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user4.Name). AddTokenAuth(testCtx.Token) resp := MakeRequest(t, req, http.StatusOK) @@ -78,13 +78,13 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { }) t.Run("CollaboratorNotFound", func(t *testing.T) { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "non-existent-user"). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, "non-existent-user"). AddTokenAuth(testCtx.Token) MakeRequest(t, req, http.StatusNotFound) }) t.Run("CollaboratorBlocked", func(t *testing.T) { - ctx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, repo2Owner.Name, repo2.Name, auth_model.AccessTokenScopeWriteRepository) ctx.ExpectedCode = http.StatusForbidden doAPIAddCollaborator(ctx, user34.Name, perm.AccessModeAdmin)(t) }) @@ -93,9 +93,9 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user5.Name, perm.AccessModeRead)) _session := loginUser(t, user5.Name) - _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) + _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user5.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) @@ -107,7 +107,7 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { session := loginUser(t, user5.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user5.Name).AddTokenAuth(token) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user5.Name).AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) repoCollPerm := DecodeJSON(t, resp, &api.RepoCollaboratorPermission{}) @@ -120,9 +120,9 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user5.Name, perm.AccessModeRead)) _session := loginUser(t, user5.Name) - _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) + _testCtx := NewAPITestContext(t, user5.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user5.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user5.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) @@ -136,9 +136,9 @@ func TestAPIRepoCollaboratorPermission(t *testing.T) { t.Run("AddUserAsCollaboratorWithReadAccess", doAPIAddCollaborator(testCtx, user11.Name, perm.AccessModeRead)) _session := loginUser(t, user10.Name) - _testCtx := NewAPITestContext(t, user10.Name, repo2.Name, repo2.GroupID, auth_model.AccessTokenScopeReadRepository) + _testCtx := NewAPITestContext(t, user10.Name, repo2.Name, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/collaborators/%s/permission", repo2Owner.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, user11.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/collaborators/%s/permission", repo2Owner.Name, repo2.Name, user11.Name). AddTokenAuth(_testCtx.Token) resp := _session.MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/api_repo_edit_test.go b/tests/integration/api_repo_edit_test.go index c9516c1b22..e37b214fa8 100644 --- a/tests/integration/api_repo_edit_test.go +++ b/tests/integration/api_repo_edit_test.go @@ -400,11 +400,11 @@ func TestAPIRepoEdit(t *testing.T) { // Test using org repo "org3/repo3" where user2 is a collaborator origRepoEditOption = getRepoEditOptionFromRepo(repo3) repoEditOption = getNewRepoEditOption(origRepoEditOption) - req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/group/%d/%s", org3.Name, repo3.GroupID, repo3.Name), &repoEditOption). + req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s", org3.Name, repo3.Name), &repoEditOption). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // reset repo in db - req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/group/%d/%s", org3.Name, repo3.GroupID, *repoEditOption.Name), &origRepoEditOption). + req = NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s", org3.Name, *repoEditOption.Name), &origRepoEditOption). AddTokenAuth(token2) _ = MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go index 4f6294fa10..26cc0aad0e 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -150,7 +150,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.BranchName = branch fileID++ treePath := fmt.Sprintf("new/file%d.txt", fileID) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -184,7 +184,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.NewBranchName = "new_branch" fileID++ treePath := fmt.Sprintf("new/file%d.txt", fileID) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -201,7 +201,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions.Message = "" fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusCreated) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -211,7 +211,7 @@ func TestAPICreateFile(t *testing.T) { // Test trying to create a file that already exists, should fail createFileOptions = getCreateFileOptions() treePath = "README.md" - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := &context.APIError{ @@ -225,7 +225,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &createFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -233,14 +233,14 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &createFileOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &createFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &createFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -248,7 +248,7 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &createFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -256,19 +256,19 @@ func TestAPICreateFile(t *testing.T) { createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &createFileOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &createFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &createFileOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &createFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) // Test creating a file in an empty repository - doAPICreateRepository(NewAPITestContext(t, "user2", "empty-repo", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser), true)(t) + doAPICreateRepository(NewAPITestContext(t, "user2", "empty-repo", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser), true)(t) createFileOptions = getCreateFileOptions() fileID++ treePath = fmt.Sprintf("new/file%d.txt", fileID) diff --git a/tests/integration/api_repo_file_delete_test.go b/tests/integration/api_repo_file_delete_test.go index a5b05ee754..96ca39dab9 100644 --- a/tests/integration/api_repo_file_delete_test.go +++ b/tests/integration/api_repo_file_delete_test.go @@ -64,7 +64,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions := getDeleteFileOptions() deleteFileOptions.BranchName = branch - req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). + req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -79,7 +79,7 @@ func TestAPIDeleteFile(t *testing.T) { deleteFileOptions := getDeleteFileOptions() deleteFileOptions.BranchName = repo1.DefaultBranch deleteFileOptions.NewBranchName = "new_branch" - req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). + req := NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -93,7 +93,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() deleteFileOptions.Message = "" - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -106,7 +106,7 @@ func TestAPIDeleteFile(t *testing.T) { createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() deleteFileOptions.SHA = "badsha" - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) @@ -115,7 +115,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &deleteFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -124,7 +124,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &deleteFileOptions) + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &deleteFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -132,7 +132,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo16, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -141,7 +141,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(org3, repo3, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &deleteFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -150,7 +150,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(org3, repo3, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &deleteFileOptions) + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &deleteFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -158,7 +158,7 @@ func TestAPIDeleteFile(t *testing.T) { treePath = fmt.Sprintf("delete/file%d.txt", fileID) createFile(user2, repo1, treePath) deleteFileOptions = getDeleteFileOptions() - req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &deleteFileOptions). + req = NewRequestWithJSON(t, "DELETE", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &deleteFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_file_diffpatch_test.go b/tests/integration/api_repo_file_diffpatch_test.go index e1aa0860d3..928ea3bfb8 100644 --- a/tests/integration/api_repo_file_diffpatch_test.go +++ b/tests/integration/api_repo_file_diffpatch_test.go @@ -72,12 +72,12 @@ func TestAPIApplyDiffPatchFileOptions(t *testing.T) { MakeRequest(t, req, http.StatusCreated) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/diffpatch", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), getApplyDiffPatchFileOptions()). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/diffpatch", org3.Name, repo3.Name), getApplyDiffPatchFileOptions()). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) // Test using org repo "org3/repo3" with no user token - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/diffpatch", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), getApplyDiffPatchFileOptions()) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/diffpatch", org3.Name, repo3.Name), getApplyDiffPatchFileOptions()) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator diff --git a/tests/integration/api_repo_file_get_test.go b/tests/integration/api_repo_file_get_test.go index 62c7b8c775..ec50cf52f4 100644 --- a/tests/integration/api_repo_file_get_test.go +++ b/tests/integration/api_repo_file_get_test.go @@ -25,7 +25,7 @@ func TestAPIGetRawFileOrLFS(t *testing.T) { // Test with LFS onGiteaRun(t, func(t *testing.T, u *url.URL) { createLFSTestRepository(t, "repo-lfs-test") - httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", 0, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", auth_model.AccessTokenScopeWriteRepository) t.Run("repo-lfs-test", func(t *testing.T) { u.Path = httpContext.GitPath() dstPath := t.TempDir() diff --git a/tests/integration/api_repo_file_update_test.go b/tests/integration/api_repo_file_update_test.go index e3c25090fb..4098beeefd 100644 --- a/tests/integration/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -133,7 +133,7 @@ func TestAPIUpdateFile(t *testing.T) { createFile(user2, repo1, treePath) updateFileOptions := getUpdateFileOptions() updateFileOptions.BranchName = branch - req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). + req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -163,7 +163,7 @@ func TestAPIUpdateFile(t *testing.T) { fileID++ treePath := fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) - req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). + req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusOK) fileResponse := DecodeJSON(t, resp, &api.FileResponse{}) @@ -192,7 +192,7 @@ func TestAPIUpdateFile(t *testing.T) { createFile(user2, repo1, treePath) updateFileOptions.FromPath = treePath treePath = "rename/" + treePath - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -210,7 +210,7 @@ func TestAPIUpdateFile(t *testing.T) { fileID++ treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusOK) fileResponse = DecodeJSON(t, resp, &api.FileResponse{}) @@ -224,7 +224,7 @@ func TestAPIUpdateFile(t *testing.T) { updateFileOptions = getUpdateFileOptions() correctSHA := updateFileOptions.SHA updateFileOptions.SHA = "badsha" - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token2) resp = MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := &context.APIError{ @@ -239,7 +239,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &updateFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -248,7 +248,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &updateFileOptions) + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &updateFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -256,7 +256,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo16, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath), &updateFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -265,7 +265,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(org3, repo3, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &updateFileOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) @@ -274,7 +274,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(org3, repo3, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath), &updateFileOptions) + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath), &updateFileOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -282,7 +282,7 @@ func TestAPIUpdateFile(t *testing.T) { treePath = fmt.Sprintf("update/file%d.txt", fileID) createFile(user2, repo1, treePath) updateFileOptions = getUpdateFileOptions() - req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath), &updateFileOptions). + req = NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath), &updateFileOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_files_change_test.go b/tests/integration/api_repo_files_change_test.go index 48660f5f63..d518944083 100644 --- a/tests/integration/api_repo_files_change_test.go +++ b/tests/integration/api_repo_files_change_test.go @@ -90,7 +90,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name), &changeFilesOptions). + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo1.Name), &changeFilesOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) gitRepo, _ := gitrepo.OpenRepository(t.Context(), repo1) @@ -141,7 +141,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[2].Path = deleteTreePath createFile(user2, repo1, updateTreePath) createFile(user2, repo1, deleteTreePath) - url := fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name) + url := fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo1.Name) req := NewRequestWithJSON(t, "POST", url, &changeFilesOptions). AddTokenAuth(token2) resp := MakeRequest(t, req, http.StatusCreated) @@ -311,7 +311,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo16.Name), &changeFilesOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) @@ -326,7 +326,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &changeFilesOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo16.Name), &changeFilesOptions) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns @@ -340,7 +340,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo16.Name), &changeFilesOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -355,7 +355,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", org3.Name, repo3.Name), &changeFilesOptions). AddTokenAuth(token2) MakeRequest(t, req, http.StatusCreated) @@ -370,7 +370,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), &changeFilesOptions) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", org3.Name, repo3.Name), &changeFilesOptions) MakeRequest(t, req, http.StatusNotFound) // Test using repo "user2/repo1" where user4 is a NOT collaborator @@ -384,7 +384,7 @@ func TestAPIChangeFiles(t *testing.T) { changeFilesOptions.Files[0].Path = createTreePath changeFilesOptions.Files[1].Path = updateTreePath changeFilesOptions.Files[2].Path = deleteTreePath - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/contents", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name), &changeFilesOptions). + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents", user2.Name, repo1.Name), &changeFilesOptions). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_files_get_test.go b/tests/integration/api_repo_files_get_test.go index d0ff792ba0..3d299cd655 100644 --- a/tests/integration/api_repo_files_get_test.go +++ b/tests/integration/api_repo_files_get_test.go @@ -94,13 +94,13 @@ func TestAPIGetRequestedFiles(t *testing.T) { t.Run("PermissionCheck", func(t *testing.T) { filesOptions := &api.GetFilesOptions{Files: []string{"README.md"}} // Test accessing private ref with user token that does not have access - should fail - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/file-contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &filesOptions).AddTokenAuth(token4) + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/file-contents", user2.Name, repo16.Name), &filesOptions).AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/file-contents", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name), &filesOptions).AddTokenAuth(token2) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/file-contents", user2.Name, repo16.Name), &filesOptions).AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/file-contents", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name), &filesOptions).AddTokenAuth(token2) + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/file-contents", org3.Name, repo3.Name), &filesOptions).AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) }) diff --git a/tests/integration/api_repo_get_contents_list_test.go b/tests/integration/api_repo_get_contents_list_test.go index 49923cde56..0b8bc5a8dc 100644 --- a/tests/integration/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -92,7 +92,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is default ref ref := repo1.DefaultBranch refType := "branch" - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents?ref=%s", user2.Name, repo1.Name, ref) resp := MakeRequest(t, req, http.StatusOK) contentsListResponse := DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -103,7 +103,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // No ref refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", user2.Name, repo1.Name) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -114,7 +114,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is the branch we created above in setup ref = newBranch refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents?ref=%s", user2.Name, repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -128,7 +128,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is the new tag we created above in setup ref = newTag refType = "tag" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/?ref=%s", user2.Name, repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -142,7 +142,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // ref is a commit ref = commitID refType = "commit" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/?ref=%s", user2.Name, repo1.Name, ref) resp = MakeRequest(t, req, http.StatusOK) contentsListResponse = DecodeJSON(t, resp, []*api.ContentsResponse{}) assert.NotNil(t, contentsListResponse) @@ -151,21 +151,21 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) { // Test file contents a file with a bad ref ref = "badref" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/?ref=%s", user2.Name, repo1.Name, ref) MakeRequest(t, req, http.StatusNotFound) // Test accessing private ref with user token that does not have access - should fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", user2.Name, repo16.Name). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", user2.Name, repo16.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/", org3.Name, repo3.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/api_repo_get_contents_test.go b/tests/integration/api_repo_get_contents_test.go index 325192eabb..bc9a17ff8d 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -96,14 +96,14 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { /*** END SETUP ***/ // not found - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/no-such/file.md", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/no-such/file.md", user2.Name, repo1.Name) resp := MakeRequest(t, req, http.StatusNotFound) assert.Contains(t, resp.Body.String(), "object does not exist [id: , rel_path: no-such]") // ref is default ref ref := repo1.DefaultBranch refType := "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse := DecodeJSON(t, resp, &api.ContentsResponse{}) lastCommit, _ := gitRepo.GetCommitByPath("README.md") @@ -112,7 +112,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // No ref refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s", user2.Name, repo1.Name, treePath) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) expectedContentsResponse = getExpectedContentsResponseForContents(repo1.DefaultBranch, refType, lastCommit.ID.String()) @@ -121,7 +121,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is the branch we created above in setup ref = newBranch refType = "branch" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) branchCommit, _ := gitRepo.GetBranchCommit(ref) @@ -132,7 +132,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is the new tag we created above in setup ref = newTag refType = "tag" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) tagCommit, _ := gitRepo.GetTagCommit(ref) @@ -143,7 +143,7 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // ref is a commit ref = commitID refType = "commit" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) resp = MakeRequest(t, req, http.StatusOK) contentsResponse = DecodeJSON(t, resp, &api.ContentsResponse{}) expectedContentsResponse = getExpectedContentsResponseForContents(ref, refType, commitID) @@ -151,21 +151,21 @@ func testAPIGetContents(t *testing.T, _ *url.URL) { // Test file contents a file with a bad ref ref = "badref" - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s?ref=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, treePath, ref) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s?ref=%s", user2.Name, repo1.Name, treePath, ref) MakeRequest(t, req, http.StatusNotFound) // Test accessing private ref with user token that does not have access - should fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, treePath). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s", user2.Name, repo16.Name, treePath). AddTokenAuth(token4) MakeRequest(t, req, http.StatusNotFound) // Test access private ref of owner of token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/readme.md", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/readme.md", user2.Name, repo16.Name). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) // Test access of org org3 private repo file by owner user2 - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/contents/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, treePath). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/contents/%s", org3.Name, repo3.Name, treePath). AddTokenAuth(token2) MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/api_repo_git_blobs_test.go b/tests/integration/api_repo_git_blobs_test.go index 3d45c5770f..d8270ad9f3 100644 --- a/tests/integration/api_repo_git_blobs_test.go +++ b/tests/integration/api_repo_git_blobs_test.go @@ -35,7 +35,7 @@ func TestAPIReposGitBlobs(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) // Test a public repo that anyone can GET the blob of - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, repo1ReadmeSHA) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo1.Name, repo1ReadmeSHA) resp := MakeRequest(t, req, http.StatusOK) gitBlobResponse := DecodeJSON(t, resp, &api.GitBlobResponse{}) assert.NotNil(t, gitBlobResponse) @@ -43,30 +43,30 @@ func TestAPIReposGitBlobs(t *testing.T) { assert.Equal(t, expectedContent, *gitBlobResponse.Content) // Tests a private repo with no token so will fail - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, repo16ReadmeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo16.Name, repo16ReadmeSHA) MakeRequest(t, req, http.StatusNotFound) // Test using access token for a private repo that the user of the token owns - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, repo16ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo16.Name, repo16ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using bad sha - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, badSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", user2.Name, repo1.Name, badSHA) MakeRequest(t, req, http.StatusBadRequest) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", org3.Name, repo3.Name, repo3ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3ReadmeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", org3.Name, repo3.Name, repo3ReadmeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3ReadmeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/%s", org3.Name, repo3ReadmeSHA, repo3.Name) MakeRequest(t, req, http.StatusNotFound) // Login as User4. @@ -74,6 +74,6 @@ func TestAPIReposGitBlobs(t *testing.T) { token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) // Test using org repo "org3/repo3" where user4 is a NOT collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/blobs/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, token4) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/blobs/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.Name, token4) MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_repo_git_hook_test.go b/tests/integration/api_repo_git_hook_test.go index 4a1b5a2be4..d8254c6c61 100644 --- a/tests/integration/api_repo_git_hook_test.go +++ b/tests/integration/api_repo_git_hook_test.go @@ -37,7 +37,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git", owner.Name, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHooks := DecodeJSON(t, resp, []*api.GitHook{}) @@ -62,7 +62,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git", owner.Name, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHooks := DecodeJSON(t, resp, []*api.GitHook{}) @@ -81,7 +81,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git", owner.Name, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) @@ -95,7 +95,7 @@ echo "TestGitHookScript" // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHook := DecodeJSON(t, resp, &api.GitHook{}) @@ -110,7 +110,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) @@ -135,7 +135,7 @@ echo "TestGitHookScript" assert.True(t, apiGitHook.IsActive) assert.Equal(t, testHookContent, apiGitHook.Content) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). AddTokenAuth(token) resp = MakeRequest(t, req, http.StatusOK) apiGitHook2 := DecodeJSON(t, resp, &api.GitHook{}) @@ -151,7 +151,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name) req := NewRequestWithJSON(t, "PATCH", urlStr, &api.EditGitHookOption{ Content: testHookContent, }).AddTokenAuth(token) @@ -168,11 +168,11 @@ echo "TestGitHookScript" session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusNoContent) - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiGitHook2 := DecodeJSON(t, resp, &api.GitHook{}) @@ -188,7 +188,7 @@ echo "TestGitHookScript" session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/hooks/git/pre-receive", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/hooks/git/pre-receive", owner.Name, repo.Name). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) }) diff --git a/tests/integration/api_repo_git_tags_test.go b/tests/integration/api_repo_git_tags_test.go index 50d35b132e..9ce1fb6fc1 100644 --- a/tests/integration/api_repo_git_tags_test.go +++ b/tests/integration/api_repo_git_tags_test.go @@ -44,7 +44,7 @@ func TestAPIGitTags(t *testing.T) { aTag, _ := gitRepo.GetTag(aTagName) // SHOULD work for annotated tags - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/tags/%s", user.Name, maybeGroupSegment(repo.GroupID), repo.Name, aTag.ID.String()). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/tags/%s", user.Name, repo.Name, aTag.ID.String()). AddTokenAuth(token) res := MakeRequest(t, req, http.StatusOK) @@ -59,7 +59,7 @@ func TestAPIGitTags(t *testing.T) { assert.Equal(t, repo.APIURL()+"/git/tags/"+aTag.ID.String(), tag.URL) // Should NOT work for lightweight tags - badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/tags/%s", user.Name, maybeGroupSegment(repo.GroupID), repo.Name, commit.ID.String()). + badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/tags/%s", user.Name, repo.Name, commit.ID.String()). AddTokenAuth(token) MakeRequest(t, badReq, http.StatusBadRequest) } @@ -72,14 +72,14 @@ func TestAPIDeleteTagByName(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/tags/delete-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)). + req := NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/tags/delete-tag", owner.Name, repo.Name)). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusNoContent) // Make sure that actual releases can't be deleted outright createNewReleaseUsingAPI(t, token, owner, repo, "release-tag", "", "Release Tag", "test") - req = NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s%s/tags/release-tag", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name)). + req = NewRequest(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/tags/release-tag", owner.Name, repo.Name)). AddTokenAuth(token) _ = MakeRequest(t, req, http.StatusConflict) } diff --git a/tests/integration/api_repo_git_trees_test.go b/tests/integration/api_repo_git_trees_test.go index b3c8e12251..5cfce1044d 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -55,26 +55,26 @@ func TestAPIReposGitTrees(t *testing.T) { "master", // Branch repo1TreeSHA, // Tag } { - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, ref) + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", user2.Name, repo16.Name, ref) MakeRequest(t, req, http.StatusNotFound) } // Test using access token for a private repo that the user of the token owns - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", user2.Name, maybeGroupSegment(repo16.GroupID), repo16.Name, repo16TreeSHA). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", user2.Name, repo16.Name, repo16TreeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using bad sha - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, badSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", user2.Name, repo1.Name, badSHA) MakeRequest(t, req, http.StatusBadRequest) // Test using org repo "org3/repo3" where user2 is a collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3TreeSHA). + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", org3.Name, repo3.Name, repo3TreeSHA). AddTokenAuth(token) MakeRequest(t, req, http.StatusOK) // Test using org repo "org3/repo3" with no user token - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, repo3TreeSHA) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/%s", org3.Name, repo3TreeSHA, repo3.Name) MakeRequest(t, req, http.StatusNotFound) // Login as User4. @@ -82,6 +82,6 @@ func TestAPIReposGitTrees(t *testing.T) { token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) // Test using org repo "org3/repo3" where user4 is a NOT collaborator - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/git/trees/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, token4) + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/trees/d56a3073c1dbb7b15963110a049d50cdb5db99fc?access=%s", org3.Name, repo3.Name, token4) MakeRequest(t, req, http.StatusNotFound) } diff --git a/tests/integration/api_repo_hook_test.go b/tests/integration/api_repo_hook_test.go index e487d016a5..e34b3f80f9 100644 --- a/tests/integration/api_repo_hook_test.go +++ b/tests/integration/api_repo_hook_test.go @@ -27,7 +27,7 @@ func TestAPICreateHook(t *testing.T) { // user1 is an admin user session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/%s", owner.Name, maybeGroupSegment(repo.GroupID), repo.Name, "hooks"), api.CreateHookOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/%s", owner.Name, repo.Name, "hooks"), api.CreateHookOption{ Type: "gitea", Config: api.CreateHookOptionConfig{ "content_type": "json", diff --git a/tests/integration/api_repo_lfs_test.go b/tests/integration/api_repo_lfs_test.go index 1cc1ab2d1a..c0af1e77ca 100644 --- a/tests/integration/api_repo_lfs_test.go +++ b/tests/integration/api_repo_lfs_test.go @@ -61,7 +61,7 @@ func TestAPILFSMediaType(t *testing.T) { } func createLFSTestRepository(t *testing.T, repoName string) *repo_model.Repository { - ctx := NewAPITestContext(t, "user2", repoName, 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + 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, 0) diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index c43cb71a24..6b9cef58ae 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -399,7 +399,7 @@ func TestAPIRepoMigrateConflict(t *testing.T) { func testAPIRepoMigrateConflict(t *testing.T, u *url.URL) { username := "user2" - baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() @@ -484,7 +484,7 @@ func TestAPIRepoCreateConflict(t *testing.T) { func testAPIRepoCreateConflict(t *testing.T, u *url.URL) { username := "user2" - baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() @@ -553,7 +553,7 @@ func TestAPIRepoTransfer(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) session = loginUser(t, user.Name) token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &api.TransferRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer", repo.OwnerName, repo.Name), &api.TransferRepoOption{ NewOwner: testCase.newOwner, TeamIDs: testCase.teams, }).AddTokenAuth(token) @@ -584,7 +584,7 @@ func transfer(t *testing.T) *repo_model.Repository { DecodeJSON(t, resp, apiRepo) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: apiRepo.ID}) - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name), &api.TransferRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer", repo.OwnerName, repo.Name), &api.TransferRepoOption{ NewOwner: "user4", }).AddTokenAuth(token) MakeRequest(t, req, http.StatusCreated) @@ -600,7 +600,7 @@ func TestAPIAcceptTransfer(t *testing.T) { // try to accept with not authorized user session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/reject", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/reject", repo.OwnerName, repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -613,7 +613,7 @@ func TestAPIAcceptTransfer(t *testing.T) { session = loginUser(t, "user4") token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/accept", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/accept", repo.OwnerName, repo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusAccepted) apiRepo := new(api.Repository) @@ -629,7 +629,7 @@ func TestAPIRejectTransfer(t *testing.T) { // try to reject with not authorized user session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/reject", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). + req := NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/reject", repo.OwnerName, repo.Name)). AddTokenAuth(token) MakeRequest(t, req, http.StatusForbidden) @@ -642,7 +642,7 @@ func TestAPIRejectTransfer(t *testing.T) { session = loginUser(t, "user4") token = getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/transfer/reject", repo.OwnerName, maybeGroupSegment(repo.GroupID), repo.Name)). + req = NewRequest(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer/reject", repo.OwnerName, repo.Name)). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) apiRepo := new(api.Repository) @@ -661,7 +661,7 @@ func TestAPIGenerateRepo(t *testing.T) { // user repo := new(api.Repository) - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/generate", templateRepo.OwnerName, maybeGroupSegment(templateRepo.GroupID), templateRepo.Name), &api.GenerateRepoOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/generate", templateRepo.OwnerName, templateRepo.Name), &api.GenerateRepoOption{ Owner: user.Name, Name: "new-repo", Description: "test generate repo", @@ -674,7 +674,7 @@ func TestAPIGenerateRepo(t *testing.T) { assert.Equal(t, "new-repo", repo.Name) // org - req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/generate", templateRepo.OwnerName, maybeGroupSegment(templateRepo.GroupID), templateRepo.Name), &api.GenerateRepoOption{ + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/generate", templateRepo.OwnerName, templateRepo.Name), &api.GenerateRepoOption{ Owner: "org3", Name: "new-repo", Description: "test generate repo", @@ -694,7 +694,7 @@ func TestAPIRepoGetReviewers(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/reviewers", user.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/reviewers", user.Name, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) reviewers := DecodeJSON(t, resp, []*api.User{}) @@ -710,7 +710,7 @@ func TestAPIRepoGetAssignees(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s%s/assignees", user.Name, maybeGroupSegment(repo.GroupID), repo.Name). + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/assignees", user.Name, repo.Name). AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) assignees := DecodeJSON(t, resp, []*api.User{}) diff --git a/tests/integration/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go index 76fe09905f..d0e490d0c9 100644 --- a/tests/integration/api_repo_topic_test.go +++ b/tests/integration/api_repo_topic_test.go @@ -88,28 +88,28 @@ func TestAPIRepoTopic(t *testing.T) { token2 := getUserToken(t, user2.Name, auth_model.AccessTokenScopeWriteRepository) // Test read topics using login - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/topics", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name)). + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/topics", user2.Name, repo2.Name)). AddTokenAuth(token2) res := MakeRequest(t, req, http.StatusOK) topics := DecodeJSON(t, res, &api.TopicName{}) assert.ElementsMatch(t, []string{"topicname1", "topicname2"}, topics.TopicNames) // Test delete a topic - req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "Topicname1"). + req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "Topicname1"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // Test add an existing topic - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "Golang"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "Golang"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) // Test add a topic - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "topicName3"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "topicName3"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNoContent) - url := fmt.Sprintf("/api/v1/repos/%s/%s%s/topics", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name) + url := fmt.Sprintf("/api/v1/repos/%s/%s/topics", user2.Name, repo2.Name) // Test read topics using token req = NewRequest(t, "GET", url). @@ -162,12 +162,12 @@ func TestAPIRepoTopic(t *testing.T) { MakeRequest(t, req, http.StatusUnprocessableEntity) // Test add a topic when there is already maximum - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "t26"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "t26"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusUnprocessableEntity) // Test delete a topic that repo doesn't have - req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s%s/topics/%s", user2.Name, maybeGroupSegment(repo2.GroupID), repo2.Name, "Topicname1"). + req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/topics/%s", user2.Name, repo2.Name, "Topicname1"). AddTokenAuth(token2) MakeRequest(t, req, http.StatusNotFound) @@ -175,14 +175,14 @@ func TestAPIRepoTopic(t *testing.T) { token4 := getUserToken(t, user4.Name, auth_model.AccessTokenScopeWriteRepository) // Test read topics with write access - req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/topics", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/topics", org3.Name, repo3.Name)). AddTokenAuth(token4) res = MakeRequest(t, req, http.StatusOK) topics = DecodeJSON(t, res, &api.TopicName{}) assert.Empty(t, topics.TopicNames) // Test add a topic to repo with write access (requires repo admin access) - req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s%s/topics/%s", org3.Name, maybeGroupSegment(repo3.GroupID), repo3.Name, "topicName"). + req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s", org3.Name, repo3.Name, "topicName"). AddTokenAuth(token4) MakeRequest(t, req, http.StatusForbidden) } diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go index 1f237c1ce2..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 @@ -171,13 +171,13 @@ func TestCompareCodeExpand(t *testing.T) { assert.NoError(t, err) session := loginUser(t, user1.Name) - testEditFile(t, session, repo.GroupID, user1.Name, repo.Name, "main", "README.md", strings.Repeat("a\n", 30)) + testEditFile(t, session, user1.Name, repo.Name, "main", "README.md", strings.Repeat("a\n", 30)) user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session = loginUser(t, user2.Name) - testRepoFork(t, session, repo.GroupID, user1.Name, repo.Name, user2.Name, "test_blob_excerpt-fork", "") + testRepoFork(t, session, user1.Name, repo.Name, user2.Name, "test_blob_excerpt-fork", "") testCreateBranch(t, session, user2.Name, "test_blob_excerpt-fork", "branch/main", "forked-branch", http.StatusSeeOther) - testEditFile(t, session, repo.GroupID, user2.Name, "test_blob_excerpt-fork", "forked-branch", "README.md", strings.Repeat("a\n", 15)+"CHANGED\n"+strings.Repeat("a\n", 15)) + testEditFile(t, session, user2.Name, "test_blob_excerpt-fork", "forked-branch", "README.md", strings.Repeat("a\n", 15)+"CHANGED\n"+strings.Repeat("a\n", 15)) req := NewRequest(t, "GET", "/user1/test_blob_excerpt/compare/main...user2/test_blob_excerpt-fork:forked-branch") resp := session.MakeRequest(t, req, http.StatusOK) diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index c2ca0e8028..4a06159690 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -37,8 +37,8 @@ func TestEditor(t *testing.T) { t.Run("DiffPreview", testEditorDiffPreview) t.Run("CreateFile", testEditorCreateFile) t.Run("EditFile", func(t *testing.T) { - testEditFile(t, sessionUser2, 0, "user2", "repo1", "master", "README.md", "Hello, World (direct)\n") - testEditFileToNewBranch(t, sessionUser2, 0, "user2", "repo1", "master", "feature/test", "README.md", "Hello, World (commit-to-new-branch)\n") + testEditFile(t, sessionUser2, "user2", "repo1", "master", "README.md", "Hello, World (direct)\n") + testEditFileToNewBranch(t, sessionUser2, "user2", "repo1", "master", "feature/test", "README.md", "Hello, World (commit-to-new-branch)\n") }) t.Run("PatchFile", testEditorPatchFile) t.Run("DeleteFile", func(t *testing.T) { @@ -57,7 +57,7 @@ func TestEditor(t *testing.T) { func testEditorCreateFile(t *testing.T) { session := loginUser(t, "user2") - testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test.txt", "Content") + testCreateFile(t, session, "user2", "repo1", "master", "", "test.txt", "Content") testEditorActionPostRequestError(t, session, "/user2/repo1/_new/master/", map[string]string{ "tree_path": "test.txt", "commit_choice": "direct", @@ -70,12 +70,12 @@ func testEditorCreateFile(t *testing.T) { }, `Branch "master" already exists in this repository.`) } -func testCreateFile(t *testing.T, session *TestSession, groupID int64, user, repo, baseBranchName, newBranchName, filePath, content string) { +func testCreateFile(t *testing.T, session *TestSession, user, repo, baseBranchName, newBranchName, filePath, content string) { commitChoice := "direct" if newBranchName != "" && newBranchName != baseBranchName { commitChoice = "commit-to-new-branch" } - testEditorActionEdit(t, session, groupID, user, repo, "_new", baseBranchName, "", map[string]string{ + testEditorActionEdit(t, session, user, repo, "_new", baseBranchName, "", map[string]string{ "tree_path": filePath, "content": content, "commit_choice": commitChoice, @@ -118,28 +118,27 @@ func testEditorActionPostRequestError(t *testing.T, session *TestSession, reques assert.Equal(t, errorMessage, test.ParseJSONError(resp.Body.Bytes()).ErrorMessage) } -func testEditorActionEdit(t *testing.T, session *TestSession, groupID int64, user, repo, editorAction, branch, filePath string, params map[string]string) *httptest.ResponseRecorder { +func testEditorActionEdit(t *testing.T, session *TestSession, user, repo, editorAction, branch, filePath string, params map[string]string) *httptest.ResponseRecorder { params["tree_path"] = util.IfZero(params["tree_path"], filePath) newBranchName := util.Iif(params["commit_choice"] == "direct", branch, params["new_branch_name"]) - - resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s%s/%s/%s/%s", user, maybeGroupSegment(groupID), repo, editorAction, branch, filePath), params) + resp := testEditorActionPostRequest(t, session, fmt.Sprintf("/%s/%s/%s/%s/%s", user, repo, editorAction, branch, filePath), params) assert.Equal(t, http.StatusOK, resp.Code) assert.NotEmpty(t, test.RedirectURL(resp)) - req := NewRequest(t, "GET", "/"+path.Join(user, maybeGroupSegment(groupID), repo, "raw/branch", newBranchName, params["tree_path"])) + req := NewRequest(t, "GET", "/"+path.Join(user, repo, "raw/branch", newBranchName, params["tree_path"])) resp = session.MakeRequest(t, req, http.StatusOK) assert.Equal(t, params["content"], resp.Body.String()) return resp } -func testEditFile(t *testing.T, session *TestSession, groupID int64, user, repo, branch, filePath, newContent string) { - testEditorActionEdit(t, session, groupID, user, repo, "_edit", branch, filePath, map[string]string{ +func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePath, newContent string) { + testEditorActionEdit(t, session, user, repo, "_edit", branch, filePath, map[string]string{ "content": newContent, "commit_choice": "direct", }) } -func testEditFileToNewBranch(t *testing.T, session *TestSession, groupID int64, user, repo, branch, targetBranch, filePath, newContent string) { - testEditorActionEdit(t, session, groupID, user, repo, "_edit", branch, filePath, map[string]string{ +func testEditFileToNewBranch(t *testing.T, session *TestSession, user, repo, branch, targetBranch, filePath, newContent string) { + testEditorActionEdit(t, session, user, repo, "_edit", branch, filePath, map[string]string{ "content": newContent, "commit_choice": "commit-to-new-branch", "new_branch_name": targetBranch, diff --git a/tests/integration/eventsource_test.go b/tests/integration/eventsource_test.go index 47caf7f767..e0dbd0b23f 100644 --- a/tests/integration/eventsource_test.go +++ b/tests/integration/eventsource_test.go @@ -70,7 +70,7 @@ func TestEventSourceManagerRun(t *testing.T) { assert.Len(t, apiNL, 2) lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 <- only Notification 4 is in this filter ... - req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s%s/notifications?last_read_at=%s", user2.Name, maybeGroupSegment(repo1.GroupID), repo1.Name, lastReadAt)). + req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?last_read_at=%s", user2.Name, repo1.Name, lastReadAt)). AddTokenAuth(token) session.MakeRequest(t, req, http.StatusResetContent) diff --git a/tests/integration/git_general_test.go b/tests/integration/git_general_test.go index e249e0173d..25aa1ce38b 100644 --- a/tests/integration/git_general_test.go +++ b/tests/integration/git_general_test.go @@ -51,11 +51,11 @@ func TestGitGeneral(t *testing.T) { func testGitGeneral(t *testing.T, u *url.URL) { username := "user2" - baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() - forkedUserCtx := NewAPITestContext(t, "user4", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + forkedUserCtx := NewAPITestContext(t, "user4", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("HTTP", func(t *testing.T) { defer tests.PrintCurrentTest(t)() @@ -370,7 +370,7 @@ func generateCommitWithNewData(ctx context.Context, size int, repoPath, email, f func doCreateProtectedBranch(baseCtx *APITestContext, dstPath string) func(t *testing.T) { return func(t *testing.T) { defer tests.PrintCurrentTest(t)() - ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) t.Run("ProtectBranchWithFilePatterns", doProtectBranch(ctx, "release-*", baseCtx.Username, "", "", "config*")) @@ -401,7 +401,7 @@ func doBranchProtectPRMerge(baseCtx *APITestContext, dstPath string) func(t *tes t.Run("CreateBranchProtected", doGitCreateBranch(dstPath, "protected")) t.Run("PushProtectedBranch", doGitPushTestRepository(dstPath, "origin", "protected")) - ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) // Protect branch without any whitelisting t.Run("ProtectBranchNoWhitelist", doProtectBranch(ctx, "protected", "", "", "", "")) @@ -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, ctx.GroupID) + 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) @@ -700,9 +700,9 @@ func doAutoPRMerge(baseCtx *APITestContext, dstPath string) func(t *testing.T) { return func(t *testing.T) { defer tests.PrintCurrentTest(t)() - ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) - collaboratorCtx := NewAPITestContext(t, "user5", baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) - readOnlyCtx := NewAPITestContext(t, "user4", baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) + collaboratorCtx := NewAPITestContext(t, "user5", baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) + readOnlyCtx := NewAPITestContext(t, "user4", baseCtx.Reponame, auth_model.AccessTokenScopeWriteRepository) t.Run("AddAutoMergeCollaborator", doAPIAddCollaborator(*baseCtx, collaboratorCtx.Username, perm.AccessModeWrite)) t.Run("AddReadOnlyAutoMergeCollaborator", doAPIAddCollaborator(*baseCtx, readOnlyCtx.Username, perm.AccessModeRead)) @@ -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, ctx.GroupID) + 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/git_lfs_ssh_test.go b/tests/integration/git_lfs_ssh_test.go index 27cf72fd90..d2f34ef10b 100644 --- a/tests/integration/git_lfs_ssh_test.go +++ b/tests/integration/git_lfs_ssh_test.go @@ -27,7 +27,7 @@ func TestGitLFSSSH(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { localRepoForUpload := filepath.Join(t.TempDir(), "test-upload") localRepoForDownload := filepath.Join(t.TempDir(), "test-download") - apiTestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + apiTestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) var mu sync.Mutex var routerCalls []string diff --git a/tests/integration/git_misc_test.go b/tests/integration/git_misc_test.go index 5532b5d19f..c830086e3f 100644 --- a/tests/integration/git_misc_test.go +++ b/tests/integration/git_misc_test.go @@ -82,7 +82,7 @@ func TestDataAsyncDoubleRead_Issue29101(t *testing.T) { func TestAgitPullPush(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() u.User = url.UserPassword("user2", userPassword) @@ -145,7 +145,7 @@ func TestAgitPullPush(t *testing.T) { func TestAgitReviewStaleness(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() u.User = url.UserPassword("user2", userPassword) diff --git a/tests/integration/git_push_test.go b/tests/integration/git_push_test.go index 408c330ec4..5d54eaed12 100644 --- a/tests/integration/git_push_test.go +++ b/tests/integration/git_push_test.go @@ -201,7 +201,7 @@ func runTestGitPush(t *testing.T, u *url.URL, gitOperation func(t *testing.T, gi func TestPushPullRefs(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = baseAPITestContext.GitPath() u.User = url.UserPassword("user2", userPassword) diff --git a/tests/integration/git_ssh_redirect_test.go b/tests/integration/git_ssh_redirect_test.go index ee44866b9a..3ae2652412 100644 --- a/tests/integration/git_ssh_redirect_test.go +++ b/tests/integration/git_ssh_redirect_test.go @@ -20,7 +20,7 @@ func TestGitSSHRedirect(t *testing.T) { } func testGitSSHRedirect(t *testing.T, u *url.URL) { - apiTestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) + apiTestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) session := loginUser(t, "user2") withKeyFile(t, "my-testing-key", func(keyFile string) { @@ -56,7 +56,7 @@ func testGitSSHRedirect(t *testing.T, u *url.URL) { Name: "repo1", AutoInit: true, })(t) - testEditFile(t, session, 0, "olduser2", "repo1", "master", "README.md", "This is olduser2's repo1\n") + testEditFile(t, session, "olduser2", "repo1", "master", "README.md", "This is olduser2's repo1\n") dstDir := t.TempDir() t.Run("Clone", doGitClone(dstDir, cloneURL)) @@ -64,9 +64,9 @@ func testGitSSHRedirect(t *testing.T, u *url.URL) { assert.NoError(t, err) assert.Equal(t, "This is olduser2's repo1\n", string(readMEContent)) - apiTestContext2 := NewAPITestContext(t, "user2", "oldrepo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) + apiTestContext2 := NewAPITestContext(t, "user2", "oldrepo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteOrganization) doAPICreateRepository(apiTestContext2, false)(t) - testEditFile(t, session, 0, "user2", "oldrepo1", "master", "README.md", "This is user2's oldrepo1\n") + testEditFile(t, session, "user2", "oldrepo1", "master", "README.md", "This is user2's oldrepo1\n") dstDir = t.TempDir() cloneURL = createSSHUrl("user2/oldrepo1.git", u) diff --git a/tests/integration/gpg_ssh_git_test.go b/tests/integration/gpg_ssh_git_test.go index 589a639aa2..a8ec79cd9d 100644 --- a/tests/integration/gpg_ssh_git_test.go +++ b/tests/integration/gpg_ssh_git_test.go @@ -81,14 +81,14 @@ func TestSSHGit(t *testing.T) { func testGitSigning(t *testing.T) { username := "user2" user := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: username}) - baseAPITestContext := NewAPITestContext(t, username, "repo1", 0) + baseAPITestContext := NewAPITestContext(t, username, "repo1") onGiteaRun(t, func(t *testing.T, u *url.URL) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CheckMasterBranchUnsigned", doAPIGetBranch(testCtx, "master", func(t *testing.T, branch api.Branch) { assert.NotNil(t, branch.Commit) @@ -109,7 +109,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"parentsigned"} t.Run("Unsigned-Initial-CRUD-ParentSigned", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile( t, testCtx, user, "master", "parentsigned", "signed-parent.txt", func(t *testing.T, response api.FileResponse) { assert.False(t, response.Verification.Verified) @@ -123,7 +123,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"never"} t.Run("Unsigned-Initial-CRUD-Never", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-Never", crudActionCreateFile( t, testCtx, user, "parentsigned", "parentsigned-never", "unsigned-never2.txt", func(t *testing.T, response api.FileResponse) { assert.False(t, response.Verification.Verified) @@ -133,7 +133,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"always"} t.Run("Unsigned-Initial-CRUD-Always", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-Always", crudActionCreateFile( t, testCtx, user, "master", "always", "signed-always.txt", func(t *testing.T, response api.FileResponse) { require.NotNil(t, response.Verification, "no verification provided with response! %v", response) @@ -151,7 +151,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"parentsigned"} t.Run("Unsigned-Initial-CRUD-ParentSigned", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateCRUDFile-Always-ParentSigned", crudActionCreateFile( t, testCtx, user, "always", "always-parentsigned", "signed-always-parentsigned.txt", func(t *testing.T, response api.FileResponse) { require.NotNil(t, response.Verification, "no verification provided with response! %v", response) @@ -163,7 +163,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.InitialCommit = []string{"always"} t.Run("AlwaysSign-Initial", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CheckMasterBranchSigned", doAPIGetBranch(testCtx, "master", func(t *testing.T, branch api.Branch) { require.NotNil(t, branch.Commit, "no commit provided with branch! %v", branch) @@ -176,7 +176,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"never"} t.Run("AlwaysSign-Initial-CRUD-Never", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always-never", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always-never", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-Never", crudActionCreateFile( t, testCtx, user, "master", "never", "unsigned-never.txt", func(t *testing.T, response api.FileResponse) { @@ -187,7 +187,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"parentsigned"} t.Run("AlwaysSign-Initial-CRUD-ParentSigned-On-Always", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always-parent", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always-parent", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile( t, testCtx, user, "master", "parentsigned", "signed-parent.txt", func(t *testing.T, response api.FileResponse) { @@ -199,7 +199,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.CRUDActions = []string{"always"} t.Run("AlwaysSign-Initial-CRUD-Always", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-always-always", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-always-always", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-Always", crudActionCreateFile( t, testCtx, user, "master", "always", "signed-always.txt", func(t *testing.T, response api.FileResponse) { @@ -211,7 +211,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.Merges = []string{"commitssigned"} t.Run("UnsignedMerging", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreatePullRequest", func(t *testing.T) { pr, err := doAPICreatePullRequest(testCtx, testCtx.Username, testCtx.Reponame, "master", "never2")(t) assert.NoError(t, err) @@ -228,7 +228,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.Merges = []string{"basesigned"} t.Run("BaseSignedMerging", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreatePullRequest", func(t *testing.T) { pr, err := doAPICreatePullRequest(testCtx, testCtx.Username, testCtx.Reponame, "master", "parentsigned2")(t) assert.NoError(t, err) @@ -245,7 +245,7 @@ func testGitSigning(t *testing.T) { setting.Repository.Signing.Merges = []string{"commitssigned"} t.Run("CommitsSignedMerging", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - testCtx := NewAPITestContext(t, username, "initial-unsigned", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + testCtx := NewAPITestContext(t, username, "initial-unsigned", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) t.Run("CreatePullRequest", func(t *testing.T) { pr, err := doAPICreatePullRequest(testCtx, testCtx.Username, testCtx.Reponame, "master", "always-parentsigned")(t) assert.NoError(t, err) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 0f3280285a..ba15f8962e 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -445,19 +445,19 @@ func TestIssueRedirect(t *testing.T) { session := loginUser(t, "user2") // Test external tracker where style not set (shall default numeric) - req := NewRequest(t, "GET", "/org26/group/49/repo_external_tracker/issues/1") + req := NewRequest(t, "GET", "/org26/repo_external_tracker/issues/1") resp := session.MakeRequest(t, req, http.StatusSeeOther) assert.Equal(t, "https://tracker.com/org26/repo_external_tracker/issues/1", test.RedirectURL(resp)) // Test external tracker with numeric style - req = NewRequest(t, "GET", "/org26/group/53/repo_external_tracker_numeric/issues/1") + req = NewRequest(t, "GET", "/org26/repo_external_tracker_numeric/issues/1") resp = session.MakeRequest(t, req, http.StatusSeeOther) assert.Equal(t, "https://tracker.com/org26/repo_external_tracker_numeric/issues/1", test.RedirectURL(resp)) // Test external tracker with alphanumeric style (for a pull request) - req = NewRequest(t, "GET", "/org26/group/41/repo_external_tracker_alpha/issues/1") + req = NewRequest(t, "GET", "/org26/repo_external_tracker_alpha/issues/1") resp = session.MakeRequest(t, req, http.StatusSeeOther) - assert.Equal(t, "/org26/group/41/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) + assert.Equal(t, "/org26/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp)) // test to check that the PR redirection works if the issue unit is disabled // repo1 is a normal repository with issue unit enabled, visit issue 2(which is a pull request) diff --git a/tests/integration/migrate_test.go b/tests/integration/migrate_test.go index cbd425c608..613c5b9aca 100644 --- a/tests/integration/migrate_test.go +++ b/tests/integration/migrate_test.go @@ -99,7 +99,7 @@ func TestMigrateGiteaForm(t *testing.T) { migratedRepoName := "otherrepo" req = NewRequestWithValues(t, "POST", link, map[string]string{ "service": fmt.Sprintf("%d", structs.GiteaService), - "clone_addr": fmt.Sprintf("%s/%s%s", u, ownerName, repoName), + "clone_addr": fmt.Sprintf("%s%s/%s", u, ownerName, repoName), "auth_token": token, "issues": "on", "repo_name": migratedRepoName, diff --git a/tests/integration/oauth_test.go b/tests/integration/oauth_test.go index 230757a454..5ec5fa7dcd 100644 --- a/tests/integration/oauth_test.go +++ b/tests/integration/oauth_test.go @@ -810,10 +810,6 @@ func testOAuthGrantScopesReadRepositoryFailOrganization(t *testing.T) { FullRepoName: "user2/commitsonpr", Private: false, }, - { - FullRepoName: "user2/test_commit_revert", - Private: true, - }, } assert.Equal(t, reposExpected, reposCaptured) diff --git a/tests/integration/org_count_test.go b/tests/integration/org_count_test.go index e2ff1cdc58..6a2cf53ed4 100644 --- a/tests/integration/org_count_test.go +++ b/tests/integration/org_count_test.go @@ -27,7 +27,7 @@ func testOrgCounts(t *testing.T) { orgOwner := "user2" orgName := "testOrg" orgCollaborator := "user4" - ctx := NewAPITestContext(t, orgOwner, "repo1", 0, auth_model.AccessTokenScopeWriteOrganization) + ctx := NewAPITestContext(t, orgOwner, "repo1", auth_model.AccessTokenScopeWriteOrganization) var ownerCountRepos map[string]int var collabCountRepos map[string]int diff --git a/tests/integration/org_profile_test.go b/tests/integration/org_profile_test.go index 9bb8bdade2..69d7999bb9 100644 --- a/tests/integration/org_profile_test.go +++ b/tests/integration/org_profile_test.go @@ -38,7 +38,7 @@ func getCreateProfileReadmeFileOptions(content string) api.CreateFileOptions { func createTestProfile(t *testing.T, orgName, profileRepoName, readmeContent string) { isPrivate := profileRepoName == user.RepoNameProfilePrivate - ctx := NewAPITestContext(t, "user1", profileRepoName, 0, auth_model.AccessTokenScopeAll) + ctx := NewAPITestContext(t, "user1", profileRepoName, auth_model.AccessTokenScopeAll) session := loginUser(t, "user1") tokenAdmin := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index 0776f788eb..e34bc60635 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -70,27 +70,27 @@ func testLimitedOrg(t *testing.T) { // not logged-in user req := NewRequest(t, "GET", "/limited_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/limited_org/group/231/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/limited_org/group/221/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/private_repo_on_limited_org") MakeRequest(t, req, http.StatusNotFound) // login non-org member user session := loginUser(t, "user2") req = NewRequest(t, "GET", "/limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/group/231/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/group/221/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/private_repo_on_limited_org") session.MakeRequest(t, req, http.StatusNotFound) // site admin session = loginUser(t, "user1") req = NewRequest(t, "GET", "/limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/group/231/public_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/limited_org/group/221/private_repo_on_limited_org") + req = NewRequest(t, "GET", "/limited_org/private_repo_on_limited_org") session.MakeRequest(t, req, http.StatusOK) } @@ -98,36 +98,36 @@ func testPrivateOrg(t *testing.T) { // not logged-in user req := NewRequest(t, "GET", "/privated_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") MakeRequest(t, req, http.StatusNotFound) // login non-org member user session := loginUser(t, "user2") req = NewRequest(t, "GET", "/privated_org") session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) // non-org member who is collaborator on repo in private org session = loginUser(t, "user4") req = NewRequest(t, "GET", "/privated_org") session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") // colab of this repo + req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") // colab of this repo session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) // site admin session = loginUser(t, "user1") req = NewRequest(t, "GET", "/privated_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/privated_org/group/340/public_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") session.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", "/privated_org/group/352/private_repo_on_private_org") + req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusOK) } @@ -154,8 +154,6 @@ func testOrgRestrictedUser(t *testing.T) { // public_repo_on_private_org is a public repo on privated_org repoName := "public_repo_on_private_org" - repoGroup := 340 - // user29 is a restricted user who is not a member of the organization restrictedUser := "user29" @@ -166,7 +164,7 @@ func testOrgRestrictedUser(t *testing.T) { req := NewRequest(t, "GET", "/"+orgName) restrictedSession.MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", fmt.Sprintf("/%s/group/%d/%s", orgName, repoGroup, repoName)) + req = NewRequest(t, "GET", fmt.Sprintf("/%s/%s", orgName, repoName)) restrictedSession.MakeRequest(t, req, http.StatusNotFound) // Therefore create a read-only team @@ -201,7 +199,7 @@ func testOrgRestrictedUser(t *testing.T) { req = NewRequest(t, "GET", "/"+orgName) restrictedSession.MakeRequest(t, req, http.StatusOK) - req = NewRequest(t, "GET", fmt.Sprintf("/%s/%s%s", orgName, maybeGroupSegment(int64(repoGroup)), repoName)) + req = NewRequest(t, "GET", fmt.Sprintf("/%s/%s", orgName, repoName)) restrictedSession.MakeRequest(t, req, http.StatusOK) } diff --git a/tests/integration/privateactivity_test.go b/tests/integration/privateactivity_test.go index a7dfb332d3..4db483a074 100644 --- a/tests/integration/privateactivity_test.go +++ b/tests/integration/privateactivity_test.go @@ -35,7 +35,7 @@ func testPrivateActivityDoSomethingForActionEntries(t *testing.T) { session := loginUser(t, privateActivityTestUser) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s%s/issues?state=all", owner.Name, maybeGroupSegment(repoBefore.GroupID), repoBefore.Name) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues?state=all", owner.Name, repoBefore.Name) req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateIssueOption{ Body: "test", Title: "test", diff --git a/tests/integration/pull_comment_test.go b/tests/integration/pull_comment_test.go index e9eb1762cd..56ef9972ad 100644 --- a/tests/integration/pull_comment_test.go +++ b/tests/integration/pull_comment_test.go @@ -32,10 +32,10 @@ func testWaitForPullRequestStatus(t *testing.T, prIssue *issues_model.Issue, exp func testPullCommentRebase(t *testing.T, u *url.URL, session *TestSession) { testPRTitle := "Test PR for rebase comment" // make a change on forked branch - testEditFile(t, session, 0, "user1", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, "user1", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "test-branch/rebase", "test-branch/rebase", testPRTitle) // create a conflict on base repo branch - testEditFile(t, session, 0, "user2", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited Conflicted)\n") + testEditFile(t, session, "user2", "repo1", "test-branch/rebase", "README.md", "Hello, World (Edited Conflicted)\n") // Now the pull request status should be conflicted testWaitForPullRequestStatus(t, &issues_model.Issue{Title: testPRTitle}, issues_model.PullRequestStatusConflict) @@ -79,10 +79,10 @@ func testPullCommentRetarget(t *testing.T, _ *url.URL, session *TestSession) { // keep a non-conflict branch testCreateBranch(t, session, "user2", "repo1", "branch/test-branch/retarget", "test-branch/retarget-no-conflict", http.StatusSeeOther) // make a change on forked branch - testEditFile(t, session, 0, "user1", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, "user1", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "test-branch/retarget", "test-branch/retarget", testPRTitle) // create a conflict line on user2/repo1 README.md - testEditFile(t, session, 0, "user2", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited Conflicted)\n") + testEditFile(t, session, "user2", "repo1", "test-branch/retarget", "README.md", "Hello, World (Edited Conflicted)\n") // Now the pull request status should be conflicted prIssue := testWaitForPullRequestStatus(t, &issues_model.Issue{Title: testPRTitle}, issues_model.PullRequestStatusConflict) @@ -100,7 +100,7 @@ func TestPullComment(t *testing.T) { session := loginUser(t, "user1") testCreateBranch(t, session, "user2", "repo1", "branch/master", "test-branch/rebase", http.StatusSeeOther) testCreateBranch(t, session, "user2", "repo1", "branch/master", "test-branch/retarget", http.StatusSeeOther) - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") t.Run("RebaseComment", func(t *testing.T) { testPullCommentRebase(t, u, session) }) t.Run("RetargetComment", func(t *testing.T) { testPullCommentRetarget(t, u, session) }) diff --git a/tests/integration/pull_compare_test.go b/tests/integration/pull_compare_test.go index 9308876929..da00b3fd56 100644 --- a/tests/integration/pull_compare_test.go +++ b/tests/integration/pull_compare_test.go @@ -59,9 +59,9 @@ func TestPullCompare(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) - testEditFile(t, session, 0, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "master1", "This is a pull title") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -96,21 +96,20 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) { // user4 forks repo3 user4Session := loginUser(t, "user4") forkedRepoName := "user4-forked-repo3" - testRepoFork(t, user4Session, repo3.GroupID, repo3.OwnerName, repo3.Name, "user4", forkedRepoName, "") + testRepoFork(t, user4Session, repo3.OwnerName, repo3.Name, "user4", forkedRepoName, "") forkedRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user4", Name: forkedRepoName}) assert.True(t, forkedRepo.IsPrivate) // user4 creates a new branch and a PR - testEditFileToNewBranch(t, user4Session, 0, "user4", forkedRepoName, "master", "user4/update-readme", "README.md", "Hello, World\n(Edited by user4)\n") + testEditFileToNewBranch(t, user4Session, "user4", forkedRepoName, "master", "user4/update-readme", "README.md", "Hello, World\n(Edited by user4)\n") resp := testPullCreateDirectly(t, user4Session, createPullRequestOptions{ - BaseRepoOwner: repo3.OwnerName, - BaseRepoName: repo3.Name, - BaseRepoGroupID: repo3.GroupID, - BaseBranch: "master", - HeadRepoOwner: "user4", - HeadRepoName: forkedRepoName, - HeadBranch: "user4/update-readme", - Title: "PR for user4 forked repo3", + BaseRepoOwner: repo3.OwnerName, + BaseRepoName: repo3.Name, + BaseBranch: "master", + HeadRepoOwner: "user4", + HeadRepoName: forkedRepoName, + HeadBranch: "user4/update-readme", + Title: "PR for user4 forked repo3", }) prURL := test.RedirectURL(resp) diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index ceb0802de3..48e8c96d38 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -65,15 +65,14 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo string, toSel } type createPullRequestOptions struct { - BaseRepoOwner string - BaseRepoName string - BaseRepoGroupID int64 - BaseBranch string - HeadRepoOwner string - HeadRepoName string - HeadBranch string - Title string - ReviewerIDs string // comma-separated list of user IDs + BaseRepoOwner string + BaseRepoName string + BaseBranch string + HeadRepoOwner string + HeadRepoName string + HeadBranch string + Title string + ReviewerIDs string // comma-separated list of user IDs } func (opts createPullRequestOptions) IsValid() bool { @@ -94,7 +93,7 @@ func testPullCreateDirectly(t *testing.T, session *TestSession, opts createPullR headCompare = fmt.Sprintf("%s:%s", opts.HeadRepoOwner, opts.HeadBranch) } } - req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s%s/compare/%s...%s", opts.BaseRepoOwner, maybeGroupSegment(opts.BaseRepoGroupID), opts.BaseRepoName, opts.BaseBranch, headCompare)) + req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/compare/%s...%s", opts.BaseRepoOwner, opts.BaseRepoName, opts.BaseBranch, headCompare)) resp := session.MakeRequest(t, req, http.StatusOK) // Submit the form for creating the pull @@ -138,8 +137,8 @@ func testPullCreateFailure(t *testing.T, session *TestSession, baseRepoOwner, ba func TestPullCreate(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo1.NumPulls) assert.Equal(t, 3, repo1.NumOpenPulls) @@ -199,9 +198,9 @@ func TestPullBranchDelete(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) - testEditFile(t, session, 0, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, "user1", "repo1", "master1", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master1", "This is a pull title") // check the redirected URL @@ -235,11 +234,11 @@ Check if pull request can be created from base to the fork repository. func TestPullCreatePrFromBaseToFork(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { sessionFork := loginUser(t, "user1") - testRepoFork(t, sessionFork, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, sessionFork, "user2", "repo1", "user1", "repo1", "") // Edit base repository sessionBase := loginUser(t, "user2") - testEditFile(t, sessionBase, 0, "user2", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, sessionBase, "user2", "repo1", "master", "README.md", "Hello, World (Edited)\n") // Create a PR resp := testPullCreateDirectly(t, sessionFork, createPullRequestOptions{ @@ -346,7 +345,7 @@ func TestCreatePullRequestFromNestedOrgForks(t *testing.T) { func TestPullCreateParallel(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { sessionFork := loginUser(t, "user1") - testRepoFork(t, sessionFork, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, sessionFork, "user2", "repo1", "user1", "repo1", "") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo1.NumPulls) @@ -356,7 +355,7 @@ func TestPullCreateParallel(t *testing.T) { for i := range 5 { wg.Go(func() { branchName := fmt.Sprintf("new-branch-%d", i) - testEditFileToNewBranch(t, sessionFork, 0, "user1", "repo1", "master", branchName, "README.md", fmt.Sprintf("Hello, World (Edited) %d\n", i)) + testEditFileToNewBranch(t, sessionFork, "user1", "repo1", "master", branchName, "README.md", fmt.Sprintf("Hello, World (Edited) %d\n", i)) // Create a PR resp := testPullCreateDirectly(t, sessionFork, createPullRequestOptions{ @@ -428,7 +427,7 @@ func TestCreatePullWhenBlocked(t *testing.T) { // Setup // User1 forks repo1 from User2 sessionFork := loginUser(t, ForkOwner) - testRepoFork(t, sessionFork, 0, RepoOwner, "repo1", ForkOwner, "forkrepo1", "") + testRepoFork(t, sessionFork, RepoOwner, "repo1", ForkOwner, "forkrepo1", "") // 1. User2 blocks user1 // sessionBase := loginUser(t, "user2") @@ -442,7 +441,7 @@ func TestCreatePullWhenBlocked(t *testing.T) { MakeRequest(t, req, http.StatusNoContent) // 2. User1 adds changes to fork - testEditFile(t, sessionFork, 0, ForkOwner, "forkrepo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, sessionFork, ForkOwner, "forkrepo1", "master", "README.md", "Hello, World (Edited)\n") // 3. User1 attempts to create a pull request testPullCreateFailure(t, sessionFork, RepoOwner, "repo1", "master", ForkOwner, "forkrepo1", "master", "This is a pull title") diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index 0ef6e5bc76..8a94822de1 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -51,7 +51,7 @@ type MergeOptions struct { DeleteBranch bool } -func testPullMerge(t *testing.T, session *TestSession, user, repo string, groupID int64, pullNum string, mergeOptions MergeOptions) *httptest.ResponseRecorder { +func testPullMerge(t *testing.T, session *TestSession, user, repo, pullNum string, mergeOptions MergeOptions) *httptest.ResponseRecorder { options := map[string]string{ "do": string(mergeOptions.Style), "head_commit_id": mergeOptions.HeadCommitID, @@ -66,15 +66,10 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo string, groupI redirect := test.RedirectURL(resp) assert.Equal(t, fmt.Sprintf("/%s/%s/pulls/%s", user, repo, pullNum), redirect) - var groupSegment string - if groupID > 0 { - groupSegment = fmt.Sprintf("%d/", groupID) - } - assert.Equal(t, fmt.Sprintf("/%s/%s%s/pulls/%s", user, groupSegment, repo, pullNum), redirect) pullNumInt, err := strconv.ParseInt(pullNum, 10, 64) assert.NoError(t, err) - repository, err := repo_model.GetRepositoryByOwnerAndName(t.Context(), user, repo, groupID) + 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) @@ -117,8 +112,8 @@ func TestPullMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -132,7 +127,7 @@ func TestPullMerge(t *testing.T) { elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -149,8 +144,8 @@ func TestPullRebase(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -164,7 +159,7 @@ func TestPullRebase(t *testing.T) { elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleRebase, DeleteBranch: false, }) @@ -181,8 +176,8 @@ func TestPullRebaseMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -196,7 +191,7 @@ func TestPullRebaseMerge(t *testing.T) { elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleRebaseMerge, DeleteBranch: false, }) @@ -213,15 +208,15 @@ func TestPullSquash(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleSquash, DeleteBranch: false, }) @@ -234,9 +229,9 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { preparePullMergeWebhook(t, 1) session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -256,7 +251,7 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { assert.Equal(t, 4, repo.NumPulls) assert.Equal(t, 4, repo.NumOpenPulls) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleSquash, DeleteBranch: false, HeadCommitID: headBranch.CommitID, @@ -272,8 +267,8 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { func TestPullCleanUpAfterMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -288,7 +283,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { assert.Equal(t, 4, repo.NumPulls) assert.Equal(t, 4, repo.NumOpenPulls) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -318,8 +313,8 @@ func TestPullCleanUpAfterMerge(t *testing.T) { func TestCantMergeWorkInProgress(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "[wip] This is a pull title") @@ -334,9 +329,9 @@ func TestCantMergeWorkInProgress(t *testing.T) { func TestCantMergeConflict(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") // Use API to create a conflicting pr token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -376,8 +371,8 @@ func TestCantMergeConflict(t *testing.T) { func TestCantMergeUnrelated(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") // Now we want to create a commit on a branch that is totally unrelated to our current head // Drop down to pure code at this point @@ -440,7 +435,7 @@ func TestCantMergeUnrelated(t *testing.T) { RunStdString(t.Context()) assert.NoError(t, err) - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") // Use API to create a conflicting pr token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -468,8 +463,8 @@ func TestCantMergeUnrelated(t *testing.T) { func TestFastForwardOnlyMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "update", "README.md", "Hello, World 2\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "update", "README.md", "Hello, World 2\n") // Use API to create a pr from update to master token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -589,9 +584,9 @@ func TestFastForwardOnlyMergeWithRequiredSignedCommits(t *testing.T) { func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "diverging", "README.md", "Hello, World diverged\n") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World 2\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "diverging", "README.md", "Hello, World diverged\n") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World 2\n") // Use API to create a pr from diverging to update token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) @@ -626,9 +621,9 @@ func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { func TestPullRetargetChildOnBranchDelete(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testEditFileToNewBranch(t, session, 0, "user2", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n(Edited - TestPullRetargetOnCleanup - child PR)") + testEditFileToNewBranch(t, session, "user2", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n(Edited - TestPullRetargetOnCleanup - child PR)") respBasePR := testPullCreate(t, session, "user2", "repo1", true, "master", "base-pr", "Base Pull Request") elemBasePR := strings.Split(test.RedirectURL(respBasePR), "/") @@ -638,7 +633,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { elemChildPR := strings.Split(test.RedirectURL(respChildPR), "/") assert.Equal(t, "pulls", elemChildPR[3]) - testPullMerge(t, session, elemBasePR[1], elemBasePR[2], 0, elemBasePR[4], MergeOptions{ + testPullMerge(t, session, elemBasePR[1], elemBasePR[2], elemBasePR[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: true, }) @@ -663,9 +658,9 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n(Edited - TestPullDontRetargetChildOnWrongRepo - child PR)") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") + testEditFileToNewBranch(t, session, "user1", "repo1", "base-pr", "child-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n(Edited - TestPullDontRetargetChildOnWrongRepo - child PR)") respBasePR := testPullCreate(t, session, "user1", "repo1", false, "master", "base-pr", "Base Pull Request") elemBasePR := strings.Split(test.RedirectURL(respBasePR), "/") @@ -677,7 +672,7 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { defer test.MockVariableValue(&setting.Repository.PullRequest.RetargetChildrenOnMerge, false)() - testPullMerge(t, session, elemBasePR[1], elemBasePR[2], 0, elemBasePR[4], MergeOptions{ + testPullMerge(t, session, elemBasePR[1], elemBasePR[2], elemBasePR[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: true, }) @@ -703,8 +698,8 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { func TestPullRequestMergedWithNoPermissionDeleteBranch(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user4") - testRepoFork(t, session, 0, "user2", "repo1", "user4", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user4", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") + testRepoFork(t, session, "user2", "repo1", "user4", "repo1", "") + testEditFileToNewBranch(t, session, "user4", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") respBasePR := testPullCreate(t, session, "user4", "repo1", false, "master", "base-pr", "Base Pull Request") elemBasePR := strings.Split(test.RedirectURL(respBasePR), "/") @@ -712,7 +707,7 @@ func TestPullRequestMergedWithNoPermissionDeleteBranch(t *testing.T) { // user2 has no permission to delete branch of repo user1/repo1 session2 := loginUser(t, "user2") - testPullMerge(t, session2, elemBasePR[1], elemBasePR[2], 0, elemBasePR[4], MergeOptions{ + testPullMerge(t, session2, elemBasePR[1], elemBasePR[2], elemBasePR[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: true, }) @@ -728,8 +723,8 @@ func TestPullMergeIndexerNotifier(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { // create a pull request session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") createPullResp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "Indexer notifier test pull") assert.NoError(t, queue.GetManager().FlushAll(t.Context(), 0)) @@ -762,7 +757,7 @@ func TestPullMergeIndexerNotifier(t *testing.T) { // merge the pull request elem := strings.Split(test.RedirectURL(createPullResp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -790,8 +785,8 @@ func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) forkedName := "repo1-1" - testRepoFork(t, session, 0, "user2", "repo1", "user1", forkedName, "") - testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") + testEditFile(t, session, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", forkedName, false, "master", "master", "Indexer notifier test pull") baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -873,8 +868,8 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { forkUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 5}) forkSession := loginUser(t, "user5") forkedName := "repo1-fork" - testRepoFork(t, forkSession, 0, "user2", "repo1", forkUser.Name, forkedName, "") - testEditFile(t, forkSession, 0, forkUser.Name, forkedName, "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, forkSession, "user2", "repo1", forkUser.Name, forkedName, "") + testEditFile(t, forkSession, forkUser.Name, forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, forkSession, forkUser.Name, forkedName, false, "master", "master", "Indexer notifier test pull") baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -947,7 +942,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { func TestPullAutoMergeAfterCommitStatusSucceedAndApprovalForAgitFlow(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { // create a pull request - baseAPITestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) dstPath := t.TempDir() @@ -1060,8 +1055,8 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { // create a pull request session := loginUser(t, "user1") // FIXME: don't use admin user for testing forkedName := "repo1-1" - testRepoFork(t, session, 0, "user2", "repo1", "user1", forkedName, "") - testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") + testEditFile(t, session, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") testPullCreate(t, session, "user1", forkedName, false, "master", "master", "Indexer notifier test pull") baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -1099,13 +1094,13 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { func TestPullSquashMergeEmpty(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") // FIXME: don't use admin user for testing - testEditFileToNewBranch(t, session, 0, "user2", "repo1", "master", "pr-squash-empty", "README.md", "Hello, World (Edited)\n") + testEditFileToNewBranch(t, session, "user2", "repo1", "master", "pr-squash-empty", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user2", "repo1", false, "master", "pr-squash-empty", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - httpContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) dstPath := t.TempDir() u.Path = httpContext.GitPath() @@ -1121,7 +1116,7 @@ func TestPullSquashMergeEmpty(t *testing.T) { doGitPushTestRepository(dstPath)(t) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleSquash, DeleteBranch: false, }) diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index b13b36e322..b38a037870 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -220,15 +220,15 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { user2Session := loginUser(t, "user2") // Have user1 create a fork of repo1. - testRepoFork(t, user1Session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, user1Session, "user2", "repo1", "user1", "repo1", "") t.Run("Submit approve/reject review on merged PR", func(t *testing.T) { // Create a merged PR (made by user1) in the upstream repo1. - testEditFile(t, user1Session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testEditFile(t, user1Session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, user1Session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, user1Session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) @@ -242,7 +242,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { t.Run("Submit approve/reject review on closed PR", func(t *testing.T) { // Created a closed PR (made by user1) in the upstream repo1. - testEditFileToNewBranch(t, user1Session, 0, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Edited...again)\n") + testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Edited...again)\n") resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "a-test-branch", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) diff --git a/tests/integration/pull_status_test.go b/tests/integration/pull_status_test.go index 7cdf4ea36e..16b415c364 100644 --- a/tests/integration/pull_status_test.go +++ b/tests/integration/pull_status_test.go @@ -28,8 +28,8 @@ import ( func TestPullCreate_CommitStatus(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "status1", "README.md", "status1") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "status1", "README.md", "status1") req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", map[string]string{ @@ -70,7 +70,7 @@ func TestPullCreate_CommitStatus(t *testing.T) { commitstatus.CommitStatusWarning: "gitea-exclamation", } - testCtx := NewAPITestContext(t, "user1", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) + testCtx := NewAPITestContext(t, "user1", "repo1", auth_model.AccessTokenScopeWriteRepository) // Update commit status, and check if icon is updated as well for _, status := range statusList { @@ -116,9 +116,9 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { // so we need to have this meta commit also in develop branch. onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "status1", "README.md", "status1") - testEditFile(t, session, 0, "user1", "repo1", "status1", "README.md", "# repo1\n\nDescription for repo1") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "status1", "README.md", "status1") + testEditFile(t, session, "user1", "repo1", "status1", "README.md", "# repo1\n\nDescription for repo1") req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", map[string]string{ @@ -140,7 +140,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { func TestPullCreate_EmptyChangesWithSameCommits(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") testCreateBranch(t, session, "user1", "repo1", "branch/master", "status1", http.StatusSeeOther) req := NewRequestWithValues(t, "POST", "/user1/repo1/compare/master...status1", map[string]string{ @@ -197,7 +197,7 @@ func TestPullStatusDelayCheck(t *testing.T) { // when base branch changes, PR status should be updated, but it is inactive for long time, so no real check issue3, checkedPrID = run(t, func(t *testing.T) { - testEditFile(t, session, 0, "user2", "repo1", "master", "README.md", "new content 1") + testEditFile(t, session, "user2", "repo1", "master", "README.md", "new content 1") }) assert.Equal(t, issues.PullRequestStatusChecking, issue3.PullRequest.Status) assert.Zero(t, checkedPrID) @@ -213,7 +213,7 @@ func TestPullStatusDelayCheck(t *testing.T) { // when base branch changes, still so no real check issue3, checkedPrID = run(t, func(t *testing.T) { - testEditFile(t, session, 0, "user2", "repo1", "master", "README.md", "new content 2") + testEditFile(t, session, "user2", "repo1", "master", "README.md", "new content 2") }) assert.Equal(t, issues.PullRequestStatusChecking, issue3.PullRequest.Status) assert.Zero(t, checkedPrID) @@ -221,7 +221,7 @@ func TestPullStatusDelayCheck(t *testing.T) { // then allow to check PRs without delay, when base branch changes, the PRs will be checked setting.Repository.PullRequest.DelayCheckForInactiveDays = -1 issue3, checkedPrID = run(t, func(t *testing.T) { - testEditFile(t, session, 0, "user2", "repo1", "master", "README.md", "new content 3") + testEditFile(t, session, "user2", "repo1", "master", "README.md", "new content 3") }) assert.Equal(t, issues.PullRequestStatusChecking, issue3.PullRequest.Status) assert.Equal(t, issue3.PullRequest.ID, checkedPrID) diff --git a/tests/integration/repo_activity_test.go b/tests/integration/repo_activity_test.go index ee79cfcd39..7781fd0511 100644 --- a/tests/integration/repo_activity_test.go +++ b/tests/integration/repo_activity_test.go @@ -22,20 +22,20 @@ func TestRepoActivity(t *testing.T) { session := loginUser(t, "user1") // Create PRs (1 merged & 2 proposed) - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") - testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") + testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "This is a pull title") elem := strings.Split(test.RedirectURL(resp), "/") assert.Equal(t, "pulls", elem[3]) - testPullMerge(t, session, elem[1], elem[2], 0, elem[4], MergeOptions{ + testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{ Style: repo_model.MergeStyleMerge, DeleteBranch: false, }) - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feat/better_readme", "README.md", "Hello, World (Edited Again)\n") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feat/better_readme", "README.md", "Hello, World (Edited Again)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "feat/better_readme", "This is a pull title") - testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "feat/much_better_readme", "README.md", "Hello, World (Edited More)\n") + testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feat/much_better_readme", "README.md", "Hello, World (Edited More)\n") testPullCreate(t, session, "user1", "repo1", false, "master", "feat/much_better_readme", "This is a pull title") // Create issues (3 new issues) diff --git a/tests/integration/repo_branch_test.go b/tests/integration/repo_branch_test.go index 3bfe75aac1..792ffb6011 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -204,7 +204,7 @@ func prepareRepoPR(t *testing.T, baseSession, headSession *TestSession, baseRepo testCreateBranch(t, headSession, headRepo.OwnerName, headRepo.Name, "branch/new-commit", "merged-pr", http.StatusSeeOther) prID = testCreatePullToDefaultBranch(t, baseSession, baseRepo, headRepo, "merged-pr", "merged pr") testAPINewFile(t, headSession, headRepo.OwnerName, headRepo.Name, "merged-pr", fmt.Sprintf("new-commit-%s.txt", headRepo.Name), "new-commit") - testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, prID, MergeOptions{ + testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, prID, MergeOptions{ Style: repo_model.MergeStyleRebaseMerge, DeleteBranch: false, }) @@ -213,7 +213,7 @@ func prepareRepoPR(t *testing.T, baseSession, headSession *TestSession, baseRepo testCreateBranch(t, headSession, headRepo.OwnerName, headRepo.Name, "branch/new-commit", "merged-pr-deleted", http.StatusSeeOther) prID = testCreatePullToDefaultBranch(t, baseSession, baseRepo, headRepo, "merged-pr-deleted", "merged pr with deleted branch") testAPINewFile(t, headSession, headRepo.OwnerName, headRepo.Name, "merged-pr-deleted", fmt.Sprintf("new-commit-%s-2.txt", headRepo.Name), "new-commit") - testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, baseRepo.GroupID, prID, MergeOptions{ + testPullMerge(t, baseSession, baseRepo.OwnerName, baseRepo.Name, prID, MergeOptions{ Style: repo_model.MergeStyleRebaseMerge, DeleteBranch: true, }) @@ -241,7 +241,7 @@ func TestRecentlyPushedNewBranches(t *testing.T) { prepareRecentlyPushedBranchSpecialTest(t, user12Session, repo10, repo10) // create a fork repo in public org - testRepoFork(t, user12Session, repo10.GroupID, repo10.OwnerName, repo10.Name, "org25", "org25_fork_repo10", repo10.DefaultBranch) + testRepoFork(t, user12Session, repo10.OwnerName, repo10.Name, "org25", "org25_fork_repo10", repo10.DefaultBranch) orgPublicForkRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerID: 25, Name: "org25_fork_repo10"}) prepareRepoPR(t, user12Session, user12Session, repo10, orgPublicForkRepo) prepareRecentlyPushedBranchTest(t, user12Session, repo10, orgPublicForkRepo) diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index c36fa5a276..460a6cd812 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -183,7 +183,7 @@ func TestRepoCommitsStatusParallel(t *testing.T) { wg.Add(1) go func(parentT *testing.T, i int) { parentT.Run(fmt.Sprintf("ParallelCreateStatus_%d", i), func(t *testing.T) { - ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) doAPICreateCommitStatusTest(ctx, path.Base(commitURL), commitstatus.CommitStatusPending, "testci")(t) wg.Done() }) @@ -208,7 +208,7 @@ func TestRepoCommitsStatusMultiple(t *testing.T) { assert.NotEmpty(t, commitURL) // Call API to add status for commit - ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) t.Run("CreateStatus", doAPICreateCommitStatusTest(ctx, path.Base(commitURL), commitstatus.CommitStatusSuccess, "testci")) t.Run("CreateStatus", doAPICreateCommitStatusTest(ctx, path.Base(commitURL), commitstatus.CommitStatusSuccess, "other_context")) req = NewRequest(t, "GET", "/user2/repo1/commits/branch/master") diff --git a/tests/integration/repo_fork_test.go b/tests/integration/repo_fork_test.go index 88968a0415..fd6a0eac7a 100644 --- a/tests/integration/repo_fork_test.go +++ b/tests/integration/repo_fork_test.go @@ -21,15 +21,15 @@ import ( "github.com/stretchr/testify/assert" ) -func testRepoFork(t *testing.T, session *TestSession, groupID int64, ownerName, repoName, forkOwnerName, forkRepoName, forkBranch string) *httptest.ResponseRecorder { +func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkOwnerName, forkRepoName, forkBranch string) *httptest.ResponseRecorder { forkOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: forkOwnerName}) // Step0: check the existence of the to-fork repo - req := NewRequestf(t, "GET", "/%s/%s%s", forkOwnerName, maybeGroupSegment(groupID), forkRepoName) + req := NewRequestf(t, "GET", "/%s/%s", forkOwnerName, forkRepoName) session.MakeRequest(t, req, http.StatusNotFound) // Step1: go to the main page of repo - req = NewRequestf(t, "GET", "/%s/%s%s", ownerName, maybeGroupSegment(groupID), repoName) + req = NewRequestf(t, "GET", "/%s/%s", ownerName, repoName) resp := session.MakeRequest(t, req, http.StatusOK) // Step2: click the fork button @@ -63,13 +63,13 @@ func testRepoFork(t *testing.T, session *TestSession, groupID int64, ownerName, func TestRepoFork(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1", "") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1", "") } func TestRepoForkToOrg(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") - testRepoFork(t, session, 0, "user2", "repo1", "org3", "repo1", "") + testRepoFork(t, session, "user2", "repo1", "org3", "repo1", "") // Check that no more forking is allowed as user2 owns repository // and org3 organization that owner user2 is also now has forked this repository @@ -93,7 +93,7 @@ func TestForkListLimitedAndPrivateRepos(t *testing.T) { ownerTeam1, err := org_model.OrgFromUser(limitedOrg).GetOwnerTeam(t.Context()) assert.NoError(t, err) assert.NoError(t, org_service.AddTeamMember(t.Context(), ownerTeam1, user1)) - testRepoFork(t, user1Sess, 0, "user2", "repo1", limitedOrg.Name, "repo1", "") + testRepoFork(t, user1Sess, "user2", "repo1", limitedOrg.Name, "repo1", "") // fork to a private org user4Sess := loginUser(t, "user4") @@ -103,7 +103,7 @@ func TestForkListLimitedAndPrivateRepos(t *testing.T) { ownerTeam2, err := org_model.OrgFromUser(privateOrg).GetOwnerTeam(t.Context()) assert.NoError(t, err) assert.NoError(t, org_service.AddTeamMember(t.Context(), ownerTeam2, user4)) - testRepoFork(t, user4Sess, 0, "user2", "repo1", privateOrg.Name, "repo1", "") + testRepoFork(t, user4Sess, "user2", "repo1", privateOrg.Name, "repo1", "") t.Run("Anonymous", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/repo_merge_upstream_test.go b/tests/integration/repo_merge_upstream_test.go index c4eb63653e..e0e47e1a03 100644 --- a/tests/integration/repo_merge_upstream_test.go +++ b/tests/integration/repo_merge_upstream_test.go @@ -40,7 +40,7 @@ func TestRepoMergeUpstream(t *testing.T) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) // create a fork - req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s%s/forks", baseUser.Name, maybeGroupSegment(baseRepo.GroupID), baseRepo.Name), &api.CreateForkOption{ + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks", baseUser.Name, baseRepo.Name), &api.CreateForkOption{ Name: new("test-repo-fork"), }).AddTokenAuth(token) MakeRequest(t, req, http.StatusAccepted) diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index 87c069e873..eef83a794e 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -46,7 +46,7 @@ func TestCreateNewTagProtected(t *testing.T) { t.Run("Git", func(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - httpContext := NewAPITestContext(t, owner.Name, repo.Name, repo.GroupID) + httpContext := NewAPITestContext(t, owner.Name, repo.Name) dstPath := t.TempDir() @@ -66,7 +66,7 @@ func TestCreateNewTagProtected(t *testing.T) { t.Run("GitTagForce", func(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - httpContext := NewAPITestContext(t, owner.Name, repo.Name, repo.GroupID) + httpContext := NewAPITestContext(t, owner.Name, repo.Name) dstPath := t.TempDir() @@ -129,7 +129,7 @@ func TestRepushTag(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) - httpContext := NewAPITestContext(t, owner.Name, repo.Name, repo.GroupID) + httpContext := NewAPITestContext(t, owner.Name, repo.Name) dstPath := t.TempDir() diff --git a/tests/integration/repo_test.go b/tests/integration/repo_test.go index 4c77c7ea0e..cc560cb8cc 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -64,7 +64,7 @@ func testViewRepoPublic(t *testing.T) { assert.True(t, repoTopics.HasClass("repo-topic")) assert.True(t, repoSummary.HasClass("repository-menu")) - req = NewRequest(t, "GET", "/org3/group/129/repo3") + req = NewRequest(t, "GET", "/org3/repo3") MakeRequest(t, req, http.StatusNotFound) session = loginUser(t, "user1") @@ -74,7 +74,7 @@ func testViewRepoPublic(t *testing.T) { func testViewRepoWithCache(t *testing.T) { defer tests.PrintCurrentTest(t)() testView := func(t *testing.T) { - req := NewRequest(t, "GET", "/org3/group/129/repo3") + req := NewRequest(t, "GET", "/org3/repo3") session := loginUser(t, "user2") resp := session.MakeRequest(t, req, http.StatusOK) @@ -145,11 +145,11 @@ func testViewRepoWithCache(t *testing.T) { func testViewRepoPrivate(t *testing.T) { defer tests.PrintCurrentTest(t)() - req := NewRequest(t, "GET", "/org3/group/129/repo3") + req := NewRequest(t, "GET", "/org3/repo3") MakeRequest(t, req, http.StatusNotFound) t.Run("OrgMemberAccess", func(t *testing.T) { - req = NewRequest(t, "GET", "/org3/group/129/repo3") + req = NewRequest(t, "GET", "/org3/repo3") session := loginUser(t, "user4") resp := session.MakeRequest(t, req, http.StatusOK) assert.Contains(t, resp.Body.String(), `
Public Access`) // remove "anonymous read" - req = NewRequest(t, "POST", "/org3/group/129/repo3/settings/public_access") + req = NewRequest(t, "POST", "/org3/repo3/settings/public_access") session.MakeRequest(t, req, http.StatusSeeOther) // try to "anonymous read" (not found) - req = NewRequest(t, "GET", "/org3/group/129/repo3") + req = NewRequest(t, "GET", "/org3/repo3") MakeRequest(t, req, http.StatusNotFound) }) } @@ -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", generatedRepo.GroupID), 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", diff --git a/tests/integration/repo_watch_test.go b/tests/integration/repo_watch_test.go index e3ca8c1796..ef3028f293 100644 --- a/tests/integration/repo_watch_test.go +++ b/tests/integration/repo_watch_test.go @@ -18,7 +18,7 @@ func TestRepoWatch(t *testing.T) { setting.Service.AutoWatchOnChanges = true session := loginUser(t, "user2") unittest.AssertNotExistsBean(t, &repo_model.Watch{UserID: 2, RepoID: 3}) - testEditFile(t, session, 129, "org3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n") + testEditFile(t, session, "org3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n") unittest.AssertExistsAndLoadBean(t, &repo_model.Watch{UserID: 2, RepoID: 3, Mode: repo_model.WatchModeAuto}) }) } diff --git a/tests/integration/repo_webhook_test.go b/tests/integration/repo_webhook_test.go index 9f37a46e9f..12a11d45bd 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -68,7 +68,7 @@ func TestNewWebHookLink(t *testing.T) { } } -func testAPICreateWebhookForRepo(t *testing.T, session *TestSession, groupID int64, userName, repoName, url, event string, branchFilter ...string) { +func testAPICreateWebhookForRepo(t *testing.T, session *TestSession, userName, repoName, url, event string, branchFilter ...string) { token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeAll) var branchFilterString string if len(branchFilter) > 0 { @@ -157,10 +157,10 @@ func Test_WebhookCreate(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "create") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "create") // 2. trigger the webhook - testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) // 3. validate the webhook is triggered assert.Len(t, payloads, 1) @@ -189,10 +189,10 @@ func Test_WebhookDelete(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "delete") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "delete") // 2. trigger the webhook - testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) testAPIDeleteBranch(t, "master2", http.StatusNoContent) // 3. validate the webhook is triggered @@ -222,10 +222,10 @@ func Test_WebhookFork(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user1") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "fork") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "fork") // 2. trigger the webhook - testRepoFork(t, session, 0, "user2", "repo1", "user1", "repo1-fork", "master") + testRepoFork(t, session, "user2", "repo1", "user1", "repo1-fork", "master") // 3. validate the webhook is triggered assert.Equal(t, "fork", triggeredEvent) @@ -254,7 +254,7 @@ func Test_WebhookIssueComment(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issue_comment") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issue_comment") t.Run("create comment", func(t *testing.T) { // 2. trigger the webhook @@ -336,7 +336,7 @@ func Test_WebhookRelease(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "release") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "release") // 2. trigger the webhook createNewRelease(t, session, "/user2/repo1", "v0.0.99", "v0.0.99", false, false) @@ -369,10 +369,10 @@ func Test_WebhookPush(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "push") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push") // 2. trigger the webhook - testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") // 3. validate the webhook is triggered assert.Equal(t, "push", triggeredEvent) @@ -402,10 +402,10 @@ func Test_WebhookPushDevBranch(t *testing.T) { session := loginUser(t, "user2") // only for dev branch - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "push", "develop") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push", "develop") // 2. this should not trigger the webhook - testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") assert.Empty(t, triggeredEvent) assert.Empty(t, payloads) @@ -418,7 +418,7 @@ func Test_WebhookPushDevBranch(t *testing.T) { assert.NoError(t, err) // 3. trigger the webhook - testCreateFile(t, session, 0, "user2", "repo1", "develop", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "develop", "", "test_webhook_push.md", "# a test file for webhook push") afterCommitID, err := gitRepo.GetBranchCommitID("develop") assert.NoError(t, err) @@ -458,7 +458,7 @@ func Test_WebhookPushToNewBranch(t *testing.T) { session := loginUser(t, "user2") // only for dev branch - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "push", "new_branch") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push", "new_branch") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) gitRepo, err := gitrepo.OpenRepository(t.Context(), repo1) @@ -469,7 +469,7 @@ func Test_WebhookPushToNewBranch(t *testing.T) { assert.NoError(t, err) // 2. trigger the webhook - testCreateFile(t, session, 0, "user2", "repo1", "master", "new_branch", "test_webhook_push.md", "# a new push from new branch") + testCreateFile(t, session, "user2", "repo1", "master", "new_branch", "test_webhook_push.md", "# a new push from new branch") afterCommitID, err := gitRepo.GetBranchCommitID("new_branch") assert.NoError(t, err) @@ -509,7 +509,7 @@ func Test_WebhookIssue(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issues") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issues") // 2. trigger the webhook testNewIssue(t, session, "user2", "repo1", "Title1", "Description1") @@ -543,7 +543,7 @@ func Test_WebhookIssueDelete(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issues") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issues") issueURL := testNewIssue(t, session, "user2", "repo1", "Title1", "Description1") // 2. trigger the webhook @@ -580,7 +580,7 @@ func Test_WebhookIssueAssign(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "pull_request_assign") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "pull_request_assign") // 2. trigger the webhook, issue 2 is a pull request testIssueAssign(t, session, repo1.Link(), 2, user2.ID) @@ -614,7 +614,7 @@ func Test_WebhookIssueMilestone(t *testing.T) { // create a new webhook with special webhook for repo1 session := loginUser(t, "user2") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "issue_milestone") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "issue_milestone") t.Run("assign a milestone", func(t *testing.T) { // trigger the webhook @@ -683,7 +683,7 @@ func Test_WebhookPullRequest(t *testing.T) { }, http.StatusOK) defer provider.Close() - testCtx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeAll) + testCtx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeAll) // add user4 as collabrator so that it can be a reviewer doAPIAddCollaborator(testCtx, "user4", perm.AccessModeWrite)(t) @@ -692,9 +692,9 @@ func Test_WebhookPullRequest(t *testing.T) { sessionUser4 := loginUser(t, "user4") // ignore the possible review_requested event to keep the test deterministic - testAPICreateWebhookForRepo(t, sessionUser2, 0, "user2", "repo1", provider.URL(), "pull_request_only") + testAPICreateWebhookForRepo(t, sessionUser2, "user2", "repo1", provider.URL(), "pull_request_only") - testAPICreateBranch(t, sessionUser2, 0, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, sessionUser2, "user2", "repo1", "master", "master2", http.StatusCreated) // 2. trigger the webhook repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) testPullCreateDirectly(t, sessionUser4, createPullRequestOptions{ @@ -739,9 +739,9 @@ func Test_WebhookPullRequestDelete(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "pull_request") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "pull_request") - testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) issueURL := testCreatePullToDefaultBranch(t, session, repo1, repo1, "master2", "first pull request") @@ -778,10 +778,10 @@ func Test_WebhookPullRequestComment(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "pull_request_comment") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "pull_request_comment") // 2. trigger the webhook - testAPICreateBranch(t, session, 0, "user2", "repo1", "master", "master2", http.StatusCreated) + testAPICreateBranch(t, session, "user2", "repo1", "master", "master2", http.StatusCreated) repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) prID := testCreatePullToDefaultBranch(t, session, repo1, repo1, "master2", "first pull request") @@ -816,7 +816,7 @@ func Test_WebhookWiki(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "wiki") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "wiki") // 2. trigger the webhook testAPICreateWikiPage(t, session, "user2", "repo1", "Test Wiki Page", http.StatusCreated) @@ -922,7 +922,7 @@ func Test_WebhookStatus(t *testing.T) { // 1. create a new webhook with special webhook for repo1 session := loginUser(t, "user2") - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "status") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "status") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -932,7 +932,7 @@ func Test_WebhookStatus(t *testing.T) { assert.NoError(t, err) // 2. trigger the webhook - testCtx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeAll) + testCtx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeAll) // update a status for a commit via API doAPICreateCommitStatusTest(testCtx, commitID, commitstatus.CommitStatusSuccess, "testci")(t) @@ -966,7 +966,7 @@ func Test_WebhookStatus_NoWrongTrigger(t *testing.T) { testCreateWebhookForRepo(t, session, "gitea", "user2", "repo1", provider.URL(), "push_only") // 2. trigger the webhook with a push action - testCreateFile(t, session, 0, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") // 3. validate the webhook is triggered with right event assert.Equal(t, "push", trigger) @@ -995,7 +995,7 @@ func Test_WebhookWorkflowJob(t *testing.T) { session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", provider.URL(), "workflow_job") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "workflow_job") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1025,7 +1025,7 @@ jobs: - run: echo 'cmd 2' ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", repo1.GroupID, wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1187,7 +1187,7 @@ func testWorkflowRunEvents(t *testing.T, webhookData *workflowRunWebhook) { session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1266,7 +1266,7 @@ jobs: steps: - run: exit 0` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", 0, wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1312,7 +1312,7 @@ func testWorkflowRunEventsOnRerun(t *testing.T, webhookData *workflowRunWebhook) runners[i].registerAsRepoRunner(t, "user2", "repo1", fmt.Sprintf("mock-runner-%d", i), []string{"ubuntu-latest"}, false) } - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1391,7 +1391,7 @@ jobs: steps: - run: exit 0` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", 0, wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1483,7 +1483,7 @@ func testWorkflowRunEventsOnCancellingAbandonedRun(t *testing.T, webhookData *wo fmt.Sprintf("mock-runner-%d", i), []string{"ubuntu-latest"}, false) } - testAPICreateWebhookForRepo(t, session, 0, "user2", repoName, webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, "user2", repoName, webhookData.URL, "workflow_run") ctx := t.Context() gitRepo, err := gitrepo.OpenRepository(ctx, testRepo) @@ -1563,7 +1563,7 @@ jobs: - run: exit 0` opts := getWorkflowCreateFileOptions(user2, testRepo.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", repoName, 0, wfTreePath, opts) + createWorkflowFile(t, token, "user2", repoName, wfTreePath, opts) commitID, err := gitRepo.GetBranchCommitID(testRepo.DefaultBranch) assert.NoError(t, err) @@ -1700,7 +1700,7 @@ func testWebhookWorkflowRun(t *testing.T, webhookData *workflowRunWebhook) { session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1724,7 +1724,7 @@ jobs: steps: - run: echo 'test the webhook' `) - createWorkflowFile(t, token, "user2", "repo1", 0, ".gitea/workflows/dispatch.yml", opts) + createWorkflowFile(t, token, "user2", "repo1", ".gitea/workflows/dispatch.yml", opts) // 2.2 trigger the webhooks @@ -1746,7 +1746,7 @@ jobs: - run: echo 'cmd 2' ` opts = getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", repo1.GroupID, wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) @@ -1801,7 +1801,7 @@ func testWebhookWorkflowRunDepthLimit(t *testing.T, webhookData *workflowRunWebh session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - testAPICreateWebhookForRepo(t, session, 0, "user2", "repo1", webhookData.URL, "workflow_run") + testAPICreateWebhookForRepo(t, session, "user2", "repo1", webhookData.URL, "workflow_run") repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) @@ -1826,7 +1826,7 @@ jobs: - run: echo 'test the webhook' ` opts := getWorkflowCreateFileOptions(user2, repo1.DefaultBranch, "create "+wfTreePath, wfFileContent) - createWorkflowFile(t, token, "user2", "repo1", repo1.GroupID, wfTreePath, opts) + createWorkflowFile(t, token, "user2", "repo1", wfTreePath, opts) commitID, err := gitRepo1.GetBranchCommitID(repo1.DefaultBranch) assert.NoError(t, err) diff --git a/tests/integration/ssh_key_test.go b/tests/integration/ssh_key_test.go index 9679129455..1625dc3756 100644 --- a/tests/integration/ssh_key_test.go +++ b/tests/integration/ssh_key_test.go @@ -48,8 +48,8 @@ func TestPushDeployKeyOnEmptyRepo(t *testing.T) { func testPushDeployKeyOnEmptyRepo(t *testing.T, u *url.URL) { // OK login - ctx := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - ctxWithDeleteRepo := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctxWithDeleteRepo := NewAPITestContext(t, "user2", "deploy-key-empty-repo-1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) keyname := ctx.Reponame + "-push" u.Path = ctx.GitPath() @@ -92,8 +92,8 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { keyname := reponame + "-push" // OK login - ctx := NewAPITestContext(t, username, reponame, 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) - ctxWithDeleteRepo := NewAPITestContext(t, username, reponame, 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctx := NewAPITestContext(t, username, reponame, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + ctxWithDeleteRepo := NewAPITestContext(t, username, reponame, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) otherCtx := ctx otherCtx.Reponame = "ssh-key-test-repo-2" diff --git a/tests/integration/timetracking_test.go b/tests/integration/timetracking_test.go index cb16f9bb49..e4d8927856 100644 --- a/tests/integration/timetracking_test.go +++ b/tests/integration/timetracking_test.go @@ -20,24 +20,24 @@ func TestViewTimetrackingControls(t *testing.T) { t.Run("Exist", func(t *testing.T) { defer tests.PrintCurrentTest(t)() session := loginUser(t, "user2") - testViewTimetrackingControls(t, session, 0, "repo1", "1", true, "user2") + testViewTimetrackingControls(t, session, "user2", "repo1", "1", true) }) t.Run("Non-exist", func(t *testing.T) { defer tests.PrintCurrentTest(t)() session := loginUser(t, "user5") - testViewTimetrackingControls(t, session, 0, "repo1", "1", false, "user2") + testViewTimetrackingControls(t, session, "user2", "repo1", "1", false) }) t.Run("Disabled", func(t *testing.T) { defer tests.PrintCurrentTest(t)() session := loginUser(t, "user2") - testViewTimetrackingControls(t, session, 129, "repo3", "1", false, "org3") + testViewTimetrackingControls(t, session, "org3", "repo3", "1", false) }) } -func testViewTimetrackingControls(t *testing.T, session *TestSession, groupID int64, repo, issue string, canTrackTime bool, user string) { - req := NewRequest(t, "GET", "/"+path.Join(user, maybeGroupSegment(groupID), repo, "issues", issue)) +func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo, issue string, canTrackTime bool) { + req := NewRequest(t, "GET", "/"+path.Join(user, repo, "issues", issue)) resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) @@ -45,7 +45,7 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, groupID in AssertHTMLElement(t, htmlDoc, ".issue-start-time", canTrackTime) AssertHTMLElement(t, htmlDoc, ".issue-add-time", canTrackTime) - issueLink := "/" + path.Join(user, maybeGroupSegment(groupID), repo, "issues", issue) + issueLink := "/" + path.Join(user, repo, "issues", issue) reqStart := NewRequest(t, "POST", path.Join(issueLink, "times", "stopwatch", "start")) if canTrackTime { session.MakeRequest(t, reqStart, http.StatusOK) diff --git a/tests/integration/wiki_test.go b/tests/integration/wiki_test.go index c74560f4e4..5718156ffa 100644 --- a/tests/integration/wiki_test.go +++ b/tests/integration/wiki_test.go @@ -80,7 +80,7 @@ func Test_WikiClone(t *testing.T) { reponame := "repo1" wikiPath := username + "/" + reponame + ".wiki.git" keyname := "my-testing-key" - baseAPITestContext := NewAPITestContext(t, username, "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) + baseAPITestContext := NewAPITestContext(t, username, "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) u.Path = wikiPath diff --git a/tests/integration/workflow_run_api_check_test.go b/tests/integration/workflow_run_api_check_test.go index d8e42c7846..d7390b3ac1 100644 --- a/tests/integration/workflow_run_api_check_test.go +++ b/tests/integration/workflow_run_api_check_test.go @@ -27,7 +27,7 @@ func TestAPIWorkflowRun(t *testing.T) { testAPIWorkflowRunBasic(t, "/api/v1/orgs/org3/actions", "User1", 802, auth_model.AccessTokenScopeReadOrganization, auth_model.AccessTokenScopeReadRepository) }) t.Run("RepoRuns", func(t *testing.T) { - testAPIWorkflowRunBasic(t, "/api/v1/repos/org3/group/139/repo5/actions", "User2", 802, auth_model.AccessTokenScopeReadRepository) + testAPIWorkflowRunBasic(t, "/api/v1/repos/org3/repo5/actions", "User2", 802, auth_model.AccessTokenScopeReadRepository) }) } From ed516115e82d454be63510d47162e87c21d10341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 19 Dec 2025 18:07:27 -0500 Subject: [PATCH 169/218] refactor: update tests use the correct number of arguments when calling certain functions which take a group ID like `RepoPath` --- tests/integration/api_private_serv_test.go | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) 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) From 06cc8269875777e39a21275751da5fa3fcfe1e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 19 Dec 2025 19:01:12 -0500 Subject: [PATCH 170/218] refactor: update fixture items - add new org which owns all testing repo groups - create new repositories, teams and team units in this org --- models/fixtures/repo_group.yml | 12670 ++------------------------ models/fixtures/repo_group_team.yml | 174 +- models/fixtures/repo_group_unit.yml | 1382 +-- 3 files changed, 983 insertions(+), 13243 deletions(-) diff --git a/models/fixtures/repo_group.yml b/models/fixtures/repo_group.yml index c248870eaf..5e8095c13a 100644 --- a/models/fixtures/repo_group.yml +++ b/models/fixtures/repo_group.yml @@ -1,10 +1,6 @@ -- id: 1 - owner_id: 25 - owner_name: org25 - lower_name: group 1 - name: group 1 +- avatar: "" description: | - In his anyway it recently to horror. Company alas stream to the soon host. Out tensely to as spell his contrast. Today afterwards it board shower from are. Had hence whichever few alas man would. + Instance snarl wolf tomorrow none emerge occasionally. About end with whose themselves next grip. Tomorrow boxers help little other could cry. Several her out education who since Greek. Could apart under its he with this. \#\# Table of Contents - [Installation](\#installation) @@ -13,432 +9,208 @@ \#\# Installation '''bash - pip install TomatoInexpensive + pip install DurianSuccessful ''' \#\# Usage '''python - result = tomatoinexpensive.perform("funny request") - print("tomatoinexpensive result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 1 -- id: 2 - owner_id: 25 - owner_name: org25 - lower_name: group 2 - name: group 2 - description: | - These then painting government when each myself. One afterwards friendly upstairs inquire ourselves onto. Brilliance yet union each soon ours sometimes. Group host she you my pout under. Videotape gee under those shall these you. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/TomatoConfusing/MotionlessBlender - ''' - - \#\# Usage - '''go - result \:= MotionlessBlender.execute("playful alert") - fmt.Println("motionlessblender result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 2 -- id: 3 - owner_id: 25 - owner_name: org25 - lower_name: group 3 - name: group 3 - description: | - Now while them elsewhere congregation accordingly it. Energy around gun promise fact spin utterly. Yours each occur week monthly quarterly anything. He elated theirs American them army brace. How indeed daily some of sharply nobody. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LegumeEnergetic264 - ''' - - \#\# Usage - '''javascript - const result = legumeenergetic264.process("funny request"); - console.log("legumeenergetic264 result\:", "success"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 1 - sort_order: 1 -- id: 4 - owner_id: 25 - owner_name: org25 - lower_name: group 4 - name: group 4 - description: | - First aha that these finally summation understanding. Their well quarterly posse rainbow dizzying upset. Where substantial victoriously wearily whose eek for. Either about anything Barbadian across about weekly. Several theirs how first monthly later due. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install MysteriousKangaroo99 - ''' - - \#\# Usage - '''javascript - const result = mysteriouskangaroo99.execute("playful alert"); - console.log("mysteriouskangaroo99 result\:", "terminated"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 3 -- id: 5 - owner_id: 25 - owner_name: org25 - lower_name: group 5 - name: group 5 - description: | - Ours either today lot generally tablet finally. Consequently I their little it sari some. Daily boldly yikes Indonesian ourselves the foot. Here could of same page mine include. Everything Chinese catalog through of mine because. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GorgeousRestaurant - ''' - - \#\# Usage - '''python - result = gorgeousrestaurant.handle("quirky message") - print("gorgeousrestaurant result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 1 - sort_order: 2 -- id: 6 - owner_id: 25 - owner_name: org25 - lower_name: group 6 - name: group 6 - description: | - His them Einsteinian this why give himself. To its ourselves nobody safely ouch suddenly. Tonight being bunch link us herself bevy. Had his gossip purely work most still. Later whatever galaxy yourself play ours day. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PagodaShakeer - ''' - - \#\# Usage - '''javascript - const result = pagodashakeer.run("funny request"); - console.log("pagodashakeer result\:", "completed"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 3 - sort_order: 1 -- id: 7 - owner_id: 25 - owner_name: org25 - lower_name: group 7 - name: group 7 - description: | - Head are instance daringly mango want of. That now inside tomorrow clump his eek. Annually well yikes what his Turkmen convert. I who must calm how exaltation before. Ourselves now instance man towards give where. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install YellowPainter524 - ''' - - \#\# Usage - '''javascript - const result = yellowpainter524.execute("funny request"); - console.log("yellowpainter524 result\:", "terminated"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 5 - sort_order: 1 -- id: 8 - owner_id: 25 - owner_name: org25 - lower_name: group 8 - name: group 8 - description: | - Then several out neither he cast yay. Yourselves where Diabolical your nobody brass nest. I how your from because what as. Meanwhile anger dazzle nightly range Shakespearean doctor. As including everybody been as near wrap. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ImportantGorilla7 - ''' - - \#\# Usage - '''javascript - const result = importantgorilla7.run("quirky message"); - console.log("importantgorilla7 result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 1 - sort_order: 3 -- id: 9 - owner_id: 25 - owner_name: org25 - lower_name: group 9 - name: group 9 - description: | - Here nearly did within sometimes inside patrol. Huh that hers mine key videotape her. He softly her muddy yearly london day. Secondly Pacific alas the here last Taiwanese. Its soon when yesterday band at metal. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install AdventurousChest1 - ''' - - \#\# Usage - '''python - result = adventurouschest1.execute("funny request") - print("adventurouschest1 result\:", "completed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 4 -- id: 10 - owner_id: 25 - owner_name: org25 - lower_name: group 10 - name: group 10 - description: | - Had first that that gee gee additionally. Within respond tonight my her ourselves today. Constantly how one German that clap dizzying. Through appear onto warmth this there not. Each everybody these up firstly unless has. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LemonModern24 - ''' - - \#\# Usage - '''javascript - const result = lemonmodern24.execute("funny request"); - console.log("lemonmodern24 result\:", "unknown"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 5 - sort_order: 2 -- id: 11 - owner_id: 25 - owner_name: org25 - lower_name: group 11 - name: group 11 - description: | - Batch firstly too will these depending them. Of onion father sometimes cackle sternly forest. Shall electricity himself as rarely way climb. Him up very game firstly adventurous huh. Finnish whereas growth before yesterday off behind. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/TaxiReader/OutrageousFarm264 - ''' - - \#\# Usage - '''go - result \:= OutrageousFarm264.execute("whimsical story") - fmt.Println("outrageousfarm264 result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 5 - sort_order: 3 -- id: 12 - owner_id: 25 - owner_name: org25 - lower_name: group 12 - name: group 12 - description: | - Of certain since my indoors how stand. Tonight yet by government goodness normally host. Pretty anthology of from some kiss yearly. Number him yikes myself for still shiny. Above shall pack its way some constantly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/DonkeyOpener836/CleverCrow - ''' - - \#\# Usage - '''go - result \:= CleverCrow.run("lighthearted command") - fmt.Println("clevercrow result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 11 - sort_order: 1 -- id: 13 - owner_id: 25 - owner_name: org25 - lower_name: group 13 - name: group 13 - description: | - Group at mine for whose why everybody. Along whose of which I bush rarely. Regularly mob certain wad everybody which to. How jump in deceit belong bread employment. These Indian electricity does that how all. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/GauvaRideer/DistinctCastle - ''' - - \#\# Usage - '''go - result \:= DistinctCastle.run("quirky message") - fmt.Println("distinctcastle result\:", "success") + result = duriansuccessful.run("funny request") + print("duriansuccessful result\:", "success") ''' \#\# License GPL-3.0 + id: 1 + lower_name: group 1 + name: group 1 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 0 + sort_order: 2 + visibility: 0 +- avatar: "" + description: | + Which straw where addition onto lay infrequently. Brilliance far others dig we Iraqi through. In secondly them doctor it determination person. Onto tolerance me fully mirror everybody i.e.. This whoa pretty seriously infrequently buy i.e.. + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install WrongSister99 + ''' + + \#\# Usage + '''python + result = wrongsister99.handle("whimsical story") + print("wrongsister99 result\:", "completed") + ''' + + \#\# License + BSD-3-Clause + id: 2 + lower_name: group 2 + name: group 2 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 1 + sort_order: 2 + visibility: 1 +- avatar: "" + description: | + Of that later gang downstairs some it. Meanwhile wit in first my nobody however. Towards batch furthermore with of neatly might. Inside must Diabolical Norwegian which lie your. Never away quarterly yikes whose in funny. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install OrangeAgreeable + ''' + + \#\# Usage + '''javascript + const result = orangeagreeable.execute("quirky message"); + console.log("orangeagreeable result\:", "in progress"); + ''' + + \#\# License + ISC + id: 3 + lower_name: group 3 + name: group 3 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 0 + sort_order: 3 + visibility: 1 +- avatar: "" + description: | + Bravo there for each crowd gee purple. Hourly today divorce victorious Peruvian it out. Loudly emerge reluctantly monthly any those sorrow. Nest Antarctic does might grandfather candy finally. By Greek hers frightening party carrot from. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/ApricotClumsy/BilberryJealous + ''' + + \#\# Usage + '''go + result \:= BilberryJealous.handle("playful alert") + fmt.Println("bilberryjealous result\:", "success") + ''' + + \#\# License + Apache 2.0 + id: 4 + lower_name: group 4 + name: group 4 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 2 + sort_order: 2 visibility: 2 - avatar: "" +- avatar: "" + description: | + Left next me what number his dig. Annoyance ouch downstairs whose those government was. E.g. beauty neither yourself constantly did been. Cackle dizzying yourself why brass since whose. Yearly e.g. cut loudly nightly firstly her. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/FriendlyOyster203/GorgeousPhotographer + ''' + + \#\# Usage + '''go + result \:= GorgeousPhotographer.perform("quirky message") + fmt.Println("gorgeousphotographer result\:", "error") + ''' + + \#\# License + Apache 2.0 + id: 5 + lower_name: group 5 + name: group 5 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 3 + sort_order: 2 + visibility: 2 +- avatar: "" + description: | + Sedge phew you what may party key. Late normally my how were every hers. Brother yourselves finally theirs being frail town. Costa he usually theirs happiness that then. From Kazakh ours she why problem Turkmen. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install ApricotYellow527 + ''' + + \#\# Usage + '''javascript + const result = apricotyellow527.execute("whimsical story"); + console.log("apricotyellow527 result\:", "error"); + ''' + + \#\# License + MIT + id: 6 + lower_name: group 6 + name: group 6 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 0 + sort_order: 4 + visibility: 1 +- avatar: "" + description: | + Each company smell our hourly do since. Himself my herself rudely intensely read due. Full weekly will firstly cluster often alas. Daily galaxy order religion whole generation that. Party fortnightly game due whichever regularly yell. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install LimeFrail + ''' + + \#\# Usage + '''javascript + const result = limefrail.process("funny request"); + console.log("limefrail result\:", "terminated"); + ''' + + \#\# License + Apache 2.0 + id: 7 + lower_name: group 7 + name: group 7 + owner_id: 43 + owner_name: org-with-groups parent_group_id: 4 - sort_order: 1 -- id: 14 - owner_id: 25 - owner_name: org25 - lower_name: group 14 - name: group 14 - description: | - Each meanwhile hand joy love whoever weekly. Which yesterday of lastly furnish being me. Plant earlier few my finally had before. Unless monthly your gee begin by group. Fine in company French frequently give within. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install NeckShakeer0 - ''' - - \#\# Usage - '''python - result = neckshakeer0.run("playful alert") - print("neckshakeer0 result\:", "error") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 11 sort_order: 2 -- id: 15 - owner_id: 25 - owner_name: org25 - lower_name: group 15 - name: group 15 + visibility: 1 +- avatar: "" description: | - Who yours fight finally his dream back. I regularly follow annually that in bravo. Tibetan problem account regularly lag today scold. An wheat neither sing him anything hey. Had your each first nightly auspicious where. + That before this wait cry tomorrow cry. Hence lips them regularly could whenever when. Year album aloof numerous eat she way. Run of also contrast an whatever an. Where sing how surprise of her punctuation. \#\# Table of Contents - [Installation](\#installation) @@ -447,618 +219,28 @@ \#\# Installation '''js - npm install MelonImportant + npm install BlueberryAloof9 ''' \#\# Usage '''javascript - const result = melonimportant.handle("funny request"); - console.log("melonimportant result\:", "error"); + const result = blueberryaloof9.perform("funny request"); + console.log("blueberryaloof9 result\:", "completed"); ''' \#\# License GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 8 - sort_order: 1 -- id: 16 - owner_id: 25 - owner_name: org25 - lower_name: group 16 - name: group 16 - description: | - Near these almost she these without without. For listen of noise with conclude finally. Recklessly itself must highly we kill besides. Who mouse her realistic giraffe Gaussian racism. Pencil data some him hail then stand. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LycheeConfusing - ''' - - \#\# Usage - '''python - result = lycheeconfusing.handle("whimsical story") - print("lycheeconfusing result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 15 - sort_order: 1 -- id: 17 - owner_id: 25 - owner_name: org25 - lower_name: group 17 - name: group 17 - description: | - Under stand than designer hail their tough. Wisp being as yourselves labour he all. Salt ourselves government that off whose through. Constantly cautiously owing her then these hey. What in his including box those what. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install RedcurrantDull009 - ''' - - \#\# Usage - '''python - result = redcurrantdull009.handle("playful alert") - print("redcurrantdull009 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 12 - sort_order: 1 -- id: 18 - owner_id: 25 - owner_name: org25 - lower_name: group 18 - name: group 18 - description: | - Both these sternly how finally end by. Anyway from below next of filthy beautiful. How in annually eek to gently myself. Off but everything Thatcherite hedge notebook our. Nothing from than everything recently everybody problem. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install DisgustingMinnow - ''' - - \#\# Usage - '''javascript - const result = disgustingminnow.execute("whimsical story"); - console.log("disgustingminnow result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 2 - sort_order: 1 -- id: 19 - owner_id: 25 - owner_name: org25 - lower_name: group 19 - name: group 19 - description: | - Shall our American across fortnightly ourselves our. Brass in tomorrow itchy straightaway justice every. Summation then that someone that Chinese business. Someone has sink tonight packet inadequately than. That unless school how company busily other. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install DresserKisser - ''' - - \#\# Usage - '''python - result = dresserkisser.handle("quirky message") - print("dresserkisser result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 2 - sort_order: 2 -- id: 20 - owner_id: 25 - owner_name: org25 - lower_name: group 20 - name: group 20 - description: | - Result mob Jungian above nearly bunch there. His light answer last others vacate at. Sit those which tomorrow yearly here annually. Oops sand yearly drink are grammar secondly. Themselves lovely rather involve tomorrow tomorrow what. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WideShirt - ''' - - \#\# Usage - '''python - result = wideshirt.run("playful alert") - print("wideshirt result\:", "in progress") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 3 - sort_order: 2 -- id: 21 - owner_id: 25 - owner_name: org25 - lower_name: group 21 - name: group 21 - description: | - Often coat me fine huh covey completely. Ouch little whose as heart from theirs. His behind may sometimes could everything occasionally. Will us all whose along those munch. Few wow certain where where weight tonight. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/NectarineNice595/DelightfulWildebeest - ''' - - \#\# Usage - '''go - result \:= DelightfulWildebeest.perform("lighthearted command") - fmt.Println("delightfulwildebeest result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 14 - sort_order: 1 -- id: 22 - owner_id: 25 - owner_name: org25 - lower_name: group 22 - name: group 22 - description: | - Understimate her everything he modern nest without. At problem yearly loss my all determination. He there tonight us herself he life. His Peruvian thoroughly each next as what. Myself quarterly entirely which his my from. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SwimmingPoolEater27/CondemnedDinosaur - ''' - - \#\# Usage - '''go - result \:= CondemnedDinosaur.run("quirky message") - fmt.Println("condemneddinosaur result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 8 - sort_order: 2 -- id: 23 - owner_id: 25 - owner_name: org25 - lower_name: group 23 - name: group 23 - description: | - Shy I enough myself whose Pacific club. Company equally that you aloof fact generally. Next that lake why which liter other. Somebody buckles themselves in of many firstly. Murder off by absolutely wash town nobody. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install KangarooStacker - ''' - - \#\# Usage - '''python - result = kangaroostacker.process("playful alert") - print("kangaroostacker result\:", "unknown") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 9 - sort_order: 1 -- id: 24 - owner_id: 25 - owner_name: org25 - lower_name: group 24 - name: group 24 - description: | - Shall outside it of than yours these. So be next Mozartian a heavily brace. Yourself there paint hers tonight we pollution. Onto recline would red your hers anywhere. For near same anyone never appear fish. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GrumpyPrairieDog5 - ''' - - \#\# Usage - '''python - result = grumpyprairiedog5.execute("funny request") - print("grumpyprairiedog5 result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 22 - sort_order: 1 -- id: 25 - owner_id: 25 - owner_name: org25 - lower_name: group 25 - name: group 25 - description: | - Including frock where consist Senegalese virtually murder. Bother to its army till some by. Whose Shakespearean did might in her research. That mall murder normally stand Antarctic regularly. Door whoever instead each above secondly had. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CaneCrawler/ToughGrapes13 - ''' - - \#\# Usage - '''go - result \:= ToughGrapes13.handle("quirky message") - fmt.Println("toughgrapes13 result\:", "error") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 7 - sort_order: 1 -- id: 26 - owner_id: 25 - owner_name: org25 - lower_name: group 26 - name: group 26 - description: | - South nobody silence they from cloud transform. These these myself Einsteinian everyone someone therefore. Tribe beauty there sleep who what as. Congregation pack this out enlist monthly our. No lastly grip could hang our I. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PhysalisTense/PhysalisBusy383 - ''' - - \#\# Usage - '''go - result \:= PhysalisBusy383.perform("playful alert") - fmt.Println("physalisbusy383 result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 13 - sort_order: 1 -- id: 27 - owner_id: 25 - owner_name: org25 - lower_name: group 27 - name: group 27 - description: | - No little backwards just before your be. Bra off her should monthly wisdom why. African hmm gain who words itself oops. Fact obesity elsewhere flock these those he. Adorable hmm today insufficient horse generally behind. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PipeListener2 - ''' - - \#\# Usage - '''javascript - const result = pipelistener2.execute("lighthearted command"); - console.log("pipelistener2 result\:", "failed"); - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 2 - sort_order: 3 -- id: 28 - owner_id: 25 - owner_name: org25 - lower_name: group 28 - name: group 28 - description: | - Afterwards any some off meanwhile rapidly enough. By Greek now street sleepy up remove. Carry failure bread fairly troop his answer. A always life clap had why card. Sandals as hourly already deeply aha me. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PerfectCane - ''' - - \#\# Usage - '''python - result = perfectcane.execute("playful alert") - print("perfectcane result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 22 - sort_order: 2 -- id: 29 - owner_id: 25 - owner_name: org25 - lower_name: group 29 - name: group 29 - description: | - Wrack me off today class whose as. Of American theirs those since insert library. Anybody may from lastly quarterly that throughout. For unemployment are whose mob upstairs fortunately. What whom her tomorrow first few ours. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install EmbarrassedSheep - ''' - - \#\# Usage - '''python - result = embarrassedsheep.handle("lighthearted command") - print("embarrassedsheep result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 14 - sort_order: 2 -- id: 30 - owner_id: 25 - owner_name: org25 - lower_name: group 30 - name: group 30 - description: | - Cigarette part line first is few nightly. Where first none example him sock next. Confucian without those Kyrgyz seldom his that. They few us later moreover quarterly blushing. That Kyrgyz couch have am their spit. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WatermelonImpossible - ''' - - \#\# Usage - '''python - result = watermelonimpossible.run("quirky message") - print("watermelonimpossible result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" + id: 8 + lower_name: group 8 + name: group 8 + owner_id: 43 + owner_name: org-with-groups parent_group_id: 1 - sort_order: 4 -- id: 31 - owner_id: 26 - owner_name: org26 - lower_name: group 1 - name: group 1 - description: | - You whom bale where caravan veterinarian that. Weather then that for being outside disgusting. Mine she what party onto untie why. Another tomorrow what she previously him themselves. Monthly yet occasionally some him her daily. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install JoyousMonkey - ''' - - \#\# Usage - '''python - result = joyousmonkey.perform("playful alert") - print("joyousmonkey result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 5 -- id: 32 - owner_id: 26 - owner_name: org26 - lower_name: group 2 - name: group 2 - description: | - Drab which in occasionally apple congregation themselves. You an host from man he shall. To yourselves occasionally since monthly that power. We before late we your have obediently. His thing finally frequently joy dress end. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install KnightlyWoodchuck - ''' - - \#\# Usage - '''python - result = knightlywoodchuck.process("quirky message") - print("knightlywoodchuck result\:", "error") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 31 - sort_order: 1 -- id: 33 - owner_id: 26 - owner_name: org26 - lower_name: group 3 - name: group 3 - description: | - I after several when due remain in. Think any their these this with set. Then frequently sensibly hers hastily woman this. Elsewhere shower theirs above turkey safety horde. That with luxury this Kazakh that it. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/RedcurrantPowerless86/CurrantItchy - ''' - - \#\# Usage - '''go - result \:= CurrantItchy.handle("whimsical story") - fmt.Println("currantitchy result\:", "failed") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 31 - sort_order: 2 -- id: 34 - owner_id: 26 - owner_name: org26 - lower_name: group 4 - name: group 4 - description: | - Hmm key newspaper them rather for their. Cough formerly cut abundant huge back eek. Ourselves whom that your brace every monthly. Handle ours mine previously whenever few previously. Mustering into to I with off decidedly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install HungryToad - ''' - - \#\# Usage - '''javascript - const result = hungrytoad.perform("playful alert"); - console.log("hungrytoad result\:", "success"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 31 sort_order: 3 -- id: 35 - owner_id: 26 - owner_name: org26 - lower_name: group 5 - name: group 5 + visibility: 0 +- avatar: "" description: | - Whenever whose neither anxious generally this neither. Shall of somebody it party worrisome stack. Whichever these furthermore gladly group warmth might. Caravan chair those Barbadian theirs Nepalese knock. Tribe packet these he however those instance. + Viplate one painter seldom highly regiment for. Therefore without white pyramid man tomorrow these. E.g. moreover hourly of sedge e.g. it. Hence super besides throughout work a Atlantic. Yoga pause anything so what hey congregation. \#\# Table of Contents - [Installation](\#installation) @@ -1066,61 +248,479 @@ - [License](\#license) \#\# Installation - '''js - npm install GrapeEvil3 + '''go + go get github.com/TomatoCheerful/ProudBalloon ''' \#\# Usage - '''javascript - const result = grapeevil3.handle("funny request"); - console.log("grapeevil3 result\:", "in progress"); + '''go + result \:= ProudBalloon.run("funny request") + fmt.Println("proudballoon result\:", "failed") ''' \#\# License ISC + id: 9 + lower_name: group 9 + name: group 9 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 0 + sort_order: 5 + visibility: 2 +- avatar: "" + description: | + Ream advantage that what highly scarcely entertain. Without tiger soften basket that sternly Machiavellian. Garden American herself roughly world all these. Upon whole should crawl alas about whomever. Little himself the shall addition down disregard. + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PhysalisQueer/CurrantFrightening29 + ''' + + \#\# Usage + '''go + result \:= CurrantFrightening29.execute("quirky message") + fmt.Println("currantfrightening29 result\:", "success") + ''' + + \#\# License + ISC + id: 10 + lower_name: group 10 + name: group 10 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 6 + sort_order: 2 visibility: 1 - avatar: "" +- avatar: "" + description: | + Number to on whatever herself theirs single. Where under in this early enormously throughout. Out himself in mine it distinct annually. Who theirs by though most place Einsteinian. Hand the in that outside wow by. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/PlainBrass/RoadListener + ''' + + \#\# Usage + '''go + result \:= RoadListener.execute("funny request") + fmt.Println("roadlistener result\:", "terminated") + ''' + + \#\# License + BSD-3-Clause + id: 11 + lower_name: group 11 + name: group 11 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 6 + sort_order: 3 + visibility: 1 +- avatar: "" + description: | + Now staff whereas wisdom few to in. Exactly her belief he besides whom above. Because quarterly class greatly tea someone mother. Because day quarterly to later work nap. Several later any that regiment army anything. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HuckleberryEmbarrassed47/BlackberrySmiling + ''' + + \#\# Usage + '''go + result \:= BlackberrySmiling.execute("lighthearted command") + fmt.Println("blackberrysmiling result\:", "unknown") + ''' + + \#\# License + MIT + id: 12 + lower_name: group 12 + name: group 12 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 3 + sort_order: 3 + visibility: 1 +- avatar: "" + description: | + Daily year frantically sleep whose nevertheless according. Thing murder example between with back yesterday. Whoa when popcorn whoa being anthology now. Equipment for has Amazonian arrive whom who. To whichever Korean heap life our Swazi. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''bash + pip install CostumeKniter2 + ''' + + \#\# Usage + '''python + result = costumekniter2.perform("lighthearted command") + print("costumekniter2 result\:", "completed") + ''' + + \#\# License + Apache 2.0 + id: 13 + lower_name: group 13 + name: group 13 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 8 + sort_order: 2 + visibility: 0 +- avatar: "" + description: | + Equipment dive beautiful in either these monthly. Frequently phew could including how mourn these. Under in another what what tonight hers. As there formerly anything indoors yourself should. Ring whichever accordingly to for whenever frock. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install EnviousSkyscraper + ''' + + \#\# Usage + '''javascript + const result = enviousskyscraper.handle("playful alert"); + console.log("enviousskyscraper result\:", "success"); + ''' + + \#\# License + GPL-3.0 + id: 14 + lower_name: group 14 + name: group 14 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 8 + sort_order: 3 + visibility: 1 +- avatar: "" + description: | + Oil gain yourself several advice face which. Lie violently Icelandic paint been any phew. Virtually straightaway to where some gang place. She luggage nightly tonight who it movement. Jittery over out work seriously his am. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/DamsonRepelling/JumperSinger + ''' + + \#\# Usage + '''go + result \:= JumperSinger.run("quirky message") + fmt.Println("jumpersinger result\:", "failed") + ''' + + \#\# License + ISC + id: 15 + lower_name: group 15 + name: group 15 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 6 + sort_order: 4 + visibility: 1 +- avatar: "" + description: | + That enthusiastically furniture with she cup ours. In Balinese besides whoever courageous theirs bale. For just my me who finally inside. Are of fantastic himself gang how class. Me for to learn every every hourly. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/KiwiCondemned47/ExpensiveCow72 + ''' + + \#\# Usage + '''go + result \:= ExpensiveCow72.handle("whimsical story") + fmt.Println("expensivecow72 result\:", "in progress") + ''' + + \#\# License + ISC + id: 16 + lower_name: group 16 + name: group 16 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 13 + sort_order: 2 + visibility: 0 +- avatar: "" + description: | + Forest next stack thing ours lately his. Nervously to bouquet moreover anything enchanted our. From whatever covey huh so fully pleasant. Decidedly frequently anything you yesterday itself covey. Sew bunch sometimes slavery hey all armchair. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/CasinoCrawler/NervousMall + ''' + + \#\# Usage + '''go + result \:= NervousMall.execute("funny request") + fmt.Println("nervousmall result\:", "completed") + ''' + + \#\# License + GPL-3.0 + id: 17 + lower_name: group 17 + name: group 17 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 7 + sort_order: 2 + visibility: 0 +- avatar: "" + description: | + Listen ream them party him time so. Which there group in his conclude all. Before gee which now do in arrive. Why in for herself Canadian therefore which. Shout few from other they you in. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get bitbucket.org/MushyMouse8/AuspiciousButter + ''' + + \#\# Usage + '''go + result \:= AuspiciousButter.process("playful alert") + fmt.Println("auspiciousbutter result\:", "failed") + ''' + + \#\# License + MIT + id: 18 + lower_name: group 18 + name: group 18 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 8 + sort_order: 4 + visibility: 1 +- avatar: "" + description: | + Skip can today you shout in on. Hotel a already brother have victoriously their. Sit how yard cheerfully week what interrupt. Taiwanese but before bank they Finnish Iranian. Any wow everybody along on yourself brace. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/SariWiner/GrapefruitWandering29 + ''' + + \#\# Usage + '''go + result \:= GrapefruitWandering29.execute("whimsical story") + fmt.Println("grapefruitwandering29 result\:", "failed") + ''' + + \#\# License + MIT + id: 19 + lower_name: group 19 + name: group 19 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 10 + sort_order: 2 + visibility: 2 +- avatar: "" + description: | + In quarterly outside someone number pack fiction. Reel election these there itself archipelago should. Must because those truthfully when gather Taiwanese. Hastily hastily ever us range an ski. How that you courageous little film others. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/HouseBuyer97/HoneydewElated4 + ''' + + \#\# Usage + '''go + result \:= HoneydewElated4.handle("quirky message") + fmt.Println("honeydewelated4 result\:", "in progress") + ''' + + \#\# License + Apache 2.0 + id: 20 + lower_name: group 20 + name: group 20 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 6 + sort_order: 5 + visibility: 0 +- avatar: "" + description: | + What those his all Atlantean width Alpine. That every thoroughly is even of upon. Diabolical black eagerly to fortnightly who labour. Lastly task otherwise it problem through whatever. To each forest awful carelessly bird other. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get github.com/GoodBird/WatermelonDark0 + ''' + + \#\# Usage + '''go + result \:= WatermelonDark0.execute("funny request") + fmt.Println("watermelondark0 result\:", "terminated") + ''' + + \#\# License + ISC + id: 21 + lower_name: group 21 + name: group 21 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 13 + sort_order: 3 + visibility: 0 +- avatar: "" + description: | + There it to of rarely jumper also. That sometimes tonight also tonight persuade normally. Whom panda unload bale eek mine victoriously. Road shopping powerfully cluster an annually once. Whirl must few heavily sew throughout than. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''go + go get gitlab.com/BilberryPink25/ScissorsShakeer6 + ''' + + \#\# Usage + '''go + result \:= ScissorsShakeer6.handle("funny request") + fmt.Println("scissorsshakeer6 result\:", "unknown") + ''' + + \#\# License + Apache 2.0 + id: 22 + lower_name: group 22 + name: group 22 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 2 + sort_order: 3 + visibility: 0 +- avatar: "" + description: | + Light Aristotelian to e.g. behind on wait. Huh his aha stemmed herself otherwise rarely. Grammar why either why over whose gun. Late it conclude i.e. hers ouch our. It they over job soon were relaxation. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install TeacherRideer + ''' + + \#\# Usage + '''javascript + const result = teacherrideer.handle("playful alert"); + console.log("teacherrideer result\:", "success"); + ''' + + \#\# License + ISC + id: 23 + lower_name: group 23 + name: group 23 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 2 + sort_order: 4 + visibility: 2 +- avatar: "" + description: | + Of obedient daily which fortnightly herself my. Indeed sunshine your rise knock leap I. Alas am whose these weakly soak problem. Your soon yourselves nobody loosely exaltation enough. Around would that stemmed towards much frantic. + + \#\# Table of Contents + - [Installation](\#installation) + - [Usage](\#usage) + - [License](\#license) + + \#\# Installation + '''js + npm install PineappleWhite + ''' + + \#\# Usage + '''javascript + const result = pineapplewhite.execute("whimsical story"); + console.log("pineapplewhite result\:", "error"); + ''' + + \#\# License + GPL-3.0 + id: 24 + lower_name: group 24 + name: group 24 + owner_id: 43 + owner_name: org-with-groups parent_group_id: 0 sort_order: 6 -- id: 36 - owner_id: 26 - owner_name: org26 - lower_name: group 6 - name: group 6 + visibility: 0 +- avatar: "" description: | - Inadequately electricity nervously monthly lucky these pair. Cravat these that hourly fortunately later these. For but Darwinian smile must patrol i.e.. Book bottle kuban how day the these. Nightly host phew judge he neither e.g.. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/DullImpala/KidLaugher - ''' - - \#\# Usage - '''go - result \:= KidLaugher.handle("funny request") - fmt.Println("kidlaugher result\:", "terminated") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 35 - sort_order: 1 -- id: 37 - owner_id: 26 - owner_name: org26 - lower_name: group 7 - name: group 7 - description: | - Nevertheless include somebody cooker that now petrify. Can desk down chest monthly which itself. Build virtually that inside everything recline ours. Archipelago regiment Monacan firstly weekly American troubling. They Colombian out what gee whomever neither. + Those cast uptight those he after which. Incredibly her whose therefore Malagasy left though. Themselves after Antarctic cook chastise generation how. Acknowledge here annually punctuation of their understimate. Why message upon outside everyone many instead. \#\# Table of Contents - [Installation](\#installation) @@ -1129,556 +729,28 @@ \#\# Installation '''bash - pip install GauvaClimber3 + pip install GuavaCurios2 ''' \#\# Usage '''python - result = gauvaclimber3.handle("playful alert") - print("gauvaclimber3 result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 31 - sort_order: 4 -- id: 38 - owner_id: 26 - owner_name: org26 - lower_name: group 8 - name: group 8 - description: | - Fuel over in part an here he. All a Japanese terribly host why in. Formerly in were tribe it that his. May pouch next whisker whose elegance down. Might his since pronunciation stand really party. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ImportantDonkey - ''' - - \#\# Usage - '''javascript - const result = importantdonkey.perform("funny request"); - console.log("importantdonkey result\:", "failed"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 32 - sort_order: 1 -- id: 39 - owner_id: 26 - owner_name: org26 - lower_name: group 9 - name: group 9 - description: | - Barbadian it I monthly that down chair. These on at mine include who practically. Toothpaste whenever theirs mine wings that it. Today its hers though Sri-Lankan lastly important. Thing my cloud horde finally outcome can. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install JitteryModel - ''' - - \#\# Usage - '''javascript - const result = jitterymodel.execute("lighthearted command"); - console.log("jitterymodel result\:", "failed"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 35 - sort_order: 2 -- id: 40 - owner_id: 26 - owner_name: org26 - lower_name: group 10 - name: group 10 - description: | - Who joy an many generally rhythm time. Nobody alone whomever could where wash congregation. Joyously previously which nest where in woman. Week Congolese will has as full must. Additionally into us therefore whom tender also. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install DefiantNoise - ''' - - \#\# Usage - '''javascript - const result = defiantnoise.handle("funny request"); - console.log("defiantnoise result\:", "failed"); - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 7 -- id: 41 - owner_id: 26 - owner_name: org26 - lower_name: group 11 - name: group 11 - description: | - To seldom here look do you its. Education constantly backwards stack she these some. Which might besides tomorrow behind open indoors. Wow it alas phew careful is tonight. Gun information now did will garlic late. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/TerseTiger/PhysalisQuaint - ''' - - \#\# Usage - '''go - result \:= PhysalisQuaint.perform("playful alert") - fmt.Println("physalisquaint result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 34 - sort_order: 1 -- id: 42 - owner_id: 26 - owner_name: org26 - lower_name: group 12 - name: group 12 - description: | - Congregation it cook which accordingly wisp here. Nest painting staff none each weather it. Highly must bale do eye any hand. Might belong team stand including differs covey. Onion enough certain just nightly book very. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FaithfulCave - ''' - - \#\# Usage - '''python - result = faithfulcave.run("whimsical story") - print("faithfulcave result\:", "in progress") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 38 - sort_order: 1 -- id: 43 - owner_id: 26 - owner_name: org26 - lower_name: group 13 - name: group 13 - description: | - Sprint now now some some Cypriot instance. Far sorrow flock everyone meanwhile group we. Welsh peace frightening these relaxation recently most. I.e. one in either from them our. Him heap each life where about shower. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install RepulsivePotato - ''' - - \#\# Usage - '''javascript - const result = repulsivepotato.process("lighthearted command"); - console.log("repulsivepotato result\:", "terminated"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 31 - sort_order: 5 -- id: 44 - owner_id: 26 - owner_name: org26 - lower_name: group 14 - name: group 14 - description: | - Catch muddy above does yesterday many I. All her unless then other bunch shall. Is brace yearly seldom elsewhere throughout at. Monthly flock this as fortnightly just anything. Other ours scold quietly these for regularly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install EasyWildebeest - ''' - - \#\# Usage - '''javascript - const result = easywildebeest.run("funny request"); - console.log("easywildebeest result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 8 -- id: 45 - owner_id: 26 - owner_name: org26 - lower_name: group 15 - name: group 15 - description: | - Acknowledge away me there soon why for. Hmm as yesterday unless her they they. Corner car line smell toy where should. Differs so his gain ours colorful did. Painfully constantly for ouch few thing over. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/OutrageousDinosaur/BookstoreFighter - ''' - - \#\# Usage - '''go - result \:= BookstoreFighter.perform("playful alert") - fmt.Println("bookstorefighter result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 37 - sort_order: 1 -- id: 46 - owner_id: 26 - owner_name: org26 - lower_name: group 16 - name: group 16 - description: | - Am on out way into juice double. Foolishly Confucian time still next each outfit. Neither you most cut tickle then tightly. Him here have its you wow dig. Where several bless highly juicer whom his. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/MelonMuddy/AuntDiveer - ''' - - \#\# Usage - '''go - result \:= AuntDiveer.process("lighthearted command") - fmt.Println("auntdiveer result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 44 - sort_order: 1 -- id: 47 - owner_id: 26 - owner_name: org26 - lower_name: group 17 - name: group 17 - description: | - Whose boxers reel inside significant this thing. Away in finally finally yet my nearby. Hedge sandwich today our yours hurt edge. Far hourly theirs lastly therefore eat currency. Somebody work glamorous monthly accordingly him certain. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/RambutanDisgusting05/KiwiQueer - ''' - - \#\# Usage - '''go - result \:= KiwiQueer.handle("lighthearted command") - fmt.Println("kiwiqueer result\:", "success") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 36 - sort_order: 1 -- id: 48 - owner_id: 26 - owner_name: org26 - lower_name: group 18 - name: group 18 - description: | - Numerous could wisp when of you murder. Last normally crawl rudely seafood head lastly. The my slavery Pacific busily you his. Sometimes below lately poverty these deskpath on. Shoulder silently you live many great most. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PitayaHungry/DisgustingMango36 - ''' - - \#\# Usage - '''go - result \:= DisgustingMango36.perform("funny request") - fmt.Println("disgustingmango36 result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 37 - sort_order: 2 -- id: 49 - owner_id: 26 - owner_name: org26 - lower_name: group 19 - name: group 19 - description: | - Whose outcome for monthly widen of first. Previously yet we this in moreover on. Whom just fact tonight hourly up half. Joy Californian should bravely solemnly murder some. Rain your regularly in it read child. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install HilariousBrother - ''' - - \#\# Usage - '''javascript - const result = hilariousbrother.process("funny request"); - console.log("hilariousbrother result\:", "success"); + result = guavacurios2.perform("playful alert") + print("guavacurios2 result\:", "terminated") ''' \#\# License Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 44 - sort_order: 2 -- id: 50 - owner_id: 26 - owner_name: org26 - lower_name: group 20 - name: group 20 - description: | - Hence cough flock troupe group nap ouch. Off tomorrow hourly sufficient which string any. Quiver auspicious mob inquisitively block tea why. Throughout leave that sometimes hers which drag. Tonight within anyway fade this bale those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/VastJuicer16/AnxiousWombat2 - ''' - - \#\# Usage - '''go - result \:= AnxiousWombat2.handle("funny request") - fmt.Println("anxiouswombat2 result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 31 - sort_order: 6 -- id: 51 - owner_id: 26 - owner_name: org26 - lower_name: group 21 - name: group 21 - description: | - Quarterly upon party pipe early ahead hers. Each e.g. sleep begin late those about. Mushy out today couple her then earlier. Me which this whoever these most fight. We that though weekly many Mozartian those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PlantThinker59 - ''' - - \#\# Usage - '''python - result = plantthinker59.handle("whimsical story") - print("plantthinker59 result\:", "unknown") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 38 - sort_order: 2 -- id: 52 - owner_id: 26 - owner_name: org26 - lower_name: group 22 - name: group 22 - description: | - Example mustering late now i.e. that with. These determination joyously cap weight when yourselves. One powerless that viplate always brace spotted. Tomorrow Putinist Peruvian work yet bill that. Hand which it they it fortnightly these. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install StupidChicken - ''' - - \#\# Usage - '''python - result = stupidchicken.execute("playful alert") - print("stupidchicken result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 48 - sort_order: 1 -- id: 53 - owner_id: 26 - owner_name: org26 - lower_name: group 23 - name: group 23 - description: | - Woman others board recognise today where me. Pod by juice car any pack would. Lastly whichever where his someone medicine consequently. Give between interest his will laugh ream. Last seldom album was to that also. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install EnchantedRabbit - ''' - - \#\# Usage - '''python - result = enchantedrabbit.process("quirky message") - print("enchantedrabbit result\:", "success") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 41 - sort_order: 1 -- id: 54 - owner_id: 26 - owner_name: org26 - lower_name: group 24 - name: group 24 - description: | - Magic e.g. almost frequently itself always who. Empty I stormy was these somebody heavily. Yesterday until these elephant Confucian though which. Whose here aha yay tired grip next. Everybody since pack covey us that which. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/RambutanCrowded/ShortsThrower12 - ''' - - \#\# Usage - '''go - result \:= ShortsThrower12.handle("playful alert") - fmt.Println("shortsthrower12 result\:", "error") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 42 - sort_order: 1 -- id: 55 - owner_id: 26 - owner_name: org26 + id: 25 lower_name: group 25 name: group 25 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 15 + sort_order: 2 + visibility: 1 +- avatar: "" description: | - Ride when any then begin thought where. Itself i.e. accordingly to example us yourselves. Us our whoever what me though flour. Team our rather rather in can write. Frail themselves cry Iraqi mine shoes lot. + Furthermore theirs stand from extremely whoever respect. Everybody busily I ours where this from. Would room that swallow why smell than. So group were all equipment huh anybody. Is lastly comfort herself we some himself. \#\# Table of Contents - [Installation](\#installation) @@ -1686,30 +758,29 @@ - [License](\#license) \#\# Installation - '''bash - pip install ClumsyGnu055 + '''go + go get github.com/PuzzledWallet/CooperativeWaterBuffalo724 ''' \#\# Usage - '''python - result = clumsygnu055.process("quirky message") - print("clumsygnu055 result\:", "failed") + '''go + result \:= CooperativeWaterBuffalo724.run("funny request") + fmt.Println("cooperativewaterbuffalo724 result\:", "unknown") ''' \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 53 - sort_order: 1 -- id: 56 - owner_id: 26 - owner_name: org26 + BSD-3-Clause + id: 26 lower_name: group 26 name: group 26 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 17 + sort_order: 2 + visibility: 0 +- avatar: "" description: | - Which ours Lebanese who set each consequently. Group flock huge beneath care hers to. Other party him madly together everything climb. Ream several pack nightly conclude to panda. Spoon his outside without little anyone their. + Fork our already on Laotian whatever this. Than that now literature we that man. Indulge what theirs where include revolt exemplified. Revolt through none recently batch bale none. String already an what enough additionally meanwhile. \#\# Table of Contents - [Installation](\#installation) @@ -1717,30 +788,29 @@ - [License](\#license) \#\# Installation - '''go - go get github.com/ArchitectSnoreer/CheerfulWombat276 + '''bash + pip install BankFlyer ''' \#\# Usage - '''go - result \:= CheerfulWombat276.perform("playful alert") - fmt.Println("cheerfulwombat276 result\:", "terminated") + '''python + result = bankflyer.handle("funny request") + print("bankflyer result\:", "finished") ''' \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 43 - sort_order: 1 -- id: 57 - owner_id: 26 - owner_name: org26 + GPL-3.0 + id: 27 lower_name: group 27 name: group 27 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 21 + sort_order: 2 + visibility: 2 +- avatar: "" description: | - Anyone may annoyance away library whose Somali. That man grieving none which necklace that. Recline it now daughter nose luxuty to. Anxiously then what team tomorrow out wisp. Which in whose its pod eventually impossible. + Down over under host circumstances accordingly lastly. With for weekend nevertheless salt terribly several. Joyously since inside frequently aha oops apro. Down account yours a themselves yearly here. Your nervously secondly those before huge just. \#\# Table of Contents - [Installation](\#installation) @@ -1748,30 +818,29 @@ - [License](\#license) \#\# Installation - '''bash - pip install FeijoaEasy + '''js + npm install BonesPainter193 ''' \#\# Usage - '''python - result = feijoaeasy.process("funny request") - print("feijoaeasy result\:", "error") + '''javascript + const result = bonespainter193.execute("quirky message"); + console.log("bonespainter193 result\:", "completed"); ''' \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 36 - sort_order: 2 -- id: 58 - owner_id: 26 - owner_name: org26 + BSD-3-Clause + id: 28 lower_name: group 28 name: group 28 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 21 + sort_order: 3 + visibility: 2 +- avatar: "" description: | - Conditioner her were as anxiously opposite e.g.. Pen eek nevertheless Dutch gather will itself. Soon anywhere arrow she this purely ever. Animal there your might patrol she less. Annually at think judge whose yourself their. + Government have acknowledge violin strongly tomato Bismarckian. Troop one outside sleepy which he exactly. Earlier you yours to many e.g. she. Out their wow travel today these may. Orange so company sing ours upstairs lead. \#\# Table of Contents - [Installation](\#installation) @@ -1779,30 +848,29 @@ - [License](\#license) \#\# Installation - '''go - go get github.com/PencilClimber/RockMelonIll + '''bash + pip install OrangeElated ''' \#\# Usage - '''go - result \:= RockMelonIll.run("whimsical story") - fmt.Println("rockmelonill result\:", "terminated") + '''python + result = orangeelated.process("quirky message") + print("orangeelated result\:", "success") ''' \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 54 - sort_order: 1 -- id: 59 - owner_id: 26 - owner_name: org26 + Apache 2.0 + id: 29 lower_name: group 29 name: group 29 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 25 + sort_order: 2 + visibility: 0 +- avatar: "" description: | - Who yesterday what why repel building cheerfully. Today had you in to us yourselves. Yourselves she gang whoever e.g. nothing learn. Any where accordingly never even usually bunch. Hmm might childhood this regularly imitate those. + Suspiciously host off knightly am that her. Besides listen some these accident strongly his. Theirs ride early care terribly patrol next. Hundred shout orange now usually above whose. Up tomorrow joy jittery often then son. \#\# Table of Contents - [Installation](\#installation) @@ -1810,10281 +878,23 @@ - [License](\#license) \#\# Installation - '''bash - pip install VillaWasher75 + '''js + npm install VictoriousCookware ''' \#\# Usage - '''python - result = villawasher75.process("whimsical story") - print("villawasher75 result\:", "success") + '''javascript + const result = victoriouscookware.execute("lighthearted command"); + console.log("victoriouscookware result\:", "failed"); ''' \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 33 - sort_order: 1 -- id: 60 - owner_id: 26 - owner_name: org26 + GPL-3.0 + id: 30 lower_name: group 30 name: group 30 - description: | - Talk outcome those badly next enough lastly. Towards sunshine to that whose abundant lately. Somebody he on pronunciation must yourself explode. We these whichever though regiment murder inside. Gee moreover whom thing patience there so. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install DefiantLeg - ''' - - \#\# Usage - '''python - result = defiantleg.perform("whimsical story") - print("defiantleg result\:", "failed") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 31 - sort_order: 7 -- id: 61 - owner_id: 41 - owner_name: org41 - lower_name: group 1 - name: group 1 - description: | - What avoid range range ourselves by enormously. About up should differs every number ankle. Several nest what what besides including jump. Tomorrow lastly then how monthly who east. Off another year upon scold those the. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install TelevisionCooker - ''' - - \#\# Usage - '''python - result = televisioncooker.execute("funny request") - print("televisioncooker result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 9 -- id: 62 - owner_id: 41 - owner_name: org41 - lower_name: group 2 - name: group 2 - description: | - On I did do there how in. Differs this heap there Einsteinian far within. Half off open instance then stealthily here. What they straight me instance where no. Trip upstairs purely handsome catalog moreover link. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ApricotObnoxious812/CheerfulVeterinarian35 - ''' - - \#\# Usage - '''go - result \:= CheerfulVeterinarian35.perform("playful alert") - fmt.Println("cheerfulveterinarian35 result\:", "failed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 61 - sort_order: 1 -- id: 63 - owner_id: 41 - owner_name: org41 - lower_name: group 3 - name: group 3 - description: | - Will scarcely provided finally his ever is. German child are school i.e. am from. Here week how day never day smell. On something been wit varied themselves outside. Outside then virtually few crib indeed full. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/MusicCuter07/StormyTomato - ''' - - \#\# Usage - '''go - result \:= StormyTomato.run("whimsical story") - fmt.Println("stormytomato result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 10 -- id: 64 - owner_id: 41 - owner_name: org41 - lower_name: group 4 - name: group 4 - description: | - Contrast harvest of his nightly vacate climb. English talk you behind leave that firstly. Result in us above is tomorrow hug. Why videotape cackle near through quarterly daughter. Company yesterday you sharply sometimes in which. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SoreCane1 - ''' - - \#\# Usage - '''python - result = sorecane1.process("quirky message") - print("sorecane1 result\:", "success") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 11 -- id: 65 - owner_id: 41 - owner_name: org41 - lower_name: group 5 - name: group 5 - description: | - Walk fact sleep shall quite pollution besides. Week whose either kindness earlier yet few. Lately how stress may just up stand. Troop airport there that herself cloud himself. Team of Atlantic tomorrow Dutch everyone conclude. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install HoneydewArrogant - ''' - - \#\# Usage - '''python - result = honeydewarrogant.handle("lighthearted command") - print("honeydewarrogant result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 64 - sort_order: 1 -- id: 66 - owner_id: 41 - owner_name: org41 - lower_name: group 6 - name: group 6 - description: | - I.e. i.e. battle comb here other most. We on faithfully anything him innocently hers. Fatally itself how body those were occasionally. Tie who hers person gun that fiction. Those whose to yay rarely that orange. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/DateHappy413/ToyDiger6 - ''' - - \#\# Usage - '''go - result \:= ToyDiger6.perform("lighthearted command") - fmt.Println("toydiger6 result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 63 - sort_order: 1 -- id: 67 - owner_id: 41 - owner_name: org41 - lower_name: group 7 - name: group 7 - description: | - When powerless Senegalese how hundreds sleep whom. Why we since does finally week hence. Fact how me theirs hourly to freedom. His single murder that Finnish estate ourselves. Therefore occasionally whichever hmm they about horror. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ElatedNewspaper - ''' - - \#\# Usage - '''javascript - const result = elatednewspaper.execute("funny request"); - console.log("elatednewspaper result\:", "in progress"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 66 - sort_order: 1 -- id: 68 - owner_id: 41 - owner_name: org41 - lower_name: group 8 - name: group 8 - description: | - One those this our will substantial upon. Agree our bird finally obediently there violently. Mine drink example it since hey what. Nobody yet father any conclude eek daily. Group of mourn had additionally then conclude. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FrighteningServal874 - ''' - - \#\# Usage - '''python - result = frighteningserval874.process("whimsical story") - print("frighteningserval874 result\:", "failed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 63 - sort_order: 2 -- id: 69 - owner_id: 41 - owner_name: org41 - lower_name: group 9 - name: group 9 - description: | - Troupe tomorrow regularly why without videotape case. Our gold truthfully that infrequently bow look. Other thing circumstances where example mustering watch. Whom world how down finally case their. Group murder reassure sprint we this earlier. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/WatermelonDelightful/GlassesCryer983 - ''' - - \#\# Usage - '''go - result \:= GlassesCryer983.handle("lighthearted command") - fmt.Println("glassescryer983 result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 62 - sort_order: 1 -- id: 70 - owner_id: 41 - owner_name: org41 - lower_name: group 10 - name: group 10 - description: | - Research publicity climb that eek about muster. Air everyone is yourselves tonight monthly fact. Somebody holiday few that Afghan later his. Read chicken flock dynasty life before opposite. Ring what Philippine then mine many brother. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install BlackcurrantRed83 - ''' - - \#\# Usage - '''python - result = blackcurrantred83.handle("whimsical story") - print("blackcurrantred83 result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 61 - sort_order: 2 -- id: 71 - owner_id: 41 - owner_name: org41 - lower_name: group 11 - name: group 11 - description: | - Mysteriously anybody up weekly them album pray. Laugh that red to transform whirl a. Nothing whoa poised pack in what because. Greatly whose hail formerly trend today open. Pasta week its them eye some these. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HilariousGorilla/ClementineMysterious - ''' - - \#\# Usage - '''go - result \:= ClementineMysterious.perform("funny request") - fmt.Println("clementinemysterious result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 64 - sort_order: 2 -- id: 72 - owner_id: 41 - owner_name: org41 - lower_name: group 12 - name: group 12 - description: | - Would up theirs how fine me when. Gallop who those anxiously whatever ski conclude. Troupe fall you vanish vanish number moreover. Over some cost are am yikes another. Wildly you select therefore host yours cast. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FineSheep679 - ''' - - \#\# Usage - '''python - result = finesheep679.execute("funny request") - print("finesheep679 result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 68 - sort_order: 1 -- id: 73 - owner_id: 41 - owner_name: org41 - lower_name: group 13 - name: group 13 - description: | - Monthly greatly next inexpensive whomever what I. Within company whose his what yet deceive. All whichever at hourly there my your. Weekly her one us anyone deliberately luxury. Huge on all line outfit conclude as. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HostOpener/LemonyGasStation - ''' - - \#\# Usage - '''go - result \:= LemonyGasStation.handle("lighthearted command") - fmt.Println("lemonygasstation result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 67 - sort_order: 1 -- id: 74 - owner_id: 41 - owner_name: org41 - lower_name: group 14 - name: group 14 - description: | - Yours you fine late me viplate eat. Since these then no delightful today lately. Economics her himself Belgian I then themselves. Way execute must roughly aha anybody most. Flock gracefully all sometimes throughout bookstore hence. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install OnionCuter - ''' - - \#\# Usage - '''javascript - const result = onioncuter.perform("lighthearted command"); - console.log("onioncuter result\:", "failed"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 70 - sort_order: 1 -- id: 75 - owner_id: 41 - owner_name: org41 - lower_name: group 15 - name: group 15 - description: | - Several day woman being limp fleet this. Are intensely honour Turkish him happiness of. Quarterly someone that which as recently alone. Myself today besides few hers marriage insufficient. How near us sedge a since speedily. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SkirtDreamer/OrangeSweater - ''' - - \#\# Usage - '''go - result \:= OrangeSweater.perform("playful alert") - fmt.Println("orangesweater result\:", "finished") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 73 - sort_order: 1 -- id: 76 - owner_id: 41 - owner_name: org41 - lower_name: group 16 - name: group 16 - description: | - Promise no grieving reel its yay besides. Lately slide that of in mob several. It with yet ball bill so what. This anyway whom week anybody hmm firstly. Upstairs how constantly whoever will happiness pleasure. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ElephantClimber0/PhysalisWitty - ''' - - \#\# Usage - '''go - result \:= PhysalisWitty.process("lighthearted command") - fmt.Println("physaliswitty result\:", "failed") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 63 + owner_id: 43 + owner_name: org-with-groups + parent_group_id: 15 sort_order: 3 -- id: 77 - owner_id: 41 - owner_name: org41 - lower_name: group 17 - name: group 17 - description: | - Yet for whose are Christian yikes as. The swing from in without firstly i.e.. Stay fortnightly Christian of yourselves murder one. Patrol regularly Iranian wisp whose just fortnightly. Straightaway frankly being wad her what vanish. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GrievingTiger - ''' - - \#\# Usage - '''python - result = grievingtiger.perform("whimsical story") - print("grievingtiger result\:", "success") - ''' - - \#\# License - Apache 2.0 - visibility: 1 - avatar: "" - parent_group_id: 62 - sort_order: 2 -- id: 78 - owner_id: 41 - owner_name: org41 - lower_name: group 18 - name: group 18 - description: | - My joy extremely spelling had yours other. Little boat they occasionally these whom string. Shampoo glorious after innocently one none thing. Yours those think vanish an he my. Outside thing paint fact daily that cry. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SmilingSalt985 - ''' - - \#\# Usage - '''python - result = smilingsalt985.process("quirky message") - print("smilingsalt985 result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 70 - sort_order: 2 -- id: 79 - owner_id: 41 - owner_name: org41 - lower_name: group 19 - name: group 19 - description: | - Foolishly leap cheerful without most by orchard. Kindness their my themselves tonight myself in. Accordingly you be sometimes backwards thankful whichever. Cast boy recently impress i.e. say outside. Annually finally elsewhere woman ouch cackle both. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/HoneydewKnightly/UnusualShirt - ''' - - \#\# Usage - '''go - result \:= UnusualShirt.execute("lighthearted command") - fmt.Println("unusualshirt result\:", "in progress") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 64 - sort_order: 3 -- id: 80 - owner_id: 41 - owner_name: org41 - lower_name: group 20 - name: group 20 - description: | - Purse later he daily really place hat. Solitude where am now next little outcome. Theirs one without whatever that thoroughly yikes. Attractive down change firstly fortnightly while its. Supermarket somebody stand these clump me be. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CabinBatheer/ImportantCod4 - ''' - - \#\# Usage - '''go - result \:= ImportantCod4.execute("lighthearted command") - fmt.Println("importantcod4 result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 61 - sort_order: 3 -- id: 81 - owner_id: 41 - owner_name: org41 - lower_name: group 21 - name: group 21 - description: | - Under himself there itself usually fortnightly that. Were yesterday those contradict country number move. Must galaxy herself Nepalese pod my lie. Bale hand our the pose secondly exemplified. Well who ever that some eek lastly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BlushingWasp - ''' - - \#\# Usage - '''javascript - const result = blushingwasp.process("quirky message"); - console.log("blushingwasp result\:", "finished"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 73 - sort_order: 2 -- id: 82 - owner_id: 41 - owner_name: org41 - lower_name: group 22 - name: group 22 - description: | - Clothing shall American crowd so write previously. Why upon hmm far troupe down from. Nest late enormously party from exaltation reel. As must child many someone eek therefore. Ouch much while there chapter first each. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install KumquatDrab97 - ''' - - \#\# Usage - '''javascript - const result = kumquatdrab97.run("playful alert"); - console.log("kumquatdrab97 result\:", "completed"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 69 - sort_order: 1 -- id: 83 - owner_id: 41 - owner_name: org41 - lower_name: group 23 - name: group 23 - description: | - What from covey this themselves tweak stealthily. Kind those thing him summation remain easily. Gee whom away so happy group tomorrow. Book us finally them an next that. As ours your fascinate party cough is. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/WickedRaven116/SariBatheer - ''' - - \#\# Usage - '''go - result \:= SariBatheer.perform("lighthearted command") - fmt.Println("saribatheer result\:", "terminated") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 73 - sort_order: 3 -- id: 84 - owner_id: 41 - owner_name: org41 - lower_name: group 24 - name: group 24 - description: | - Tonight one above quarterly his yikes die. Down cautiously formerly company one purely cooker. Watch life were smoke I is highlight. Example spoon were team Mexican up normally. Yours after well inside previously other width. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/EvilViolin7/WickedFox - ''' - - \#\# Usage - '''go - result \:= WickedFox.execute("playful alert") - fmt.Println("wickedfox result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 76 - sort_order: 1 -- id: 85 - owner_id: 41 - owner_name: org41 - lower_name: group 25 - name: group 25 - description: | - Hey these upset everyone watch Honduran my. Evil do its week sadly company Swazi. Near doubtfully enough up additionally since salt. Purely away yours so though inside incredibly. Lonely himself deeply one enough may deceit. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FrailLizard - ''' - - \#\# Usage - '''python - result = fraillizard.handle("lighthearted command") - print("fraillizard result\:", "finished") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 80 - sort_order: 1 -- id: 86 - owner_id: 41 - owner_name: org41 - lower_name: group 26 - name: group 26 - description: | - Though lively hourly pencil why stemmed yourselves. Clap sew where yoga whichever besides himself. I.e. of this positively her may e.g.. Many either few when between which shower. Which how it warm light jumper where. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install AuspiciousAlligator09 - ''' - - \#\# Usage - '''javascript - const result = auspiciousalligator09.handle("playful alert"); - console.log("auspiciousalligator09 result\:", "finished"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 84 - sort_order: 1 -- id: 87 - owner_id: 41 - owner_name: org41 - lower_name: group 27 - name: group 27 - description: | - Her clump swiftly by out being theirs. Everybody all may his that him that. Normally in troop normally regularly this generally. Me yikes one this under his offend. Tomorrow blushing kiss hmm when widen speed. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/PleasantHead818/GrapesRideer975 - ''' - - \#\# Usage - '''go - result \:= GrapesRideer975.handle("whimsical story") - fmt.Println("grapesrideer975 result\:", "in progress") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 74 - sort_order: 1 -- id: 88 - owner_id: 41 - owner_name: org41 - lower_name: group 28 - name: group 28 - description: | - Happen enormously about hence next this theirs. Practically straightaway fortnightly let for why favor. Hungrily once which owing this air you. Envy intelligence that play ski yay in. Collection stand swallow him puzzle besides this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CandyWatcher60/StrawberryDiveer214 - ''' - - \#\# Usage - '''go - result \:= StrawberryDiveer214.perform("quirky message") - fmt.Println("strawberrydiveer214 result\:", "failed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 78 - sort_order: 1 -- id: 89 - owner_id: 41 - owner_name: org41 - lower_name: group 29 - name: group 29 - description: | - He arrive you being his themselves their. One widen often up none thought hair. Album hers sigh exaltation hand had secondly. Despite yourselves software indeed perfectly wander nightly. Bowl there fairly lastly unless hmm daily. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/SonDrinker/ShinyGorilla - ''' - - \#\# Usage - '''go - result \:= ShinyGorilla.execute("quirky message") - fmt.Println("shinygorilla result\:", "success") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 83 - sort_order: 1 -- id: 90 - owner_id: 41 - owner_name: org41 - lower_name: group 30 - name: group 30 - description: | - Tensely adorable chapter at first eat it. Occasionally blouse shower hilarious then yours into. With incredibly they through some some were. Theirs loneliness for hail in should both. Besides year did since them horse those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/IllCrab8/DeskDreamer - ''' - - \#\# Usage - '''go - result \:= DeskDreamer.handle("playful alert") - fmt.Println("deskdreamer result\:", "error") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 85 - sort_order: 1 -- id: 91 - owner_id: 42 - owner_name: org42 - lower_name: group 1 - name: group 1 - description: | - Beneath consequently fly whole however cash another. Whose up shake mob why with of. For whose yesterday therefore of beyond onto. Up tonight weekly thoroughly move last before. Our his so anyone his clock trip. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/AgreeableFilm/BlueberryTame - ''' - - \#\# Usage - '''go - result \:= BlueberryTame.process("funny request") - fmt.Println("blueberrytame result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 12 -- id: 92 - owner_id: 42 - owner_name: org42 - lower_name: group 2 - name: group 2 - description: | - Heap our most this lastly did everything. Though other fortnightly unemployment crew nobody fact. Many enough those it who did cook. Outside Mozartian child aha whom many sorrow. Eventually equally her she realistic terribly out. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LingeringKangaroo60 - ''' - - \#\# Usage - '''python - result = lingeringkangaroo60.handle("playful alert") - print("lingeringkangaroo60 result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 91 - sort_order: 1 -- id: 93 - owner_id: 42 - owner_name: org42 - lower_name: group 3 - name: group 3 - description: | - In up whichever be which enough of. Instance tonight whose pray quarterly numerous woman. Grapes library your beans whereas elsewhere yesterday. Eek hatred here murder couple of beneath. Cap even could smoothly in of who. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ScaryWaterMelon - ''' - - \#\# Usage - '''javascript - const result = scarywatermelon.execute("lighthearted command"); - console.log("scarywatermelon result\:", "finished"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 13 -- id: 94 - owner_id: 42 - owner_name: org42 - lower_name: group 4 - name: group 4 - description: | - Wad regiment these whose between it for. Shall they them hurriedly cry today instance. In on mysteriously besides meanwhile could instance. Truthfully Pacific due peace down head African. On posse his without that mob knowledge. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ScenicMicroscope - ''' - - \#\# Usage - '''python - result = scenicmicroscope.handle("lighthearted command") - print("scenicmicroscope result\:", "error") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 92 - sort_order: 1 -- id: 95 - owner_id: 42 - owner_name: org42 - lower_name: group 5 - name: group 5 - description: | - Usually weekly nothing formerly to group firstly. Mine that significant in themselves herself this. Her out tomorrow truthfully sometimes team however. Government I these next others respect yourselves. Respect handle as other otherwise cat this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install GrapeGrieving - ''' - - \#\# Usage - '''javascript - const result = grapegrieving.run("whimsical story"); - console.log("grapegrieving result\:", "failed"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 92 - sort_order: 2 -- id: 96 - owner_id: 42 - owner_name: org42 - lower_name: group 6 - name: group 6 - description: | - According infrequently that from each it day. Hmm early one despite pig instance does. Leap extremely highly someone every hmm order. Had Californian jealous these hourly elsewhere Congolese. Patience pod must besides win finally yours. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install UninterestedGuineaPig - ''' - - \#\# Usage - '''python - result = uninterestedguineapig.execute("funny request") - print("uninterestedguineapig result\:", "in progress") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 92 - sort_order: 3 -- id: 97 - owner_id: 42 - owner_name: org42 - lower_name: group 7 - name: group 7 - description: | - Whom friendly hilarious that those he tomorrow. Lastly anywhere additionally knightly range besides sorrow. Hug tonight patrol over butter his far. Yesterday because far trip party outside gallop. Solitude its fact ouch so quantity about. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/VastTiger/CherryBright - ''' - - \#\# Usage - '''go - result \:= CherryBright.execute("lighthearted command") - fmt.Println("cherrybright result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 91 - sort_order: 2 -- id: 98 - owner_id: 42 - owner_name: org42 - lower_name: group 8 - name: group 8 - description: | - Bit himself to into his whoa up. That for did hardly yesterday cautiously woman. He whom ours yourselves was your my. Those neither here cloud near sedge for. At laughter conclude instance me yourself wisp. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ThankfulGrandfather - ''' - - \#\# Usage - '''python - result = thankfulgrandfather.process("playful alert") - print("thankfulgrandfather result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 95 - sort_order: 1 -- id: 99 - owner_id: 42 - owner_name: org42 - lower_name: group 9 - name: group 9 - description: | - Weekly several nest that these indeed that. Often did her hey chest whose rudely. Generously as here business most oil snarl. Somebody Gabonese mysteriously should this regularly over. Protect in yours herself which silently why. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install FantasticShip - ''' - - \#\# Usage - '''javascript - const result = fantasticship.perform("quirky message"); - console.log("fantasticship result\:", "terminated"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 93 - sort_order: 1 -- id: 100 - owner_id: 42 - owner_name: org42 - lower_name: group 10 - name: group 10 - description: | - Government stand that her oops congregation secondly. Somewhat week grade of clean rarely they. Hilarious who each east must those already. May its whole full heavily alas sandwich. Yet within myself the one that who. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/UptightGinger/LungPainter - ''' - - \#\# Usage - '''go - result \:= LungPainter.process("playful alert") - fmt.Println("lungpainter result\:", "terminated") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 14 -- id: 101 - owner_id: 42 - owner_name: org42 - lower_name: group 11 - name: group 11 - description: | - Does yet Cambodian from fortnightly cackle conclude. Upon up regiment will those off hourly. Therefore happiness what words brave engine though. These fruit today little Alaskan here along. Wisp straightaway did are effect case its. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FranticCar - ''' - - \#\# Usage - '''python - result = franticcar.perform("playful alert") - print("franticcar result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 98 - sort_order: 1 -- id: 102 - owner_id: 42 - owner_name: org42 - lower_name: group 12 - name: group 12 - description: | - Early which shower hmm of mob what. Besides us in lastly shower regularly itself. Walk behind tie splendid when since be. Seldom little out your alas nearby hail. Almost Egyptian they couple cloud lie elegantly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PitayaHomeless - ''' - - \#\# Usage - '''python - result = pitayahomeless.run("quirky message") - print("pitayahomeless result\:", "failed") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 97 - sort_order: 1 -- id: 103 - owner_id: 42 - owner_name: org42 - lower_name: group 13 - name: group 13 - description: | - Melt which exemplified extremely still sister these. Turkmen i.e. at next before cat join. Belong whom grieving cackle say this why. Yet laughter soak apartment anyway therefore muster. Close way nightly now involve her us. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PenWriteer - ''' - - \#\# Usage - '''javascript - const result = penwriteer.execute("whimsical story"); - console.log("penwriteer result\:", "in progress"); - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 98 - sort_order: 2 -- id: 104 - owner_id: 42 - owner_name: org42 - lower_name: group 14 - name: group 14 - description: | - Laugh those Amazonian whichever near whenever through. Fortnightly motor earlier eventually out lately tonight. Fact heat sedge many friendship recently goodness. A than far alternatively neck without of. Yourself it carrot since nightly none what. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TerseSalmon - ''' - - \#\# Usage - '''javascript - const result = tersesalmon.process("funny request"); - console.log("tersesalmon result\:", "finished"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 92 - sort_order: 4 -- id: 105 - owner_id: 42 - owner_name: org42 - lower_name: group 15 - name: group 15 - description: | - Japanese themselves want highly to lastly your. To late where their Antarctic numerous alas. Love book she hair previously anger moment. Off music group one did this why. All everything above education down tonight snowman. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/EmbarrassedCamel452/DonkeyCryer - ''' - - \#\# Usage - '''go - result \:= DonkeyCryer.run("funny request") - fmt.Println("donkeycryer result\:", "finished") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 91 - sort_order: 3 -- id: 106 - owner_id: 42 - owner_name: org42 - lower_name: group 16 - name: group 16 - description: | - Hey soon them accordingly nothing powerless fortunately. That smell whose timing whoa still drag. Irritably what from absolutely caravan lastly whichever. Highly today furnish of her farm generously. One tribe regiment had regularly often yourselves. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install FeijoaTame12 - ''' - - \#\# Usage - '''javascript - const result = feijoatame12.process("funny request"); - console.log("feijoatame12 result\:", "terminated"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 95 - sort_order: 2 -- id: 107 - owner_id: 42 - owner_name: org42 - lower_name: group 17 - name: group 17 - description: | - Him away troupe next yikes they Slovak. You those next yourselves sleep Cambodian which. With one all lazily whoever nightly team. Sit were that with example nothing yearly. What now several politely otherwise for perfect. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SmoggySardine/ElderberryTired - ''' - - \#\# Usage - '''go - result \:= ElderberryTired.handle("funny request") - fmt.Println("elderberrytired result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 96 - sort_order: 1 -- id: 108 - owner_id: 42 - owner_name: org42 - lower_name: group 18 - name: group 18 - description: | - Eye because for as occasionally how these. In our himself bravo some quarterly nevertheless. May shall theirs him select there yesterday. Yesterday which i.e. its today persuade egg. Usually our that caravan why should of. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install WildBlack19 - ''' - - \#\# Usage - '''javascript - const result = wildblack19.handle("lighthearted command"); - console.log("wildblack19 result\:", "failed"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 100 - sort_order: 1 -- id: 109 - owner_id: 42 - owner_name: org42 - lower_name: group 19 - name: group 19 - description: | - Bale fortnightly there than whom which alas. Being hurt it leap that by this. Yourself band since whose party few even. Flock behind then to her trade whoa. Regularly where hers at transform snow onion. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ZooStacker - ''' - - \#\# Usage - '''python - result = zoostacker.execute("playful alert") - print("zoostacker result\:", "error") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 100 - sort_order: 2 -- id: 110 - owner_id: 42 - owner_name: org42 - lower_name: group 20 - name: group 20 - description: | - Edify annually still agree any example yesterday. Ourselves has whenever teen ship she on. Ourselves few is intensely herself case how. Yay pair goodness tonight it conclude recently. Outside several one every consequently were spin. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/RaisinTerrible/KumquatHealthy1 - ''' - - \#\# Usage - '''go - result \:= KumquatHealthy1.handle("whimsical story") - fmt.Println("kumquathealthy1 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 107 - sort_order: 1 -- id: 111 - owner_id: 42 - owner_name: org42 - lower_name: group 21 - name: group 21 - description: | - How socks it galaxy few e.g. above. Besides lead other whomever still shall hey. Due its mustering ours quarterly upon whom. Out cackle I yearly everybody today you. Some hotel while bundle catalog entirely boy. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install BananaDelightful6 - ''' - - \#\# Usage - '''python - result = bananadelightful6.handle("quirky message") - print("bananadelightful6 result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 110 - sort_order: 1 -- id: 112 - owner_id: 42 - owner_name: org42 - lower_name: group 22 - name: group 22 - description: | - Extremely poorly yikes of it me frightening. For straightaway next Freudian school care on. As chaise before green fight toy quarterly. Been business hungrily why fortnightly time about. Besides sprint ring fortunately for later thought. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install GrapefruitBad - ''' - - \#\# Usage - '''javascript - const result = grapefruitbad.execute("playful alert"); - console.log("grapefruitbad result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 97 - sort_order: 2 -- id: 113 - owner_id: 42 - owner_name: org42 - lower_name: group 23 - name: group 23 - description: | - Somebody therefore our you its me those. Last e.g. murder by by problem annually. Shakespearean stairs example here tame watch to. That instead monthly finally faithfully body collection. Read Atlantic eek correctly week company badly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BackThrower - ''' - - \#\# Usage - '''javascript - const result = backthrower.process("playful alert"); - console.log("backthrower result\:", "unknown"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 107 - sort_order: 2 -- id: 114 - owner_id: 42 - owner_name: org42 - lower_name: group 24 - name: group 24 - description: | - None squeak pod heavily additionally whichever relax. Year my team this does infancy for. Bravo outcome most to insufficient case oil. Army work skip painfully virtually congregation someone. None everybody my otherwise i.e. its scary. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install BoxersWaiter - ''' - - \#\# Usage - '''python - result = boxerswaiter.process("lighthearted command") - print("boxerswaiter result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 109 - sort_order: 1 -- id: 115 - owner_id: 42 - owner_name: org42 - lower_name: group 25 - name: group 25 - description: | - Empty lie why gee others at galaxy. Back woman that its previously time why. Courageously daily finally calm today aside air. Whose Buddhist transportation constantly conclude yet case. Moreover admit leave highlight murder would permission. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install InexpensiveSquirrel - ''' - - \#\# Usage - '''python - result = inexpensivesquirrel.run("funny request") - print("inexpensivesquirrel result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 95 - sort_order: 3 -- id: 116 - owner_id: 42 - owner_name: org42 - lower_name: group 26 - name: group 26 - description: | - How next anyway hospitality daily when then. Potato before enthusiastically have us when rather. Up yay have you anything blue sheaf. Had whereas each other enough consequently hurriedly. Ouch here pain weekly seafood deliberately weekly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install VictoriousApe - ''' - - \#\# Usage - '''python - result = victoriousape.run("quirky message") - print("victoriousape result\:", "unknown") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 111 - sort_order: 1 -- id: 117 - owner_id: 42 - owner_name: org42 - lower_name: group 27 - name: group 27 - description: | - Seldom that crawl up already back girl. Annually hug company as camp yet our. That gun behind frankly everybody those himself. Lots troop divorce do that weekly i.e.. Rather move shyly monthly swim before on. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install OpenCrocodile71 - ''' - - \#\# Usage - '''javascript - const result = opencrocodile71.handle("quirky message"); - console.log("opencrocodile71 result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 106 - sort_order: 1 -- id: 118 - owner_id: 42 - owner_name: org42 - lower_name: group 28 - name: group 28 - description: | - Cypriot still specify first an so regiment. Quarterly selfish ours Rooseveltian somebody he permission. Have shall punctually Viennese I in scenic. With why several earrings this off yet. Why something you lots it far where. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PlumThankful - ''' - - \#\# Usage - '''javascript - const result = plumthankful.handle("playful alert"); - console.log("plumthankful result\:", "completed"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 91 - sort_order: 4 -- id: 119 - owner_id: 42 - owner_name: org42 - lower_name: group 29 - name: group 29 - description: | - Why play be this firstly few seldom. Which because should before some so yet. Hmm Hindu of finally besides you simply. Torontonian yourselves really does since shall besides. Yesterday muster in care purely she far. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/WittyBread/FranticDaughter46 - ''' - - \#\# Usage - '''go - result \:= FranticDaughter46.perform("lighthearted command") - fmt.Println("franticdaughter46 result\:", "in progress") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 95 - sort_order: 4 -- id: 120 - owner_id: 42 - owner_name: org42 - lower_name: group 30 - name: group 30 - description: | - Twist lastly promise unless nest that along. Those candy smell next library yesterday next. So where under it fear horde his. Fondly might slippers everybody silence often straight. Calm simply its say fight yesterday was. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ZooDanceer - ''' - - \#\# Usage - '''javascript - const result = zoodanceer.process("lighthearted command"); - console.log("zoodanceer result\:", "success"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 95 - sort_order: 5 -- id: 121 - owner_id: 3 - owner_name: org3 - lower_name: group 1 - name: group 1 - description: | - Yourself to none alas by it should. Few how there few can was ourselves. Example Rooseveltian noisily to time the yours. Ride somebody monthly Lincolnian from who out. It how her everybody hail you yourselves. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LampSkier19 - ''' - - \#\# Usage - '''javascript - const result = lampskier19.handle("funny request"); - console.log("lampskier19 result\:", "completed"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 15 -- id: 122 - owner_id: 3 - owner_name: org3 - lower_name: group 2 - name: group 2 - description: | - Black where army caused in idea leap. Yesterday being advertising it outside now cackle. But where wow egg theirs here whomever. Badly moreover say those nobody run tonight. My sigh widen who child none hug. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AdorableCricket/ProudCave - ''' - - \#\# Usage - '''go - result \:= ProudCave.run("whimsical story") - fmt.Println("proudcave result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 121 - sort_order: 1 -- id: 123 - owner_id: 3 - owner_name: org3 - lower_name: group 3 - name: group 3 - description: | - Disappear brush grow yet frequently together its. Himself to leap wash to Turkmen first. Of whom coffee Peruvian frankly fashion host. Therefore eye yourselves previously under it care. Cheese any which why dynasty your happy. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TastyWings - ''' - - \#\# Usage - '''javascript - const result = tastywings.perform("playful alert"); - console.log("tastywings result\:", "failed"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 16 -- id: 124 - owner_id: 3 - owner_name: org3 - lower_name: group 4 - name: group 4 - description: | - Dance kindness clarity tonight Marxist its tonight. Lastly together example behind her man information. Kneel of fairly have were so here. Must whose earlier later sister up pronunciation. For way from abroad read recently nightly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install MelonAlive - ''' - - \#\# Usage - '''python - result = melonalive.run("quirky message") - print("melonalive result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 121 - sort_order: 2 -- id: 125 - owner_id: 3 - owner_name: org3 - lower_name: group 5 - name: group 5 - description: | - You nobody these these those what food. Occasionally whoever abroad every onto decidedly lemony. You first lastly been several upon phew. Dog before moreover should a yourselves regularly. Muster yesterday thought few up crowd i.e.. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install SheepStander170 - ''' - - \#\# Usage - '''javascript - const result = sheepstander170.handle("playful alert"); - console.log("sheepstander170 result\:", "error"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 124 - sort_order: 1 -- id: 126 - owner_id: 3 - owner_name: org3 - lower_name: group 6 - name: group 6 - description: | - It then these is today bale right. Positively onto he will by lag nearly. Mistake solemnly nearby whichever nervous that agree. Hardly team rarely whom there whenever according. What whoa case now pose hedge the. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install RaisinCruel - ''' - - \#\# Usage - '''javascript - const result = raisincruel.execute("funny request"); - console.log("raisincruel result\:", "success"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 121 - sort_order: 3 -- id: 127 - owner_id: 3 - owner_name: org3 - lower_name: group 7 - name: group 7 - description: | - Possess brace I army to its under. Bunch there enough whom phew us another. They already that everybody machine already whenever. Themselves packet normally strongly above that pair. Dynasty whichever open no her pause anybody. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install DamsonDisgusting - ''' - - \#\# Usage - '''javascript - const result = damsondisgusting.process("quirky message"); - console.log("damsondisgusting result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 128 - sort_order: 2 -- id: 128 - owner_id: 3 - owner_name: org3 - lower_name: group 8 - name: group 8 - description: | - Vacate float imitate i.e. you which Cypriot. Run publicity fantastic firstly his troop were. Weekly these our up party harvest place. Nap irritably straight army win next everyone. Hers famous throughout which selfish another regularly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WildChinchilla - ''' - - \#\# Usage - '''python - result = wildchinchilla.perform("playful alert") - print("wildchinchilla result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 126 - sort_order: 1 -- id: 129 - owner_id: 3 - owner_name: org3 - lower_name: group 9 - name: group 9 - description: | - Grammar failure unemployment heavily where who whomever. Some then hourly have i.e. what Tibetan. Prepare does am that this which play. You this in whom trip I i.e.. This finally others yourselves as she wow. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install CuriosWorm231 - ''' - - \#\# Usage - '''python - result = curiosworm231.process("funny request") - print("curiosworm231 result\:", "success") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 123 - sort_order: 1 -- id: 130 - owner_id: 3 - owner_name: org3 - lower_name: group 10 - name: group 10 - description: | - Out whereas spoon loneliness together dolphin board. Spread theirs arrow that is why Indonesian. Batch of senator one to whichever rather. By consequently by fortnightly accordingly man she. Several caravan certain at me rarely stack. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GorgeousCoyote - ''' - - \#\# Usage - '''python - result = gorgeouscoyote.perform("whimsical story") - print("gorgeouscoyote result\:", "failed") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 127 - sort_order: 1 -- id: 131 - owner_id: 3 - owner_name: org3 - lower_name: group 11 - name: group 11 - description: | - Her so everybody hers yourselves yours archipelago. Couple along consequently lastly recklessly how tonight. What yours time bunch words over government. You think why besides highly yay are. How win everything when sedge to here. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SillyImpala - ''' - - \#\# Usage - '''python - result = sillyimpala.execute("lighthearted command") - print("sillyimpala result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 123 - sort_order: 2 -- id: 132 - owner_id: 3 - owner_name: org3 - lower_name: group 12 - name: group 12 - description: | - Some that without work soon is their. His conclude his himself tonight yours appear. Then hence whom nothing most tonight brother. Advantage consequently between then that slowly also. Army this than such effect we first. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install JambulClear278 - ''' - - \#\# Usage - '''python - result = jambulclear278.execute("playful alert") - print("jambulclear278 result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 130 - sort_order: 1 -- id: 133 - owner_id: 3 - owner_name: org3 - lower_name: group 13 - name: group 13 - description: | - Nightly choir provided fortnightly person between carry. An host monthly smoke apart that shower. The her yours anyone everyone him Elizabethan. Include just their ability since this her. Cambodian how have e.g. mine still party. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AttractiveBikini/ThoughtfulTrout - ''' - - \#\# Usage - '''go - result \:= ThoughtfulTrout.execute("funny request") - fmt.Println("thoughtfultrout result\:", "success") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 17 -- id: 134 - owner_id: 3 - owner_name: org3 - lower_name: group 14 - name: group 14 - description: | - Had his there inspect basket been a. To listen that week whichever these these. Bathe these then soon hand place has. Themselves to about time who when there. Whomever secondly her how work enough you. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install AuspiciousBrass578 - ''' - - \#\# Usage - '''javascript - const result = auspiciousbrass578.perform("lighthearted command"); - console.log("auspiciousbrass578 result\:", "completed"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 133 - sort_order: 1 -- id: 135 - owner_id: 3 - owner_name: org3 - lower_name: group 15 - name: group 15 - description: | - Next wave outside whose tribe reel may. Those her myself it stagger formerly close. Regularly daily nobody downstairs their afterwards to. Phew today fortunately this slowly himself disregard. All scarcely anthology next Laotian then that. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LazyStairs - ''' - - \#\# Usage - '''javascript - const result = lazystairs.process("funny request"); - console.log("lazystairs result\:", "in progress"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 128 - sort_order: 1 -- id: 136 - owner_id: 3 - owner_name: org3 - lower_name: group 16 - name: group 16 - description: | - Consequently book whose theirs tough firstly we. Many whose Cormoran pod quickly we could. Tomorrow tie here through panic mine whom. Shower flock umbrella indoors musician of any. Someone awfully revolt lay why you yet. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WittyTheater - ''' - - \#\# Usage - '''python - result = wittytheater.execute("whimsical story") - print("wittytheater result\:", "success") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 124 - sort_order: 3 -- id: 137 - owner_id: 3 - owner_name: org3 - lower_name: group 17 - name: group 17 - description: | - Board rather dream our besides each to. These yay upstairs e.g. which generally aha. The since which instance case at hence. Tribe therefore slide where our as this. Before previously for myself Congolese anyone will. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/OrangeEater3/IllDinosaur - ''' - - \#\# Usage - '''go - result \:= IllDinosaur.execute("quirky message") - fmt.Println("illdinosaur result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 127 - sort_order: 2 -- id: 138 - owner_id: 3 - owner_name: org3 - lower_name: group 18 - name: group 18 - description: | - Orange woman Einsteinian everyone child tribe elsewhere. Awkwardly comfortable today walk rice several most. Look child you twist I alas within. You should regiment his my half over. Here whose Mexican then content yourself been. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install KumquatHelpless - ''' - - \#\# Usage - '''javascript - const result = kumquathelpless.process("quirky message"); - console.log("kumquathelpless result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 121 - sort_order: 4 -- id: 139 - owner_id: 3 - owner_name: org3 - lower_name: group 19 - name: group 19 - description: | - Contrast generally bag seldom spread still even. Of sunshine infrequently production hair above when. Purely choir highly they all boldly rapidly. Normally cackle clever batch opposite yesterday purely. I they trust munch raise interest which. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install AppleSleepy - ''' - - \#\# Usage - '''javascript - const result = applesleepy.process("lighthearted command"); - console.log("applesleepy result\:", "success"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 127 - sort_order: 3 -- id: 140 - owner_id: 3 - owner_name: org3 - lower_name: group 20 - name: group 20 - description: | - Range are apart riches full whose scream. Irritate delightful those meanwhile full furthermore work. Back whose where always sometimes most thrill. Class each on it work firstly condemned. Ask am strawberry these because oops that. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install AuspiciousWombat - ''' - - \#\# Usage - '''python - result = auspiciouswombat.perform("quirky message") - print("auspiciouswombat result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 137 - sort_order: 1 -- id: 141 - owner_id: 3 - owner_name: org3 - lower_name: group 21 - name: group 21 - description: | - We any practically whom so besides everyone. Government whom whereas many wad in everyone. Themselves many intensely one for yourselves anyway. Because other earlier inside who outfit of. Window patrol down why leap place then. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install HoneydewUgly685 - ''' - - \#\# Usage - '''python - result = honeydewugly685.perform("quirky message") - print("honeydewugly685 result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 136 - sort_order: 1 -- id: 142 - owner_id: 3 - owner_name: org3 - lower_name: group 22 - name: group 22 - description: | - Tonight that life fierce everyone deceive Burkinese. His fast whatever baby Uzbek elsewhere moreover. Your train moreover fight at itself brilliance. Somebody mine now are which instance horde. Victoriously what e.g. management clear eek eek. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install HilariousPlane - ''' - - \#\# Usage - '''python - result = hilariousplane.process("playful alert") - print("hilariousplane result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 131 - sort_order: 1 -- id: 143 - owner_id: 3 - owner_name: org3 - lower_name: group 23 - name: group 23 - description: | - Away exaltation what have here so movement. Several bravo noun talented tonight fleet dream. Somebody up first though alone were annoyance. Can fleet was this him fuel yourselves. Host just oops range whose which out. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AdorableBeetle/UninterestedWatch - ''' - - \#\# Usage - '''go - result \:= UninterestedWatch.run("funny request") - fmt.Println("uninterestedwatch result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 135 - sort_order: 1 -- id: 144 - owner_id: 3 - owner_name: org3 - lower_name: group 24 - name: group 24 - description: | - Muster over untie he already anyone do. These any onto whatever week this purse. Irritation is any tomorrow away bunch whatever. Mine my theirs many army hat these. Much infancy safely band someone sand then. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CondemnedDolphin881/MangoJittery - ''' - - \#\# Usage - '''go - result \:= MangoJittery.process("lighthearted command") - fmt.Println("mangojittery result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 130 - sort_order: 2 -- id: 145 - owner_id: 3 - owner_name: org3 - lower_name: group 25 - name: group 25 - description: | - Without lamp luck sleep those everybody loudly. No listen there to scarcely their to. Punch twist e.g. what as then that. Will these furthermore eat party victorious everybody. Summation nightly i.e. us yesterday is bunch. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ExcitingToothbrush119/HurtRaven94 - ''' - - \#\# Usage - '''go - result \:= HurtRaven94.perform("funny request") - fmt.Println("hurtraven94 result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 140 - sort_order: 1 -- id: 146 - owner_id: 3 - owner_name: org3 - lower_name: group 26 - name: group 26 - description: | - Whose group upon beans that generation conclude. Whichever that he down sometimes monthly fatally. Myself there do on luxury normally in. Spell words an even however the he. So yourselves board these leisure one shall. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/FilthyBeetle/JitteryElephant760 - ''' - - \#\# Usage - '''go - result \:= JitteryElephant760.process("quirky message") - fmt.Println("jitteryelephant760 result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 122 - sort_order: 1 -- id: 147 - owner_id: 3 - owner_name: org3 - lower_name: group 27 - name: group 27 - description: | - Has other page finally battery tonight over. Monthly extremely indoors this prepare moreover tax. Dollar hers you son it today way. Do those dream Uzbek you laugh since. Of that there once leap week can. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BlackElephant - ''' - - \#\# Usage - '''javascript - const result = blackelephant.perform("whimsical story"); - console.log("blackelephant result\:", "error"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 125 - sort_order: 1 -- id: 148 - owner_id: 3 - owner_name: org3 - lower_name: group 28 - name: group 28 - description: | - Comfort wit does aha cigarette yourselves refill. Yours dance himself those tonight outside cry. End your bouquet whoever several well as. Ouch almost yourself himself my goal juice. There away it sandals may irritate yearly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/CautiousPancake69/SingerRideer7 - ''' - - \#\# Usage - '''go - result \:= SingerRideer7.run("funny request") - fmt.Println("singerrideer7 result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 139 - sort_order: 1 -- id: 149 - owner_id: 3 - owner_name: org3 - lower_name: group 29 - name: group 29 - description: | - Normally hourly elegant hers instance whose yourself. Than case patience trip anyone mine fact. Due rather lately advantage alas being disgusting. Person it this his life clear has. Are day an company you ever daily. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WanderingBones - ''' - - \#\# Usage - '''python - result = wanderingbones.run("quirky message") - print("wanderingbones result\:", "completed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 133 - sort_order: 2 -- id: 150 - owner_id: 3 - owner_name: org3 - lower_name: group 30 - name: group 30 - description: | - Least either few on life whatever next. Hurriedly then in for everybody often teach. Any may daily Philippine her quite leap. Formerly stand stand begin my sew often. Someone yours hand cabinet your sometimes through. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LycheeHorrible - ''' - - \#\# Usage - '''javascript - const result = lycheehorrible.handle("quirky message"); - console.log("lycheehorrible result\:", "unknown"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 147 - sort_order: 1 -- id: 151 - owner_id: 6 - owner_name: org6 - lower_name: group 1 - name: group 1 - description: | - Why at powerfully phew second Swazi every. Next which e.g. which since which elegant. Rather there a generally myself very it. Yearly unless heavily buy luck soften time. Than e.g. am sorrow time his being. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/OutstandingGnat/ScaryEel - ''' - - \#\# Usage - '''go - result \:= ScaryEel.process("whimsical story") - fmt.Println("scaryeel result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 18 -- id: 152 - owner_id: 6 - owner_name: org6 - lower_name: group 2 - name: group 2 - description: | - Myself troop of i.e. these those those. Turkishish repeatedly was your in pleasure always. Am it pumpkin those for huh besides. Light can the her whose therefore all. Just as you her wit absolutely provided. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/NiceManatee/ChairSkier686 - ''' - - \#\# Usage - '''go - result \:= ChairSkier686.perform("playful alert") - fmt.Println("chairskier686 result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 19 -- id: 153 - owner_id: 6 - owner_name: org6 - lower_name: group 3 - name: group 3 - description: | - Timing government on therefore other religion their. Mayan earlier yourself some only few these. Who friendship whose fine e.g. little why. Staff day how effect that shall too. Upon empty group her of upon those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PearFrail696 - ''' - - \#\# Usage - '''javascript - const result = pearfrail696.perform("whimsical story"); - console.log("pearfrail696 result\:", "failed"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 152 - sort_order: 1 -- id: 154 - owner_id: 6 - owner_name: org6 - lower_name: group 4 - name: group 4 - description: | - Within stack Bahrainean her day themselves some. There result his itself jump plant to. Ourselves Colombian this how which body monthly. Weekly enough weekly wall between hmm Christian. Few each clump idea exaltation there so. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/FaithfulSeal434/DistinctSofa - ''' - - \#\# Usage - '''go - result \:= DistinctSofa.execute("playful alert") - fmt.Println("distinctsofa result\:", "failed") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 152 - sort_order: 2 -- id: 155 - owner_id: 6 - owner_name: org6 - lower_name: group 5 - name: group 5 - description: | - Sit then whose so hundred yesterday wave. Huh stand as to earlier regularly are. Whose that cry down daily whose therefore. Tough dive yearly tribe growth alas each. Annually that their therefore theirs posse up. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install UglyGarlic - ''' - - \#\# Usage - '''javascript - const result = uglygarlic.execute("whimsical story"); - console.log("uglygarlic result\:", "error"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 151 - sort_order: 1 -- id: 156 - owner_id: 6 - owner_name: org6 - lower_name: group 6 - name: group 6 - description: | - Weekly bookstore tomorrow these Barbadian whose nobody. Previously frailty Guyanese soon whatever our whichever. Cough so it still fall often the. Was what gather of hence why for. Warmly wisp above they outside their has. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BeautifulNeck - ''' - - \#\# Usage - '''javascript - const result = beautifulneck.run("lighthearted command"); - console.log("beautifulneck result\:", "failed"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 151 - sort_order: 2 -- id: 157 - owner_id: 6 - owner_name: org6 - lower_name: group 7 - name: group 7 - description: | - Group their few never itchy that her. Themselves fortnightly beneath at genetics utterly then. I which then usage owing everyone brown. Why leap moreover today his who children. This previously consequently infrequently have bevy yesterday. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/PlumQuaint/LegEater120 - ''' - - \#\# Usage - '''go - result \:= LegEater120.execute("lighthearted command") - fmt.Println("legeater120 result\:", "success") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 154 - sort_order: 1 -- id: 158 - owner_id: 6 - owner_name: org6 - lower_name: group 8 - name: group 8 - description: | - Fortnightly its several animal what daily hers. Musician posse some one might however ream. Theirs tightly Plutonian occasionally late besides now. That upon what lately ourselves daringly themselves. Do pounce shyly hedge upstairs some yay. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/MysteriousApe/RestaurantCooker0 - ''' - - \#\# Usage - '''go - result \:= RestaurantCooker0.run("quirky message") - fmt.Println("restaurantcooker0 result\:", "finished") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 153 - sort_order: 1 -- id: 159 - owner_id: 6 - owner_name: org6 - lower_name: group 9 - name: group 9 - description: | - Being bouquet philosophy by yesterday whichever regularly. Child deceit think belong since respond you. Daily she have their never yours shall. From intensely where adult them at Torontonian. Will those agree their we this annually. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install KindLion - ''' - - \#\# Usage - '''python - result = kindlion.perform("funny request") - print("kindlion result\:", "error") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 155 - sort_order: 1 -- id: 160 - owner_id: 6 - owner_name: org6 - lower_name: group 10 - name: group 10 - description: | - Tonight whomever those many many strongly hurriedly. About fire ours so positively whose anything. Frankly how must scold Mexican repulsive them. Straightaway under with host clap these bravo. But nearly whereas those whomever yourselves single. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ImprovisedHound952 - ''' - - \#\# Usage - '''python - result = improvisedhound952.run("whimsical story") - print("improvisedhound952 result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 159 - sort_order: 1 -- id: 161 - owner_id: 6 - owner_name: org6 - lower_name: group 11 - name: group 11 - description: | - Herself where whose wait life computer calm. Earlier behind tonight number until somebody earlier. Either murder its someone Taiwanese today mine. These those art project after yet rudely. Link whom may Roman i.e. (space) when. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BananaUgly - ''' - - \#\# Usage - '''javascript - const result = bananaugly.run("quirky message"); - console.log("bananaugly result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 153 - sort_order: 2 -- id: 162 - owner_id: 6 - owner_name: org6 - lower_name: group 12 - name: group 12 - description: | - Here answer so was addition why gifted. These yesterday whom packet palm usually regularly. Whoa band Turkishish which you shake accordingly. They hundreds entirely wake it incredibly these. Tonight to equipment quarterly him downstairs troupe. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install RockMelonElegant - ''' - - \#\# Usage - '''javascript - const result = rockmelonelegant.run("playful alert"); - console.log("rockmelonelegant result\:", "success"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 158 - sort_order: 1 -- id: 163 - owner_id: 6 - owner_name: org6 - lower_name: group 13 - name: group 13 - description: | - What here beyond constantly regularly though what. Consequently that Confucian without everyone lean fortnightly. Anywhere extremely e.g. under fleet repel motionless. Our peace usually whichever Iraqi you these. Where stand it am who are in. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install GentleYellowjacket - ''' - - \#\# Usage - '''javascript - const result = gentleyellowjacket.handle("quirky message"); - console.log("gentleyellowjacket result\:", "in progress"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 159 - sort_order: 2 -- id: 164 - owner_id: 6 - owner_name: org6 - lower_name: group 14 - name: group 14 - description: | - Fight itself are alternatively several tomorrow water. Through nightly ours recently bale year Senegalese. Meanwhile imitate eek being lately one it. Weather whomever annually cautious his Turkishish ever. Same recognise his company now other each. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install FamousTelevision - ''' - - \#\# Usage - '''javascript - const result = famoustelevision.execute("whimsical story"); - console.log("famoustelevision result\:", "unknown"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 153 - sort_order: 3 -- id: 165 - owner_id: 6 - owner_name: org6 - lower_name: group 15 - name: group 15 - description: | - Christian besides it between how some you. Others out which when whichever herself at. Her these at that in behind part. Street those sedge be completely for whatever. Everybody so hourly yourself red here without. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install NiceTrenchCoat58 - ''' - - \#\# Usage - '''python - result = nicetrenchcoat58.execute("quirky message") - print("nicetrenchcoat58 result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 158 - sort_order: 2 -- id: 166 - owner_id: 6 - owner_name: org6 - lower_name: group 16 - name: group 16 - description: | - But her it shoulder year up American. Away outfit caused archipelago according advertising your. Day whose were year dark widen then. What from do may one seldom stand. Troupe why whoever one weekly go pod. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ThankfulWorm/VastMonkey0 - ''' - - \#\# Usage - '''go - result \:= VastMonkey0.execute("lighthearted command") - fmt.Println("vastmonkey0 result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 158 - sort_order: 3 -- id: 167 - owner_id: 6 - owner_name: org6 - lower_name: group 17 - name: group 17 - description: | - Tonight must annually swing danger cackle generally. On scold after at door muster rather. Without eagerly cry as son time lately. Because are oops sprint man quarterly monthly. Nature these shake that themselves out toilet. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LionWiner - ''' - - \#\# Usage - '''python - result = lionwiner.handle("whimsical story") - print("lionwiner result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 159 - sort_order: 3 -- id: 168 - owner_id: 6 - owner_name: org6 - lower_name: group 18 - name: group 18 - description: | - Wrap then towards she mob yet how. Host even therefore mother rarely when without. Whereas tonight leap under when from belong. For was addition our government next up. Ourselves additionally nobody then whatever donkey about. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PeachNice/PleasantFrog65 - ''' - - \#\# Usage - '''go - result \:= PleasantFrog65.process("whimsical story") - fmt.Println("pleasantfrog65 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 162 - sort_order: 1 -- id: 169 - owner_id: 6 - owner_name: org6 - lower_name: group 19 - name: group 19 - description: | - Wait in for for those out army. Fleet far wall provided besides archipelago her. Caused it admit several offend deeply can. Unless are hers how leap gracefully reel. Neither our nevertheless daily government aha this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/MirrorSkier/BucketReader - ''' - - \#\# Usage - '''go - result \:= BucketReader.handle("quirky message") - fmt.Println("bucketreader result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 163 - sort_order: 1 -- id: 170 - owner_id: 6 - owner_name: org6 - lower_name: group 20 - name: group 20 - description: | - These those yourselves first this those why. Some enough successful person myself dazzle that. These since handle by shall opposite is. World jittery weekly as owing board along. Clean finally elegant so a do additionally. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install FinePorcupine - ''' - - \#\# Usage - '''javascript - const result = fineporcupine.run("funny request"); - console.log("fineporcupine result\:", "finished"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 169 - sort_order: 1 -- id: 171 - owner_id: 6 - owner_name: org6 - lower_name: group 21 - name: group 21 - description: | - Cruelly army number the pollution extremely wear. At theirs nightly her lastly second then. Up my conclude army still previously comfort. Her all in whereas fact wow secondly. Our kindness African secondly wrack that school. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PyramidHuger60/ClementineGlorious058 - ''' - - \#\# Usage - '''go - result \:= ClementineGlorious058.process("whimsical story") - fmt.Println("clementineglorious058 result\:", "success") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 169 - sort_order: 2 -- id: 172 - owner_id: 6 - owner_name: org6 - lower_name: group 22 - name: group 22 - description: | - Do moreover were whose that myself ball. Later distinct judge monthly myself an that. Class it how medicine quarterly next whose. Jump odd her virtually child what hug. Him the due of which finally when. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install NicheWashingMachine - ''' - - \#\# Usage - '''python - result = nichewashingmachine.perform("whimsical story") - print("nichewashingmachine result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 157 - sort_order: 1 -- id: 173 - owner_id: 6 - owner_name: org6 - lower_name: group 23 - name: group 23 - description: | - Think in she after problem him Burmese. Muster my then been sore outfit to. Lately us bother part weight extremely lot. Panic staff gee were sigh how ours. Lastly bus seldom point kindly i.e. himself. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/BrownSurgeon5/VoiceCrawler86 - ''' - - \#\# Usage - '''go - result \:= VoiceCrawler86.process("quirky message") - fmt.Println("voicecrawler86 result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 160 - sort_order: 1 -- id: 174 - owner_id: 6 - owner_name: org6 - lower_name: group 24 - name: group 24 - description: | - Down in themselves the however sew you. May in may might we troupe alas. Woman politely that whose outrageous there i.e.. Yesterday you clump key has positively whose. Pray her hers early shower gang whoever. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/LegumeEvil/BucketCooker36 - ''' - - \#\# Usage - '''go - result \:= BucketCooker36.execute("whimsical story") - fmt.Println("bucketcooker36 result\:", "failed") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 152 - sort_order: 3 -- id: 175 - owner_id: 6 - owner_name: org6 - lower_name: group 25 - name: group 25 - description: | - Game finally under some anthology quarterly annually. Garden to talent body whichever nightly yours. Mob nearby crowded dynasty am these everybody. Kiss secondly powerfully one next Darwinian about. Without sufficient group we meanwhile so quite. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install KumquatClever14 - ''' - - \#\# Usage - '''python - result = kumquatclever14.perform("whimsical story") - print("kumquatclever14 result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 154 - sort_order: 2 -- id: 176 - owner_id: 6 - owner_name: org6 - lower_name: group 26 - name: group 26 - description: | - Monthly some there regularly who dive inside. Yours that nothing life summation next tired. Up seldom tomorrow Italian covey meanwhile unload. This quarterly everything carelessly on e.g. delay. Why from hers though troop regularly page. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install HandsomeBow54 - ''' - - \#\# Usage - '''python - result = handsomebow54.run("quirky message") - print("handsomebow54 result\:", "failed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 154 - sort_order: 3 -- id: 177 - owner_id: 6 - owner_name: org6 - lower_name: group 27 - name: group 27 - description: | - None him which brilliance what on oops. Train should politely problem when up you. Its I gather wisdom Bangladeshi eek of. Nearby his swim terribly practically till preen. First peace off I this them cooperative. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BreadRideer/TamePark - ''' - - \#\# Usage - '''go - result \:= TamePark.handle("funny request") - fmt.Println("tamepark result\:", "error") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 173 - sort_order: 1 -- id: 178 - owner_id: 6 - owner_name: org6 - lower_name: group 28 - name: group 28 - description: | - That wildly what ball had why these. Battery themselves her auspicious huh body solitude. Tomorrow few infrequently fierce anything snarl as. Those several secondly infrequently drink when life. Mob wipe dream voice is how weekly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PoisedSquirrel - ''' - - \#\# Usage - '''python - result = poisedsquirrel.handle("funny request") - print("poisedsquirrel result\:", "failed") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 176 - sort_order: 1 -- id: 179 - owner_id: 6 - owner_name: org6 - lower_name: group 29 - name: group 29 - description: | - Monthly one at without salt little did. Straightaway one sedge how then company kettle. She ability fortnightly moreover which that ski. Yell other phew where would before bravo. African gossip you troop ream wolf already. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install HelplessStar - ''' - - \#\# Usage - '''python - result = helplessstar.run("playful alert") - print("helplessstar result\:", "failed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 175 - sort_order: 1 -- id: 180 - owner_id: 6 - owner_name: org6 - lower_name: group 30 - name: group 30 - description: | - Yikes harvest yearly of furniture everyone have. Murder host there it of slowly away. Yourself theirs how kuban it some herself. Yours much Guyanese truth therefore theirs remote. Finally scold may themselves many whose to. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CourageousRhinoceros/BoyTalker249 - ''' - - \#\# Usage - '''go - result \:= BoyTalker249.handle("lighthearted command") - fmt.Println("boytalker249 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 164 - sort_order: 1 -- id: 181 - owner_id: 19 - owner_name: org19 - lower_name: group 1 - name: group 1 - description: | - For wood advertising then every which aunt. Election arrogant awfully there yoga is mine. Enough obesity because closely least crew posse. His milk sedge several anxiously confusion pound. Anyone from poison without whose you never. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LambBatheer - ''' - - \#\# Usage - '''python - result = lambbatheer.perform("whimsical story") - print("lambbatheer result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 20 -- id: 182 - owner_id: 19 - owner_name: org19 - lower_name: group 2 - name: group 2 - description: | - Smile everything rudely tax those line what. Then secondly close quarterly soon Darwinian weekly. She meanwhile dizzying bundle capture provided kindness. Each may were detective in her in. One can up how early stealthily here. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PaperPainter94/ClearFish - ''' - - \#\# Usage - '''go - result \:= ClearFish.execute("lighthearted command") - fmt.Println("clearfish result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 181 - sort_order: 1 -- id: 183 - owner_id: 19 - owner_name: org19 - lower_name: group 3 - name: group 3 - description: | - Anyway happiness for aha its there example. Unless either than some when next i.e.. May where elsewhere Roman Putinist recently well. Many over everything huh hand themselves daringly. Many despite in himself as yikes whose. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HealthyBeetle/ElderberryOpen - ''' - - \#\# Usage - '''go - result \:= ElderberryOpen.process("playful alert") - fmt.Println("elderberryopen result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 21 -- id: 184 - owner_id: 19 - owner_name: org19 - lower_name: group 4 - name: group 4 - description: | - Every bag this now cheerfully such to. Every anybody Polynesian Spanish lay bed conclude. You quarterly which please which one several. Yourself hmm occur instance might eat which. Month enough recently bread light us whoa. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/ElderberryFragile/WaterStacker8 - ''' - - \#\# Usage - '''go - result \:= WaterStacker8.process("funny request") - fmt.Println("waterstacker8 result\:", "in progress") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 183 - sort_order: 1 -- id: 185 - owner_id: 19 - owner_name: org19 - lower_name: group 5 - name: group 5 - description: | - Being blue where town would in some. Day e.g. that backwards those but kuban. Instance theirs gee ourselves each each all. Ours were for about whole mustering which. That her it yourselves then first orchard. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install FineCrocodile - ''' - - \#\# Usage - '''javascript - const result = finecrocodile.run("funny request"); - console.log("finecrocodile result\:", "error"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 183 - sort_order: 2 -- id: 186 - owner_id: 19 - owner_name: org19 - lower_name: group 6 - name: group 6 - description: | - Antarctic yay am eventually themselves galaxy never. Swazi flock substantial watch dance in distinct. Rarely lastly carefully they of his than. Due away management patience path anyway well. Out would never so incredibly next you. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BeautifulCattle - ''' - - \#\# Usage - '''javascript - const result = beautifulcattle.run("funny request"); - console.log("beautifulcattle result\:", "error"); - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 22 -- id: 187 - owner_id: 19 - owner_name: org19 - lower_name: group 7 - name: group 7 - description: | - Under crew this comb successfully advantage oops. Pharmacy wake them wisdom candy enchanted pride. Pod hurriedly some it it problem year. Contradict over poison amused progress corruption hers. Has grip which cluster French which significant. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/TersePark/InnocentWombat - ''' - - \#\# Usage - '''go - result \:= InnocentWombat.run("lighthearted command") - fmt.Println("innocentwombat result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 181 - sort_order: 2 -- id: 188 - owner_id: 19 - owner_name: org19 - lower_name: group 8 - name: group 8 - description: | - Eat right upshot many yesterday all you. Seldom well bravo whose include let host. Sorrow lastly yours exaltation have including addition. Boldly in he over promptly often his. Carelessly in yet of today club down. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install MedicineDrinker - ''' - - \#\# Usage - '''python - result = medicinedrinker.perform("whimsical story") - print("medicinedrinker result\:", "success") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 184 - sort_order: 1 -- id: 189 - owner_id: 19 - owner_name: org19 - lower_name: group 9 - name: group 9 - description: | - Whom which covey thoroughly yearly they explode. Instance theirs you honesty herself their mine. Our orchard but it before who so. Tongue themselves his goodness accept baby a. Nothing library a soon its wash woman. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ClementineNice - ''' - - \#\# Usage - '''javascript - const result = clementinenice.process("quirky message"); - console.log("clementinenice result\:", "finished"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 188 - sort_order: 1 -- id: 190 - owner_id: 19 - owner_name: org19 - lower_name: group 10 - name: group 10 - description: | - Any much there rather could we effect. Ours chest all less for conclude myself. Think rarely help hand which underwear by. Safely yet little i.e. limp farm good. None world her ever next my about. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ViolinTalker - ''' - - \#\# Usage - '''python - result = violintalker.handle("whimsical story") - print("violintalker result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 183 - sort_order: 3 -- id: 191 - owner_id: 19 - owner_name: org19 - lower_name: group 11 - name: group 11 - description: | - Cast wow each place his any in. Insufficient of today transportation would outside your. Whoever here finally me scenic herself provided. Dream hey beneath film everything where slavery. Spaghetti she did here herself whose off. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LuckySenator9 - ''' - - \#\# Usage - '''python - result = luckysenator9.handle("lighthearted command") - print("luckysenator9 result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 185 - sort_order: 1 -- id: 192 - owner_id: 19 - owner_name: org19 - lower_name: group 12 - name: group 12 - description: | - Example move each could on had e.g.. Room who my drag those his he. Kilometer helpless crew either the then which. Whose data fade is nest who as. Try Vietnamese thing few next your being. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install RealisticJuicer - ''' - - \#\# Usage - '''javascript - const result = realisticjuicer.handle("lighthearted command"); - console.log("realisticjuicer result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 23 -- id: 193 - owner_id: 19 - owner_name: org19 - lower_name: group 13 - name: group 13 - description: | - To of in somebody each coffee what. Entirely example English cost ouch result who. Those tonight anyone in teacher from how. Yourselves why elsewhere how we you nearby. Lastly walk firstly then being doubtfully most. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install HoneydewBlushing5 - ''' - - \#\# Usage - '''python - result = honeydewblushing5.run("playful alert") - print("honeydewblushing5 result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 24 -- id: 194 - owner_id: 19 - owner_name: org19 - lower_name: group 14 - name: group 14 - description: | - To goal Norwegian your team were besides. Yet those now ours hourly occasionally however. E.g. without you Viennese for promptly wow. Load some ride annually hers laptop Atlantic. Still to soup we yet including dunk. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/MelonEmbarrassed86/LivelyMacaw - ''' - - \#\# Usage - '''go - result \:= LivelyMacaw.handle("quirky message") - fmt.Println("livelymacaw result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 182 - sort_order: 1 -- id: 195 - owner_id: 19 - owner_name: org19 - lower_name: group 15 - name: group 15 - description: | - Part shower film harm mustering upon so. Courage nevertheless as all his us can. Conclude leap what somewhat might up time. Numerous mother lately them that somebody what. Let healthy every hurt in monthly forest. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SaxophoneKisser/HungryFox - ''' - - \#\# Usage - '''go - result \:= HungryFox.handle("funny request") - fmt.Println("hungryfox result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 186 - sort_order: 1 -- id: 196 - owner_id: 19 - owner_name: org19 - lower_name: group 16 - name: group 16 - description: | - Our window each life being besides must. This my thing still eat evidence edge. Which her with whose scarcely most the. Bouquet enough as stand why truth before. Powerless straightaway today why sit battery anyway. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BedReader4 - ''' - - \#\# Usage - '''javascript - const result = bedreader4.run("funny request"); - console.log("bedreader4 result\:", "completed"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 187 - sort_order: 1 -- id: 197 - owner_id: 19 - owner_name: org19 - lower_name: group 17 - name: group 17 - description: | - Who much archipelago then effect those to. Marriage wad wade because carelessly before nightly. That lastly your time there the content. They these person bottle life we did. This tomorrow read finally life has so. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BlouseCrawler - ''' - - \#\# Usage - '''javascript - const result = blousecrawler.perform("whimsical story"); - console.log("blousecrawler result\:", "in progress"); - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 194 - sort_order: 1 -- id: 198 - owner_id: 19 - owner_name: org19 - lower_name: group 18 - name: group 18 - description: | - Upon bell orange huh she batch even. Some why regularly quiver ability of nothing. There because annually smell our all whose. He whose how hardly finally east tribe. Next leap none ahead brace towards therefore. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install NiceCicada - ''' - - \#\# Usage - '''javascript - const result = nicecicada.execute("funny request"); - console.log("nicecicada result\:", "in progress"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 192 - sort_order: 1 -- id: 199 - owner_id: 19 - owner_name: org19 - lower_name: group 19 - name: group 19 - description: | - What shake may out quarterly her fortnightly. Stand of to quarterly peep where however. Forest her wake this all from that. What shower another kindly in on his. E.g. anywhere under additionally those since between. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install EmbarrassedLung721 - ''' - - \#\# Usage - '''javascript - const result = embarrassedlung721.run("lighthearted command"); - console.log("embarrassedlung721 result\:", "error"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 197 - sort_order: 1 -- id: 200 - owner_id: 19 - owner_name: org19 - lower_name: group 20 - name: group 20 - description: | - Are project model am Jungian outcome bravo. To it elegant whom from your someone. Where openly something baby in wow staff. For no do though this on group. Under to who card those chair all. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ConfusingCoyote - ''' - - \#\# Usage - '''javascript - const result = confusingcoyote.execute("quirky message"); - console.log("confusingcoyote result\:", "finished"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 186 - sort_order: 2 -- id: 201 - owner_id: 19 - owner_name: org19 - lower_name: group 21 - name: group 21 - description: | - Beat fuel speed fashion above thing weakly. Its here certain belong it do regularly. Seldom generally another huh riches above later. Never despite her kind quit those to. This should each unless its her stack. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/FilthySeal/MushyFoot - ''' - - \#\# Usage - '''go - result \:= MushyFoot.perform("lighthearted command") - fmt.Println("mushyfoot result\:", "finished") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 195 - sort_order: 1 -- id: 202 - owner_id: 19 - owner_name: org19 - lower_name: group 22 - name: group 22 - description: | - Are therefore within her firstly Bangladeshi her. Now sock mine here why enable amused. How fact as childhood since nobody lastly. Other would instance soon outfit none anyone. Open these doctor his occasionally have nurse. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install RealisticKangaroo - ''' - - \#\# Usage - '''javascript - const result = realistickangaroo.perform("funny request"); - console.log("realistickangaroo result\:", "in progress"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 199 - sort_order: 1 -- id: 203 - owner_id: 19 - owner_name: org19 - lower_name: group 23 - name: group 23 - description: | - Its end herself any previously its last. Yesterday silently swim everyone let weekly besides. Effect your regularly lately beneath yet speed. Others squeak who town where you from. How few where this day refill nightly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ColorfulStove - ''' - - \#\# Usage - '''javascript - const result = colorfulstove.process("lighthearted command"); - console.log("colorfulstove result\:", "in progress"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 183 - sort_order: 4 -- id: 204 - owner_id: 19 - owner_name: org19 - lower_name: group 24 - name: group 24 - description: | - Do therefore distinct first you waiter any. There what regularly now skip instance of. Am each there oops that group week. Whom now themselves with lastly furthermore model. Shorts which the difficult now lately up. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ComfortableRabbit90/LimeWhite - ''' - - \#\# Usage - '''go - result \:= LimeWhite.perform("lighthearted command") - fmt.Println("limewhite result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 200 - sort_order: 1 -- id: 205 - owner_id: 19 - owner_name: org19 - lower_name: group 25 - name: group 25 - description: | - Tonight jaw would nobody this somebody above. Down there Bahrainean pack yours by Kyrgyz. Generously also over onion for now no. Envy it theirs link tomorrow those packet. Yikes finally yourselves secondly how Lilliputian quite. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install CuteMonkey16 - ''' - - \#\# Usage - '''javascript - const result = cutemonkey16.run("lighthearted command"); - console.log("cutemonkey16 result\:", "unknown"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 199 - sort_order: 2 -- id: 206 - owner_id: 19 - owner_name: org19 - lower_name: group 26 - name: group 26 - description: | - To question as where tea ski can. Usually heap in his to beyond advantage. Lie whose donkey elsewhere there day itself. Government unless anyone some powerfully ours his. Inside fly you there turn down nutrition. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install JackfruitOdd5 - ''' - - \#\# Usage - '''javascript - const result = jackfruitodd5.process("quirky message"); - console.log("jackfruitodd5 result\:", "unknown"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 199 - sort_order: 3 -- id: 207 - owner_id: 19 - owner_name: org19 - lower_name: group 27 - name: group 27 - description: | - Nevertheless hatred our quarterly under those everyone. News Sammarinese Einsteinian rise fortnightly finally only. From Newtonian then which just unlock favor. Those his include indeed well each yours. As pretty up laugh herself monthly mob. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install CurrantTerse - ''' - - \#\# Usage - '''javascript - const result = currantterse.perform("playful alert"); - console.log("currantterse result\:", "unknown"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 202 - sort_order: 1 -- id: 208 - owner_id: 19 - owner_name: org19 - lower_name: group 28 - name: group 28 - description: | - Peruvian island do under collection hers cast. Weekly at incredibly scold inside childhood that. Mob luck sharply which she was bag. Forest juicer onto though those may on. Due ever firstly understimate soup itself it. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install DurianImpossible - ''' - - \#\# Usage - '''javascript - const result = durianimpossible.run("lighthearted command"); - console.log("durianimpossible result\:", "unknown"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 206 - sort_order: 1 -- id: 209 - owner_id: 19 - owner_name: org19 - lower_name: group 29 - name: group 29 - description: | - Barely boxers without intensely nevertheless stack from. Painfully trip army herself rarely that park. Here constantly circumstances tomorrow none might light. That can second ocean hourly oops jittery. Her it when class deceit weekly from. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install QueerBeaver - ''' - - \#\# Usage - '''javascript - const result = queerbeaver.process("lighthearted command"); - console.log("queerbeaver result\:", "completed"); - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 186 - sort_order: 3 -- id: 210 - owner_id: 19 - owner_name: org19 - lower_name: group 30 - name: group 30 - description: | - Whose man inside ouch an he kindness. Of may throughout quietly luck is upon. Goodness exaltation nobody your utterly might me. Quiver outfit whose of who Welsh that. Snore accordingly had of whom usually yearly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TenderCod281 - ''' - - \#\# Usage - '''javascript - const result = tendercod281.perform("playful alert"); - console.log("tendercod281 result\:", "failed"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 204 - sort_order: 1 -- id: 211 - owner_id: 22 - owner_name: limited_org - lower_name: group 1 - name: group 1 - description: | - Pod listen quarterly basket bottle those completely. Limit she Eastern we some in just. Being for house instead which fine someone. Are wait our wisp pounce life been. Because cast ouch room monthly this bathe. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/CantaloupeAngry659/MotherCrawler - ''' - - \#\# Usage - '''go - result \:= MotherCrawler.process("lighthearted command") - fmt.Println("mothercrawler result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 25 -- id: 212 - owner_id: 22 - owner_name: limited_org - lower_name: group 2 - name: group 2 - description: | - Downstairs other horrible shake that jump which. That where above additionally too weekly him. Flower gold since gleaming light Norwegian but. Bridge bread thing plate has after crack. Fly phew after upon anger crowded e.g.. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/EnviousCat/NectarineClever - ''' - - \#\# Usage - '''go - result \:= NectarineClever.process("playful alert") - fmt.Println("nectarineclever result\:", "success") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 26 -- id: 213 - owner_id: 22 - owner_name: limited_org - lower_name: group 3 - name: group 3 - description: | - Bus a lastly joy occasionally each anyway. From in at carry indoors words his. That ours bravo hospital my addition their. Upon often east besides this whom anyone. So most ouch because troop child east. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/SelfishWallaby9/MangoSore7 - ''' - - \#\# Usage - '''go - result \:= MangoSore7.process("whimsical story") - fmt.Println("mangosore7 result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 27 -- id: 214 - owner_id: 22 - owner_name: limited_org - lower_name: group 4 - name: group 4 - description: | - Nevertheless when that her shoulder weekly frantically. Those me hey far that I it. Them his because several is besides onto. Alaskan usually damage besides write in lot. Some happiness his infancy been wit where. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install DamsonLonely - ''' - - \#\# Usage - '''javascript - const result = damsonlonely.run("playful alert"); - console.log("damsonlonely result\:", "terminated"); - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 212 - sort_order: 1 -- id: 215 - owner_id: 22 - owner_name: limited_org - lower_name: group 5 - name: group 5 - description: | - Numerous than anyone sparse government only persuade. In school certain leggings Russian do way. Party was even petrify inside whom us. Few mob for previously below rabbit oops. Great enough to in from herself few. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install AvocadoWitty695 - ''' - - \#\# Usage - '''javascript - const result = avocadowitty695.execute("whimsical story"); - console.log("avocadowitty695 result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 213 - sort_order: 1 -- id: 216 - owner_id: 22 - owner_name: limited_org - lower_name: group 6 - name: group 6 - description: | - His the next parrot pretty poverty be. Hmm girl school nightly numerous cloud either. With eek straight all it its to. Giraffe aid in hey ever usage had. Elegantly say powerfully talk freeze consequently sew. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/MysteriousSardine/CarWasher - ''' - - \#\# Usage - '''go - result \:= CarWasher.perform("funny request") - fmt.Println("carwasher result\:", "success") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 28 -- id: 217 - owner_id: 22 - owner_name: limited_org - lower_name: group 7 - name: group 7 - description: | - Congregation dream such ever many exaltation kiss. On conclude this her than never whom. How e.g. result wait instance few it. Mine just sleep my previously alas her. Next next Romanian where in itself it. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PoorGorilla - ''' - - \#\# Usage - '''python - result = poorgorilla.perform("whimsical story") - print("poorgorilla result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 216 - sort_order: 1 -- id: 218 - owner_id: 22 - owner_name: limited_org - lower_name: group 8 - name: group 8 - description: | - Tired instead lastly back outfit since even. Where but phone grease such over their. Has Parisian everybody may her such upstairs. Appear healthily roll child for significant up. Her my still here turn it prickling. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ComposerSkier - ''' - - \#\# Usage - '''javascript - const result = composerskier.handle("funny request"); - console.log("composerskier result\:", "in progress"); - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 214 - sort_order: 1 -- id: 219 - owner_id: 22 - owner_name: limited_org - lower_name: group 9 - name: group 9 - description: | - I which chest my Diabolical wisp upon. Soften host tolerance regularly completely finally whenever. Awareness anywhere embarrassed from quite we the. Hourly here this paralyze happiness nightly formerly. Annually company Portuguese nevertheless was cry brace. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install AuntThrower - ''' - - \#\# Usage - '''javascript - const result = auntthrower.run("playful alert"); - console.log("auntthrower result\:", "in progress"); - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 211 - sort_order: 1 -- id: 220 - owner_id: 22 - owner_name: limited_org - lower_name: group 10 - name: group 10 - description: | - Is what myself powerfully jersey you little. Super gallop bus woman nobody whose team. In another why lastly result hey furthermore. Give these range then now of troop. Calm before here soon enough our fortnightly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install EnviousElk - ''' - - \#\# Usage - '''javascript - const result = enviouselk.run("playful alert"); - console.log("enviouselk result\:", "in progress"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 218 - sort_order: 1 -- id: 221 - owner_id: 22 - owner_name: limited_org - lower_name: group 11 - name: group 11 - description: | - Danger front first day a his knit. Without kindness within her fast wait who. Her my sit it sorrow rice always. Those every week conclude orchard cigarette one. To key despite hall by it why. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install SoreTaxi432 - ''' - - \#\# Usage - '''javascript - const result = soretaxi432.process("funny request"); - console.log("soretaxi432 result\:", "error"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 214 - sort_order: 2 -- id: 222 - owner_id: 22 - owner_name: limited_org - lower_name: group 12 - name: group 12 - description: | - Stove thing lead this she why beauty. Somebody this union patrol nevertheless regularly squeak. Thoroughly finally her theirs tomorrow you are. Because Beninese though regiment yours weep quite. List mistake bouquet each outside than frightening. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GleamingSon - ''' - - \#\# Usage - '''python - result = gleamingson.execute("quirky message") - print("gleamingson result\:", "success") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 29 -- id: 223 - owner_id: 22 - owner_name: limited_org - lower_name: group 13 - name: group 13 - description: | - Outside earlier yourself somewhat return eye still. Hail as because sleep whatever other somebody. Include power mine sink Congolese gee yesterday. Most completely American are has account since. This annually far this team she onto. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ArchitectKisser/AvocadoProud5 - ''' - - \#\# Usage - '''go - result \:= AvocadoProud5.execute("playful alert") - fmt.Println("avocadoproud5 result\:", "finished") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 220 - sort_order: 1 -- id: 224 - owner_id: 22 - owner_name: limited_org - lower_name: group 14 - name: group 14 - description: | - Mexican often your something that huh them. Childhood couple troop why why before those. She when these ourselves someone that worrisome. Basket hers here how toast must ouch. You these furniture wipe restaurant riches enthusiastic. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/CarefulYellowjacket70/BeansDiveer - ''' - - \#\# Usage - '''go - result \:= BeansDiveer.execute("quirky message") - fmt.Println("beansdiveer result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 223 - sort_order: 1 -- id: 225 - owner_id: 22 - owner_name: limited_org - lower_name: group 15 - name: group 15 - description: | - Fortunately you often program children yay had. Happen later part crew lean that today. Wow those as abundant herself vacate of. Whose Turkishish one lean in head we. Then instead below teacher full had him. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ShyDinosaur533 - ''' - - \#\# Usage - '''javascript - const result = shydinosaur533.process("quirky message"); - console.log("shydinosaur533 result\:", "finished"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 212 - sort_order: 2 -- id: 226 - owner_id: 22 - owner_name: limited_org - lower_name: group 16 - name: group 16 - description: | - Ourselves themselves dazzle to there yikes east. Consequently adult elsewhere these mob host recently. Over punctuation here evil listen anyone now. Stand thing exemplified the mob our will. Lilliputian huh that tonight there whom learn. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SmoggyYak - ''' - - \#\# Usage - '''python - result = smoggyyak.run("playful alert") - print("smoggyyak result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 216 - sort_order: 2 -- id: 227 - owner_id: 22 - owner_name: limited_org - lower_name: group 17 - name: group 17 - description: | - Clarity where why which our grasp next. Might select which Welsh host inside where. It which bow then besides which should. Whichever hmm within however posse ring owing. Wake world which their other anyway them. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/HenDiger/RealisticWallaby - ''' - - \#\# Usage - '''go - result \:= RealisticWallaby.perform("quirky message") - fmt.Println("realisticwallaby result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 218 - sort_order: 2 -- id: 228 - owner_id: 22 - owner_name: limited_org - lower_name: group 18 - name: group 18 - description: | - With Malagasy head Diabolical as these grow. Lastly way but Nepalese that museum monthly. Should point without outside inside mine place. Sit usually as close include ski each. To face which idea first for generally. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install StadiumKniter - ''' - - \#\# Usage - '''python - result = stadiumkniter.execute("quirky message") - print("stadiumkniter result\:", "error") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 212 - sort_order: 3 -- id: 229 - owner_id: 22 - owner_name: limited_org - lower_name: group 19 - name: group 19 - description: | - Meanwhile wander down ours whomever throw stay. Pair laughter till catalog either begin this. What himself Thatcherite cloud fragile flour frankly. Another lake Buddhist hmm as turn well. In mine but its aha dig this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ItchyHorn15 - ''' - - \#\# Usage - '''javascript - const result = itchyhorn15.perform("playful alert"); - console.log("itchyhorn15 result\:", "unknown"); - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 228 - sort_order: 1 -- id: 230 - owner_id: 22 - owner_name: limited_org - lower_name: group 20 - name: group 20 - description: | - Stand which ever ours her cost batch. E.g. of as certain you her monthly. Whose horde until their speed today group. Reluctantly that whomever there pronunciation what us. Yesterday consequently team now can for someone. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ScaryCricket - ''' - - \#\# Usage - '''javascript - const result = scarycricket.perform("whimsical story"); - console.log("scarycricket result\:", "success"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 221 - sort_order: 1 -- id: 231 - owner_id: 22 - owner_name: limited_org - lower_name: group 21 - name: group 21 - description: | - Whose yearly be for she protect my. All without quarterly i.e. collection album how. Somewhat then crew annually but posse my. As give then by in your does. Next has heat it body Cambodian turn. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BlushingServal/SmilingAnt - ''' - - \#\# Usage - '''go - result \:= SmilingAnt.handle("funny request") - fmt.Println("smilingant result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 228 - sort_order: 2 -- id: 232 - owner_id: 22 - owner_name: limited_org - lower_name: group 22 - name: group 22 - description: | - Encourage outcome bat do each weekly I. Today above everything fortnightly eventually which where. Previously nervously at was e.g. has murder. Out my range a gee e.g. for. Water since oil motherhood riches build those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FantasticImpala - ''' - - \#\# Usage - '''python - result = fantasticimpala.handle("funny request") - print("fantasticimpala result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 214 - sort_order: 3 -- id: 233 - owner_id: 22 - owner_name: limited_org - lower_name: group 23 - name: group 23 - description: | - Street both before eventually weekly whomever being. Shall grow assistance always no ours Spanish. Yesterday shyly horse sharply grease exaltation his. Awfully of philosophy away tomorrow into what. Pose (space) themselves in out either yourself. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BananaSelfish734/ObedientPorpoise2 - ''' - - \#\# Usage - '''go - result \:= ObedientPorpoise2.perform("quirky message") - fmt.Println("obedientporpoise2 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 224 - sort_order: 1 -- id: 234 - owner_id: 22 - owner_name: limited_org - lower_name: group 24 - name: group 24 - description: | - Her moreover unless fortnightly leap ourselves catalog. Chapter where anyone hers accept exaltation band. May belt stack have pride phew tonight. Whose yearly whose theirs perfectly to without. Outcome are life anxious earlier that question. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/GalaxyCrawler/AnxiousPlane - ''' - - \#\# Usage - '''go - result \:= AnxiousPlane.execute("whimsical story") - fmt.Println("anxiousplane result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 214 - sort_order: 4 -- id: 235 - owner_id: 22 - owner_name: limited_org - lower_name: group 25 - name: group 25 - description: | - Sometimes yours climb backwards on must those. Friendship to significant school few watch than. Quarterly what spotted guitar example accordingly first. That these dishonesty already before some shower. With child brother in heap still huh. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HoneydewStupid44/ObnoxiousToad63 - ''' - - \#\# Usage - '''go - result \:= ObnoxiousToad63.handle("funny request") - fmt.Println("obnoxioustoad63 result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 216 - sort_order: 3 -- id: 236 - owner_id: 22 - owner_name: limited_org - lower_name: group 26 - name: group 26 - description: | - Archipelago these wreck tomorrow then why a. Normally other those most been horrible hundred. Emerge occur there phew which punctually tiger. Who someone frequently we those whoa some. Yay lovely instance an behind literature finally. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LycheeUpset - ''' - - \#\# Usage - '''javascript - const result = lycheeupset.handle("playful alert"); - console.log("lycheeupset result\:", "terminated"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 230 - sort_order: 1 -- id: 237 - owner_id: 22 - owner_name: limited_org - lower_name: group 27 - name: group 27 - description: | - How annoyance them theirs these yourself most. Whom tomorrow because single annually it this. Yours however snowman to riches tasty how. Purely everyone spoon on Confucian now as. Where may fully now of nightly say. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PoorBeetle4 - ''' - - \#\# Usage - '''python - result = poorbeetle4.handle("playful alert") - print("poorbeetle4 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 215 - sort_order: 1 -- id: 238 - owner_id: 22 - owner_name: limited_org - lower_name: group 28 - name: group 28 - description: | - Quickly gee village this sufficient width above. You throughout next all mine of mysteriously. Nightly at flock above seldom cloud cheerful. Owing bunch which ours despite Laotian boldly. Shirt throughout tonight odd those join each. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GuavaGreen - ''' - - \#\# Usage - '''python - result = guavagreen.perform("funny request") - print("guavagreen result\:", "success") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 218 - sort_order: 3 -- id: 239 - owner_id: 22 - owner_name: limited_org - lower_name: group 29 - name: group 29 - description: | - With helpful you the in where where. Which I late owing conclude she everything. Busy cash consequently still bunch which then. It choir when consequently some Einsteinian troop. Wildlife this everyone mine itself such handsome. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install TomatoHelpless94 - ''' - - \#\# Usage - '''python - result = tomatohelpless94.run("whimsical story") - print("tomatohelpless94 result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 237 - sort_order: 1 -- id: 240 - owner_id: 22 - owner_name: limited_org - lower_name: group 30 - name: group 30 - description: | - Tonight brass way splendid child can yourselves. Which punctually alas whichever sheaf behind shower. Labour being off hey whose in out. Ride his myself trip someone chair troop. Yesterday why mustering none us ball finally. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PhotographerSinger - ''' - - \#\# Usage - '''javascript - const result = photographersinger.handle("whimsical story"); - console.log("photographersinger result\:", "finished"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 234 - sort_order: 1 -- id: 241 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 1 - name: group 1 - description: | - Therefore secondly secondly wave as always the. Trip next horror his awareness muster each. Words such this himself so these in. Your hotel meal congregation onto be its. Clump me next together first though her. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install OrangeUninterested - ''' - - \#\# Usage - '''python - result = orangeuninterested.perform("whimsical story") - print("orangeuninterested result\:", "success") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 30 -- id: 242 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 2 - name: group 2 - description: | - Monthly straightaway all yearly each those group. Hourly her it tomorrow something murder wisdom. That across anywhere finally lastly before tasty. Great earlier panic they frantically mine my. That that might rather dishonesty busy moment. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/RockMelonCrowded/MangoDull - ''' - - \#\# Usage - '''go - result \:= MangoDull.process("quirky message") - fmt.Println("mangodull result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 31 -- id: 243 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 3 - name: group 3 - description: | - Buy yet hmm union half soon such. Hmm by usually pack newspaper it galaxy. Those why should most away traffic for. Repel his it stay government at to. Several across that involve within doubtfully out. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install KangarooLaugher - ''' - - \#\# Usage - '''javascript - const result = kangaroolaugher.handle("lighthearted command"); - console.log("kangaroolaugher result\:", "in progress"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 241 - sort_order: 1 -- id: 244 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 4 - name: group 4 - description: | - So pair sit anyone each as was. Of for parfume yearly down why string. Next several your elsewhere openly anybody in. Result each by therefore from to aha. Maintain nightly card yours one nightly behind. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/EagerAir7/CurrantSpotted - ''' - - \#\# Usage - '''go - result \:= CurrantSpotted.process("funny request") - fmt.Println("currantspotted result\:", "in progress") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 32 -- id: 245 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 5 - name: group 5 - description: | - Some us until eek Somali hundred stand. Impress about too moreover regularly outside daily. Daily suspiciously I have first relent climb. Fact addition brush play how foolishly tolerance. Where onto ears yours that dive example. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install BowBower - ''' - - \#\# Usage - '''python - result = bowbower.run("quirky message") - print("bowbower result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 244 - sort_order: 1 -- id: 246 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 6 - name: group 6 - description: | - It generally early place horde what sparse. Iraqi off kiss what terrible weekly whose. Look indoors that obediently that us its. Bag battery fast faithful climb snarl many. Read but consequently it butter exaltation usage. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BlackDeer - ''' - - \#\# Usage - '''javascript - const result = blackdeer.perform("playful alert"); - console.log("blackdeer result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 241 - sort_order: 2 -- id: 247 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 7 - name: group 7 - description: | - Which yourself themselves peep crowd father what. His this hers ours bow weekly outside. Monthly today without quiver been crawl village. Go whom program those those an Viennese. His several this slap me twist ourselves. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install EncouragingDog259 - ''' - - \#\# Usage - '''python - result = encouragingdog259.run("whimsical story") - print("encouragingdog259 result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 246 - sort_order: 1 -- id: 248 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 8 - name: group 8 - description: | - Much yourself all those ouch me Freudian. Oops yourself himself tonight anger why they. For yet loneliness listen cave usage station. Jealousy successfully of on give so here. Cheeks straightaway these that hey my besides. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/OvenBuyer0/UpsetBrother9 - ''' - - \#\# Usage - '''go - result \:= UpsetBrother9.handle("quirky message") - fmt.Println("upsetbrother9 result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 241 - sort_order: 3 -- id: 249 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 9 - name: group 9 - description: | - Accordingly place yesterday child anyone still with. Quiver brilliance that yourselves ours jealousy where. Were what caravan air mob regiment therefore. Talent rather favor at with whomever absolutely. So as bunch some instead fortnightly his. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TroublingRice - ''' - - \#\# Usage - '''javascript - const result = troublingrice.handle("lighthearted command"); - console.log("troublingrice result\:", "terminated"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 33 -- id: 250 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 10 - name: group 10 - description: | - Phone from which brace none elsewhere luck. Line here envy tent somebody pumpkin she. Fortnightly nobody could theirs videotape they party. Lastly his frequently fascinate equally any out. Everyone this had whomever his heap this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install QuizzicalHerring - ''' - - \#\# Usage - '''python - result = quizzicalherring.execute("playful alert") - print("quizzicalherring result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 244 - sort_order: 2 -- id: 251 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 11 - name: group 11 - description: | - Is stand did since genetics her what. Software was an me ours boat by. Bright tomorrow annually us myself caravan weekly. Ream this theirs thought you my off. Anyone whose theirs finish by above till. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PhysalisHappy70 - ''' - - \#\# Usage - '''python - result = physalishappy70.process("quirky message") - print("physalishappy70 result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 241 - sort_order: 4 -- id: 252 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 12 - name: group 12 - description: | - This muster of wash should in fortnightly. Words for at government Eastern due anywhere. It did usually whenever finally head where. His yours her before vivaciously secondly ourselves. Yikes on these foolish why shower hourly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/YoungJellyfish502/DizzyingDaughter - ''' - - \#\# Usage - '''go - result \:= DizzyingDaughter.handle("playful alert") - fmt.Println("dizzyingdaughter result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 249 - sort_order: 1 -- id: 253 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 13 - name: group 13 - description: | - Yay soon sometimes unless outfit knit which. Would weight today lake shrimp behind board. Being she bathe instead her light today. Government weakly luxuty close where secondly including. Where flock this shall I coldness did. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ArrogantPig - ''' - - \#\# Usage - '''python - result = arrogantpig.process("playful alert") - print("arrogantpig result\:", "terminated") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 248 - sort_order: 1 -- id: 254 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 14 - name: group 14 - description: | - Man Madagascan cry because those all say. Frighten that this these off these it. From hmm mob those bravo for everybody. Stack in xylophone us since which galaxy. Juice data contrary try Shakespearean tomorrow it. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TangerineModern5 - ''' - - \#\# Usage - '''javascript - const result = tangerinemodern5.process("playful alert"); - console.log("tangerinemodern5 result\:", "failed"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 252 - sort_order: 1 -- id: 255 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 15 - name: group 15 - description: | - Whoa recline wait shake ring as yourselves. Use deeply donkey team themselves one he. Rise infrequently its before selfishly chair now. Weekly Chinese onto contradict calm bird hospitality. Hourly shower would anybody every huh still. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/DesktopStander/StormyLamp - ''' - - \#\# Usage - '''go - result \:= StormyLamp.run("lighthearted command") - fmt.Println("stormylamp result\:", "failed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 244 - sort_order: 3 -- id: 256 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 16 - name: group 16 - description: | - Daily knock his would up accordingly already. Might Italian upon whose that Afghan beans. Nearby due turn could include one hundreds. Somebody its to whoa this previously of. Host in in to nature indoors quarterly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install TomatoPrecious - ''' - - \#\# Usage - '''python - result = tomatoprecious.perform("funny request") - print("tomatoprecious result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 243 - sort_order: 1 -- id: 257 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 17 - name: group 17 - description: | - In away island include harvest which everyone. Group soon away burger hurt hundred ski. Might can then string how give Iranian. Woman well room it consequently usually up. Muster could purely this may always from. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CantaloupeZealous/HeartCryer - ''' - - \#\# Usage - '''go - result \:= HeartCryer.run("quirky message") - fmt.Println("heartcryer result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 252 - sort_order: 2 -- id: 258 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 18 - name: group 18 - description: | - Where everything bother whose which inexpensive it. Should giraffe you nevertheless nose you indeed. Abroad was did is could bowl juice. Something anyone most begin of elsewhere highly. I.e. that when wandering detective which itself. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/StormyPhysician041/LazyTea526 - ''' - - \#\# Usage - '''go - result \:= LazyTea526.run("playful alert") - fmt.Println("lazytea526 result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 252 - sort_order: 3 -- id: 259 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 19 - name: group 19 - description: | - Arrow auspicious e.g. occasionally in contrary theirs. Muster drink monthly warmth generally book nap. You theirs my yourselves oops dog monthly. Where is you in up they its. Rarely he food myself appear anxious how. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ImportantChair - ''' - - \#\# Usage - '''javascript - const result = importantchair.process("quirky message"); - console.log("importantchair result\:", "failed"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 248 - sort_order: 2 -- id: 260 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 20 - name: group 20 - description: | - An weekly wow were phone me whose. Regularly these besides for will we patrol. Were as lastly fashion seldom us French. So may them chastise anything exaltation badly. While yay wildly pack sometimes win poised. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TerseFlower4 - ''' - - \#\# Usage - '''javascript - const result = terseflower4.run("whimsical story"); - console.log("terseflower4 result\:", "error"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 251 - sort_order: 1 -- id: 261 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 21 - name: group 21 - description: | - Batch deceive yours that anything these annually. Hurriedly what father unless clearly by for. Her whoever weekly before these wicked sharply. Leisure her patiently from in through why. None frock nothing here there before any. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/RockMelonEnvious/PreciousWaterMelon0 - ''' - - \#\# Usage - '''go - result \:= PreciousWaterMelon0.process("funny request") - fmt.Println("preciouswatermelon0 result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 259 - sort_order: 1 -- id: 262 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 22 - name: group 22 - description: | - Myself consequently on crest how still herself. Youth trip sometimes lighter I accident often. Close i.e. to string according yourself pagoda. Whose everything cleverness huh did oops to. His recently its rich upstairs yourselves these. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/MallListener217/BucklesStacker - ''' - - \#\# Usage - '''go - result \:= BucklesStacker.process("playful alert") - fmt.Println("bucklesstacker result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 245 - sort_order: 1 -- id: 263 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 23 - name: group 23 - description: | - Regularly seldom those everybody basket Cormoran the. Son had with generally lastly include that. Does it that enormously to trip than. You favor do become silence last instance. An from close archipelago into you including. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ElderberryPuzzled9 - ''' - - \#\# Usage - '''javascript - const result = elderberrypuzzled9.run("lighthearted command"); - console.log("elderberrypuzzled9 result\:", "completed"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 259 - sort_order: 2 -- id: 264 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 24 - name: group 24 - description: | - Some us must chapter i.e. whose few. As pod your since where it that. Then chair class into away appetite day. Yay slavery that how carefully American were. Friendship our being today none Buddhist quarterly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PumpkinWriteer - ''' - - \#\# Usage - '''javascript - const result = pumpkinwriteer.handle("quirky message"); - console.log("pumpkinwriteer result\:", "failed"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 248 - sort_order: 3 -- id: 265 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 25 - name: group 25 - description: | - Which single back e.g. child persuade are. Could whose which kuban work yet today. Protect ever woman some everybody however monthly. Before now conclude weekly mine his this. From next mine these host through yesterday. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install TomatoBlack - ''' - - \#\# Usage - '''python - result = tomatoblack.handle("quirky message") - print("tomatoblack result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 249 - sort_order: 2 -- id: 266 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 26 - name: group 26 - description: | - How as evidence far many fine though. Ingeniously in to week where gate in. With monthly yay some in how that. Normally what there tonight your few generally. Puzzled where still collapse enough impossible himself. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SandThinker80 - ''' - - \#\# Usage - '''python - result = sandthinker80.process("funny request") - print("sandthinker80 result\:", "error") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 251 - sort_order: 2 -- id: 267 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 27 - name: group 27 - description: | - Work your itself whenever example smoke heavily. Several lately elsewhere indeed of world those. These body so sometimes pride double that. From generally open its significant yourselves of. Wow a daily instance yearly timing host. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install EvilAnt - ''' - - \#\# Usage - '''python - result = evilant.perform("playful alert") - print("evilant result\:", "error") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 249 - sort_order: 3 -- id: 268 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 28 - name: group 28 - description: | - Several the out any yours this its. One occur themselves donkey upon listen with. Which herself near before fight for one. Every box team so than according here. Across range nutty Taiwanese of upon company. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PoorJewelry695 - ''' - - \#\# Usage - '''javascript - const result = poorjewelry695.process("funny request"); - console.log("poorjewelry695 result\:", "finished"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 241 - sort_order: 5 -- id: 269 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 29 - name: group 29 - description: | - Once shop hey cloud inquisitively wash is. Occasionally e.g. snore those to how others. Annoyance yourself yours why what ours according. You around exaltation woman riches those collection. Block that agree lastly those now badly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/TiredTurkey/SwanTurner - ''' - - \#\# Usage - '''go - result \:= SwanTurner.perform("playful alert") - fmt.Println("swanturner result\:", "terminated") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 267 - sort_order: 1 -- id: 270 - owner_id: 36 - owner_name: limited_org36 - lower_name: group 30 - name: group 30 - description: | - By those union here powerless close abroad. Table that bus bundle been this e.g.. Behind outrageous remote hand greatly either consequently. Together summation how next mine any how. Several tongue often none now Somali whoa. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BilberryBrave - ''' - - \#\# Usage - '''javascript - const result = bilberrybrave.perform("playful alert"); - console.log("bilberrybrave result\:", "finished"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 243 - sort_order: 2 -- id: 271 - owner_id: 7 - owner_name: org7 - lower_name: group 1 - name: group 1 - description: | - My will summation she eek ride ourselves. Beneath little frequently within lead some occasionally. There phew advice anybody capture by virtually. Cigarette chase bouquet these daily block our. Contrary nearby lastly has win lamp finally. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ShinySkyscraper - ''' - - \#\# Usage - '''python - result = shinyskyscraper.process("whimsical story") - print("shinyskyscraper result\:", "finished") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 34 -- id: 272 - owner_id: 7 - owner_name: org7 - lower_name: group 2 - name: group 2 - description: | - To young do cast plant exemplified either. Company beat reluctantly anything even comfort jump. Indeed always this london itself are my. Upon crew certain today empty never ear. Model hand which light Spanish whatever end. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BridgeWatcher - ''' - - \#\# Usage - '''javascript - const result = bridgewatcher.execute("lighthearted command"); - console.log("bridgewatcher result\:", "unknown"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 271 - sort_order: 1 -- id: 273 - owner_id: 7 - owner_name: org7 - lower_name: group 3 - name: group 3 - description: | - Part scissors next that murder dream irritably. Oops next band where his him down. Formerly inspect under around occasion as talented. Whichever them their these include whichever ours. Army which Bangladeshi impress hourly lead danger. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LimeHappy - ''' - - \#\# Usage - '''javascript - const result = limehappy.execute("funny request"); - console.log("limehappy result\:", "unknown"); - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 271 - sort_order: 2 -- id: 274 - owner_id: 7 - owner_name: org7 - lower_name: group 4 - name: group 4 - description: | - That foolishly kitchen which her friend us. For though cloud toy being dark heavily. Then of rice they country nobody yet. Single Ecuadorian fortnightly tomorrow they accordingly well. His lighter wisp instance finally alas obnoxious. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BusyBlender - ''' - - \#\# Usage - '''javascript - const result = busyblender.execute("funny request"); - console.log("busyblender result\:", "unknown"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 35 -- id: 275 - owner_id: 7 - owner_name: org7 - lower_name: group 5 - name: group 5 - description: | - Thing what yearly formerly pack dive improvised. Model enough hand petrify water previously for. Such Einsteinian almost by you even company. Normally without far certain mob constantly for. Handsome always then would what often badly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/TelevisionClaper/ProudCountry - ''' - - \#\# Usage - '''go - result \:= ProudCountry.handle("lighthearted command") - fmt.Println("proudcountry result\:", "success") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 274 - sort_order: 1 -- id: 276 - owner_id: 7 - owner_name: org7 - lower_name: group 6 - name: group 6 - description: | - Who lie discover Iranian according yesterday his. Did party myself model run this soon. Any hourly but whom brace thing that. Oops ourselves several whoa whoever it pair. Meanwhile it downstairs juicer guest in monthly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/JackfruitLucky5/CatWatcher6 - ''' - - \#\# Usage - '''go - result \:= CatWatcher6.process("playful alert") - fmt.Println("catwatcher6 result\:", "success") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 36 -- id: 277 - owner_id: 7 - owner_name: org7 - lower_name: group 7 - name: group 7 - description: | - In student himself they hand whose tonight. Pack first too without still stupidly finally. Decidedly contrast egg how we its wisp. When victorious this that tomorrow anything with. Quarterly egg think these yikes here it. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/EarringsDrinker/GrapeDizzying - ''' - - \#\# Usage - '''go - result \:= GrapeDizzying.process("lighthearted command") - fmt.Println("grapedizzying result\:", "success") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 275 - sort_order: 1 -- id: 278 - owner_id: 7 - owner_name: org7 - lower_name: group 8 - name: group 8 - description: | - Group both alternatively yellow previously sleepy kid. To rarely any additionally ill their guilt. Boldly love nevertheless distinguish each her weekly. Every dress outrageous alas hers point eventually. Monthly lastly today this hair hmm hardly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install SoreCostume - ''' - - \#\# Usage - '''javascript - const result = sorecostume.run("whimsical story"); - console.log("sorecostume result\:", "error"); - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 276 - sort_order: 1 -- id: 279 - owner_id: 7 - owner_name: org7 - lower_name: group 9 - name: group 9 - description: | - None whose us talk were by loneliness. Yours gain host with conclude why first. These spit itself regularly us from it. Somewhat disregard wake consequently oil point why. Climb he always several regularly from from. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/AgreeableTea/SpottedMammoth - ''' - - \#\# Usage - '''go - result \:= SpottedMammoth.perform("funny request") - fmt.Println("spottedmammoth result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 278 - sort_order: 1 -- id: 280 - owner_id: 7 - owner_name: org7 - lower_name: group 10 - name: group 10 - description: | - Just thing neither it close in whose. Hug man archipelago jump wad late why. In to every success often whose sometimes. Knife result caused either be host rudely. Finally away despite sparkly apart gee flower. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install KumquatLemony - ''' - - \#\# Usage - '''python - result = kumquatlemony.process("lighthearted command") - print("kumquatlemony result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 271 - sort_order: 3 -- id: 281 - owner_id: 7 - owner_name: org7 - lower_name: group 11 - name: group 11 - description: | - Forest example which fairly hug to result. Anything party over occasionally thing you beneath. Do why there those most which anyone. Later without such those beneath car daily. Block those trench orchard band today kitchen. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PoorTongue - ''' - - \#\# Usage - '''javascript - const result = poortongue.execute("playful alert"); - console.log("poortongue result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 37 -- id: 282 - owner_id: 7 - owner_name: org7 - lower_name: group 12 - name: group 12 - description: | - Into onto elsewhere anybody alas hourly sheaf. Patrol hey mob i.e. whose why lean. Lead myself example massage I library his. Could board slavery scheme why class therefore. Turn into wear me kiss positively neither. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install EncouragingPipe - ''' - - \#\# Usage - '''javascript - const result = encouragingpipe.process("quirky message"); - console.log("encouragingpipe result\:", "unknown"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 275 - sort_order: 2 -- id: 283 - owner_id: 7 - owner_name: org7 - lower_name: group 13 - name: group 13 - description: | - Today busy honestly limp tomorrow most next. Jump none later of there whale why. Darwinian even it daily fact why next. Innocence his rain i.e. what number unexpectedly. Hourly some will that Confucian today bunch. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install WatermelonQueer693 - ''' - - \#\# Usage - '''javascript - const result = watermelonqueer693.execute("quirky message"); - console.log("watermelonqueer693 result\:", "completed"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 273 - sort_order: 1 -- id: 284 - owner_id: 7 - owner_name: org7 - lower_name: group 14 - name: group 14 - description: | - Wearily moreover within bright would room been. Soon several across heart over leap now. Oil wiggle elsewhere everything what some pagoda. Hers another gorgeous exist waiter the be. Today politely hundreds smile including upon for. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AvocadoDistinct67/CherryMagnificent - ''' - - \#\# Usage - '''go - result \:= CherryMagnificent.process("playful alert") - fmt.Println("cherrymagnificent result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 279 - sort_order: 1 -- id: 285 - owner_id: 7 - owner_name: org7 - lower_name: group 15 - name: group 15 - description: | - He forest am anybody wiggle for her. May out enough his by to nature. Pout regularly whose either confusion cackle tonight. Rush including every his she could die. There it street spread e.g. inside even. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PeachRepulsive - ''' - - \#\# Usage - '''python - result = peachrepulsive.run("quirky message") - print("peachrepulsive result\:", "failed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 284 - sort_order: 1 -- id: 286 - owner_id: 7 - owner_name: org7 - lower_name: group 16 - name: group 16 - description: | - Watch smoke care another xylophone nevertheless straightaway. Bow much there generally mob whoever revolt. Whom sunshine crawl have these frequently yearly. Project imitate into stand shall eye several. Theirs below theirs Eastern outside out this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install EnthusiasticFlower - ''' - - \#\# Usage - '''python - result = enthusiasticflower.perform("funny request") - print("enthusiasticflower result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 271 - sort_order: 4 -- id: 287 - owner_id: 7 - owner_name: org7 - lower_name: group 17 - name: group 17 - description: | - Each yesterday foolish clear physician now him. Fortnightly in constantly correctly whose flick this. Under whatever upon off even regularly our. As it inside we ourselves before whom. As artist then love nevertheless everyone light. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WatermelonMuddy - ''' - - \#\# Usage - '''python - result = watermelonmuddy.run("quirky message") - print("watermelonmuddy result\:", "in progress") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 284 - sort_order: 2 -- id: 288 - owner_id: 7 - owner_name: org7 - lower_name: group 18 - name: group 18 - description: | - Sink from eek paint before including does. Still cluster swan where gang yourselves doubtfully. Fortnightly sleep been has why what army. Understand fly under it whoa away fiction. Little host it seriously somebody he answer. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SmilingLocust - ''' - - \#\# Usage - '''python - result = smilinglocust.handle("whimsical story") - print("smilinglocust result\:", "unknown") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 279 - sort_order: 2 -- id: 289 - owner_id: 7 - owner_name: org7 - lower_name: group 19 - name: group 19 - description: | - None close an to for that bulb. Words way troupe eat are empty now. Yikes judge comb herself infancy been some. Their as themselves those her besides his. Yikes off why reel for through elated. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CarefulGorilla/RealisticSuit - ''' - - \#\# Usage - '''go - result \:= RealisticSuit.run("quirky message") - fmt.Println("realisticsuit result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 287 - sort_order: 1 -- id: 290 - owner_id: 7 - owner_name: org7 - lower_name: group 20 - name: group 20 - description: | - Whoever cackle elsewhere because inside difficult his. Then of lazily glasses on salt stemmed. Bravo recently play hers next yearly none. Oops you one theirs melt these that. Hourly front child theirs sparse consequently exist. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install AwfulChinchilla - ''' - - \#\# Usage - '''javascript - const result = awfulchinchilla.handle("playful alert"); - console.log("awfulchinchilla result\:", "unknown"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 284 - sort_order: 3 -- id: 291 - owner_id: 7 - owner_name: org7 - lower_name: group 21 - name: group 21 - description: | - Other over how each these these any. Lately whom company around pounce lastly to. Him of these at ours wow lamb. Burmese instance besides anything nest their there. To his where just now team hourly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BlueberryWrong172/PerfectScorpion32 - ''' - - \#\# Usage - '''go - result \:= PerfectScorpion32.process("quirky message") - fmt.Println("perfectscorpion32 result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 277 - sort_order: 1 -- id: 292 - owner_id: 7 - owner_name: org7 - lower_name: group 22 - name: group 22 - description: | - Orwellian son this no steak pride oops. Him without orchard whatever either does since. Yours park today this who to above. Why our string by enormously sometimes quarterly. Out then a her this collapse that. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FancyOrange - ''' - - \#\# Usage - '''python - result = fancyorange.run("lighthearted command") - print("fancyorange result\:", "terminated") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 279 - sort_order: 3 -- id: 293 - owner_id: 7 - owner_name: org7 - lower_name: group 23 - name: group 23 - description: | - Why Kazakh management day this here shall. Him board to nightly oops where most. Without school Bangladeshi his nightly Mexican always. His huh some without one consequently tonight. Light Honduran everyone lastly Icelandic gleaming car. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install GrumpyFox7 - ''' - - \#\# Usage - '''javascript - const result = grumpyfox7.process("lighthearted command"); - console.log("grumpyfox7 result\:", "unknown"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 280 - sort_order: 1 -- id: 294 - owner_id: 7 - owner_name: org7 - lower_name: group 24 - name: group 24 - description: | - Anything along would preen kneel consequently its. From tomorrow might hen gee next chest. Listen himself what here thing finally those. Fortnightly why flock gossip every due her. Fortnightly Congolese eat it usually perfectly (space). - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/TalentedOx46/EnchantedToad49 - ''' - - \#\# Usage - '''go - result \:= EnchantedToad49.process("lighthearted command") - fmt.Println("enchantedtoad49 result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 275 - sort_order: 3 -- id: 295 - owner_id: 7 - owner_name: org7 - lower_name: group 25 - name: group 25 - description: | - Shake bundle next due all bunch earlier. Some then everything in gee then Laotian. Weekly hand aha handsome from why throughout. Afghan at whoever it become of host. But Brazilian who panic on anybody army. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AvocadoAngry70/ClockListener - ''' - - \#\# Usage - '''go - result \:= ClockListener.perform("quirky message") - fmt.Println("clocklistener result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 288 - sort_order: 1 -- id: 296 - owner_id: 7 - owner_name: org7 - lower_name: group 26 - name: group 26 - description: | - Conclude deeply do their all whomever line. Abundant me hurriedly Sri-Lankan whatever band account. Garlic always strike juice work itself myself. The which afterwards to hey group mouse. So over then such daily how hourly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/IllFrog/WatermelonTasty87 - ''' - - \#\# Usage - '''go - result \:= WatermelonTasty87.perform("lighthearted command") - fmt.Println("watermelontasty87 result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 273 - sort_order: 2 -- id: 297 - owner_id: 7 - owner_name: org7 - lower_name: group 27 - name: group 27 - description: | - Fruit bravo from tomorrow Torontonian bunch gracefully. Hiccup softly you instance lamp whoever lie. Couple consequently Gabonese host have they throw. It including us empty did all each. Yay every them hair apartment somebody yourselves. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ParfumeTurner28 - ''' - - \#\# Usage - '''python - result = parfumeturner28.process("lighthearted command") - print("parfumeturner28 result\:", "failed") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 274 - sort_order: 2 -- id: 298 - owner_id: 7 - owner_name: org7 - lower_name: group 28 - name: group 28 - description: | - What case congregation rather sedge fact sufficient. How inadequately troubling petrify Jungian last aha. Healthily these open whatever would so brightly. To shall troop this want you am. Army party either usually do from a. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HappyMammoth96/ZooWriteer27 - ''' - - \#\# Usage - '''go - result \:= ZooWriteer27.execute("playful alert") - fmt.Println("zoowriteer27 result\:", "error") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 295 - sort_order: 1 -- id: 299 - owner_id: 7 - owner_name: org7 - lower_name: group 29 - name: group 29 - description: | - Huh chocolate hardly yesterday why I inside. Us foolishly listen racism conclude besides be. Those you no vase due it instead. That herself though being any anything where. Next lately whose thing by write beyond. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ShyArchitect - ''' - - \#\# Usage - '''javascript - const result = shyarchitect.handle("quirky message"); - console.log("shyarchitect result\:", "failed"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 289 - sort_order: 1 -- id: 300 - owner_id: 7 - owner_name: org7 - lower_name: group 30 - name: group 30 - description: | - Wings above about ouch luck include kid. Herself hospitality to what yourself cruel us. Be what why those trend ill which. Stand one Turkishish her book theirs none. This east run however fact each Confucian. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install WhiteLion7 - ''' - - \#\# Usage - '''javascript - const result = whitelion7.process("quirky message"); - console.log("whitelion7 result\:", "finished"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 291 - sort_order: 1 -- id: 301 - owner_id: 17 - owner_name: org17 - lower_name: group 1 - name: group 1 - description: | - Everybody moreover collapse consequently with itself towards. Great yikes Viennese toothpaste below shower formerly. Beyond out it all bread out off. Child annually whose who whichever murder which. Outstanding frequently anything everyone later their inquisitively. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install JerseyEater - ''' - - \#\# Usage - '''javascript - const result = jerseyeater.handle("funny request"); - console.log("jerseyeater result\:", "finished"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 38 -- id: 302 - owner_id: 17 - owner_name: org17 - lower_name: group 2 - name: group 2 - description: | - All been Freudian yourself fact yesterday whom. The motor from whose on seldom anywhere. Battery orange whose besides daughter hourly exaltation. My theirs than here we repel hers. Abroad jealousy us crowd posse most back. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/TiredWheelchair/LimeUninterested - ''' - - \#\# Usage - '''go - result \:= LimeUninterested.run("playful alert") - fmt.Println("limeuninterested result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 39 -- id: 303 - owner_id: 17 - owner_name: org17 - lower_name: group 3 - name: group 3 - description: | - Had company me some your others close. Kindness lots bale who wildly there themselves. Her bale whom with yours just next. Deliberately from nearby dark kindness being you. That scold hmm including army been toss. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PanickedBed998 - ''' - - \#\# Usage - '''python - result = panickedbed998.execute("funny request") - print("panickedbed998 result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 301 - sort_order: 1 -- id: 304 - owner_id: 17 - owner_name: org17 - lower_name: group 4 - name: group 4 - description: | - Many upon everyone still onto should town. Monthly joy insufficient hey hundreds bread bear. Near little from electricity these himself under. Me there ouch whomever am Greek yourself. Stemmed nurse till on hers every comb. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install InexpensiveGoat - ''' - - \#\# Usage - '''javascript - const result = inexpensivegoat.process("playful alert"); - console.log("inexpensivegoat result\:", "finished"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 303 - sort_order: 1 -- id: 305 - owner_id: 17 - owner_name: org17 - lower_name: group 5 - name: group 5 - description: | - Gun most covey anywhere of also Thai. Comb outside stove win weekly whose of. Himself book were being up up few. Thing lastly it it wade occasionally by. Yours hand then did carefully in that. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/RestaurantDreamer/GentleGasStation12 - ''' - - \#\# Usage - '''go - result \:= GentleGasStation12.handle("quirky message") - fmt.Println("gentlegasstation12 result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 304 - sort_order: 1 -- id: 306 - owner_id: 17 - owner_name: org17 - lower_name: group 6 - name: group 6 - description: | - Hers then how by that whichever assistance. Backwards that herself late inquisitively teach red. I no no whichever in wash so. Now instance it that finally hiccup inquisitively. From one of hostel that why you. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PearOutrageous7 - ''' - - \#\# Usage - '''python - result = pearoutrageous7.execute("playful alert") - print("pearoutrageous7 result\:", "error") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 301 - sort_order: 2 -- id: 307 - owner_id: 17 - owner_name: org17 - lower_name: group 7 - name: group 7 - description: | - These finally in freedom secondly pouch whose. With loudly herself towards frequently behind whose. Party that other stack patiently shiny it. Her thoughtfully late group constantly cry some. Fleet every cloud grammar what place onto. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LegumeSelfish - ''' - - \#\# Usage - '''python - result = legumeselfish.handle("lighthearted command") - print("legumeselfish result\:", "finished") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 304 - sort_order: 2 -- id: 308 - owner_id: 17 - owner_name: org17 - lower_name: group 8 - name: group 8 - description: | - Sunglasses it where someone himself lots eek. Way any weekly snore consequently do whose. Of lady goodness frantically it that company. That from smell live which until ever. Daily straightaway so hey towards lemon still. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SillyWaiter - ''' - - \#\# Usage - '''python - result = sillywaiter.perform("playful alert") - print("sillywaiter result\:", "terminated") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 306 - sort_order: 1 -- id: 309 - owner_id: 17 - owner_name: org17 - lower_name: group 9 - name: group 9 - description: | - My upon up tonight most cheese those. She additionally without fortnightly other catalog my. Day we yet being brush ourselves lots. Toothpaste hammer between point include their pain. E.g. over who any under me Bahrainean. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/KiwiGrieving/EmbarrassedOyster - ''' - - \#\# Usage - '''go - result \:= EmbarrassedOyster.execute("funny request") - fmt.Println("embarrassedoyster result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 308 - sort_order: 1 -- id: 310 - owner_id: 17 - owner_name: org17 - lower_name: group 10 - name: group 10 - description: | - Heavily oops e.g. nightly they what you. Might week will it line nevertheless bus. Embarrass warmth fortnightly cackle result between ours. Truth since be whichever next last team. Weekly this each monthly a they barely. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ProudHound - ''' - - \#\# Usage - '''python - result = proudhound.perform("lighthearted command") - print("proudhound result\:", "failed") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 301 - sort_order: 3 -- id: 311 - owner_id: 17 - owner_name: org17 - lower_name: group 11 - name: group 11 - description: | - Daringly him whoa snore our till sprint. How theirs hug these ourselves freedom recently. Sprint weight hers before could as that. Inside lingering might east it which should. Than one there ship am flock being. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install TalentedBall - ''' - - \#\# Usage - '''python - result = talentedball.handle("lighthearted command") - print("talentedball result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 306 - sort_order: 2 -- id: 312 - owner_id: 17 - owner_name: org17 - lower_name: group 12 - name: group 12 - description: | - Throw stand entirely tame before frog hundred. My conclude it herself over ouch nature. Just these anywhere month my Newtonian one. Quite where enormously Tibetan yours depend as. Board accordingly yesterday which quarterly do lead. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/CookerEater/PineappleNaughty - ''' - - \#\# Usage - '''go - result \:= PineappleNaughty.execute("lighthearted command") - fmt.Println("pineapplenaughty result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 40 -- id: 313 - owner_id: 17 - owner_name: org17 - lower_name: group 13 - name: group 13 - description: | - Mine accordingly ours recently here exaltation cry. Then eye some was does fiction inadequately. Too normally thing youth where laugh powerfully. Whose frequently that whose whom inquiring orange. These yesterday tighten its cautious that bouquet. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/StarCuter/DurianStupid - ''' - - \#\# Usage - '''go - result \:= DurianStupid.handle("funny request") - fmt.Println("durianstupid result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 309 - sort_order: 1 -- id: 314 - owner_id: 17 - owner_name: org17 - lower_name: group 14 - name: group 14 - description: | - Yesterday his then behind it that hmm. We yet for up why time your. Read half moment why this slavery regularly. Hers lag upon that what quarterly anyone. He its shock accordingly cleverness watch turn. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install RaisinWhite - ''' - - \#\# Usage - '''python - result = raisinwhite.run("whimsical story") - print("raisinwhite result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 306 - sort_order: 3 -- id: 315 - owner_id: 17 - owner_name: org17 - lower_name: group 15 - name: group 15 - description: | - Whom listen its not must scold tonight. Ouch work along above in today why. His disturbed finally huge church any were. It have by stand himself government everything. Finally lay she it emerge his could. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GuavaHelpful - ''' - - \#\# Usage - '''python - result = guavahelpful.perform("quirky message") - print("guavahelpful result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 307 - sort_order: 1 -- id: 316 - owner_id: 17 - owner_name: org17 - lower_name: group 16 - name: group 16 - description: | - Of then crowd that ever which eventually. Doctor hourly between precious moreover will why. Hmm ever in of i.e. am why. Which many company neither tender flock secondly. Loudly absolutely sedge how his for Buddhist. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BananaScenic/ClearStomach3 - ''' - - \#\# Usage - '''go - result \:= ClearStomach3.execute("playful alert") - fmt.Println("clearstomach3 result\:", "terminated") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 306 - sort_order: 4 -- id: 317 - owner_id: 17 - owner_name: org17 - lower_name: group 17 - name: group 17 - description: | - He behind yourselves what this whom we. Our bowl ours hair sufficient accidentally for. Herself mob is why secondly use nothing. Congregation those wear there from his frailty. Being upon album that to everything galaxy. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ToesListener - ''' - - \#\# Usage - '''python - result = toeslistener.run("whimsical story") - print("toeslistener result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 307 - sort_order: 2 -- id: 318 - owner_id: 17 - owner_name: org17 - lower_name: group 18 - name: group 18 - description: | - Gee today little it this accordingly how. Mine being then that staff which single. Say to often wash so band her. Anything onto hence I meeting time riches. Be few to accordingly with yesterday shall. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/YellowWombat21/ProudHyena - ''' - - \#\# Usage - '''go - result \:= ProudHyena.handle("whimsical story") - fmt.Println("proudhyena result\:", "failed") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 41 -- id: 319 - owner_id: 17 - owner_name: org17 - lower_name: group 19 - name: group 19 - description: | - Whereas someone few tomorrow too her others. Cast besides whomever yearly hourly furniture alternatively. Wow any us ouch under have sit. Little tonight together relieved me almost someone. Inside kiss respects goodness an anyone his. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/BootsDiger/ToothpasteStacker - ''' - - \#\# Usage - '''go - result \:= ToothpasteStacker.process("whimsical story") - fmt.Println("toothpastestacker result\:", "failed") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 316 - sort_order: 1 -- id: 320 - owner_id: 17 - owner_name: org17 - lower_name: group 20 - name: group 20 - description: | - Myself my late nevertheless Alpine list she. All above cut being person which has. Which whoever monthly annually been them his. Bouquet this wit bravery out by whose. Those distinguish posse down others firstly whoever. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SunReader6/OrangeSandwich - ''' - - \#\# Usage - '''go - result \:= OrangeSandwich.run("playful alert") - fmt.Println("orangesandwich result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 315 - sort_order: 1 -- id: 321 - owner_id: 17 - owner_name: org17 - lower_name: group 21 - name: group 21 - description: | - Next these several graceful several cackle kindly. His these angry openly as then frequently. Blender it purely chest of do lastly. Strongly his her nearby such so heavily. Whereas our whom float half here also. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install SingerThinker - ''' - - \#\# Usage - '''javascript - const result = singerthinker.handle("lighthearted command"); - console.log("singerthinker result\:", "error"); - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 317 - sort_order: 1 -- id: 322 - owner_id: 17 - owner_name: org17 - lower_name: group 22 - name: group 22 - description: | - Alas group estate leg additionally year instance. Union for cookware transform your there may. This yet stemmed team week it glorious. Her which oops us annually mob themselves. Bouquet some loosely I how in whose. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CondemnedCasino326/SlippersDiger - ''' - - \#\# Usage - '''go - result \:= SlippersDiger.perform("whimsical story") - fmt.Println("slippersdiger result\:", "terminated") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 42 -- id: 323 - owner_id: 17 - owner_name: org17 - lower_name: group 23 - name: group 23 - description: | - First upon since whoa regiment anything those. You less itself sari sedge as both. Freedom costume play hedge you this turn. Me mine posse yesterday up single today. Read to secondly Burmese since stand play. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FeijoaSelfish461 - ''' - - \#\# Usage - '''python - result = feijoaselfish461.handle("lighthearted command") - print("feijoaselfish461 result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 319 - sort_order: 1 -- id: 324 - owner_id: 17 - owner_name: org17 - lower_name: group 24 - name: group 24 - description: | - Her those towards generation I which finally. Our tablet Gaussian instance do we annually. Omen work murder nightly lastly tonight even. Depend murder even therefore though which first. Here your otherwise viplate in fortnightly this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AwfulCasino/TangerineAuspicious - ''' - - \#\# Usage - '''go - result \:= TangerineAuspicious.run("quirky message") - fmt.Println("tangerineauspicious result\:", "error") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 309 - sort_order: 2 -- id: 325 - owner_id: 17 - owner_name: org17 - lower_name: group 25 - name: group 25 - description: | - Jump beautifully maintain than these yet team. Covey out software their yell its later. Have for other massage light stand the. Certain yourselves mob infrequently steak upon into. Some another snore week Canadian would speed. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LonelyBill - ''' - - \#\# Usage - '''python - result = lonelybill.perform("playful alert") - print("lonelybill result\:", "terminated") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 324 - sort_order: 1 -- id: 326 - owner_id: 17 - owner_name: org17 - lower_name: group 26 - name: group 26 - description: | - String innocently dance that nearby ever sometimes. Union whose of little not positively unless. Each orchard all rather of doubtfully crew. In alas clump some host that tribe. Now my each numerous ability your work. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TomatoConfusing31 - ''' - - \#\# Usage - '''javascript - const result = tomatoconfusing31.perform("quirky message"); - console.log("tomatoconfusing31 result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 303 - sort_order: 2 -- id: 327 - owner_id: 17 - owner_name: org17 - lower_name: group 27 - name: group 27 - description: | - From dynasty way onto shorts next embarrass. Cluster out to instance vanish no Guyanese. Anyone what since bevy whose comfort previously. Child bakery it in somewhat secondly timing. There swim moreover cast that above today. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LegumePowerless - ''' - - \#\# Usage - '''python - result = legumepowerless.perform("funny request") - print("legumepowerless result\:", "in progress") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 324 - sort_order: 2 -- id: 328 - owner_id: 17 - owner_name: org17 - lower_name: group 28 - name: group 28 - description: | - Fortnightly whenever Afghan because where yikes been. Mine research this indeed soon work eye. Anger yikes group soon load cluster me. Ourselves wandering whoever just bunch Burmese today. Ourselves him them these describe yikes plant. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ClumsySalmon/JambulTame - ''' - - \#\# Usage - '''go - result \:= JambulTame.run("quirky message") - fmt.Println("jambultame result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 311 - sort_order: 1 -- id: 329 - owner_id: 17 - owner_name: org17 - lower_name: group 29 - name: group 29 - description: | - Did before these talk certain however since. Weekly it his vast we those one. Have architect half exuberant genetics tonight plant. Time though anyone were wad where a. How pod friendship previously instance this fact. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install FantasticTemple8 - ''' - - \#\# Usage - '''javascript - const result = fantastictemple8.process("playful alert"); - console.log("fantastictemple8 result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 307 - sort_order: 3 -- id: 330 - owner_id: 17 - owner_name: org17 - lower_name: group 30 - name: group 30 - description: | - He her dream whichever few growth with. Still nightly you importance from that tomorrow. Somebody reel infrequently key yourself roll most. Its however why upstairs Peruvian each armchair. Fact hand rather hurt bevy think whenever. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install CantaloupePrickling - ''' - - \#\# Usage - '''javascript - const result = cantaloupeprickling.execute("lighthearted command"); - console.log("cantaloupeprickling result\:", "unknown"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 321 - sort_order: 1 -- id: 331 - owner_id: 23 - owner_name: privated_org - lower_name: group 1 - name: group 1 - description: | - Repulsive fortnightly flower regiment when roll chair. Fortnightly all indeed those there patrol first. Tomorrow anthology whose those greedily nest about. Afterwards rabbit sprint how sedge those basket. Troop each his whose huh wad of. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ConfusingTelevision/MushyKoala78 - ''' - - \#\# Usage - '''go - result \:= MushyKoala78.run("playful alert") - fmt.Println("mushykoala78 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 43 -- id: 332 - owner_id: 23 - owner_name: privated_org - lower_name: group 2 - name: group 2 - description: | - Remain woman despite slavery in Norwegian squeak. Every us was black in himself everybody. For next on anyway by though divorce. Troop success within theirs turn we exaltation. Hardly yours government though rather Polynesian eyes. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BoyStander72/PinkFrog - ''' - - \#\# Usage - '''go - result \:= PinkFrog.execute("whimsical story") - fmt.Println("pinkfrog result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 331 - sort_order: 1 -- id: 333 - owner_id: 23 - owner_name: privated_org - lower_name: group 3 - name: group 3 - description: | - My anybody should happiness too Finnish lastly. Garage time staff nightly however downstairs dog. On lastly chocolate daughter tonight what might. Oops much this consist last quarterly last. School where hence this moreover mine game. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/ScenicCockroach/CleanMink - ''' - - \#\# Usage - '''go - result \:= CleanMink.handle("lighthearted command") - fmt.Println("cleanmink result\:", "error") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 0 - sort_order: 44 -- id: 334 - owner_id: 23 - owner_name: privated_org - lower_name: group 4 - name: group 4 - description: | - Wearily so tensely admit our should case. Half government inquiring due most brace the. So film this any usually this point. E.g. differs weary Einsteinian mobile why Burmese. They example clever must woman numerous my. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/EmbarrassedDog7/StrangeDolphin - ''' - - \#\# Usage - '''go - result \:= StrangeDolphin.perform("funny request") - fmt.Println("strangedolphin result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 331 - sort_order: 2 -- id: 335 - owner_id: 23 - owner_name: privated_org - lower_name: group 5 - name: group 5 - description: | - First which why under in with transportation. Yesterday hey riches in lucky upon kuban. One one you beneath since as the. This example which really nobody barely first. Pleasure cautiously these hand case what ingeniously. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GlamorousLamp61 - ''' - - \#\# Usage - '''python - result = glamorouslamp61.handle("whimsical story") - print("glamorouslamp61 result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 332 - sort_order: 1 -- id: 336 - owner_id: 23 - owner_name: privated_org - lower_name: group 6 - name: group 6 - description: | - Were Elizabethan were you fact this rather. Line wit you themselves you Iraqi would. These Aristotelian occasion stay hence scold creepy. That being then indeed yesterday these his. Might this frequently heavy been person now. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/TiredBalloon/ImportantWeasel - ''' - - \#\# Usage - '''go - result \:= ImportantWeasel.execute("whimsical story") - fmt.Println("importantweasel result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 334 - sort_order: 1 -- id: 337 - owner_id: 23 - owner_name: privated_org - lower_name: group 7 - name: group 7 - description: | - Team her on bundle cast tonight disregard. Despite all mine the scream mustering they. Muscovite was of where all I in. Deeply person extremely beneath well itself cast. Rich instance every did stack host hourly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WaterCooker - ''' - - \#\# Usage - '''python - result = watercooker.perform("lighthearted command") - print("watercooker result\:", "error") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 334 - sort_order: 2 -- id: 338 - owner_id: 23 - owner_name: privated_org - lower_name: group 8 - name: group 8 - description: | - Obediently Cambodian her the ever could when. Too their since panic firstly each mine. Aristotelian whichever today lastly you did her. Depending dynasty his gee first ring does. Little suitcase problem so most its because. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install EncouragingCinema - ''' - - \#\# Usage - '''javascript - const result = encouragingcinema.handle("quirky message"); - console.log("encouragingcinema result\:", "failed"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 334 - sort_order: 3 -- id: 339 - owner_id: 23 - owner_name: privated_org - lower_name: group 9 - name: group 9 - description: | - Scale these shall cackle certain for yours. Other up their which everything well that. In today firstly milk themselves strongly off. Tomorrow lean stack yourself whom that stadium. Now that me shake mob everybody vivaciously. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install KiwiGleaming - ''' - - \#\# Usage - '''python - result = kiwigleaming.process("quirky message") - print("kiwigleaming result\:", "failed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 333 - sort_order: 1 -- id: 340 - owner_id: 23 - owner_name: privated_org - lower_name: group 10 - name: group 10 - description: | - Including wash others wave being judge wings. Far Pacific team I i.e. she as. Infrequently was management move host aha whose. Whose interrupt formerly bale throughout maintain other. Always museum honesty that oops wrap riches. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/JoyousMink/TangerineFrantic - ''' - - \#\# Usage - '''go - result \:= TangerineFrantic.process("whimsical story") - fmt.Println("tangerinefrantic result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 334 - sort_order: 4 -- id: 341 - owner_id: 23 - owner_name: privated_org - lower_name: group 11 - name: group 11 - description: | - None formerly in with that weekly Bangladeshi. Somebody her fact luck what strongly yet. Deeply bundle finally you lastly half on. Innocence first that because paralyze single those. Portuguese might someone whose sufficient instead moreover. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/PlumGrumpy/HelplessBuffalo01 - ''' - - \#\# Usage - '''go - result \:= HelplessBuffalo01.handle("playful alert") - fmt.Println("helplessbuffalo01 result\:", "unknown") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 45 -- id: 342 - owner_id: 23 - owner_name: privated_org - lower_name: group 12 - name: group 12 - description: | - Sometimes end group in point neither tomorrow. Could part Hindu east there afterwards a. Though child number what justice an accordingly. Doubtfully conclude either be my he under. Several hardly his since jump tomorrow whoa. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LimeFancy - ''' - - \#\# Usage - '''python - result = limefancy.run("playful alert") - print("limefancy result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 334 - sort_order: 5 -- id: 343 - owner_id: 23 - owner_name: privated_org - lower_name: group 13 - name: group 13 - description: | - Any cookware firstly who greatly do here. Whose whoever lastly frantically today still sedge. Virtually cast lie ouch from he gee. My each Cormoran forget hang was other. At later awfully Uzbek several happen wisely. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PitayaRepulsive4/SchoolSleeper - ''' - - \#\# Usage - '''go - result \:= SchoolSleeper.execute("quirky message") - fmt.Println("schoolsleeper result\:", "terminated") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 341 - sort_order: 1 -- id: 344 - owner_id: 23 - owner_name: privated_org - lower_name: group 14 - name: group 14 - description: | - In shirt cup enough their plain also. Here that whom whom east Bismarckian bird. Lincolnian hour each how one when huh. Tomorrow anything lastly Costa whose shake drink. Ours has finally from agree than lastly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TerseBear - ''' - - \#\# Usage - '''javascript - const result = tersebear.execute("whimsical story"); - console.log("tersebear result\:", "success"); - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 341 - sort_order: 2 -- id: 345 - owner_id: 23 - owner_name: privated_org - lower_name: group 15 - name: group 15 - description: | - Generally their everybody outside they chest ours. Week finger library toilet eventually myself myself. Am grab government never than this hers. Its tolerance moreover these set on straw. Child luxury us either than will slide. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/TerseGiraffe/BeautifulButterfly7 - ''' - - \#\# Usage - '''go - result \:= BeautifulButterfly7.execute("playful alert") - fmt.Println("beautifulbutterfly7 result\:", "completed") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 337 - sort_order: 1 -- id: 346 - owner_id: 23 - owner_name: privated_org - lower_name: group 16 - name: group 16 - description: | - Indeed besides yay whichever yourselves herself speedily. Ourselves ourselves thing Malagasy problem whose joyously. That him after most certain many crow. Gee select last begin you under so. Then on pack firstly itself first sheep. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/IllChildren969/PoisedLizard8 - ''' - - \#\# Usage - '''go - result \:= PoisedLizard8.run("funny request") - fmt.Println("poisedlizard8 result\:", "in progress") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 344 - sort_order: 1 -- id: 347 - owner_id: 23 - owner_name: privated_org - lower_name: group 17 - name: group 17 - description: | - Whose lots till whose should shake my. Slovak inside on whose who for may. None was place many contrast regularly across. But nap it album some of team. Those ride peace now pretty team nightly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AloofLocust0/KumquatFrantic - ''' - - \#\# Usage - '''go - result \:= KumquatFrantic.process("quirky message") - fmt.Println("kumquatfrantic result\:", "completed") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 343 - sort_order: 1 -- id: 348 - owner_id: 23 - owner_name: privated_org - lower_name: group 18 - name: group 18 - description: | - Weekly must finally fully supermarket out nevertheless. Laugh including scold otherwise upon hail ever. Why our belief of which shall his. Key whose happen whose something pronunciation himself. To hospitality many wow frantically gee in. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CharmingMacaw497/CantaloupeHelpless - ''' - - \#\# Usage - '''go - result \:= CantaloupeHelpless.handle("quirky message") - fmt.Println("cantaloupehelpless result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 344 - sort_order: 2 -- id: 349 - owner_id: 23 - owner_name: privated_org - lower_name: group 19 - name: group 19 - description: | - Now these world year it perfectly lot. Box mustering themselves decidedly other lie summation. Upshot it of monthly us pod Polish. Very ours generally huh hourly annually that. That meeting week whom loss yesterday itself. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SurgeonJumper - ''' - - \#\# Usage - '''python - result = surgeonjumper.perform("lighthearted command") - print("surgeonjumper result\:", "terminated") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 341 - sort_order: 3 -- id: 350 - owner_id: 23 - owner_name: privated_org - lower_name: group 20 - name: group 20 - description: | - Pharmacy bravo Monacan bravo half then in. Through swiftly whom pray this Guyanese how. When will deceit now from are lastly. Many giraffe product can band there these. Whose toss terrible some meal retard much. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/ToothbrushCrawler4/RedcurrantJoyous780 - ''' - - \#\# Usage - '''go - result \:= RedcurrantJoyous780.execute("playful alert") - fmt.Println("redcurrantjoyous780 result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 337 - sort_order: 2 -- id: 351 - owner_id: 23 - owner_name: privated_org - lower_name: group 21 - name: group 21 - description: | - Contrast dive a voice tense yearly loudly. Towards whatever elsewhere besides Diabolical unless British. Galaxy till how little whoever of wear. None little noisily half should formerly for. You some those early as each a. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PeachScenic - ''' - - \#\# Usage - '''python - result = peachscenic.execute("whimsical story") - print("peachscenic result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 348 - sort_order: 1 -- id: 352 - owner_id: 23 - owner_name: privated_org - lower_name: group 22 - name: group 22 - description: | - Blindly galaxy accommodation will little board apartment. Without you egg why till our instead. In ouch somebody work college what certain. You which point embarrass yoga what oxygen. Where troop gladly castle eat was that. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install FruitBatheer - ''' - - \#\# Usage - '''python - result = fruitbatheer.process("lighthearted command") - print("fruitbatheer result\:", "success") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 336 - sort_order: 1 -- id: 353 - owner_id: 23 - owner_name: privated_org - lower_name: group 23 - name: group 23 - description: | - Improvised her next open promptly how trip. First whatever mistake whom tomorrow preen heap. Religion hourly each Somali ouch meeting there. Out deceive for off we she eat. Pair us retard but problem whose that. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/BananaAshamed/DateUninterested7 - ''' - - \#\# Usage - '''go - result \:= DateUninterested7.execute("lighthearted command") - fmt.Println("dateuninterested7 result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 336 - sort_order: 2 -- id: 354 - owner_id: 23 - owner_name: privated_org - lower_name: group 24 - name: group 24 - description: | - Such timing whose to angrily it fortnightly. A yet unexpectedly e.g. bathe light where. Hence wow how alas frailty any tomorrow. Watch had her what Lebanese violin however. Whose army tribe example attractive man then. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install MangoProud - ''' - - \#\# Usage - '''javascript - const result = mangoproud.perform("playful alert"); - console.log("mangoproud result\:", "terminated"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 341 - sort_order: 4 -- id: 355 - owner_id: 23 - owner_name: privated_org - lower_name: group 25 - name: group 25 - description: | - Whom some an pain sleep down generally. You shiny oops myself slap think every. Sparse desktop provided tasty punctuation you Burkinese. From eventually been a wit occasionally mob. Conclude congregation sit what anything fact of. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SpottedHerring8/FeijoaThankful9 - ''' - - \#\# Usage - '''go - result \:= FeijoaThankful9.perform("playful alert") - fmt.Println("feijoathankful9 result\:", "finished") - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 354 - sort_order: 1 -- id: 356 - owner_id: 23 - owner_name: privated_org - lower_name: group 26 - name: group 26 - description: | - Gently tribe nobody up yay otherwise onto. Perfectly under apart company enough down within. That you aha strongly too in her. Besides fly patience her why hers body. Today fortnightly furthermore whose i.e. daily formerly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install OrangeDefiant - ''' - - \#\# Usage - '''python - result = orangedefiant.handle("quirky message") - print("orangedefiant result\:", "success") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 353 - sort_order: 1 -- id: 357 - owner_id: 23 - owner_name: privated_org - lower_name: group 27 - name: group 27 - description: | - Alternatively are ourselves husband firstly until we. From peep do additionally repulsive hers team. Keep correctly yesterday how i.e. tomorrow her. Justice nice handle ride religion to now. Cat positively tomorrow might mine owing quarterly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install JealousShorts - ''' - - \#\# Usage - '''python - result = jealousshorts.handle("whimsical story") - print("jealousshorts result\:", "terminated") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 350 - sort_order: 1 -- id: 358 - owner_id: 23 - owner_name: privated_org - lower_name: group 28 - name: group 28 - description: | - I it why being above obesity phew. Open both lastly any these Mayan before. Whomever him motionless because then ever how. Those distinguish Canadian include every monthly yearly. Swim itself whom your here this out. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CheerfulHerring/SuperSparrow - ''' - - \#\# Usage - '''go - result \:= SuperSparrow.handle("whimsical story") - fmt.Println("supersparrow result\:", "completed") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 351 - sort_order: 1 -- id: 359 - owner_id: 23 - owner_name: privated_org - lower_name: group 29 - name: group 29 - description: | - To hourly rush who off many embarrass. Wallet another but look whose there packet. My group of couple conclude she circumstances. All whereas beyond yearly throughout you quarterly. Enough tomorrow someone accordingly why result many. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install LemonBower - ''' - - \#\# Usage - '''python - result = lemonbower.process("funny request") - print("lemonbower result\:", "unknown") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 339 - sort_order: 1 -- id: 360 - owner_id: 23 - owner_name: privated_org - lower_name: group 30 - name: group 30 - description: | - Painfully his quarterly parrot mustering man few. Before quite why taste but her where. Happiness fact its timing hastily my its. Ourselves madly everything heavily though our how. Over you jump still ever Caesarian Turkmen. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install SpoonCuter5 - ''' - - \#\# Usage - '''python - result = spooncuter5.process("funny request") - print("spooncuter5 result\:", "unknown") - ''' - - \#\# License - GPL-3.0 - - visibility: 2 - avatar: "" - parent_group_id: 338 - sort_order: 1 -- id: 361 - owner_id: 35 - owner_name: private_org35 - lower_name: group 1 - name: group 1 - description: | - Covey couple what upon nobody neck bundle. Shakespearean as yikes therefore politely all today. We chair artist itself rather finally several. Scary whomever philosophy weight one light quantity. Do politely these spit nightly that to. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ApartmentBatheer - ''' - - \#\# Usage - '''python - result = apartmentbatheer.execute("whimsical story") - print("apartmentbatheer result\:", "error") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 0 - sort_order: 46 -- id: 362 - owner_id: 35 - owner_name: private_org35 - lower_name: group 2 - name: group 2 - description: | - It has than Tibetan for class can. Which city nearby any ours they calmly. Anybody some where party nest fact onto. Slide when monthly secondly straightaway Sammarinese oops. Should most any by group must our. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BowCloseer/MagnificentSuit - ''' - - \#\# Usage - '''go - result \:= MagnificentSuit.perform("whimsical story") - fmt.Println("magnificentsuit result\:", "in progress") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 361 - sort_order: 1 -- id: 363 - owner_id: 35 - owner_name: private_org35 - lower_name: group 3 - name: group 3 - description: | - Rather what his secondly tax rather of. Troop barely do neither of first then. Does now yesterday religion consequently whoa bevy. How bulb shark theirs ours smoggy whose. Wide next ours courage woman above who. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install MotionlessOcean26 - ''' - - \#\# Usage - '''javascript - const result = motionlessocean26.process("lighthearted command"); - console.log("motionlessocean26 result\:", "finished"); - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 362 - sort_order: 1 -- id: 364 - owner_id: 35 - owner_name: private_org35 - lower_name: group 4 - name: group 4 - description: | - Exactly obesity she respond luggage up over. She yet your yours battery refill case. Wad that yet pretty each underwear myself. Your though wade off baby poison should. Me beautifully hers weep repel do happiness. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ConcerningHyena587 - ''' - - \#\# Usage - '''javascript - const result = concerninghyena587.perform("lighthearted command"); - console.log("concerninghyena587 result\:", "failed"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 0 - avatar: "" - parent_group_id: 362 - sort_order: 2 -- id: 365 - owner_id: 35 - owner_name: private_org35 - lower_name: group 5 - name: group 5 - description: | - For then himself catalog dynasty book constantly. Tomorrow everyone indeed what what my quiver. Wisp horrible Hindu delightful something yay were. Somebody after it there nothing this alternatively. Band at theirs firstly it quarterly backwards. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CourageousYellowjacket/CheerfulRaven - ''' - - \#\# Usage - '''go - result \:= CheerfulRaven.run("quirky message") - fmt.Println("cheerfulraven result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 363 - sort_order: 1 -- id: 366 - owner_id: 35 - owner_name: private_org35 - lower_name: group 6 - name: group 6 - description: | - Eventually early crawl company some meanwhile host. Whichever tennis nap shake world Uzbek are. Above his under these anyone rarely off. Out which dream them sit bow grains. Accordingly what dream lastly Turkmen problem somebody. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/BeautifulSardine/TroublingTown0 - ''' - - \#\# Usage - '''go - result \:= TroublingTown0.execute("whimsical story") - fmt.Println("troublingtown0 result\:", "in progress") - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 361 - sort_order: 2 -- id: 367 - owner_id: 35 - owner_name: private_org35 - lower_name: group 7 - name: group 7 - description: | - Across Hitlerian might ours such today look. His fortnightly when in whose man into. Us off dream nevertheless capture those a. Not themselves phew with always its which. Nevertheless you were e.g. horde would whatever. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BoredMole38 - ''' - - \#\# Usage - '''javascript - const result = boredmole38.run("funny request"); - console.log("boredmole38 result\:", "completed"); - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 362 - sort_order: 3 -- id: 368 - owner_id: 35 - owner_name: private_org35 - lower_name: group 8 - name: group 8 - description: | - Few body month none whom herself as. Wandering mine before lazy its weekly any. Her off heavily example account anger have. Right how anybody bowl to least result. Up several whose dizzying later incredibly barely. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PouchSmeller499/SoreSwimmingPool - ''' - - \#\# Usage - '''go - result \:= SoreSwimmingPool.handle("quirky message") - fmt.Println("soreswimmingpool result\:", "completed") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 361 - sort_order: 3 -- id: 369 - owner_id: 35 - owner_name: private_org35 - lower_name: group 9 - name: group 9 - description: | - My far instead quite quarterly despite nightly. Certain as can muster many over of. Catalog perfectly clean every whomever justice anything. Snarl indeed yet neck brightly besides annually. Him shake wake yourself including remain downstairs. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install PumpkinStander - ''' - - \#\# Usage - '''python - result = pumpkinstander.perform("funny request") - print("pumpkinstander result\:", "error") - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 361 - sort_order: 4 -- id: 370 - owner_id: 35 - owner_name: private_org35 - lower_name: group 10 - name: group 10 - description: | - Consequently who time annually upon early you. Patience remain had must solemnly whose woman. Dark place where from daily baby she. Tonight infrequently which run castle rhythm equally. Yet utterly its be frequently indeed had. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/DisturbedPlatypus/QueerWaterBuffalo - ''' - - \#\# Usage - '''go - result \:= QueerWaterBuffalo.perform("whimsical story") - fmt.Println("queerwaterbuffalo result\:", "in progress") - ''' - - \#\# License - MIT - - visibility: 0 - avatar: "" - parent_group_id: 363 - sort_order: 2 -- id: 371 - owner_id: 35 - owner_name: private_org35 - lower_name: group 11 - name: group 11 - description: | - Here barely his her what year intensely. Understimate tomorrow him joyously Viennese furthermore several. Sternly back neither toss here hundreds for. Interrupt bank from yet accordingly lots myself. Fall earlier define finally tonight where now. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/GrapefruitScary/FilthyCockroach - ''' - - \#\# Usage - '''go - result \:= FilthyCockroach.process("quirky message") - fmt.Println("filthycockroach result\:", "failed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 368 - sort_order: 1 -- id: 372 - owner_id: 35 - owner_name: private_org35 - lower_name: group 12 - name: group 12 - description: | - Near swiftly down with yesterday evidence corner. Closely some might Portuguese fondly now since. Still above sprint whose did Malagasy later. This for theirs but equipment raise peep. Finally troop finally mustering remind for none. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/AircraftCrawler/SenatorDreamer - ''' - - \#\# Usage - '''go - result \:= SenatorDreamer.process("funny request") - fmt.Println("senatordreamer result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 0 - avatar: "" - parent_group_id: 0 - sort_order: 47 -- id: 373 - owner_id: 35 - owner_name: private_org35 - lower_name: group 13 - name: group 13 - description: | - Elsewhere there theirs garage frequently in so. Do black them gee boots himself ball. There throughout murder itself tickle patience almost. Those failure at who his carry point. Chastise e.g. scold I whose every electricity. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ThoughtfulGloves - ''' - - \#\# Usage - '''python - result = thoughtfulgloves.run("quirky message") - print("thoughtfulgloves result\:", "success") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 361 - sort_order: 5 -- id: 374 - owner_id: 35 - owner_name: private_org35 - lower_name: group 14 - name: group 14 - description: | - With without that these then who daringly. Tensely early moreover to crawl theirs wildly. How fuel pose cackle each those hmm. Ourselves how secondly leggings who I eat. Next none also summation why whose scold. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/RelievedKid/GrumpyRaven - ''' - - \#\# Usage - '''go - result \:= GrumpyRaven.execute("lighthearted command") - fmt.Println("grumpyraven result\:", "terminated") - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 369 - sort_order: 1 -- id: 375 - owner_id: 35 - owner_name: private_org35 - lower_name: group 15 - name: group 15 - description: | - Deceive whereas afterwards any tightly accordingly annually. Thing instance yikes with water its of. Practically my what time as what all. I her some love our e.g. muster. However queer anyone depending any will her. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/GrapefruitCalm/BlueberryIll - ''' - - \#\# Usage - '''go - result \:= BlueberryIll.perform("playful alert") - fmt.Println("blueberryill result\:", "finished") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 370 - sort_order: 1 -- id: 376 - owner_id: 35 - owner_name: private_org35 - lower_name: group 16 - name: group 16 - description: | - Fortnightly up today before hundred this range. Energy your advertising nobody what intimidate why. Yesterday consist first grandmother whichever how be. Yet the where whole ouch her greatly. Mob our luck yesterday usually preen those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SenatorOpener/CantaloupeTired - ''' - - \#\# Usage - '''go - result \:= CantaloupeTired.handle("lighthearted command") - fmt.Println("cantaloupetired result\:", "finished") - ''' - - \#\# License - MIT - - visibility: 1 - avatar: "" - parent_group_id: 372 - sort_order: 1 -- id: 377 - owner_id: 35 - owner_name: private_org35 - lower_name: group 17 - name: group 17 - description: | - Dangerous of British into nobody neither play. Anyone other it several what will constantly. Earlier across pounce our soon class must. Accordingly mine thing Bahrainean heavy whoever union. Team who were have hurt everyone tomorrow. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install InnocentMuskrat161 - ''' - - \#\# Usage - '''javascript - const result = innocentmuskrat161.process("playful alert"); - console.log("innocentmuskrat161 result\:", "in progress"); - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 362 - sort_order: 4 -- id: 378 - owner_id: 35 - owner_name: private_org35 - lower_name: group 18 - name: group 18 - description: | - This it sometimes their nobody Laotian its. These formerly later without its all loneliness. Anything consequently what down join hey himself. Point which those east yours in Einsteinian. Comfort not teacher nevertheless might what antlers. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BrightMink71 - ''' - - \#\# Usage - '''javascript - const result = brightmink71.perform("funny request"); - console.log("brightmink71 result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 1 - avatar: "" - parent_group_id: 367 - sort_order: 1 -- id: 379 - owner_id: 35 - owner_name: private_org35 - lower_name: group 19 - name: group 19 - description: | - It did childhood wisp ours wisdom hourly. As these otherwise then pack Iraqi their. Sew generally to bed define occasionally she. Earlier hiccup damage warmly Elizabethan now upstairs. Fall have another vision those this almost. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/TenderSlippers/JewelryHuger103 - ''' - - \#\# Usage - '''go - result \:= JewelryHuger103.perform("lighthearted command") - fmt.Println("jewelryhuger103 result\:", "error") - ''' - - \#\# License - Apache 2.0 - - visibility: 1 - avatar: "" - parent_group_id: 376 - sort_order: 1 -- id: 380 - owner_id: 35 - owner_name: private_org35 - lower_name: group 20 - name: group 20 - description: | - Anyway everyone car recently are consist Rican. Ever so was her open besides whichever. You herself terrible do whose clump whoa. Under healthy how phew straightaway seafood consequently. Other Norwegian other you gloves life including. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/DetectiveOpener/UglyChinchilla - ''' - - \#\# Usage - '''go - result \:= UglyChinchilla.perform("whimsical story") - fmt.Println("uglychinchilla result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - - visibility: 2 - avatar: "" - parent_group_id: 363 - sort_order: 3 -- id: 381 - owner_id: 35 - owner_name: private_org35 - lower_name: group 21 - name: group 21 - description: | - Stand whom either a innocent neither being. Whose is occasionally may sometimes inside so. Antarctic recently finally sedge him ever must. Which hotel weekly i.e. line us work. Today line over let itself tonight soon. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install WearyPorpoise - ''' - - \#\# Usage - '''javascript - const result = wearyporpoise.execute("lighthearted command"); - console.log("wearyporpoise result\:", "unknown"); - ''' - - \#\# License - GPL-3.0 - - visibility: 0 - avatar: "" - parent_group_id: 370 - sort_order: 2 -- id: 382 - owner_id: 35 - owner_name: private_org35 - lower_name: group 22 - name: group 22 - description: | - Her machine fortnightly hand shall many failure. Car anyone down thing away elsewhere where. Many to fight irritate yoga pod terribly. Finally snore now instance envy this everybody. Where yet shall any specify next its. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install DistinctCrocodile - ''' - - \#\# Usage - '''python - result = distinctcrocodile.handle("funny request") - print("distinctcrocodile result\:", "completed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 1 - avatar: "" - parent_group_id: 368 - sort_order: 2 -- id: 383 - owner_id: 35 - owner_name: private_org35 - lower_name: group 23 - name: group 23 - description: | - Accordingly place now garage its wait to. Usage of kindness example crime herself upon. Crawl head wave frail whom entirely thing. What number i.e. its woman a path. Anyone yourself disregard each because lastly give. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/EmbarrassedReindeer/WearySinger - ''' - - \#\# Usage - '''go - result \:= WearySinger.run("quirky message") - fmt.Println("wearysinger result\:", "completed") - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 376 - sort_order: 2 -- id: 384 - owner_id: 35 - owner_name: private_org35 - lower_name: group 24 - name: group 24 - description: | - Will earlier one near class idea me. Caesarian anything kiss secondly Machiavellian under including. Greatly whose accordingly onto these hug soon. Does occur the were constantly bunch tonight. Those all later others within did spin. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/LovelyHouse3/RockMelonFrail - ''' - - \#\# Usage - '''go - result \:= RockMelonFrail.perform("funny request") - fmt.Println("rockmelonfrail result\:", "success") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 366 - sort_order: 1 -- id: 385 - owner_id: 35 - owner_name: private_org35 - lower_name: group 25 - name: group 25 - description: | - Tomorrow how example upon hers choir across. Mob outside neither tonight e.g. anyone occasionally. Cackle accordingly what army monthly its ours. What niche theirs wealth heap beneath through. Hail nightly back which bunch its he. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install ZealousConditioner - ''' - - \#\# Usage - '''python - result = zealousconditioner.handle("quirky message") - print("zealousconditioner result\:", "error") - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 365 - sort_order: 1 -- id: 386 - owner_id: 35 - owner_name: private_org35 - lower_name: group 26 - name: group 26 - description: | - Most shoulder fast whatever huh summation battery. Soon which those happiness whose whose those. Far before work about pod us much. Rainbow early pad child there begin hers. Man time it I must crime those. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PhysalisWicked2 - ''' - - \#\# Usage - '''javascript - const result = physaliswicked2.process("funny request"); - console.log("physaliswicked2 result\:", "finished"); - ''' - - \#\# License - ISC - - visibility: 0 - avatar: "" - parent_group_id: 375 - sort_order: 1 -- id: 387 - owner_id: 35 - owner_name: private_org35 - lower_name: group 27 - name: group 27 - description: | - How band heavy rarely tasty less without. Talk besides other nervously infrequently as Colombian. From finally one palm that completely then. Huh this when relent yearly party hourly. Through weekly straightaway perfectly whom live lead. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install DistinctHound - ''' - - \#\# Usage - '''javascript - const result = distincthound.run("funny request"); - console.log("distincthound result\:", "success"); - ''' - - \#\# License - BSD-3-Clause - - visibility: 2 - avatar: "" - parent_group_id: 386 - sort_order: 1 -- id: 388 - owner_id: 35 - owner_name: private_org35 - lower_name: group 28 - name: group 28 - description: | - To are cluster week with angry that. Yesterday hmm slavery company first on infrequently. Tomorrow host odd company nightly off theirs. Neither as our those we over snarl. Bunch eye ourselves seriously besides slavery there. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ModernGnu/JewelryLaugher - ''' - - \#\# Usage - '''go - result \:= JewelryLaugher.run("funny request") - fmt.Println("jewelrylaugher result\:", "unknown") - ''' - - \#\# License - MIT - - visibility: 2 - avatar: "" - parent_group_id: 369 - sort_order: 2 -- id: 389 - owner_id: 35 - owner_name: private_org35 - lower_name: group 29 - name: group 29 - description: | - Scenic just in one who still that. Whom ouch however Machiavellian lie nobody that. Any ring huh himself to these fragile. E.g. rarely due themselves in rice day. One enough her e.g. gift daringly finally. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BlushingCookware05 - ''' - - \#\# Usage - '''javascript - const result = blushingcookware05.perform("lighthearted command"); - console.log("blushingcookware05 result\:", "failed"); - ''' - - \#\# License - ISC - - visibility: 2 - avatar: "" - parent_group_id: 374 - sort_order: 1 -- id: 390 - owner_id: 35 - owner_name: private_org35 - lower_name: group 30 - name: group 30 - description: | - Differs has spin that does to lower. For thing their according murder there line. This of piano yikes imagination but finally. In under example bundle panicked bridge onto. That down few under earlier party would. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/GloriousMallard/BilberryBlack85 - ''' - - \#\# Usage - '''go - result \:= BilberryBlack85.process("funny request") - fmt.Println("bilberryblack85 result\:", "failed") - ''' - - \#\# License - GPL-3.0 - - visibility: 1 - avatar: "" - parent_group_id: 361 - sort_order: 6 diff --git a/models/fixtures/repo_group_team.yml b/models/fixtures/repo_group_team.yml index 803529a474..0e15477608 100644 --- a/models/fixtures/repo_group_team.yml +++ b/models/fixtures/repo_group_team.yml @@ -1,150 +1,30 @@ -- id: 1 - org_id: 25 - team_id: 10 - group_id: 12 - access_mode: 1 +- access_mode: 3 + can_create_in: false + group_id: 19 + id: 1 + org_id: 43 + team_id: 25 +- access_mode: 1 + can_create_in: false + group_id: 19 + id: 2 + org_id: 43 + team_id: 26 +- access_mode: 0 can_create_in: true -- id: 2 - org_id: 25 - team_id: 23 - group_id: 12 - access_mode: 4 + group_id: 19 + id: 3 + org_id: 43 + team_id: 27 +- access_mode: 0 can_create_in: true -- id: 3 - org_id: 26 - team_id: 11 - group_id: 41 - access_mode: 1 - can_create_in: false -- id: 4 - org_id: 41 - team_id: 21 - group_id: 88 - access_mode: 3 - can_create_in: true -- id: 5 - org_id: 41 - team_id: 22 - group_id: 88 - access_mode: 1 - can_create_in: true -- id: 6 - org_id: 3 - team_id: 1 - group_id: 148 - access_mode: 4 - can_create_in: true -- id: 7 - org_id: 3 - team_id: 2 - group_id: 148 - access_mode: 1 - can_create_in: false -- id: 8 - org_id: 3 - team_id: 7 - group_id: 148 - access_mode: 1 - can_create_in: false -- id: 9 - org_id: 3 - team_id: 12 - group_id: 148 - access_mode: 1 - can_create_in: false -- id: 10 - org_id: 3 - team_id: 14 - group_id: 148 - access_mode: 1 - can_create_in: true -- id: 11 - org_id: 6 - team_id: 3 - group_id: 179 - access_mode: 4 - can_create_in: true -- id: 12 - org_id: 6 - team_id: 13 - group_id: 179 - access_mode: 3 - can_create_in: false -- id: 13 - org_id: 19 - team_id: 6 - group_id: 203 - access_mode: 3 - can_create_in: false -- id: 14 - org_id: 22 - team_id: 15 - group_id: 239 - access_mode: 2 - can_create_in: false -- id: 15 - org_id: 36 - team_id: 19 - group_id: 241 - access_mode: 4 - can_create_in: false -- id: 16 - org_id: 36 - team_id: 20 - group_id: 241 - access_mode: 1 - can_create_in: true -- id: 17 - org_id: 7 - team_id: 4 - group_id: 280 - access_mode: 1 - can_create_in: false -- id: 18 - org_id: 17 - team_id: 5 - group_id: 312 - access_mode: 3 - can_create_in: true -- id: 19 - org_id: 17 - team_id: 8 - group_id: 312 - access_mode: 1 - can_create_in: false -- id: 20 - org_id: 17 - team_id: 9 - group_id: 312 - access_mode: 1 - can_create_in: true -- id: 21 - org_id: 23 - team_id: 16 - group_id: 360 - access_mode: 3 - can_create_in: false -- id: 22 - org_id: 23 - team_id: 17 - group_id: 360 - access_mode: 1 - can_create_in: false -- id: 23 - org_id: 35 - team_id: 18 - group_id: 376 - access_mode: 2 - can_create_in: false -- id: 24 - org_id: 35 - team_id: 24 - group_id: 376 - access_mode: 1 - can_create_in: false -- id: 25 - org_id: 3 - team_id: 12 - group_id: 123 - access_mode: 4 + group_id: 19 + id: 4 + org_id: 43 + team_id: 28 +- access_mode: 2 can_create_in: true + group_id: 19 + id: 5 + org_id: 43 + team_id: 29 diff --git a/models/fixtures/repo_group_unit.yml b/models/fixtures/repo_group_unit.yml index 2fce9b5286..474487f122 100644 --- a/models/fixtures/repo_group_unit.yml +++ b/models/fixtures/repo_group_unit.yml @@ -1,1200 +1,250 @@ -- id: 1 - group_id: 12 - team_id: 10 +- access_mode: 0 + group_id: 19 + id: 1 + team_id: 25 type: 2 - access_mode: 0 -- id: 2 - group_id: 12 - team_id: 10 +- access_mode: 2 + group_id: 19 + id: 2 + team_id: 25 type: 7 - access_mode: 2 -- id: 3 - group_id: 12 - team_id: 10 +- access_mode: 0 + group_id: 19 + id: 3 + team_id: 25 + type: 4 +- access_mode: 2 + group_id: 19 + id: 4 + team_id: 25 + type: 5 +- access_mode: 1 + group_id: 19 + id: 5 + team_id: 25 + type: 6 +- access_mode: 3 + group_id: 19 + id: 6 + team_id: 25 + type: 10 +- access_mode: 1 + group_id: 19 + id: 7 + team_id: 25 + type: 1 +- access_mode: 1 + group_id: 19 + id: 8 + team_id: 25 type: 3 - access_mode: 0 -- id: 4 - group_id: 12 - team_id: 10 - type: 4 - access_mode: 0 -- id: 5 - group_id: 12 - team_id: 10 - type: 5 - access_mode: 0 -- id: 6 - group_id: 12 - team_id: 10 - type: 1 - access_mode: 1 -- id: 7 - group_id: 12 - team_id: 10 - type: 6 - access_mode: 0 -- id: 8 - group_id: 12 - team_id: 10 +- access_mode: 1 + group_id: 19 + id: 9 + team_id: 25 type: 8 - access_mode: 1 -- id: 9 - group_id: 12 - team_id: 10 +- access_mode: 3 + group_id: 19 + id: 10 + team_id: 25 type: 9 - access_mode: 1 -- id: 10 - group_id: 12 - team_id: 10 - type: 10 - access_mode: 0 -- id: 11 - group_id: 12 - team_id: 23 - type: 9 - access_mode: 0 -- id: 12 - group_id: 12 - team_id: 23 - type: 10 - access_mode: 0 -- id: 13 - group_id: 12 - team_id: 23 - type: 1 - access_mode: 2 -- id: 14 - group_id: 12 - team_id: 23 - type: 6 - access_mode: 0 -- id: 15 - group_id: 12 - team_id: 23 - type: 8 - access_mode: 1 -- id: 16 - group_id: 12 - team_id: 23 - type: 4 - access_mode: 0 -- id: 17 - group_id: 12 - team_id: 23 - type: 5 - access_mode: 0 -- id: 18 - group_id: 12 - team_id: 23 +- access_mode: 2 + group_id: 19 + id: 11 + team_id: 26 type: 2 - access_mode: 0 -- id: 19 - group_id: 12 - team_id: 23 +- access_mode: 0 + group_id: 19 + id: 12 + team_id: 26 type: 7 - access_mode: 0 -- id: 20 - group_id: 12 - team_id: 23 - type: 3 - access_mode: 1 -- id: 21 - group_id: 41 - team_id: 11 - type: 7 - access_mode: 0 -- id: 22 - group_id: 41 - team_id: 11 - type: 3 - access_mode: 1 -- id: 23 - group_id: 41 - team_id: 11 +- access_mode: 0 + group_id: 19 + id: 13 + team_id: 26 type: 4 - access_mode: 0 -- id: 24 - group_id: 41 - team_id: 11 +- access_mode: 1 + group_id: 19 + id: 14 + team_id: 26 type: 5 - access_mode: 0 -- id: 25 - group_id: 41 - team_id: 11 - type: 2 - access_mode: 2 -- id: 26 - group_id: 41 - team_id: 11 +- access_mode: 0 + group_id: 19 + id: 15 + team_id: 26 type: 6 - access_mode: 1 -- id: 27 - group_id: 41 - team_id: 11 - type: 8 - access_mode: 2 -- id: 28 - group_id: 41 - team_id: 11 - type: 9 - access_mode: 0 -- id: 29 - group_id: 41 - team_id: 11 +- access_mode: 2 + group_id: 19 + id: 16 + team_id: 26 type: 10 - access_mode: 0 -- id: 30 - group_id: 41 - team_id: 11 +- access_mode: 0 + group_id: 19 + id: 17 + team_id: 26 type: 1 - access_mode: 0 -- id: 31 - group_id: 88 - team_id: 21 - type: 8 - access_mode: 0 -- id: 32 - group_id: 88 - team_id: 21 - type: 9 - access_mode: 2 -- id: 33 - group_id: 88 - team_id: 21 - type: 10 - access_mode: 0 -- id: 34 - group_id: 88 - team_id: 21 - type: 1 - access_mode: 1 -- id: 35 - group_id: 88 - team_id: 21 - type: 6 - access_mode: 1 -- id: 36 - group_id: 88 - team_id: 21 +- access_mode: 2 + group_id: 19 + id: 18 + team_id: 26 type: 3 - access_mode: 0 -- id: 37 - group_id: 88 - team_id: 21 - type: 4 - access_mode: 2 -- id: 38 - group_id: 88 - team_id: 21 - type: 5 - access_mode: 2 -- id: 39 - group_id: 88 - team_id: 21 - type: 2 - access_mode: 1 -- id: 40 - group_id: 88 - team_id: 21 - type: 7 - access_mode: 1 -- id: 41 - group_id: 88 - team_id: 22 - type: 4 - access_mode: 0 -- id: 42 - group_id: 88 - team_id: 22 - type: 5 - access_mode: 0 -- id: 43 - group_id: 88 - team_id: 22 - type: 2 - access_mode: 0 -- id: 44 - group_id: 88 - team_id: 22 - type: 7 - access_mode: 0 -- id: 45 - group_id: 88 - team_id: 22 - type: 3 - access_mode: 0 -- id: 46 - group_id: 88 - team_id: 22 - type: 9 - access_mode: 0 -- id: 47 - group_id: 88 - team_id: 22 - type: 10 - access_mode: 0 -- id: 48 - group_id: 88 - team_id: 22 - type: 1 - access_mode: 1 -- id: 49 - group_id: 88 - team_id: 22 - type: 6 - access_mode: 0 -- id: 50 - group_id: 88 - team_id: 22 +- access_mode: 0 + group_id: 19 + id: 19 + team_id: 26 type: 8 - access_mode: 0 -- id: 51 - group_id: 148 - team_id: 1 - type: 4 - access_mode: 1 -- id: 52 - group_id: 148 - team_id: 1 - type: 5 - access_mode: 0 -- id: 53 - group_id: 148 - team_id: 1 - type: 2 - access_mode: 0 -- id: 54 - group_id: 148 - team_id: 1 - type: 7 - access_mode: 0 -- id: 55 - group_id: 148 - team_id: 1 - type: 3 - access_mode: 0 -- id: 56 - group_id: 148 - team_id: 1 +- access_mode: 0 + group_id: 19 + id: 20 + team_id: 26 type: 9 - access_mode: 1 -- id: 57 - group_id: 148 - team_id: 1 - type: 10 - access_mode: 0 -- id: 58 - group_id: 148 - team_id: 1 +- access_mode: 1 + group_id: 19 + id: 21 + team_id: 27 type: 1 - access_mode: 0 -- id: 59 - group_id: 148 - team_id: 1 - type: 6 - access_mode: 1 -- id: 60 - group_id: 148 - team_id: 1 - type: 8 - access_mode: 0 -- id: 61 - group_id: 148 - team_id: 2 +- access_mode: 1 + group_id: 19 + id: 22 + team_id: 27 type: 3 - access_mode: 2 -- id: 62 - group_id: 148 - team_id: 2 - type: 4 - access_mode: 0 -- id: 63 - group_id: 148 - team_id: 2 - type: 5 - access_mode: 1 -- id: 64 - group_id: 148 - team_id: 2 - type: 2 - access_mode: 0 -- id: 65 - group_id: 148 - team_id: 2 - type: 7 - access_mode: 0 -- id: 66 - group_id: 148 - team_id: 2 +- access_mode: 1 + group_id: 19 + id: 23 + team_id: 27 type: 8 - access_mode: 1 -- id: 67 - group_id: 148 - team_id: 2 +- access_mode: 0 + group_id: 19 + id: 24 + team_id: 27 type: 9 - access_mode: 0 -- id: 68 - group_id: 148 - team_id: 2 - type: 10 - access_mode: 1 -- id: 69 - group_id: 148 - team_id: 2 - type: 1 - access_mode: 0 -- id: 70 - group_id: 148 - team_id: 2 - type: 6 - access_mode: 0 -- id: 71 - group_id: 148 - team_id: 7 - type: 4 - access_mode: 0 -- id: 72 - group_id: 148 - team_id: 7 - type: 5 - access_mode: 0 -- id: 73 - group_id: 148 - team_id: 7 +- access_mode: 0 + group_id: 19 + id: 25 + team_id: 27 type: 2 - access_mode: 2 -- id: 74 - group_id: 148 - team_id: 7 +- access_mode: 1 + group_id: 19 + id: 26 + team_id: 27 type: 7 - access_mode: 0 -- id: 75 - group_id: 148 - team_id: 7 +- access_mode: 1 + group_id: 19 + id: 27 + team_id: 27 + type: 4 +- access_mode: 0 + group_id: 19 + id: 28 + team_id: 27 + type: 5 +- access_mode: 0 + group_id: 19 + id: 29 + team_id: 27 + type: 6 +- access_mode: 0 + group_id: 19 + id: 30 + team_id: 27 + type: 10 +- access_mode: 0 + group_id: 19 + id: 31 + team_id: 28 + type: 7 +- access_mode: 0 + group_id: 19 + id: 32 + team_id: 28 + type: 4 +- access_mode: 0 + group_id: 19 + id: 33 + team_id: 28 + type: 5 +- access_mode: 0 + group_id: 19 + id: 34 + team_id: 28 + type: 6 +- access_mode: 0 + group_id: 19 + id: 35 + team_id: 28 + type: 10 +- access_mode: 0 + group_id: 19 + id: 36 + team_id: 28 + type: 1 +- access_mode: 0 + group_id: 19 + id: 37 + team_id: 28 type: 3 - access_mode: 0 -- id: 76 - group_id: 148 - team_id: 7 - type: 9 - access_mode: 1 -- id: 77 - group_id: 148 - team_id: 7 - type: 10 - access_mode: 1 -- id: 78 - group_id: 148 - team_id: 7 - type: 1 - access_mode: 1 -- id: 79 - group_id: 148 - team_id: 7 - type: 6 - access_mode: 0 -- id: 80 - group_id: 148 - team_id: 7 +- access_mode: 0 + group_id: 19 + id: 38 + team_id: 28 type: 8 - access_mode: 1 -- id: 81 - group_id: 148 - team_id: 12 - type: 3 - access_mode: 1 -- id: 82 - group_id: 148 - team_id: 12 - type: 4 - access_mode: 0 -- id: 83 - group_id: 148 - team_id: 12 - type: 5 - access_mode: 0 -- id: 84 - group_id: 148 - team_id: 12 +- access_mode: 0 + group_id: 19 + id: 39 + team_id: 28 + type: 9 +- access_mode: 0 + group_id: 19 + id: 40 + team_id: 28 type: 2 - access_mode: 1 -- id: 85 - group_id: 148 - team_id: 12 - type: 7 - access_mode: 2 -- id: 86 - group_id: 148 - team_id: 12 - type: 8 - access_mode: 2 -- id: 87 - group_id: 148 - team_id: 12 - type: 9 - access_mode: 1 -- id: 88 - group_id: 148 - team_id: 12 - type: 10 - access_mode: 0 -- id: 89 - group_id: 148 - team_id: 12 - type: 1 - access_mode: 1 -- id: 90 - group_id: 148 - team_id: 12 +- access_mode: 1 + group_id: 19 + id: 41 + team_id: 29 type: 6 - access_mode: 0 -- id: 91 - group_id: 148 - team_id: 14 - type: 6 - access_mode: 0 -- id: 92 - group_id: 148 - team_id: 14 - type: 8 - access_mode: 0 -- id: 93 - group_id: 148 - team_id: 14 - type: 9 - access_mode: 0 -- id: 94 - group_id: 148 - team_id: 14 +- access_mode: 0 + group_id: 19 + id: 42 + team_id: 29 type: 10 - access_mode: 1 -- id: 95 - group_id: 148 - team_id: 14 +- access_mode: 2 + group_id: 19 + id: 43 + team_id: 29 type: 1 - access_mode: 0 -- id: 96 - group_id: 148 - team_id: 14 - type: 7 - access_mode: 0 -- id: 97 - group_id: 148 - team_id: 14 +- access_mode: 1 + group_id: 19 + id: 44 + team_id: 29 type: 3 - access_mode: 1 -- id: 98 - group_id: 148 - team_id: 14 - type: 4 - access_mode: 0 -- id: 99 - group_id: 148 - team_id: 14 - type: 5 - access_mode: 1 -- id: 100 - group_id: 148 - team_id: 14 - type: 2 - access_mode: 1 -- id: 101 - group_id: 179 - team_id: 3 - type: 2 - access_mode: 1 -- id: 102 - group_id: 179 - team_id: 3 - type: 7 - access_mode: 1 -- id: 103 - group_id: 179 - team_id: 3 - type: 3 - access_mode: 2 -- id: 104 - group_id: 179 - team_id: 3 - type: 4 - access_mode: 0 -- id: 105 - group_id: 179 - team_id: 3 - type: 5 - access_mode: 0 -- id: 106 - group_id: 179 - team_id: 3 - type: 1 - access_mode: 1 -- id: 107 - group_id: 179 - team_id: 3 - type: 6 - access_mode: 0 -- id: 108 - group_id: 179 - team_id: 3 +- access_mode: 0 + group_id: 19 + id: 45 + team_id: 29 type: 8 - access_mode: 0 -- id: 109 - group_id: 179 - team_id: 3 +- access_mode: 1 + group_id: 19 + id: 46 + team_id: 29 type: 9 - access_mode: 1 -- id: 110 - group_id: 179 - team_id: 3 - type: 10 - access_mode: 2 -- id: 111 - group_id: 179 - team_id: 13 - type: 5 - access_mode: 2 -- id: 112 - group_id: 179 - team_id: 13 +- access_mode: 4 + group_id: 19 + id: 47 + team_id: 29 type: 2 - access_mode: 0 -- id: 113 - group_id: 179 - team_id: 13 +- access_mode: 0 + group_id: 19 + id: 48 + team_id: 29 type: 7 - access_mode: 0 -- id: 114 - group_id: 179 - team_id: 13 - type: 3 - access_mode: 1 -- id: 115 - group_id: 179 - team_id: 13 +- access_mode: 2 + group_id: 19 + id: 49 + team_id: 29 type: 4 - access_mode: 0 -- id: 116 - group_id: 179 - team_id: 13 - type: 10 - access_mode: 0 -- id: 117 - group_id: 179 - team_id: 13 - type: 1 - access_mode: 0 -- id: 118 - group_id: 179 - team_id: 13 - type: 6 - access_mode: 1 -- id: 119 - group_id: 179 - team_id: 13 - type: 8 - access_mode: 1 -- id: 120 - group_id: 179 - team_id: 13 - type: 9 - access_mode: 1 -- id: 121 - group_id: 203 - team_id: 6 - type: 2 - access_mode: 1 -- id: 122 - group_id: 203 - team_id: 6 - type: 7 - access_mode: 0 -- id: 123 - group_id: 203 - team_id: 6 - type: 3 - access_mode: 0 -- id: 124 - group_id: 203 - team_id: 6 - type: 4 - access_mode: 0 -- id: 125 - group_id: 203 - team_id: 6 +- access_mode: 2 + group_id: 19 + id: 50 + team_id: 29 type: 5 - access_mode: 0 -- id: 126 - group_id: 203 - team_id: 6 - type: 1 - access_mode: 1 -- id: 127 - group_id: 203 - team_id: 6 - type: 6 - access_mode: 0 -- id: 128 - group_id: 203 - team_id: 6 - type: 8 - access_mode: 0 -- id: 129 - group_id: 203 - team_id: 6 - type: 9 - access_mode: 1 -- id: 130 - group_id: 203 - team_id: 6 - type: 10 - access_mode: 2 -- id: 131 - group_id: 239 - team_id: 15 - type: 3 - access_mode: 0 -- id: 132 - group_id: 239 - team_id: 15 - type: 4 - access_mode: 1 -- id: 133 - group_id: 239 - team_id: 15 - type: 5 - access_mode: 0 -- id: 134 - group_id: 239 - team_id: 15 - type: 2 - access_mode: 1 -- id: 135 - group_id: 239 - team_id: 15 - type: 7 - access_mode: 0 -- id: 136 - group_id: 239 - team_id: 15 - type: 8 - access_mode: 0 -- id: 137 - group_id: 239 - team_id: 15 - type: 9 - access_mode: 0 -- id: 138 - group_id: 239 - team_id: 15 - type: 10 - access_mode: 0 -- id: 139 - group_id: 239 - team_id: 15 - type: 1 - access_mode: 0 -- id: 140 - group_id: 239 - team_id: 15 - type: 6 - access_mode: 1 -- id: 141 - group_id: 241 - team_id: 19 - type: 1 - access_mode: 0 -- id: 142 - group_id: 241 - team_id: 19 - type: 6 - access_mode: 1 -- id: 143 - group_id: 241 - team_id: 19 - type: 8 - access_mode: 1 -- id: 144 - group_id: 241 - team_id: 19 - type: 9 - access_mode: 0 -- id: 145 - group_id: 241 - team_id: 19 - type: 10 - access_mode: 0 -- id: 146 - group_id: 241 - team_id: 19 - type: 2 - access_mode: 0 -- id: 147 - group_id: 241 - team_id: 19 - type: 7 - access_mode: 0 -- id: 148 - group_id: 241 - team_id: 19 - type: 3 - access_mode: 2 -- id: 149 - group_id: 241 - team_id: 19 - type: 4 - access_mode: 0 -- id: 150 - group_id: 241 - team_id: 19 - type: 5 - access_mode: 0 -- id: 151 - group_id: 241 - team_id: 20 - type: 9 - access_mode: 0 -- id: 152 - group_id: 241 - team_id: 20 - type: 10 - access_mode: 0 -- id: 153 - group_id: 241 - team_id: 20 - type: 1 - access_mode: 0 -- id: 154 - group_id: 241 - team_id: 20 - type: 6 - access_mode: 0 -- id: 155 - group_id: 241 - team_id: 20 - type: 8 - access_mode: 1 -- id: 156 - group_id: 241 - team_id: 20 - type: 4 - access_mode: 0 -- id: 157 - group_id: 241 - team_id: 20 - type: 5 - access_mode: 0 -- id: 158 - group_id: 241 - team_id: 20 - type: 2 - access_mode: 2 -- id: 159 - group_id: 241 - team_id: 20 - type: 7 - access_mode: 0 -- id: 160 - group_id: 241 - team_id: 20 - type: 3 - access_mode: 0 -- id: 161 - group_id: 280 - team_id: 4 - type: 9 - access_mode: 1 -- id: 162 - group_id: 280 - team_id: 4 - type: 10 - access_mode: 0 -- id: 163 - group_id: 280 - team_id: 4 - type: 1 - access_mode: 1 -- id: 164 - group_id: 280 - team_id: 4 - type: 6 - access_mode: 1 -- id: 165 - group_id: 280 - team_id: 4 - type: 8 - access_mode: 0 -- id: 166 - group_id: 280 - team_id: 4 - type: 4 - access_mode: 1 -- id: 167 - group_id: 280 - team_id: 4 - type: 5 - access_mode: 1 -- id: 168 - group_id: 280 - team_id: 4 - type: 2 - access_mode: 0 -- id: 169 - group_id: 280 - team_id: 4 - type: 7 - access_mode: 0 -- id: 170 - group_id: 280 - team_id: 4 - type: 3 - access_mode: 0 -- id: 171 - group_id: 312 - team_id: 5 - type: 5 - access_mode: 0 -- id: 172 - group_id: 312 - team_id: 5 - type: 2 - access_mode: 1 -- id: 173 - group_id: 312 - team_id: 5 - type: 7 - access_mode: 1 -- id: 174 - group_id: 312 - team_id: 5 - type: 3 - access_mode: 0 -- id: 175 - group_id: 312 - team_id: 5 - type: 4 - access_mode: 0 -- id: 176 - group_id: 312 - team_id: 5 - type: 10 - access_mode: 0 -- id: 177 - group_id: 312 - team_id: 5 - type: 1 - access_mode: 0 -- id: 178 - group_id: 312 - team_id: 5 - type: 6 - access_mode: 1 -- id: 179 - group_id: 312 - team_id: 5 - type: 8 - access_mode: 0 -- id: 180 - group_id: 312 - team_id: 5 - type: 9 - access_mode: 1 -- id: 181 - group_id: 312 - team_id: 8 - type: 1 - access_mode: 0 -- id: 182 - group_id: 312 - team_id: 8 - type: 6 - access_mode: 0 -- id: 183 - group_id: 312 - team_id: 8 - type: 8 - access_mode: 0 -- id: 184 - group_id: 312 - team_id: 8 - type: 9 - access_mode: 0 -- id: 185 - group_id: 312 - team_id: 8 - type: 10 - access_mode: 0 -- id: 186 - group_id: 312 - team_id: 8 - type: 2 - access_mode: 2 -- id: 187 - group_id: 312 - team_id: 8 - type: 7 - access_mode: 1 -- id: 188 - group_id: 312 - team_id: 8 - type: 3 - access_mode: 2 -- id: 189 - group_id: 312 - team_id: 8 - type: 4 - access_mode: 2 -- id: 190 - group_id: 312 - team_id: 8 - type: 5 - access_mode: 0 -- id: 191 - group_id: 312 - team_id: 9 - type: 5 - access_mode: 1 -- id: 192 - group_id: 312 - team_id: 9 - type: 2 - access_mode: 1 -- id: 193 - group_id: 312 - team_id: 9 - type: 7 - access_mode: 0 -- id: 194 - group_id: 312 - team_id: 9 - type: 3 - access_mode: 0 -- id: 195 - group_id: 312 - team_id: 9 - type: 4 - access_mode: 0 -- id: 196 - group_id: 312 - team_id: 9 - type: 10 - access_mode: 1 -- id: 197 - group_id: 312 - team_id: 9 - type: 1 - access_mode: 2 -- id: 198 - group_id: 312 - team_id: 9 - type: 6 - access_mode: 1 -- id: 199 - group_id: 312 - team_id: 9 - type: 8 - access_mode: 1 -- id: 200 - group_id: 312 - team_id: 9 - type: 9 - access_mode: 0 -- id: 201 - group_id: 360 - team_id: 16 - type: 8 - access_mode: 0 -- id: 202 - group_id: 360 - team_id: 16 - type: 9 - access_mode: 0 -- id: 203 - group_id: 360 - team_id: 16 - type: 10 - access_mode: 0 -- id: 204 - group_id: 360 - team_id: 16 - type: 1 - access_mode: 0 -- id: 205 - group_id: 360 - team_id: 16 - type: 6 - access_mode: 1 -- id: 206 - group_id: 360 - team_id: 16 - type: 3 - access_mode: 1 -- id: 207 - group_id: 360 - team_id: 16 - type: 4 - access_mode: 2 -- id: 208 - group_id: 360 - team_id: 16 - type: 5 - access_mode: 0 -- id: 209 - group_id: 360 - team_id: 16 - type: 2 - access_mode: 0 -- id: 210 - group_id: 360 - team_id: 16 - type: 7 - access_mode: 2 -- id: 211 - group_id: 360 - team_id: 17 - type: 1 - access_mode: 0 -- id: 212 - group_id: 360 - team_id: 17 - type: 6 - access_mode: 0 -- id: 213 - group_id: 360 - team_id: 17 - type: 8 - access_mode: 0 -- id: 214 - group_id: 360 - team_id: 17 - type: 9 - access_mode: 0 -- id: 215 - group_id: 360 - team_id: 17 - type: 10 - access_mode: 1 -- id: 216 - group_id: 360 - team_id: 17 - type: 2 - access_mode: 1 -- id: 217 - group_id: 360 - team_id: 17 - type: 7 - access_mode: 1 -- id: 218 - group_id: 360 - team_id: 17 - type: 3 - access_mode: 0 -- id: 219 - group_id: 360 - team_id: 17 - type: 4 - access_mode: 2 -- id: 220 - group_id: 360 - team_id: 17 - type: 5 - access_mode: 1 -- id: 221 - group_id: 376 - team_id: 18 - type: 2 - access_mode: 0 -- id: 222 - group_id: 376 - team_id: 18 - type: 7 - access_mode: 1 -- id: 223 - group_id: 376 - team_id: 18 - type: 3 - access_mode: 0 -- id: 224 - group_id: 376 - team_id: 18 - type: 4 - access_mode: 0 -- id: 225 - group_id: 376 - team_id: 18 - type: 5 - access_mode: 0 -- id: 226 - group_id: 376 - team_id: 18 - type: 1 - access_mode: 0 -- id: 227 - group_id: 376 - team_id: 18 - type: 6 - access_mode: 2 -- id: 228 - group_id: 376 - team_id: 18 - type: 8 - access_mode: 0 -- id: 229 - group_id: 376 - team_id: 18 - type: 9 - access_mode: 1 -- id: 230 - group_id: 376 - team_id: 18 - type: 10 - access_mode: 0 -- id: 231 - group_id: 376 - team_id: 24 - type: 6 - access_mode: 0 -- id: 232 - group_id: 376 - team_id: 24 - type: 8 - access_mode: 0 -- id: 233 - group_id: 376 - team_id: 24 - type: 9 - access_mode: 1 -- id: 234 - group_id: 376 - team_id: 24 - type: 10 - access_mode: 1 -- id: 235 - group_id: 376 - team_id: 24 - type: 1 - access_mode: 1 -- id: 236 - group_id: 376 - team_id: 24 - type: 7 - access_mode: 0 -- id: 237 - group_id: 376 - team_id: 24 - type: 3 - access_mode: 0 -- id: 238 - group_id: 376 - team_id: 24 - type: 4 - access_mode: 0 -- id: 239 - group_id: 376 - team_id: 24 - type: 5 - access_mode: 0 -- id: 240 - group_id: 376 - team_id: 24 - type: 2 - access_mode: 0 From acf2a3fa1ae9680585052e38c22971b7dddc175f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 15:21:13 -0500 Subject: [PATCH 171/218] fix: update accessible group cond ensure that org owners and site admins can always see all groups --- models/group/group_list.go | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index e502b33be7..d5f839054a 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -28,6 +28,30 @@ func (groups RepoGroupList) LoadOwners(ctx context.Context) error { return nil } +func universalGroupPermBuilder(idStr string, userID int64) builder.Cond { + teamUserSubquery := builder.Select("`team_user`.uid"). + From("team_user"). + Join("INNER", "team", "`team`.id = `team_user`.team_id"). + Join("INNER", "`user`", "`user`.`id` = `team`.org_id"). + Join("INNER", "`user` as iu", "iu.`id` = `team_user`.uid"). + Where( + builder.And( + builder.Eq{"`team_user`.uid": userID}, + builder.Or( + builder.Gte{"`team`.authorize": perm.AccessModeOwner}, + builder.Eq{"iu.is_admin": true}, + ), + ), + ) + + sq := builder.Select("`repo_group`.id"). + From("`repo_group`, `team_user`"). + Join("LEFT", "repo_group_team", "`repo_group_team`.group_id = `repo_group`.id"). + Where( + builder.In("`team_user`.uid", teamUserSubquery)) + return builder.In(idStr, sq) +} + // userOrgTeamGroupBuilder returns group ids where user's teams can access. func userOrgTeamGroupBuilder(userID int64) *builder.Builder { return builder.Select("`repo_group_team`.group_id"). @@ -71,15 +95,17 @@ func AccessibleGroupCondition(user *user_model.User, unitType unit.Type, minMode if user == nil || user.ID <= 0 { orgVisibilityLimit = append(orgVisibilityLimit, structs.VisibleTypeLimited) } - cond = cond.Or(builder.And( - builder.Eq{"`repo_group`.visibility": structs.VisibleTypePublic}, - builder.NotIn("`repo_group`.owner_id", builder.Select("id").From("`user`").Where( + 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)) cond = cond.Or(UserOrgTeamPermCond("`repo_group`.id", user.ID, minMode)) if unitType == unit.TypeInvalid { cond = cond.Or( From 523ba22f0a66d7a359506a25a12f096db149de37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 15:22:33 -0500 Subject: [PATCH 172/218] fix: update `CanAccessAtLevel` func ensure that public groups can always be accessed if requested level == read --- models/group/group.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index de87cdf3c0..d2c9f19fe0 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -137,7 +137,11 @@ func (g *Group) CanAccess(ctx context.Context, user *user_model.User) (bool, err } func (g *Group) CanAccessAtLevel(ctx context.Context, user *user_model.User, level perm.AccessMode) (bool, error) { - return db.GetEngine(ctx).Where(AccessibleGroupCondition(user, unit.TypeInvalid, level).And(builder.Eq{"`repo_group`.id": g.ID})).Exist(&Group{}) + orCond := builder.Or(AccessibleGroupCondition(user, unit.TypeInvalid, level)) + if level == perm.AccessModeRead { + orCond = orCond.Or(builder.Eq{"`repo_group`.visibility": structs.VisibleTypePublic}) + } + return db.GetEngine(ctx).Table(g.TableName()).Where(orCond.And(builder.Eq{"`repo_group`.id": g.ID})).Exist() } func (g *Group) IsOwnedBy(ctx context.Context, userID int64) (bool, error) { From ed0b631a2a363413de1115f6b755a3caf8e3947a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 15:23:24 -0500 Subject: [PATCH 173/218] feat: add endpoint to retrieve root-level groups in org --- routers/api/v1/api.go | 1 + routers/api/v1/org/group.go | 78 +++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 routers/api/v1/org/group.go diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 4d3ef85292..2f14c93b42 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1740,6 +1740,7 @@ func Routes() *web.Router { }) }, reqToken(), reqOrgOwnership()) m.Group("/groups", func() { + m.Get("", org.GetOrgGroups) m.Post("/new", reqToken(), reqGroupMembership(perm.AccessModeWrite, true), group.NewGroup) }) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization), orgAssignment(true), checkTokenPublicOnly()) diff --git a/routers/api/v1/org/group.go b/routers/api/v1/org/group.go new file mode 100644 index 0000000000..5173fe752a --- /dev/null +++ b/routers/api/v1/org/group.go @@ -0,0 +1,78 @@ +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, 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) +} From b7a828762548d6e4425502550209a18fa951f735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 15:25:16 -0500 Subject: [PATCH 174/218] feat: add some integration tests --- tests/integration/api_repo_group_test.go | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tests/integration/api_repo_group_test.go diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go new file mode 100644 index 0000000000..fd247950ee --- /dev/null +++ b/tests/integration/api_repo_group_test.go @@ -0,0 +1,56 @@ +package integration + +import ( + "net/http" + "testing" + + group_model "code.gitea.io/gitea/models/group" + "code.gitea.io/gitea/models/unittest" + "code.gitea.io/gitea/modules/json" + api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" + "github.com/stretchr/testify/assert" +) + +func TestCreateGroup(t *testing.T) { + +} + +func TestOwnersAndAdminsCanSeeAllTopLevelGroups(t *testing.T) { + defer tests.PrepareTestEnv(t)() + req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user2") + resp := MakeRequest(t, req, http.StatusOK) + groups := make([]*api.Group, 0) + json.NewDecoder(resp.Body).Decode(&groups) + expectedLen := unittest.GetCount(t, new(group_model.Group), + group_model.FindGroupsOptions{ + ParentGroupID: 0, + OwnerID: 43, + }.ToConds()) + assert.Len(t, groups, expectedLen) + + // now test if site-wide admin can see all groups + req = NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user1") + resp = MakeRequest(t, req, http.StatusOK) + groups = make([]*api.Group, 0) + json.NewDecoder(resp.Body).Decode(&groups) + assert.Len(t, groups, expectedLen) +} + +func TestNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { + defer tests.PrepareTestEnv(t)() + req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user4") + resp := MakeRequest(t, req, http.StatusOK) + groups := make([]*api.Group, 0) + json.NewDecoder(resp.Body).Decode(&groups) + expectedLen := unittest.GetCount(t, new(group_model.Group), + group_model.FindGroupsOptions{ + ParentGroupID: 0, + OwnerID: 43, + }.ToConds()) + assert.NotEqual(t, len(groups), expectedLen) +} + +func TestGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { + +} From 657d35a3c5f5100b1d4dcddfdeba3fa239de66cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 16:14:25 -0500 Subject: [PATCH 175/218] update migrations --- models/migrations/v1_26/v324.go | 28 ++++++++++++++++------------ models/migrations/v1_26/v331.go | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 models/migrations/v1_26/v331.go diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index 5c67ed5998..5d96bfa3ca 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -3,18 +3,22 @@ package v1_26 -import "xorm.io/xorm" +import ( + "fmt" -func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error { - type Repository struct { - LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"` - GroupID int64 `xorm:"UNIQUE(g) INDEX DEFAULT 0"` - OwnerID int64 `xorm:"UNIQUE(s) UNIQUE(g) index"` - GroupSortOrder int + "xorm.io/xorm" +) + +func FixClosedMilestoneCompleteness(x *xorm.Engine) error { + // Update all milestones to recalculate completeness with the new logic: + // - Closed milestones with 0 issues should show 100% + // - All other milestones should calculate based on closed/total ratio + _, err := x.Exec("UPDATE `milestone` SET completeness=(CASE WHEN is_closed = ? AND num_issues = 0 THEN 100 ELSE 100*num_closed_issues/(CASE WHEN num_issues > 0 THEN num_issues ELSE 1 END) END)", + true, + ) + if err != nil { + return fmt.Errorf("error updating milestone completeness: %w", err) } - _, err := x.SyncWithOptions(xorm.SyncOptions{ - IgnoreConstrains: false, - IgnoreIndices: false, - }, new(Repository)) - return err + + return nil } diff --git a/models/migrations/v1_26/v331.go b/models/migrations/v1_26/v331.go new file mode 100644 index 0000000000..25b5b14c6a --- /dev/null +++ b/models/migrations/v1_26/v331.go @@ -0,0 +1,20 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package v1_26 + +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 +} From 5f032aef6f540905f487eb3fb27a01a1d276edd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 16:15:43 -0500 Subject: [PATCH 176/218] update swagger definitions --- templates/swagger/v1_groups.json | 68 +++++++++++++++++++ templates/swagger/v1_json.tmpl | 109 +++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 01da0e65db..d9d9806585 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -2683,6 +2683,74 @@ } } }, + "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" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 688d6a44c1..aafb511039 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -3197,6 +3197,47 @@ } } }, + "/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": [ @@ -7639,6 +7680,74 @@ } } }, + "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" From 5df99c758081bb85d3212855785cba7e79e2a688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 16:23:11 -0500 Subject: [PATCH 177/218] fix build errors --- routers/web/repo/migrate.go | 2 +- services/repository/repository.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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/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) From 93955ad026fab6dbbff3ff107b8c0bc0dac6efa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 20 Dec 2025 16:27:39 -0500 Subject: [PATCH 178/218] run formatter --- tests/integration/api_repo_group_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index fd247950ee..cb0bd4a15f 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -9,11 +9,11 @@ import ( "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/tests" + "github.com/stretchr/testify/assert" ) func TestCreateGroup(t *testing.T) { - } func TestOwnersAndAdminsCanSeeAllTopLevelGroups(t *testing.T) { @@ -52,5 +52,4 @@ func TestNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { } func TestGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { - } From 83c08e3a91a43d394987387b7cee08cb3c3244fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 2 Apr 2026 19:25:35 -0400 Subject: [PATCH 179/218] fix compilation errors after rebase --- models/migrations/v1_21/v276.go | 2 +- models/migrations/v1_9/v82.go | 2 +- routers/api/v1/group/group.go | 2 +- routers/web/shared/actions/general.go | 2 +- routers/web/shared/actions/runners.go | 2 ++ services/group/search.go | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) 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_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/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index abcb33d53c..eda16eee1b 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -357,7 +357,7 @@ func GetGroupRepos(ctx *context.APIContext) { } repos := make([]*api.Repository, len(groupRepos)) for i, repo := range groupRepos { - permission, err := access_model.GetUserRepoPermission(ctx, repo, ctx.Doer) + permission, err := access_model.GetIndividualUserRepoPermission(ctx, repo, ctx.Doer) if err != nil { ctx.APIErrorInternal(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/services/group/search.go b/services/group/search.go index 5194c7394c..cc81b9f5c5 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -94,7 +94,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error { slices.SortStableFunc(repos, func(a, b *repo_model.Repository) int { return a.GroupSortOrder - b.GroupSortOrder }) - latestCommitStatuses, err := commitstatus_service.FindReposLastestCommitStatuses(opts.Ctx, repos) + latestCommitStatuses, err := commitstatus_service.FindReposLatestCommitStatuses(opts.Ctx, repos) if err != nil { log.Error("FindReposLastestCommitStatuses: %v", err) return err From 777eb9bc86a758c554095ad4f3f97e65f7bef5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 2 Apr 2026 19:58:59 -0400 Subject: [PATCH 180/218] refactor: refactor head repo parsing to take into account repo groups --- routers/common/compare.go | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) 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 } From e1bf87833e74511ee06a520a044d44306b588dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 14:55:38 -0400 Subject: [PATCH 181/218] re-add repo group migration --- models/migrations/migrations.go | 2 +- models/migrations/{v1_26/v331.go => v1_27/v332.go} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename models/migrations/{v1_26/v331.go => v1_27/v332.go} (97%) diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index f14dfe68db..003cdd7e25 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -409,7 +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_26.AddGroupColumnsToRepositoryTable), + newMigration(332, "Add group_id and group_sort_order columns to repository table", v1_27.AddGroupColumnsToRepositoryTable), } return preparedMigrations } diff --git a/models/migrations/v1_26/v331.go b/models/migrations/v1_27/v332.go similarity index 97% rename from models/migrations/v1_26/v331.go rename to models/migrations/v1_27/v332.go index 25b5b14c6a..c3ed24d395 100644 --- a/models/migrations/v1_26/v331.go +++ b/models/migrations/v1_27/v332.go @@ -1,7 +1,7 @@ // Copyright 2025 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_26 +package v1_27 import "xorm.io/xorm" From e9d3888258532b47ea8aeeca8c67ff6c7f761941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 16:30:39 -0400 Subject: [PATCH 182/218] fix: add group id to `repoAssignmentPrepareDataStruct` struct, fix undefined references to `gid` variable in assignment funcs --- services/context/repo.go | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/services/context/repo.go b/services/context/repo.go index 295c371ae7..96ab94c9d2 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -468,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) { @@ -489,26 +490,14 @@ func repoAssignmentPrepareData(ctx *Context) *repoAssignmentPrepareDataStruct { userName := ctx.PathParam("username") repoName := ctx.PathParam("reponame") group := ctx.PathParam("group_id") - var gid int64 - if group != "" { - gid, _ = strconv.ParseInt(group, 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 += "/" - } + 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) { @@ -546,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 @@ -571,6 +574,7 @@ func repoAssignmentAutoRedirectWiki(ctx *Context, data *repoAssignmentPrepareDat func repoAssignmentPrepareRepo(ctx *Context, data *repoAssignmentPrepareDataStruct) { repoName := data.repoName // Get repository. + 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) { From 259d79a96d1f3a5560c006a0a24b68fc3e18dc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 16:39:34 -0400 Subject: [PATCH 183/218] fix: build errors after rebase --- tests/integration/pull_merge_test.go | 1 + tests/integration/repo_commits_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index 8a94822de1..1d0fcc6c8b 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -17,6 +17,7 @@ import ( "time" auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/db" git_model "code.gitea.io/gitea/models/git" issues_model "code.gitea.io/gitea/models/issues" pull_model "code.gitea.io/gitea/models/pull" diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index 460a6cd812..3bcea83f43 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -84,7 +84,7 @@ func TestRepoCommitsWithStatus(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") - ctx := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository) + ctx := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository) requestCommitStatuses := func(t *testing.T, linkList, linkCombined string) (statuses []*api.CommitStatus, status api.CombinedStatus) { assert.NoError(t, json.Unmarshal(session.MakeRequest(t, NewRequest(t, "GET", linkList), http.StatusOK).Body.Bytes(), &statuses)) From c3f173096096706bb049e4e705626745641787ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 17:36:15 -0400 Subject: [PATCH 184/218] update swagger definitions --- templates/swagger/v1_groups.json | 685 ++++++++++++++++++++++++++++--- 1 file changed, 633 insertions(+), 52 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index d9d9806585..88933d9516 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -556,6 +556,12 @@ "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", @@ -567,7 +573,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "$ref": "#/responses/RunnerList" }, "400": { "$ref": "#/responses/error" @@ -579,45 +585,6 @@ } }, "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", - "parameters": [ - { - "type": "string", - "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" - } - } - }, "post": { "produces": [ "application/json" @@ -666,7 +633,7 @@ "tags": [ "repository" ], - "summary": "Get an repo-level runner", + "summary": "Get a repo-level runner", "operationId": "getRepoRunner", "parameters": [ { @@ -701,7 +668,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Runner" }, "400": { "$ref": "#/responses/error" @@ -718,7 +685,7 @@ "tags": [ "repository" ], - "summary": "Delete an repo-level runner", + "summary": "Delete a repo-level runner", "operationId": "deleteRepoRunner", "parameters": [ { @@ -762,6 +729,71 @@ "$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": { @@ -879,7 +911,7 @@ "required": true }, { - "type": "string", + "type": "integer", "description": "id of the run", "name": "run", "in": "path", @@ -1019,6 +1051,146 @@ } } }, + "/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": [ @@ -1091,6 +1263,199 @@ } } }, + "/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": [ @@ -1850,6 +2215,12 @@ "$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", @@ -1860,8 +2231,11 @@ } ], "responses": { + "200": { + "$ref": "#/responses/RunDetails" + }, "204": { - "description": "No Content" + "description": "No Content, if return_run_details is missing or false" }, "400": { "$ref": "#/responses/error" @@ -2036,6 +2410,16 @@ "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", @@ -4140,7 +4524,7 @@ } }, "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`.", + "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" ], @@ -6387,7 +6771,7 @@ } ], "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -6545,6 +6929,7 @@ } }, "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" ], @@ -8390,7 +8775,7 @@ } ], "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -10304,7 +10689,7 @@ "type": "string" }, "collectionFormat": "multi", - "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned", + "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" }, @@ -10620,6 +11005,122 @@ } } }, + "/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": [ @@ -10915,6 +11416,83 @@ } } }, + "/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": [ @@ -11176,6 +11754,9 @@ "200": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, @@ -11444,7 +12025,7 @@ "tags": [ "repository" ], - "summary": "Create a review to an pull request", + "summary": "Create a review to a pull request", "operationId": "repoCreatePullReview", "parameters": [ { @@ -11565,7 +12146,7 @@ "tags": [ "repository" ], - "summary": "Submit a pending review to an pull request", + "summary": "Submit a pending review to a pull request", "operationId": "repoSubmitPullReview", "parameters": [ { @@ -12326,7 +12907,7 @@ }, { "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "description": "filter (exclude / include) drafts, if you don't have repo write access none will show", "name": "draft", "in": "query" }, From 6b5e17369f2f8cedf6c202b494eb767761ed738b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 17:38:38 -0400 Subject: [PATCH 185/218] fix: lint errors --- build_tools/swagger/main.go | 12 +- models/git/lfs_test.go | 2 +- routers/api/v1/org/group.go | 3 + templates/swagger/v1_groups.json | 4 +- templates/swagger/v1_json.tmpl | 681 +- templates/swagger/v1_openapi3_json.tmpl | 17998 ++++++++++++++++++++- tests/integration/api_repo_group_test.go | 5 +- tests/integration/utils.go | 13 - 8 files changed, 18641 insertions(+), 77 deletions(-) delete mode 100644 tests/integration/utils.go diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index c8e9882bde..1fef78548c 100644 --- a/build_tools/swagger/main.go +++ b/build_tools/swagger/main.go @@ -52,6 +52,8 @@ func (o OrderedMap) Iter() iter.Seq2[string, any] { } } +var errNilSentinel = errors.New("nil sentinel") + func (o *OrderedMap) UnmarshalJSON(data []byte) error { trimmed := bytes.TrimSpace(data) if bytes.Equal(trimmed, []byte("null")) { @@ -128,7 +130,7 @@ func (o *OrderedMap) UnmarshalJSON(data []byte) error { func decodeJSONValue(raw encjson.RawMessage) (any, error) { t := bytes.TrimSpace(raw) if bytes.Equal(t, []byte("null")) { - return nil, nil + return nil, errNilSentinel } d := encjson.NewDecoder(bytes.NewReader(raw)) @@ -156,7 +158,7 @@ func decodeJSONValue(raw encjson.RawMessage) (any, error) { return nil, err } v, err := decodeJSONValue(elemRaw) - if err != nil { + if err != nil && !errors.Is(err, errNilSentinel) { return nil, err } arr = append(arr, v) @@ -278,12 +280,12 @@ func generatePaths(root string) *OrderedMap { } func writeMapToFile(filename string, data *OrderedMap) { - bytes, err := json.MarshalIndent(data, "", " ") + marshaledBytes, err := json.MarshalIndent(data, "", " ") if err != nil { log.Fatal(err) } - bytes = append(bytes, '\n') - err = os.WriteFile(filename, bytes, 0o666) + marshaledBytes = append(marshaledBytes, '\n') + err = os.WriteFile(filename, marshaledBytes, 0o666) if err != nil { log.Fatal(err) } 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/routers/api/v1/org/group.go b/routers/api/v1/org/group.go index 5173fe752a..54caa5b43b 100644 --- a/routers/api/v1/org/group.go +++ b/routers/api/v1/org/group.go @@ -1,3 +1,6 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package org import ( diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 88933d9516..ffcfd2c43c 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -4524,7 +4524,7 @@ } }, "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`.", + "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" ], @@ -10689,7 +10689,7 @@ "type": "string" }, "collectionFormat": "multi", - "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned", "name": "status-types", "in": "query" }, diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index aafb511039..00e608160d 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -5553,6 +5553,12 @@ "in": "path", "required": true }, + { + "type": "boolean", + "description": "filter by disabled status (true or false)", + "name": "disabled", + "in": "query" + }, { "type": "integer", "format": "int64", @@ -5564,7 +5570,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "$ref": "#/responses/RunnerList" }, "400": { "$ref": "#/responses/error" @@ -5576,45 +5582,6 @@ } }, "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationTokenMixin0", - "parameters": [ - { - "type": "string", - "description": "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" - } - } - }, "post": { "produces": [ "application/json" @@ -5663,7 +5630,7 @@ "tags": [ "repository" ], - "summary": "Get an repo-level runner", + "summary": "Get a repo-level runner", "operationId": "getRepoRunnerMixin0", "parameters": [ { @@ -5698,7 +5665,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Runner" }, "400": { "$ref": "#/responses/error" @@ -5715,7 +5682,7 @@ "tags": [ "repository" ], - "summary": "Delete an repo-level runner", + "summary": "Delete a repo-level runner", "operationId": "deleteRepoRunnerMixin0", "parameters": [ { @@ -5759,6 +5726,71 @@ "$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": { @@ -5876,7 +5908,7 @@ "required": true }, { - "type": "string", + "type": "integer", "description": "id of the run", "name": "run", "in": "path", @@ -6016,6 +6048,146 @@ } } }, + "/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": [ @@ -6088,6 +6260,199 @@ } } }, + "/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": [ @@ -6847,6 +7212,12 @@ "$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", @@ -6857,8 +7228,11 @@ } ], "responses": { + "200": { + "$ref": "#/responses/RunDetails" + }, "204": { - "description": "No Content" + "description": "No Content, if return_run_details is missing or false" }, "400": { "$ref": "#/responses/error" @@ -7033,6 +7407,16 @@ "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", @@ -11384,7 +11768,7 @@ } ], "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -11542,6 +11926,7 @@ } }, "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" ], @@ -13387,7 +13772,7 @@ } ], "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -15617,6 +16002,122 @@ } } }, + "/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": [ @@ -15912,6 +16413,83 @@ } } }, + "/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": [ @@ -16173,6 +16751,9 @@ "200": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, @@ -16441,7 +17022,7 @@ "tags": [ "repository" ], - "summary": "Create a review to an pull request", + "summary": "Create a review to a pull request", "operationId": "repoCreatePullReviewMixin0", "parameters": [ { @@ -16562,7 +17143,7 @@ "tags": [ "repository" ], - "summary": "Submit a pending review to an pull request", + "summary": "Submit a pending review to a pull request", "operationId": "repoSubmitPullReviewMixin0", "parameters": [ { @@ -17323,7 +17904,7 @@ }, { "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "description": "filter (exclude / include) drafts, if you don't have repo write access none will show", "name": "draft", "in": "query" }, diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl index 33adff75e0..9f74265808 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/MoveGroupOption" } } }, @@ -4561,6 +4584,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 +5275,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 +6735,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 +7152,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 +7668,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 +9362,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 +10546,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 +11407,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 +12181,249 @@ ] } }, + "/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" + ] + } + }, "/label/templates": { "get": { "operationId": "listLabelTemplates", @@ -13484,6 +13989,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 +15949,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/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index cb0bd4a15f..3101153bff 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -1,3 +1,6 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package integration import ( @@ -48,7 +51,7 @@ func TestNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { ParentGroupID: 0, OwnerID: 43, }.ToConds()) - assert.NotEqual(t, len(groups), expectedLen) + assert.NotEqual(t, expectedLen, len(groups)) } func TestGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { diff --git a/tests/integration/utils.go b/tests/integration/utils.go deleted file mode 100644 index 166720fc88..0000000000 --- a/tests/integration/utils.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2025 The Gitea Authors. All rights reserved. -// SPDX-License-Identifier: MIT - -package integration - -import "fmt" - -func maybeGroupSegment(gid int64) string { - if gid > 0 { - return fmt.Sprintf("group/%d/", gid) - } - return "" -} From 30960026df81b44934d7a8a05e939e187def4749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 19:30:42 -0400 Subject: [PATCH 186/218] fix: add missing group id env variable when executing hooks --- cmd/serv.go | 1 + modules/repository/env.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/serv.go b/cmd/serv.go index 9a078cc0c7..7b00cce382 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -331,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/modules/repository/env.go b/modules/repository/env.go index a232d3a727..653dd00b3b 100644 --- a/modules/repository/env.go +++ b/modules/repository/env.go @@ -64,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 { From 1c49bbeff7310d75160574b0a39d371d485fbf7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 4 May 2026 20:19:41 -0400 Subject: [PATCH 187/218] fix: more failing tests --- models/issues/issue_xref_test.go | 4 +-- routers/common/compare_test.go | 1 + services/group/group_test.go | 42 +++++++++++++++++++++++++++++--- 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/models/issues/issue_xref_test.go b/models/issues/issue_xref_test.go index ba9db3887a..b25a704bec 100644 --- a/models/issues/issue_xref_test.go +++ b/models/issues/issue_xref_test.go @@ -54,7 +54,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { itarget = testCreateIssue(t, 3, 3, "title4", "content4", false) // Cross-reference to issue #4 by admin - content = fmt.Sprintf("content5, mentions org3/group/129/repo3#%d", itarget.Index) + content = fmt.Sprintf("content5, mentions org3/repo3#%d", itarget.Index) i = testCreateIssue(t, 2, 1, "title5", content, false) ref = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}) assert.Equal(t, issues_model.CommentTypeIssueRef, ref.Type) @@ -63,7 +63,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { assert.Equal(t, references.XRefActionNone, ref.RefAction) // Cross-reference to issue #4 with no permission - content = fmt.Sprintf("content6, mentions org3/group/129/repo3#%d", itarget.Index) + content = fmt.Sprintf("content6, mentions org3/repo3#%d", itarget.Index) i = testCreateIssue(t, 4, 5, "title6", content, false) unittest.AssertNotExistsBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}) } 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/services/group/group_test.go b/services/group/group_test.go index a726123e94..cfe5e1723f 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -6,7 +6,9 @@ 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" @@ -21,12 +23,43 @@ 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: 3, + OwnerID: orgWithGroups.ID, } assert.NoError(t, NewGroup(t.Context(), group)) unittest.AssertExistsAndLoadBean(t, &group_model.Group{Name: groupName}) @@ -34,13 +67,14 @@ func TestNewGroup(t *testing.T) { func TestMoveGroup(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) + orgWithGroups := getOrCreateOrgWithGroups(t) doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ - ID: 28, + ID: 2, }) testfn := func(gid int64) { cond := &group_model.FindGroupsOptions{ ParentGroupID: 123, - OwnerID: 3, + OwnerID: orgWithGroups.ID, } origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) @@ -60,7 +94,7 @@ func TestMoveGroup(t *testing.T) { func TestMoveRepo(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ - ID: 28, + ID: 2, }) cond := repo_model.SearchRepositoryCondition(repo_model.SearchRepoOptions{ GroupID: 123, From 318a19187db3d7fa72b1406b51abc683ab2a7d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 15:56:53 -0400 Subject: [PATCH 188/218] fix: update group service unit tests --- services/group/group_test.go | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/services/group/group_test.go b/services/group/group_test.go index cfe5e1723f..3296645a5b 100644 --- a/services/group/group_test.go +++ b/services/group/group_test.go @@ -12,13 +12,11 @@ import ( 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" ) -// group 12 is private -// team 23 are owners - func TestMain(m *testing.M) { unittest.MainTest(m) } @@ -73,22 +71,22 @@ func TestMoveGroup(t *testing.T) { }) testfn := func(gid int64) { cond := &group_model.FindGroupsOptions{ - ParentGroupID: 123, + ParentGroupID: 9, OwnerID: orgWithGroups.ID, } origCount := unittest.GetCount(t, new(group_model.Group), cond.ToConds()) assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{ - NewParent: 123, + NewParent: 9, ItemID: gid, IsGroup: true, NewPos: -1, }, doer)) unittest.AssertCountByCond(t, "repo_group", cond.ToConds(), origCount+1) } - testfn(124) - testfn(132) - testfn(150) + testfn(23) + testfn(22) + testfn(4) } func TestMoveRepo(t *testing.T) { @@ -96,14 +94,20 @@ func TestMoveRepo(t *testing.T) { 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: 123, + GroupID: 1, }) origCount := unittest.GetCount(t, new(repo_model.Repository), cond) assert.NoError(t, MoveGroupItem(t.Context(), MoveGroupOptions{ - NewParent: 123, - ItemID: 32, + NewParent: 1, + ItemID: repoToMove.ID, IsGroup: false, NewPos: -1, }, doer)) From d92dc9e79b77b33aad6cb750e611e25d1e8eb2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 20:51:52 -0400 Subject: [PATCH 189/218] refactor: update team add/remove/update logic in group service --- services/group/team.go | 117 +++++++++++++++++++++++++++++------------ 1 file changed, 82 insertions(+), 35 deletions(-) diff --git a/services/group/team.go b/services/group/team.go index 691752a0e2..5c92f56f3f 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -11,11 +11,17 @@ import ( 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) error { +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 @@ -29,31 +35,54 @@ func AddTeamToGroup(ctx context.Context, group *group_model.Group, tname string) return err } mode := t.AccessMode - canCreateIn := t.CanCreateOrgRepo + canCreateInRepo := t.CanCreateOrgRepo if parentGroup != nil { mode = max(t.AccessMode, parentGroup.AccessMode) - canCreateIn = parentGroup.CanCreateIn || t.CanCreateOrgRepo + 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, canCreateIn) + err = group_model.AddTeamGroup(ctx, group.ID, t.ID, group.ID, mode, canCreateInRepo) if err != nil { return err } - - return nil + 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 } - return group_model.RemoveTeamGroup(ctx, org, team.ID, group.ID) + 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) (err error) { +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 @@ -64,13 +93,17 @@ func UpdateGroupTeam(ctx context.Context, gt *group_model.RepoGroupTeam) (err er if _, err = sess.ID(gt.ID).AllCols().Update(gt); err != nil { return fmt.Errorf("update: %w", err) } - for _, unit := range gt.Units { - unit.TeamID = gt.TeamID + 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 = ?", unit.Type). - Update(unit); err != nil { + And("type = ?", groupUnit.Type). + Update(groupUnit); err != nil { return err } } @@ -80,8 +113,11 @@ func UpdateGroupTeam(ctx context.Context, gt *group_model.RepoGroupTeam) (err er // 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 { - var err error - sess := db.GetEngine(ctx) + ctx, committer, err := db.TxContext(ctx) + if err != nil { + return err + } + defer committer.Close() if err = g.LoadParentGroup(ctx); err != nil { return err } @@ -119,29 +155,40 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo if err != nil { return err } - newAccessMode = min(newAccessMode, gu.AccessMode) + if gu != nil { + newAccessMode = min(newAccessMode, gu.AccessMode) + } } - if isNew { - if _, err = sess.Table("repo_group_unit").Insert(&group_model.RepoGroupUnit{ - Type: u.Type, - TeamID: t.ID, - GroupID: g.ID, - AccessMode: newAccessMode, - }); err != nil { - return err - } - } else { - if _, err = sess.Table("repo_group_unit").Where(builder.Eq{ - "type": u.Type, - "team_id": t.ID, - "group_id": g.ID, - }).Cols("access_mode").Update(&group_model.RepoGroupUnit{ - AccessMode: newAccessMode, - }); err != nil { - return err - } + err = UpdateOrCreateGroupUnit(ctx, isNew, g, t, u.Unit(), newAccessMode) + if err != nil { + return err } } } - 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 } From 7b47ece4874318e9f0323263b6bcde00b51d16be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 20:52:42 -0400 Subject: [PATCH 190/218] feat: add api routes to add/update/remove teams to/from repo groups --- modules/structs/repo_group_team.go | 13 ++ routers/api/v1/api.go | 29 ++- routers/api/v1/group/team.go | 318 +++++++++++++++++++++++++++++ 3 files changed, 359 insertions(+), 1 deletion(-) create mode 100644 modules/structs/repo_group_team.go create mode 100644 routers/api/v1/group/team.go 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/routers/api/v1/api.go b/routers/api/v1/api.go index 2f14c93b42..a131660f6d 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -518,6 +518,25 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co ctx.APIErrorInternal(err) return } + isOrgOwner := false + isOrgAdmin := false + + 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 := g.CanAccessAtLevel(ctx, ctx.Doer, mode) if err != nil { ctx.APIErrorInternal(err) @@ -541,7 +560,7 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co return } } - if !canCreateIn { + 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, gid)) return } @@ -1841,6 +1860,14 @@ func Routes() *web.Router { 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(group.AddTeam, reqGroupMembership(perm.AccessModeAdmin, false)). + Patch(group.EditTeam, reqGroupMembership(perm.AccessModeAdmin, false)). + Delete(group.DeleteTeam, reqGroupMembership(perm.AccessModeAdmin, false)) + }, reqToken(), reqGroupMembership(perm.AccessModeRead, false)) }, checkTokenPublicOnly()) }) return m diff --git a/routers/api/v1/group/team.go b/routers/api/v1/group/team.go new file mode 100644 index 0000000000..2570ea7136 --- /dev/null +++ b/routers/api/v1/group/team.go @@ -0,0 +1,318 @@ +// 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) + + gid := ctx.PathParamInt64("group_id") + group, err := group_model.GetGroupByID(ctx, gid) + if err != nil { + if group_model.IsErrGroupNotExist(err) { + ctx.APIErrorNotFound() + } + ctx.APIErrorInternal(err) + return + } + 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" + + 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 + } + team := getTeamFromGroup(ctx, group) + if team == nil { + return + } + + if group_model.HasTeamGroup(ctx, group.OwnerID, team.ID, gid) { + 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) +} From 98955e607d901cbbfaccd17c89c929a7856a1161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 21:39:07 -0400 Subject: [PATCH 191/218] refactor: update integration tests --- tests/integration/api_repo_group_test.go | 132 ++++++++++++++++++++--- 1 file changed, 118 insertions(+), 14 deletions(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index 3101153bff..81116449ee 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -4,55 +4,159 @@ package integration import ( + "fmt" "net/http" "testing" + auth_model "code.gitea.io/gitea/models/auth" + "code.gitea.io/gitea/models/db" 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" - "code.gitea.io/gitea/modules/json" + user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/tests" + "xorm.io/builder" "github.com/stretchr/testify/assert" ) +func seedOrgWithGroups(t *testing.T) { + token := getUserToken(t, "user2", auth_model.AccessTokenScopeWriteOrganization) + const orgName = "org-with-groups" + baseOrgUrl := fmt.Sprintf("/api/v1/orgs/%s", orgName) + + org := api.CreateOrgOption{ + UserName: orgName, + FullName: "Org with groups", + Description: "This organization has subgroups", + Website: "https://try.gitea.io", + Location: "Shanghai", + Visibility: "public", + } + req := NewRequestWithJSON(t, "POST", "/api/v1/orgs", &org).AddTokenAuth(token) + resp := MakeRequest(t, req, http.StatusCreated) + + apiOrg := DecodeJSON(t, resp, &api.Organization{}) + + e := db.GetEngine(t.Context()) + + _, err := e.Table(&group_model.Group{}).Update(&group_model.Group{ + OwnerName: apiOrg.Name, + OwnerID: apiOrg.ID, + }) + assert.NoError(t, err) + + // seed teams + teamPrivs := map[string]perm_model.AccessMode{ + "Owners": perm_model.AccessModeOwner, + "Admins": perm_model.AccessModeAdmin, + "Writers": perm_model.AccessModeWrite, + "Readers": perm_model.AccessModeRead, + "Limited": perm_model.AccessModeNone, + } + var teams []*api.Team + + userIds := []int64{4, 5, 8, 9, 10} + + userIdIdx := 0 + for k, v := range teamPrivs { + perm := api.RepoWritePermissionRead + if v >= perm_model.AccessModeAdmin { + perm = api.RepoWritePermissionAdmin + } else if v >= perm_model.AccessModeWrite { + perm = api.RepoWritePermissionWrite + } + reqBody := &api.CreateTeamOption{ + Name: k, + CanCreateOrgRepo: v >= perm_model.AccessModeWrite, + UnitsMap: map[string]string{}, + IncludesAllRepositories: v >= perm_model.AccessModeWrite, + } + if v > perm_model.AccessModeNone { + reqBody.Permission = perm + } + for _, nunit := range unit_model.AllUnitKeyNames() { + reqBody.UnitsMap[nunit] = v.ToString() + } + treq := NewRequestWithJSON(t, "POST", baseOrgUrl+"/teams", reqBody).AddTokenAuth(token) + tresp := MakeRequest(t, treq, http.StatusCreated) + team := DecodeJSON(t, tresp, &api.Team{}) + teams = append(teams, team) + + teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIds[userIdIdx]}) + + mreq := NewRequestf(t, "PUT", "/teams/%d/members/%s", team.ID, teamUser.Name) + MakeRequest(t, mreq, http.StatusNoContent) + userIdIdx++ + } + allPrivateGroups, err := group_model.FindGroupsByCond(t.Context(), &group_model.FindGroupsOptions{ + OwnerID: apiOrg.ID, + }, builder.Eq{"`repo_group`.visibility": api.VisibleTypePrivate}) + assert.NoError(t, err) + + for _, group := range allPrivateGroups { + baseTeamUrl := fmt.Sprintf("/api/v1/groups/%d/teams", group.ID) + for _, team := range teams { + trq := NewRequestWithJSON(t, "PUT", baseTeamUrl+"/"+team.Name, &api.CreateOrUpdateRepoGroupTeamOption{ + CanCreateIn: new(group.ID%int64(2) == int64(0) && perm_model.ParseAccessMode(string(team.Permission)) > perm_model.AccessModeRead), + }).AddTokenAuth(token) + MakeRequest(t, trq, http.StatusNoContent) + assert.NoError(t, err) + } + } +} + +func getOrgWithGroups(t *testing.T) *api.Organization { + req := NewRequest(t, "GET", "/api/v1/orgs/org-with-groups") + resp := MakeRequest(t, req, http.StatusOK) + return DecodeJSON(t, resp, &api.Organization{}) +} + +func TestAPIGroup(t *testing.T) { + defer tests.PrepareTestEnv(t)() + seedOrgWithGroups(t) + t.Run("Visibility", func(t *testing.T) { + t.Run("OwnersAndSiteAdminsCanSeeAllTopLevelGroups", testOwnersAndAdminsCanSeeAllTopLevelGroups) + t.Run("NonOrgMemberWontSeeHiddenTopLevelGroups", testNonOrgMemberWontSeeHiddenTopLevelGroups) + }) +} + func TestCreateGroup(t *testing.T) { } -func TestOwnersAndAdminsCanSeeAllTopLevelGroups(t *testing.T) { - defer tests.PrepareTestEnv(t)() +func testOwnersAndAdminsCanSeeAllTopLevelGroups(t *testing.T) { + org := getOrgWithGroups(t) req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user2") resp := MakeRequest(t, req, http.StatusOK) - groups := make([]*api.Group, 0) - json.NewDecoder(resp.Body).Decode(&groups) + groups := DecodeJSON(t, resp, []api.Group{}) expectedLen := unittest.GetCount(t, new(group_model.Group), group_model.FindGroupsOptions{ ParentGroupID: 0, - OwnerID: 43, + OwnerID: 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/org-with-groups/groups").AddBasicAuth("user1") resp = MakeRequest(t, req, http.StatusOK) - groups = make([]*api.Group, 0) - json.NewDecoder(resp.Body).Decode(&groups) + groups = DecodeJSON(t, resp, []api.Group{}) assert.Len(t, groups, expectedLen) } -func TestNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { - defer tests.PrepareTestEnv(t)() +func testNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { + org := getOrgWithGroups(t) req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user4") resp := MakeRequest(t, req, http.StatusOK) - groups := make([]*api.Group, 0) - json.NewDecoder(resp.Body).Decode(&groups) + groups := DecodeJSON(t, resp, []api.Group{}) expectedLen := unittest.GetCount(t, new(group_model.Group), group_model.FindGroupsOptions{ ParentGroupID: 0, - OwnerID: 43, + OwnerID: org.ID, }.ToConds()) assert.NotEqual(t, expectedLen, len(groups)) } -func TestGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { +func testGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { } From 17762c25acfda7baaf4f19095218cf8b5d800358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 21:49:08 -0400 Subject: [PATCH 192/218] fix: missing request body payload --- routers/api/v1/swagger/options.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go index fc786573f2..06a7027f12 100644 --- a/routers/api/v1/swagger/options.go +++ b/routers/api/v1/swagger/options.go @@ -242,4 +242,7 @@ type swaggerParameterBodies struct { // in:body MoveGroupOption api.MoveGroupOption + + // in:body + CreateOrUpdateGroupTeamOption api.CreateOrUpdateRepoGroupTeamOption } From 3e45ab677b15c128ac7183a3edc5363b3eca8524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 21:54:15 -0400 Subject: [PATCH 193/218] update swagger definitions --- templates/swagger/v1_json.tmpl | 236 ++++++++++++++++++++++- templates/swagger/v1_openapi3_json.tmpl | 238 +++++++++++++++++++++++- 2 files changed, 472 insertions(+), 2 deletions(-) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 00e608160d..7d614cbfa5 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1655,6 +1655,201 @@ } } }, + "/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": [ @@ -40104,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", @@ -47649,7 +47883,7 @@ "parameterBodies": { "description": "parameterBodies", "schema": { - "$ref": "#/definitions/MoveGroupOption" + "$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption" } }, "redirect": { diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl index 9f74265808..57dfd540c2 100644 --- a/templates/swagger/v1_openapi3_json.tmpl +++ b/templates/swagger/v1_openapi3_json.tmpl @@ -1713,7 +1713,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MoveGroupOption" + "$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption" } } }, @@ -4267,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": { @@ -12424,6 +12456,210 @@ ] } }, + "/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", From 2785f6180f19a6be29206ad61150ee10d950ed4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 22:01:50 -0400 Subject: [PATCH 194/218] run formatter --- tests/integration/api_repo_group_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index 81116449ee..b1d2704726 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -17,9 +17,9 @@ import ( user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/tests" - "xorm.io/builder" "github.com/stretchr/testify/assert" + "xorm.io/builder" ) func seedOrgWithGroups(t *testing.T) { From 9a6dd97153f6e8756168b58ae97265991cb44e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 22:04:11 -0400 Subject: [PATCH 195/218] fix lint errors --- services/group/team.go | 3 +++ tests/integration/api_repo_group_test.go | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/services/group/team.go b/services/group/team.go index 5c92f56f3f..96d6341d4c 100644 --- a/services/group/team.go +++ b/services/group/team.go @@ -129,6 +129,9 @@ func RecalculateGroupAccess(ctx context.Context, g *group_model.Group, isNew boo } } 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 diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index b1d2704726..e2119ff42e 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -4,8 +4,8 @@ package integration import ( - "fmt" "net/http" + "strconv" "testing" auth_model "code.gitea.io/gitea/models/auth" @@ -25,7 +25,7 @@ import ( func seedOrgWithGroups(t *testing.T) { token := getUserToken(t, "user2", auth_model.AccessTokenScopeWriteOrganization) const orgName = "org-with-groups" - baseOrgUrl := fmt.Sprintf("/api/v1/orgs/%s", orgName) + baseOrgURL := "/api/v1/orgs/" + orgName org := api.CreateOrgOption{ UserName: orgName, @@ -58,9 +58,9 @@ func seedOrgWithGroups(t *testing.T) { } var teams []*api.Team - userIds := []int64{4, 5, 8, 9, 10} + userIDs := []int64{4, 5, 8, 9, 10} - userIdIdx := 0 + userIDIdx := 0 for k, v := range teamPrivs { perm := api.RepoWritePermissionRead if v >= perm_model.AccessModeAdmin { @@ -80,16 +80,16 @@ func seedOrgWithGroups(t *testing.T) { for _, nunit := range unit_model.AllUnitKeyNames() { reqBody.UnitsMap[nunit] = v.ToString() } - treq := NewRequestWithJSON(t, "POST", baseOrgUrl+"/teams", reqBody).AddTokenAuth(token) + treq := NewRequestWithJSON(t, "POST", baseOrgURL+"/teams", reqBody).AddTokenAuth(token) tresp := MakeRequest(t, treq, http.StatusCreated) team := DecodeJSON(t, tresp, &api.Team{}) teams = append(teams, team) - teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIds[userIdIdx]}) + teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIDs[userIDIdx]}) mreq := NewRequestf(t, "PUT", "/teams/%d/members/%s", team.ID, teamUser.Name) MakeRequest(t, mreq, http.StatusNoContent) - userIdIdx++ + userIDIdx++ } allPrivateGroups, err := group_model.FindGroupsByCond(t.Context(), &group_model.FindGroupsOptions{ OwnerID: apiOrg.ID, @@ -97,9 +97,9 @@ func seedOrgWithGroups(t *testing.T) { assert.NoError(t, err) for _, group := range allPrivateGroups { - baseTeamUrl := fmt.Sprintf("/api/v1/groups/%d/teams", group.ID) + baseTeamURL := "/api/v1/groups/" + strconv.FormatInt(group.ID, 10) + "/teams" for _, team := range teams { - trq := NewRequestWithJSON(t, "PUT", baseTeamUrl+"/"+team.Name, &api.CreateOrUpdateRepoGroupTeamOption{ + trq := NewRequestWithJSON(t, "PUT", baseTeamURL+"/"+team.Name, &api.CreateOrUpdateRepoGroupTeamOption{ CanCreateIn: new(group.ID%int64(2) == int64(0) && perm_model.ParseAccessMode(string(team.Permission)) > perm_model.AccessModeRead), }).AddTokenAuth(token) MakeRequest(t, trq, http.StatusNoContent) @@ -158,5 +158,5 @@ func testNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { assert.NotEqual(t, expectedLen, len(groups)) } -func testGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { -} +/*func testGroupNotAccessibleWhenParentIsPrivate(t *testing.T) { +}*/ From 55b7b1f71111293a039d54e93b734d99ec608207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 5 May 2026 22:31:51 -0400 Subject: [PATCH 196/218] fix test failure during org/group seeding --- tests/integration/api_repo_group_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index e2119ff42e..32efe81d79 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -87,7 +87,7 @@ func seedOrgWithGroups(t *testing.T) { teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIDs[userIDIdx]}) - mreq := NewRequestf(t, "PUT", "/teams/%d/members/%s", team.ID, teamUser.Name) + mreq := NewRequestf(t, "PUT", "/teams/%d/members/%s", team.ID, teamUser.Name).AddTokenAuth(token) MakeRequest(t, mreq, http.StatusNoContent) userIDIdx++ } From a1aa8cfe86afcda6311ca6168a2142b3fc7654ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 15:18:06 -0400 Subject: [PATCH 197/218] fix request url in group integration test --- tests/integration/api_repo_group_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index 32efe81d79..2a5fc29aad 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -87,7 +87,7 @@ func seedOrgWithGroups(t *testing.T) { teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIDs[userIDIdx]}) - mreq := NewRequestf(t, "PUT", "/teams/%d/members/%s", team.ID, teamUser.Name).AddTokenAuth(token) + mreq := NewRequestf(t, "PUT", "/api/v1/teams/%d/members/%s", team.ID, teamUser.Name).AddTokenAuth(token) MakeRequest(t, mreq, http.StatusNoContent) userIDIdx++ } From 623ce95c71d3e79c0ce57549be5e1fd819ed970f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 15:29:15 -0400 Subject: [PATCH 198/218] fix another group integration test --- tests/integration/api_repo_group_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index 2a5fc29aad..1998eebfec 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -50,7 +50,6 @@ func seedOrgWithGroups(t *testing.T) { // seed teams teamPrivs := map[string]perm_model.AccessMode{ - "Owners": perm_model.AccessModeOwner, "Admins": perm_model.AccessModeAdmin, "Writers": perm_model.AccessModeWrite, "Readers": perm_model.AccessModeRead, @@ -147,7 +146,7 @@ func testOwnersAndAdminsCanSeeAllTopLevelGroups(t *testing.T) { func testNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { org := getOrgWithGroups(t) - req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user4") + req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").AddBasicAuth("user12") resp := MakeRequest(t, req, http.StatusOK) groups := DecodeJSON(t, resp, []api.Group{}) expectedLen := unittest.GetCount(t, new(group_model.Group), From deca66b96013003d489ace22b5a59ab4f34183a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 15:42:24 -0400 Subject: [PATCH 199/218] fix middleware order for group/team api --- routers/api/v1/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index a131660f6d..99a07595a7 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1864,9 +1864,9 @@ func Routes() *web.Router { m.Get("", group.ListTeams) m.Combo("/{team}"). Get(group.IsTeam). - Put(group.AddTeam, reqGroupMembership(perm.AccessModeAdmin, false)). - Patch(group.EditTeam, reqGroupMembership(perm.AccessModeAdmin, false)). - Delete(group.DeleteTeam, reqGroupMembership(perm.AccessModeAdmin, false)) + 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)) }, checkTokenPublicOnly()) }) From 675bdf8eeefc38f7811cb1ddd1dbe2b2619d37ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 19:22:00 -0400 Subject: [PATCH 200/218] fix: update/rework accessible group query conditions --- models/group/group.go | 4 +-- models/group/group_list.go | 68 ++++++++++++++++++++++--------------- routers/api/v1/org/group.go | 2 +- services/group/search.go | 2 +- 4 files changed, 45 insertions(+), 31 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index d2c9f19fe0..daacacbebc 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -97,7 +97,7 @@ func (g *Group) LoadSubgroups(ctx context.Context, recursive bool) error { } func (g *Group) LoadAccessibleSubgroups(ctx context.Context, recursive bool, doer *user_model.User) error { - return g.doLoadSubgroups(ctx, recursive, AccessibleGroupCondition(doer, unit.TypeInvalid, perm.AccessModeRead), 0) + return g.doLoadSubgroups(ctx, recursive, AccessibleGroupCondition(doer, g.OwnerID, unit.TypeInvalid, perm.AccessModeRead), 0) } func (g *Group) LoadAttributes(ctx context.Context) error { @@ -137,7 +137,7 @@ func (g *Group) CanAccess(ctx context.Context, user *user_model.User) (bool, err } func (g *Group) CanAccessAtLevel(ctx context.Context, user *user_model.User, level perm.AccessMode) (bool, error) { - orCond := builder.Or(AccessibleGroupCondition(user, unit.TypeInvalid, level)) + orCond := builder.Or(AccessibleGroupCondition(user, g.OwnerID, unit.TypeInvalid, level)) if level == perm.AccessModeRead { orCond = orCond.Or(builder.Eq{"`repo_group`.visibility": structs.VisibleTypePublic}) } diff --git a/models/group/group_list.go b/models/group/group_list.go index d5f839054a..e514009313 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -9,6 +9,7 @@ import ( "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/log" "code.gitea.io/gitea/modules/structs" "xorm.io/builder" @@ -28,67 +29,80 @@ func (groups RepoGroupList) LoadOwners(ctx context.Context) error { return nil } -func universalGroupPermBuilder(idStr string, userID int64) builder.Cond { +func universalGroupPermBuilder(idStr string, userID, orgID int64) 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} teamUserSubquery := builder.Select("`team_user`.uid"). From("team_user"). Join("INNER", "team", "`team`.id = `team_user`.team_id"). - Join("INNER", "`user`", "`user`.`id` = `team`.org_id"). - Join("INNER", "`user` as iu", "iu.`id` = `team_user`.uid"). + Join("LEFT", "`user` as iu", "iu.`id` = `team_user`.uid"). Where( builder.And( - builder.Eq{"`team_user`.uid": userID}, + builder.Eq{"`team`.org_id": orgID}, + eqCond, builder.Or( builder.Gte{"`team`.authorize": perm.AccessModeOwner}, - builder.Eq{"iu.is_admin": true}, - ), - ), + )), ) + 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}, + builder.In("`team_user`.uid", teamUserSubquery), + )) sq := builder.Select("`repo_group`.id"). - From("`repo_group`, `team_user`"). - Join("LEFT", "repo_group_team", "`repo_group_team`.group_id = `repo_group`.id"). + From("`repo_group`, team_user"). + Join("LEFT", "team", "`team`.org_id = `repo_group`.owner_id"). Where( - builder.In("`team_user`.uid", teamUserSubquery)) - return builder.In(idStr, sq) + builder.And( + builder.Eq{"`repo_group`.owner_id": orgID}, + builder.And( + builder.In("`team_user`.team_id", teamSubquery), + ))) + return builder.Or(builder.In(idStr, sq), builder.Exists(adminSubquery)) } // userOrgTeamGroupBuilder returns group ids where user's teams can access. -func userOrgTeamGroupBuilder(userID int64) *builder.Builder { +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.Eq{"`team_user`.uid": userID}) + 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 int64, level perm.AccessMode) builder.Cond { - selCond := userOrgTeamGroupBuilder(userID) +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 int64) builder.Cond { - return builder.In(idStr, userOrgTeamGroupBuilder(userID)) +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 int64, unitType unit.Type) builder.Cond { +func userOrgTeamUnitGroupCond(idStr string, userID, orgID int64, unitType unit.Type) builder.Cond { return builder.Or(builder.In( - idStr, userOrgTeamUnitGroupBuilder(userID, unitType))) + idStr, userOrgTeamUnitGroupBuilder(userID, orgID, unitType))) } // userOrgTeamUnitGroupBuilder returns group ids where user's teams can access the special unit. -func userOrgTeamUnitGroupBuilder(userID int64, unitType unit.Type) *builder.Builder { - return userOrgTeamGroupBuilder(userID). - Join("INNER", "team_unit", "`team_unit`.team_id = `team_repo`.team_id"). +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, unitType unit.Type, minMode perm.AccessMode) builder.Cond { +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 := []structs.VisibleType{structs.VisibleTypePrivate} @@ -105,15 +119,15 @@ func AccessibleGroupCondition(user *user_model.User, unitType unit.Type, minMode cond = cond.Or(condAnd) } if user != nil { - cond = cond.Or(universalGroupPermBuilder("`repo_group`.id", user.ID)) - cond = cond.Or(UserOrgTeamPermCond("`repo_group`.id", user.ID, minMode)) + cond = cond.Or(universalGroupPermBuilder("`repo_group`.id", user.ID, orgID)) + cond = cond.Or(UserOrgTeamPermCond("`repo_group`.id", user.ID, orgID, minMode)) if unitType == unit.TypeInvalid { cond = cond.Or( - UserOrgTeamGroupCond("`repo_group`.id", user.ID), + UserOrgTeamGroupCond("`repo_group`.id", user.ID, orgID), ) } else { cond = cond.Or( - userOrgTeamUnitGroupCond("`repo_group`.id", user.ID, unitType), + userOrgTeamUnitGroupCond("`repo_group`.id", user.ID, orgID, unitType), ) } } diff --git a/routers/api/v1/org/group.go b/routers/api/v1/org/group.go index 54caa5b43b..6f11ca8733 100644 --- a/routers/api/v1/org/group.go +++ b/routers/api/v1/org/group.go @@ -63,7 +63,7 @@ func GetOrgGroups(ctx *context.APIContext) { ActorID: doerID, OwnerID: org.ID, }, group_model. - AccessibleGroupCondition(ctx.Doer, unit.TypeInvalid, perm.AccessModeRead)) + AccessibleGroupCondition(ctx.Doer, org.ID, unit.TypeInvalid, perm.AccessModeRead)) if err != nil { ctx.APIErrorInternal(err) return diff --git a/services/group/search.go b/services/group/search.go index cc81b9f5c5..b57f176cca 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -119,7 +119,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error { w.LatestCommitStatus = latestCommitStatuses[latestIdx] } w.Subgroups = make([]*WebSearchGroup, 0) - groups, err := group_model.FindGroupsByCond(opts.Ctx, opts.GroupOpts, group_model.AccessibleGroupCondition(opts.Actor, unit.TypeInvalid, perm.AccessModeRead)) + 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 } From 843950818eeace58f2140ac29b654a886a22b993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 19:23:02 -0400 Subject: [PATCH 201/218] refactor: add `reqOrgAdmin` middleware, update broken `/orgs/{org}/groups/new` endpoint --- routers/api/v1/api.go | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 99a07595a7..2cc695426c 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -467,6 +467,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) { @@ -1760,7 +1791,7 @@ func Routes() *web.Router { }, reqToken(), reqOrgOwnership()) m.Group("/groups", func() { m.Get("", org.GetOrgGroups) - m.Post("/new", reqToken(), reqGroupMembership(perm.AccessModeWrite, true), group.NewGroup) + m.Post("/new", reqToken(), reqOrgAdmin(), bind(api.NewGroupOption{}), group.NewGroup) }) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryOrganization), orgAssignment(true), checkTokenPublicOnly()) m.Group("/teams/{teamid}", func() { From fd08b21d378235024930d485855c9f7696236949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 19:23:41 -0400 Subject: [PATCH 202/218] refactor: update api group integration test --- tests/integration/api_repo_group_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index 1998eebfec..8459370f47 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -57,7 +57,7 @@ func seedOrgWithGroups(t *testing.T) { } var teams []*api.Team - userIDs := []int64{4, 5, 8, 9, 10} + userIDs := []int64{4, 5, 8, 9} userIDIdx := 0 for k, v := range teamPrivs { @@ -98,8 +98,11 @@ func seedOrgWithGroups(t *testing.T) { for _, group := range allPrivateGroups { baseTeamURL := "/api/v1/groups/" + strconv.FormatInt(group.ID, 10) + "/teams" for _, team := range teams { + if team.Permission == api.AccessLevelNameNone { + continue + } trq := NewRequestWithJSON(t, "PUT", baseTeamURL+"/"+team.Name, &api.CreateOrUpdateRepoGroupTeamOption{ - CanCreateIn: new(group.ID%int64(2) == int64(0) && perm_model.ParseAccessMode(string(team.Permission)) > perm_model.AccessModeRead), + CanCreateIn: new(group.ID%int64(2) == int64(1) && perm_model.ParseAccessMode(string(team.Permission)) > perm_model.AccessModeRead), }).AddTokenAuth(token) MakeRequest(t, trq, http.StatusNoContent) assert.NoError(t, err) From 40db7688d1f680a5cedb4706d5659e26f9eb42df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 19:26:12 -0400 Subject: [PATCH 203/218] fix: unused import --- models/group/group_list.go | 1 - 1 file changed, 1 deletion(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index e514009313..621ba08dc4 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -9,7 +9,6 @@ import ( "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/log" "code.gitea.io/gitea/modules/structs" "xorm.io/builder" From aaa7e46da544bc20dcef226ec7e64ee0d9d28d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 19:45:54 -0400 Subject: [PATCH 204/218] fix: error on non-sqlite dbs --- models/group/group_list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/group/group_list.go b/models/group/group_list.go index 621ba08dc4..281e3ee306 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -30,8 +30,8 @@ func (groups RepoGroupList) LoadOwners(ctx context.Context) error { func universalGroupPermBuilder(idStr string, userID, orgID int64) builder.Cond { adminSubquery := builder.Select("1"). - From("user"). - Where(builder.Eq{"`user`.is_admin": true, "`user`.id": userID}) + From("`user`"). + Where(builder.Eq{"`user`.is_admin": true, "`user`.`id`": userID}) eqCond := builder.Eq{"`team_user`.uid": userID} teamUserSubquery := builder.Select("`team_user`.uid"). From("team_user"). From 0af8cacd4d513e75fa0c58890f7d5014cf204c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 21:11:01 -0400 Subject: [PATCH 205/218] refactor: add `permission denied` error type to group model package --- models/group/errors.go | 18 ++++++++++++++++++ services/group/group.go | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/models/group/errors.go b/models/group/errors.go index 812fc6ddc9..52aafbf655 100644 --- a/models/group/errors.go +++ b/models/group/errors.go @@ -42,3 +42,21 @@ func IsErrGroupTooDeep(err error) bool { 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/services/group/group.go b/services/group/group.go index d09077cbbf..ad48baaeb7 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -98,7 +98,10 @@ func MoveGroupItem(ctx context.Context, opts MoveGroupOptions, doer *user_model. return err } if !canAccessNewParent { - return errors.New("cannot access new parent group") + return group_model.ErrUserDoesNotHaveAccessToGroup{ + GroupID: opts.NewParent, + UserID: doer.ID, + } } err = parentGroup.LoadSubgroups(ctx, false) From 341c7a12553c1e53abfe9c1a74372ba7b7f79e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 6 May 2026 21:12:03 -0400 Subject: [PATCH 206/218] refactor: cleanup some redundant/unnecessary function calls --- routers/api/v1/group/group.go | 22 ++++++++++++---------- services/group/update.go | 4 +--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index eda16eee1b..ced4f8b59b 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -11,6 +11,7 @@ import ( group_model "code.gitea.io/gitea/models/group" 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" @@ -165,6 +166,10 @@ func MoveGroup(ctx *context.APIContext) { ctx.APIErrorNotFound() return } + if group_model.IsErrUserDoesNotHaveAccessToGroup(err) { + ctx.APIError(http.StatusForbidden, err) + return + } if err != nil { ctx.APIErrorInternal(err) return @@ -232,16 +237,13 @@ func EditGroup(ctx *context.APIContext) { ctx.APIErrorInternal(err) return } - if form.Visibility != nil { - group.Visibility = *form.Visibility - } - if form.Description != nil { - group.Description = *form.Description - } - if form.Name != nil { - group.Name = *form.Name - } - err = group_model.UpdateGroup(ctx, 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 diff --git a/services/group/update.go b/services/group/update.go index 9e64d48dbd..47730ce407 100644 --- a/services/group/update.go +++ b/services/group/update.go @@ -7,7 +7,6 @@ import ( "context" "strings" - "code.gitea.io/gitea/models/db" group_model "code.gitea.io/gitea/models/group" "code.gitea.io/gitea/modules/optional" "code.gitea.io/gitea/modules/structs" @@ -30,6 +29,5 @@ func UpdateGroup(ctx context.Context, g *group_model.Group, opts *UpdateOptions) if opts.Visibility.Has() { g.Visibility = opts.Visibility.Value() } - _, err := db.GetEngine(ctx).ID(g.ID).Update(g) - return err + return group_model.UpdateGroup(ctx, g) } From a8e886822a120fb27396cfbf086cae664e431429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 01:39:14 -0400 Subject: [PATCH 207/218] refactor: overhaul group integration tests to be more robust --- models/fixtures/repo_group.yml | 900 ----------------------- models/fixtures/repo_group_team.yml | 30 - models/fixtures/repo_group_unit.yml | 250 ------- tests/integration/api_repo_group_test.go | 333 ++++++--- 4 files changed, 240 insertions(+), 1273 deletions(-) delete mode 100644 models/fixtures/repo_group.yml delete mode 100644 models/fixtures/repo_group_team.yml delete mode 100644 models/fixtures/repo_group_unit.yml diff --git a/models/fixtures/repo_group.yml b/models/fixtures/repo_group.yml deleted file mode 100644 index 5e8095c13a..0000000000 --- a/models/fixtures/repo_group.yml +++ /dev/null @@ -1,900 +0,0 @@ -- avatar: "" - description: | - Instance snarl wolf tomorrow none emerge occasionally. About end with whose themselves next grip. Tomorrow boxers help little other could cry. Several her out education who since Greek. Could apart under its he with this. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install DurianSuccessful - ''' - - \#\# Usage - '''python - result = duriansuccessful.run("funny request") - print("duriansuccessful result\:", "success") - ''' - - \#\# License - GPL-3.0 - id: 1 - lower_name: group 1 - name: group 1 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 0 - sort_order: 2 - visibility: 0 -- avatar: "" - description: | - Which straw where addition onto lay infrequently. Brilliance far others dig we Iraqi through. In secondly them doctor it determination person. Onto tolerance me fully mirror everybody i.e.. This whoa pretty seriously infrequently buy i.e.. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install WrongSister99 - ''' - - \#\# Usage - '''python - result = wrongsister99.handle("whimsical story") - print("wrongsister99 result\:", "completed") - ''' - - \#\# License - BSD-3-Clause - id: 2 - lower_name: group 2 - name: group 2 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 1 - sort_order: 2 - visibility: 1 -- avatar: "" - description: | - Of that later gang downstairs some it. Meanwhile wit in first my nobody however. Towards batch furthermore with of neatly might. Inside must Diabolical Norwegian which lie your. Never away quarterly yikes whose in funny. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install OrangeAgreeable - ''' - - \#\# Usage - '''javascript - const result = orangeagreeable.execute("quirky message"); - console.log("orangeagreeable result\:", "in progress"); - ''' - - \#\# License - ISC - id: 3 - lower_name: group 3 - name: group 3 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 0 - sort_order: 3 - visibility: 1 -- avatar: "" - description: | - Bravo there for each crowd gee purple. Hourly today divorce victorious Peruvian it out. Loudly emerge reluctantly monthly any those sorrow. Nest Antarctic does might grandfather candy finally. By Greek hers frightening party carrot from. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/ApricotClumsy/BilberryJealous - ''' - - \#\# Usage - '''go - result \:= BilberryJealous.handle("playful alert") - fmt.Println("bilberryjealous result\:", "success") - ''' - - \#\# License - Apache 2.0 - id: 4 - lower_name: group 4 - name: group 4 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 2 - sort_order: 2 - visibility: 2 -- avatar: "" - description: | - Left next me what number his dig. Annoyance ouch downstairs whose those government was. E.g. beauty neither yourself constantly did been. Cackle dizzying yourself why brass since whose. Yearly e.g. cut loudly nightly firstly her. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/FriendlyOyster203/GorgeousPhotographer - ''' - - \#\# Usage - '''go - result \:= GorgeousPhotographer.perform("quirky message") - fmt.Println("gorgeousphotographer result\:", "error") - ''' - - \#\# License - Apache 2.0 - id: 5 - lower_name: group 5 - name: group 5 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 3 - sort_order: 2 - visibility: 2 -- avatar: "" - description: | - Sedge phew you what may party key. Late normally my how were every hers. Brother yourselves finally theirs being frail town. Costa he usually theirs happiness that then. From Kazakh ours she why problem Turkmen. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install ApricotYellow527 - ''' - - \#\# Usage - '''javascript - const result = apricotyellow527.execute("whimsical story"); - console.log("apricotyellow527 result\:", "error"); - ''' - - \#\# License - MIT - id: 6 - lower_name: group 6 - name: group 6 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 0 - sort_order: 4 - visibility: 1 -- avatar: "" - description: | - Each company smell our hourly do since. Himself my herself rudely intensely read due. Full weekly will firstly cluster often alas. Daily galaxy order religion whole generation that. Party fortnightly game due whichever regularly yell. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install LimeFrail - ''' - - \#\# Usage - '''javascript - const result = limefrail.process("funny request"); - console.log("limefrail result\:", "terminated"); - ''' - - \#\# License - Apache 2.0 - id: 7 - lower_name: group 7 - name: group 7 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 4 - sort_order: 2 - visibility: 1 -- avatar: "" - description: | - That before this wait cry tomorrow cry. Hence lips them regularly could whenever when. Year album aloof numerous eat she way. Run of also contrast an whatever an. Where sing how surprise of her punctuation. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BlueberryAloof9 - ''' - - \#\# Usage - '''javascript - const result = blueberryaloof9.perform("funny request"); - console.log("blueberryaloof9 result\:", "completed"); - ''' - - \#\# License - GPL-3.0 - id: 8 - lower_name: group 8 - name: group 8 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 1 - sort_order: 3 - visibility: 0 -- avatar: "" - description: | - Viplate one painter seldom highly regiment for. Therefore without white pyramid man tomorrow these. E.g. moreover hourly of sedge e.g. it. Hence super besides throughout work a Atlantic. Yoga pause anything so what hey congregation. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/TomatoCheerful/ProudBalloon - ''' - - \#\# Usage - '''go - result \:= ProudBalloon.run("funny request") - fmt.Println("proudballoon result\:", "failed") - ''' - - \#\# License - ISC - id: 9 - lower_name: group 9 - name: group 9 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 0 - sort_order: 5 - visibility: 2 -- avatar: "" - description: | - Ream advantage that what highly scarcely entertain. Without tiger soften basket that sternly Machiavellian. Garden American herself roughly world all these. Upon whole should crawl alas about whomever. Little himself the shall addition down disregard. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PhysalisQueer/CurrantFrightening29 - ''' - - \#\# Usage - '''go - result \:= CurrantFrightening29.execute("quirky message") - fmt.Println("currantfrightening29 result\:", "success") - ''' - - \#\# License - ISC - id: 10 - lower_name: group 10 - name: group 10 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 6 - sort_order: 2 - visibility: 1 -- avatar: "" - description: | - Number to on whatever herself theirs single. Where under in this early enormously throughout. Out himself in mine it distinct annually. Who theirs by though most place Einsteinian. Hand the in that outside wow by. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PlainBrass/RoadListener - ''' - - \#\# Usage - '''go - result \:= RoadListener.execute("funny request") - fmt.Println("roadlistener result\:", "terminated") - ''' - - \#\# License - BSD-3-Clause - id: 11 - lower_name: group 11 - name: group 11 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 6 - sort_order: 3 - visibility: 1 -- avatar: "" - description: | - Now staff whereas wisdom few to in. Exactly her belief he besides whom above. Because quarterly class greatly tea someone mother. Because day quarterly to later work nap. Several later any that regiment army anything. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HuckleberryEmbarrassed47/BlackberrySmiling - ''' - - \#\# Usage - '''go - result \:= BlackberrySmiling.execute("lighthearted command") - fmt.Println("blackberrysmiling result\:", "unknown") - ''' - - \#\# License - MIT - id: 12 - lower_name: group 12 - name: group 12 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 3 - sort_order: 3 - visibility: 1 -- avatar: "" - description: | - Daily year frantically sleep whose nevertheless according. Thing murder example between with back yesterday. Whoa when popcorn whoa being anthology now. Equipment for has Amazonian arrive whom who. To whichever Korean heap life our Swazi. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install CostumeKniter2 - ''' - - \#\# Usage - '''python - result = costumekniter2.perform("lighthearted command") - print("costumekniter2 result\:", "completed") - ''' - - \#\# License - Apache 2.0 - id: 13 - lower_name: group 13 - name: group 13 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 8 - sort_order: 2 - visibility: 0 -- avatar: "" - description: | - Equipment dive beautiful in either these monthly. Frequently phew could including how mourn these. Under in another what what tonight hers. As there formerly anything indoors yourself should. Ring whichever accordingly to for whenever frock. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install EnviousSkyscraper - ''' - - \#\# Usage - '''javascript - const result = enviousskyscraper.handle("playful alert"); - console.log("enviousskyscraper result\:", "success"); - ''' - - \#\# License - GPL-3.0 - id: 14 - lower_name: group 14 - name: group 14 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 8 - sort_order: 3 - visibility: 1 -- avatar: "" - description: | - Oil gain yourself several advice face which. Lie violently Icelandic paint been any phew. Virtually straightaway to where some gang place. She luggage nightly tonight who it movement. Jittery over out work seriously his am. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/DamsonRepelling/JumperSinger - ''' - - \#\# Usage - '''go - result \:= JumperSinger.run("quirky message") - fmt.Println("jumpersinger result\:", "failed") - ''' - - \#\# License - ISC - id: 15 - lower_name: group 15 - name: group 15 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 6 - sort_order: 4 - visibility: 1 -- avatar: "" - description: | - That enthusiastically furniture with she cup ours. In Balinese besides whoever courageous theirs bale. For just my me who finally inside. Are of fantastic himself gang how class. Me for to learn every every hourly. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/KiwiCondemned47/ExpensiveCow72 - ''' - - \#\# Usage - '''go - result \:= ExpensiveCow72.handle("whimsical story") - fmt.Println("expensivecow72 result\:", "in progress") - ''' - - \#\# License - ISC - id: 16 - lower_name: group 16 - name: group 16 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 13 - sort_order: 2 - visibility: 0 -- avatar: "" - description: | - Forest next stack thing ours lately his. Nervously to bouquet moreover anything enchanted our. From whatever covey huh so fully pleasant. Decidedly frequently anything you yesterday itself covey. Sew bunch sometimes slavery hey all armchair. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/CasinoCrawler/NervousMall - ''' - - \#\# Usage - '''go - result \:= NervousMall.execute("funny request") - fmt.Println("nervousmall result\:", "completed") - ''' - - \#\# License - GPL-3.0 - id: 17 - lower_name: group 17 - name: group 17 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 7 - sort_order: 2 - visibility: 0 -- avatar: "" - description: | - Listen ream them party him time so. Which there group in his conclude all. Before gee which now do in arrive. Why in for herself Canadian therefore which. Shout few from other they you in. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get bitbucket.org/MushyMouse8/AuspiciousButter - ''' - - \#\# Usage - '''go - result \:= AuspiciousButter.process("playful alert") - fmt.Println("auspiciousbutter result\:", "failed") - ''' - - \#\# License - MIT - id: 18 - lower_name: group 18 - name: group 18 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 8 - sort_order: 4 - visibility: 1 -- avatar: "" - description: | - Skip can today you shout in on. Hotel a already brother have victoriously their. Sit how yard cheerfully week what interrupt. Taiwanese but before bank they Finnish Iranian. Any wow everybody along on yourself brace. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/SariWiner/GrapefruitWandering29 - ''' - - \#\# Usage - '''go - result \:= GrapefruitWandering29.execute("whimsical story") - fmt.Println("grapefruitwandering29 result\:", "failed") - ''' - - \#\# License - MIT - id: 19 - lower_name: group 19 - name: group 19 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 10 - sort_order: 2 - visibility: 2 -- avatar: "" - description: | - In quarterly outside someone number pack fiction. Reel election these there itself archipelago should. Must because those truthfully when gather Taiwanese. Hastily hastily ever us range an ski. How that you courageous little film others. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/HouseBuyer97/HoneydewElated4 - ''' - - \#\# Usage - '''go - result \:= HoneydewElated4.handle("quirky message") - fmt.Println("honeydewelated4 result\:", "in progress") - ''' - - \#\# License - Apache 2.0 - id: 20 - lower_name: group 20 - name: group 20 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 6 - sort_order: 5 - visibility: 0 -- avatar: "" - description: | - What those his all Atlantean width Alpine. That every thoroughly is even of upon. Diabolical black eagerly to fortnightly who labour. Lastly task otherwise it problem through whatever. To each forest awful carelessly bird other. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/GoodBird/WatermelonDark0 - ''' - - \#\# Usage - '''go - result \:= WatermelonDark0.execute("funny request") - fmt.Println("watermelondark0 result\:", "terminated") - ''' - - \#\# License - ISC - id: 21 - lower_name: group 21 - name: group 21 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 13 - sort_order: 3 - visibility: 0 -- avatar: "" - description: | - There it to of rarely jumper also. That sometimes tonight also tonight persuade normally. Whom panda unload bale eek mine victoriously. Road shopping powerfully cluster an annually once. Whirl must few heavily sew throughout than. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get gitlab.com/BilberryPink25/ScissorsShakeer6 - ''' - - \#\# Usage - '''go - result \:= ScissorsShakeer6.handle("funny request") - fmt.Println("scissorsshakeer6 result\:", "unknown") - ''' - - \#\# License - Apache 2.0 - id: 22 - lower_name: group 22 - name: group 22 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 2 - sort_order: 3 - visibility: 0 -- avatar: "" - description: | - Light Aristotelian to e.g. behind on wait. Huh his aha stemmed herself otherwise rarely. Grammar why either why over whose gun. Late it conclude i.e. hers ouch our. It they over job soon were relaxation. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install TeacherRideer - ''' - - \#\# Usage - '''javascript - const result = teacherrideer.handle("playful alert"); - console.log("teacherrideer result\:", "success"); - ''' - - \#\# License - ISC - id: 23 - lower_name: group 23 - name: group 23 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 2 - sort_order: 4 - visibility: 2 -- avatar: "" - description: | - Of obedient daily which fortnightly herself my. Indeed sunshine your rise knock leap I. Alas am whose these weakly soak problem. Your soon yourselves nobody loosely exaltation enough. Around would that stemmed towards much frantic. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install PineappleWhite - ''' - - \#\# Usage - '''javascript - const result = pineapplewhite.execute("whimsical story"); - console.log("pineapplewhite result\:", "error"); - ''' - - \#\# License - GPL-3.0 - id: 24 - lower_name: group 24 - name: group 24 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 0 - sort_order: 6 - visibility: 0 -- avatar: "" - description: | - Those cast uptight those he after which. Incredibly her whose therefore Malagasy left though. Themselves after Antarctic cook chastise generation how. Acknowledge here annually punctuation of their understimate. Why message upon outside everyone many instead. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install GuavaCurios2 - ''' - - \#\# Usage - '''python - result = guavacurios2.perform("playful alert") - print("guavacurios2 result\:", "terminated") - ''' - - \#\# License - Apache 2.0 - id: 25 - lower_name: group 25 - name: group 25 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 15 - sort_order: 2 - visibility: 1 -- avatar: "" - description: | - Furthermore theirs stand from extremely whoever respect. Everybody busily I ours where this from. Would room that swallow why smell than. So group were all equipment huh anybody. Is lastly comfort herself we some himself. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''go - go get github.com/PuzzledWallet/CooperativeWaterBuffalo724 - ''' - - \#\# Usage - '''go - result \:= CooperativeWaterBuffalo724.run("funny request") - fmt.Println("cooperativewaterbuffalo724 result\:", "unknown") - ''' - - \#\# License - BSD-3-Clause - id: 26 - lower_name: group 26 - name: group 26 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 17 - sort_order: 2 - visibility: 0 -- avatar: "" - description: | - Fork our already on Laotian whatever this. Than that now literature we that man. Indulge what theirs where include revolt exemplified. Revolt through none recently batch bale none. String already an what enough additionally meanwhile. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install BankFlyer - ''' - - \#\# Usage - '''python - result = bankflyer.handle("funny request") - print("bankflyer result\:", "finished") - ''' - - \#\# License - GPL-3.0 - id: 27 - lower_name: group 27 - name: group 27 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 21 - sort_order: 2 - visibility: 2 -- avatar: "" - description: | - Down over under host circumstances accordingly lastly. With for weekend nevertheless salt terribly several. Joyously since inside frequently aha oops apro. Down account yours a themselves yearly here. Your nervously secondly those before huge just. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install BonesPainter193 - ''' - - \#\# Usage - '''javascript - const result = bonespainter193.execute("quirky message"); - console.log("bonespainter193 result\:", "completed"); - ''' - - \#\# License - BSD-3-Clause - id: 28 - lower_name: group 28 - name: group 28 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 21 - sort_order: 3 - visibility: 2 -- avatar: "" - description: | - Government have acknowledge violin strongly tomato Bismarckian. Troop one outside sleepy which he exactly. Earlier you yours to many e.g. she. Out their wow travel today these may. Orange so company sing ours upstairs lead. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''bash - pip install OrangeElated - ''' - - \#\# Usage - '''python - result = orangeelated.process("quirky message") - print("orangeelated result\:", "success") - ''' - - \#\# License - Apache 2.0 - id: 29 - lower_name: group 29 - name: group 29 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 25 - sort_order: 2 - visibility: 0 -- avatar: "" - description: | - Suspiciously host off knightly am that her. Besides listen some these accident strongly his. Theirs ride early care terribly patrol next. Hundred shout orange now usually above whose. Up tomorrow joy jittery often then son. - - \#\# Table of Contents - - [Installation](\#installation) - - [Usage](\#usage) - - [License](\#license) - - \#\# Installation - '''js - npm install VictoriousCookware - ''' - - \#\# Usage - '''javascript - const result = victoriouscookware.execute("lighthearted command"); - console.log("victoriouscookware result\:", "failed"); - ''' - - \#\# License - GPL-3.0 - id: 30 - lower_name: group 30 - name: group 30 - owner_id: 43 - owner_name: org-with-groups - parent_group_id: 15 - sort_order: 3 - visibility: 1 diff --git a/models/fixtures/repo_group_team.yml b/models/fixtures/repo_group_team.yml deleted file mode 100644 index 0e15477608..0000000000 --- a/models/fixtures/repo_group_team.yml +++ /dev/null @@ -1,30 +0,0 @@ -- access_mode: 3 - can_create_in: false - group_id: 19 - id: 1 - org_id: 43 - team_id: 25 -- access_mode: 1 - can_create_in: false - group_id: 19 - id: 2 - org_id: 43 - team_id: 26 -- access_mode: 0 - can_create_in: true - group_id: 19 - id: 3 - org_id: 43 - team_id: 27 -- access_mode: 0 - can_create_in: true - group_id: 19 - id: 4 - org_id: 43 - team_id: 28 -- access_mode: 2 - can_create_in: true - group_id: 19 - id: 5 - org_id: 43 - team_id: 29 diff --git a/models/fixtures/repo_group_unit.yml b/models/fixtures/repo_group_unit.yml deleted file mode 100644 index 474487f122..0000000000 --- a/models/fixtures/repo_group_unit.yml +++ /dev/null @@ -1,250 +0,0 @@ -- access_mode: 0 - group_id: 19 - id: 1 - team_id: 25 - type: 2 -- access_mode: 2 - group_id: 19 - id: 2 - team_id: 25 - type: 7 -- access_mode: 0 - group_id: 19 - id: 3 - team_id: 25 - type: 4 -- access_mode: 2 - group_id: 19 - id: 4 - team_id: 25 - type: 5 -- access_mode: 1 - group_id: 19 - id: 5 - team_id: 25 - type: 6 -- access_mode: 3 - group_id: 19 - id: 6 - team_id: 25 - type: 10 -- access_mode: 1 - group_id: 19 - id: 7 - team_id: 25 - type: 1 -- access_mode: 1 - group_id: 19 - id: 8 - team_id: 25 - type: 3 -- access_mode: 1 - group_id: 19 - id: 9 - team_id: 25 - type: 8 -- access_mode: 3 - group_id: 19 - id: 10 - team_id: 25 - type: 9 -- access_mode: 2 - group_id: 19 - id: 11 - team_id: 26 - type: 2 -- access_mode: 0 - group_id: 19 - id: 12 - team_id: 26 - type: 7 -- access_mode: 0 - group_id: 19 - id: 13 - team_id: 26 - type: 4 -- access_mode: 1 - group_id: 19 - id: 14 - team_id: 26 - type: 5 -- access_mode: 0 - group_id: 19 - id: 15 - team_id: 26 - type: 6 -- access_mode: 2 - group_id: 19 - id: 16 - team_id: 26 - type: 10 -- access_mode: 0 - group_id: 19 - id: 17 - team_id: 26 - type: 1 -- access_mode: 2 - group_id: 19 - id: 18 - team_id: 26 - type: 3 -- access_mode: 0 - group_id: 19 - id: 19 - team_id: 26 - type: 8 -- access_mode: 0 - group_id: 19 - id: 20 - team_id: 26 - type: 9 -- access_mode: 1 - group_id: 19 - id: 21 - team_id: 27 - type: 1 -- access_mode: 1 - group_id: 19 - id: 22 - team_id: 27 - type: 3 -- access_mode: 1 - group_id: 19 - id: 23 - team_id: 27 - type: 8 -- access_mode: 0 - group_id: 19 - id: 24 - team_id: 27 - type: 9 -- access_mode: 0 - group_id: 19 - id: 25 - team_id: 27 - type: 2 -- access_mode: 1 - group_id: 19 - id: 26 - team_id: 27 - type: 7 -- access_mode: 1 - group_id: 19 - id: 27 - team_id: 27 - type: 4 -- access_mode: 0 - group_id: 19 - id: 28 - team_id: 27 - type: 5 -- access_mode: 0 - group_id: 19 - id: 29 - team_id: 27 - type: 6 -- access_mode: 0 - group_id: 19 - id: 30 - team_id: 27 - type: 10 -- access_mode: 0 - group_id: 19 - id: 31 - team_id: 28 - type: 7 -- access_mode: 0 - group_id: 19 - id: 32 - team_id: 28 - type: 4 -- access_mode: 0 - group_id: 19 - id: 33 - team_id: 28 - type: 5 -- access_mode: 0 - group_id: 19 - id: 34 - team_id: 28 - type: 6 -- access_mode: 0 - group_id: 19 - id: 35 - team_id: 28 - type: 10 -- access_mode: 0 - group_id: 19 - id: 36 - team_id: 28 - type: 1 -- access_mode: 0 - group_id: 19 - id: 37 - team_id: 28 - type: 3 -- access_mode: 0 - group_id: 19 - id: 38 - team_id: 28 - type: 8 -- access_mode: 0 - group_id: 19 - id: 39 - team_id: 28 - type: 9 -- access_mode: 0 - group_id: 19 - id: 40 - team_id: 28 - type: 2 -- access_mode: 1 - group_id: 19 - id: 41 - team_id: 29 - type: 6 -- access_mode: 0 - group_id: 19 - id: 42 - team_id: 29 - type: 10 -- access_mode: 2 - group_id: 19 - id: 43 - team_id: 29 - type: 1 -- access_mode: 1 - group_id: 19 - id: 44 - team_id: 29 - type: 3 -- access_mode: 0 - group_id: 19 - id: 45 - team_id: 29 - type: 8 -- access_mode: 1 - group_id: 19 - id: 46 - team_id: 29 - type: 9 -- access_mode: 4 - group_id: 19 - id: 47 - team_id: 29 - type: 2 -- access_mode: 0 - group_id: 19 - id: 48 - team_id: 29 - type: 7 -- access_mode: 2 - group_id: 19 - id: 49 - team_id: 29 - type: 4 -- access_mode: 2 - group_id: 19 - id: 50 - team_id: 29 - type: 5 diff --git a/tests/integration/api_repo_group_test.go b/tests/integration/api_repo_group_test.go index 8459370f47..b90270931b 100644 --- a/tests/integration/api_repo_group_test.go +++ b/tests/integration/api_repo_group_test.go @@ -4,12 +4,12 @@ package integration import ( + "math/rand/v2" "net/http" "strconv" "testing" auth_model "code.gitea.io/gitea/models/auth" - "code.gitea.io/gitea/models/db" group_model "code.gitea.io/gitea/models/group" perm_model "code.gitea.io/gitea/models/perm" unit_model "code.gitea.io/gitea/models/unit" @@ -19,70 +19,69 @@ import ( "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" - "xorm.io/builder" ) -func seedOrgWithGroups(t *testing.T) { - token := getUserToken(t, "user2", auth_model.AccessTokenScopeWriteOrganization) - const orgName = "org-with-groups" - baseOrgURL := "/api/v1/orgs/" + orgName +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, - FullName: "Org with groups", + UserName: orgName + "-" + suffix, + FullName: "Org with groups #" + suffix, Description: "This organization has subgroups", Website: "https://try.gitea.io", - Location: "Shanghai", + 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{}) - e := db.GetEngine(t.Context()) - - _, err := e.Table(&group_model.Group{}).Update(&group_model.Group{ - OwnerName: apiOrg.Name, - OwnerID: apiOrg.ID, - }) - assert.NoError(t, err) - - // seed teams teamPrivs := map[string]perm_model.AccessMode{ - "Admins": perm_model.AccessModeAdmin, - "Writers": perm_model.AccessModeWrite, - "Readers": perm_model.AccessModeRead, - "Limited": perm_model.AccessModeNone, + groupOrgAdminTeam: perm_model.AccessModeAdmin, + groupOrgWriterTeam: perm_model.AccessModeWrite, + groupOrgReaderTeam: perm_model.AccessModeRead, + groupOrgUnitTeam: perm_model.AccessModeRead, } - var teams []*api.Team - - userIDs := []int64{4, 5, 8, 9} + userIDs := []int64{4, 5, 8, 13} userIDIdx := 0 + baseOrgURL := "/api/v1/orgs/" + apiOrg.Name + for k, v := range teamPrivs { - perm := api.RepoWritePermissionRead - if v >= perm_model.AccessModeAdmin { - perm = api.RepoWritePermissionAdmin - } else if v >= perm_model.AccessModeWrite { - perm = api.RepoWritePermissionWrite - } reqBody := &api.CreateTeamOption{ Name: k, CanCreateOrgRepo: v >= perm_model.AccessModeWrite, UnitsMap: map[string]string{}, IncludesAllRepositories: v >= perm_model.AccessModeWrite, } - if v > perm_model.AccessModeNone { - reqBody.Permission = perm - } for _, nunit := range unit_model.AllUnitKeyNames() { reqBody.UnitsMap[nunit] = v.ToString() } treq := NewRequestWithJSON(t, "POST", baseOrgURL+"/teams", reqBody).AddTokenAuth(token) - tresp := MakeRequest(t, treq, http.StatusCreated) - team := DecodeJSON(t, tresp, &api.Team{}) - teams = append(teams, team) + tres := MakeRequest(t, treq, http.StatusCreated) + team := DecodeJSON(t, tres, &api.Team{}) teamUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userIDs[userIDIdx]}) @@ -90,74 +89,222 @@ func seedOrgWithGroups(t *testing.T) { MakeRequest(t, mreq, http.StatusNoContent) userIDIdx++ } - allPrivateGroups, err := group_model.FindGroupsByCond(t.Context(), &group_model.FindGroupsOptions{ - OwnerID: apiOrg.ID, - }, builder.Eq{"`repo_group`.visibility": api.VisibleTypePrivate}) - assert.NoError(t, err) + 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) - for _, group := range allPrivateGroups { - baseTeamURL := "/api/v1/groups/" + strconv.FormatInt(group.ID, 10) + "/teams" - for _, team := range teams { - if team.Permission == api.AccessLevelNameNone { - continue - } - trq := NewRequestWithJSON(t, "PUT", baseTeamURL+"/"+team.Name, &api.CreateOrUpdateRepoGroupTeamOption{ - CanCreateIn: new(group.ID%int64(2) == int64(1) && perm_model.ParseAccessMode(string(team.Permission)) > perm_model.AccessModeRead), - }).AddTokenAuth(token) - MakeRequest(t, trq, http.StatusNoContent) - assert.NoError(t, err) + 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 getOrgWithGroups(t *testing.T) *api.Organization { - req := NewRequest(t, "GET", "/api/v1/orgs/org-with-groups") - resp := MakeRequest(t, req, http.StatusOK) - return DecodeJSON(t, resp, &api.Organization{}) -} - func TestAPIGroup(t *testing.T) { defer tests.PrepareTestEnv(t)() - seedOrgWithGroups(t) - t.Run("Visibility", func(t *testing.T) { - t.Run("OwnersAndSiteAdminsCanSeeAllTopLevelGroups", testOwnersAndAdminsCanSeeAllTopLevelGroups) - t.Run("NonOrgMemberWontSeeHiddenTopLevelGroups", testNonOrgMemberWontSeeHiddenTopLevelGroups) + 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 TestCreateGroup(t *testing.T) { +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 testOwnersAndAdminsCanSeeAllTopLevelGroups(t *testing.T) { - org := getOrgWithGroups(t) - req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").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: org.ID, - }.ToConds()) - assert.Len(t, groups, expectedLen) +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/org-with-groups/groups").AddBasicAuth("user1") - resp = MakeRequest(t, req, http.StatusOK) - groups = DecodeJSON(t, resp, []api.Group{}) - assert.Len(t, groups, expectedLen) -} - -func testNonOrgMemberWontSeeHiddenTopLevelGroups(t *testing.T) { - org := getOrgWithGroups(t) - req := NewRequestf(t, "GET", "/api/v1/orgs/org-with-groups/groups").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: org.ID, - }.ToConds()) - assert.NotEqual(t, expectedLen, len(groups)) + // 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) { From dc376ee7e70ccea24af096bd0d1ef02f73808edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 18:28:05 -0400 Subject: [PATCH 208/218] refactor: update group model package - add `CanAccessUnitAtLevel` method to check if a user has access to a unit in a group - update `CanAccessAtLevel` to wrap `CanAccessUnitAtLevel` - update `IsOwnedBy`, `IsAdminOf` and `CanCreateIn` methods to use existing cond builders - update `universalGroupPermBuilder` func to take a flag that dictates whether admin users should be taken into consideration - add `IsPrivateBecauseOfParentPermissions` method that checks if a group should be hidden because its parent is private/inaccessible - add `GetGroupByIDAndCond` method to find a group matching an ID and cond - make `GetGroupByRepoID` more efficient by replacing `where ... in` with join - ensure that `MoveGroup` updates each subgroup's sort order in the new parent - add `GetOwnerByGroupID` func that returns the owner of a group --- models/group/group.go | 174 +++++++++++++++++++++++++++++++------ models/group/group_list.go | 34 +++----- 2 files changed, 161 insertions(+), 47 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index daacacbebc..b8894094f5 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -137,40 +137,68 @@ func (g *Group) CanAccess(ctx context.Context, user *user_model.User) (bool, err } func (g *Group) CanAccessAtLevel(ctx context.Context, user *user_model.User, level perm.AccessMode) (bool, error) { - orCond := builder.Or(AccessibleGroupCondition(user, g.OwnerID, unit.TypeInvalid, level)) + 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(orCond.And(builder.Eq{"`repo_group`.id": g.ID})).Exist() + 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("team_user.uid = ?", userID). - Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id"). - And("repo_group_team.access_mode = ?", perm.AccessModeOwner). - And("repo_group_team.group_id = ?", g.ID). - Table("repo_group_team"). + 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) { - return db.GetEngine(ctx). - Where("team_user.uid = ?", userID). + 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"). - And("repo_group_team.group_id = ?", g.ID). - And("repo_group_team.can_create_in = ?", true). + 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("team_user.uid = ?", userID). - Join("INNER", "team_user", "team_user.team_id = repo_group_team.team_id"). - And("repo_group_team.group_id = ?", g.ID). - And("repo_group_team.access_mode >= ?", perm.AccessModeAdmin). - Table("repo_group_team"). + 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() } @@ -178,10 +206,20 @@ func (g *Group) ShortName(length int) string { return util.EllipsisDisplayString(g.Name, length) } -func GetGroupByID(ctx context.Context, id int64) (*Group, error) { +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).ID(id).Get(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 { @@ -190,13 +228,15 @@ func GetGroupByID(ctx context.Context, id int64) (*Group, error) { 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). - In("id", builder. - Select("group_id"). - From("repo"). - Where(builder.Eq{"id": repoID})). + Join("INNER", "repository", "repository.group_id = repo_group.id"). + Where(builder.Eq{"repository.`id`": repoID}). Get(group) return group, err } @@ -324,6 +364,45 @@ func GetParentGroupIDChain(ctx context.Context, groupID int64) ([]int64, error) 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) @@ -347,20 +426,49 @@ func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder 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 + } + siblings = append(append(ng.Subgroups[0:min(newSortOrder, len(ng.Subgroups))], group), ng.Subgroups[newSortOrder:]...) + } else if newParent <= 0 { + tmpSiblings, err = FindGroups(ctx, &FindGroupsOptions{ + OwnerID: group.OwnerID, + ParentGroupID: 0, + }) + 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, + } } group.ParentGroupID = newParent group.SortOrder = newSortOrder - if _, err = sess.Table(group.TableName()). - ID(group.ID). - AllCols(). - Update(group); err != nil { - return err + for i, gg := range siblings { + 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 { @@ -369,3 +477,15 @@ func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder } 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 index 281e3ee306..fdc976c94d 100644 --- a/models/group/group_list.go +++ b/models/group/group_list.go @@ -28,41 +28,35 @@ func (groups RepoGroupList) LoadOwners(ctx context.Context) error { return nil } -func universalGroupPermBuilder(idStr string, userID, orgID int64) builder.Cond { +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} - teamUserSubquery := builder.Select("`team_user`.uid"). - From("team_user"). - Join("INNER", "team", "`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.Or( - builder.Gte{"`team`.authorize": perm.AccessModeOwner}, - )), - ) + 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}, - builder.In("`team_user`.uid", teamUserSubquery), + eqCond, + builder.Gte{"`team`.authorize": perm.AccessModeOwner}, )) sq := builder.Select("`repo_group`.id"). - From("`repo_group`, team_user"). + 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_user`.team_id", teamSubquery), + builder.In("`team`.id", teamSubquery), ))) - return builder.Or(builder.In(idStr, sq), builder.Exists(adminSubquery)) + 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. @@ -104,9 +98,9 @@ func userOrgTeamUnitGroupBuilder(userID, orgID int64, unitType unit.Type) *build 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 := []structs.VisibleType{structs.VisibleTypePrivate} + orgVisibilityLimit := []int{int(structs.VisibleTypePrivate)} if user == nil || user.ID <= 0 { - orgVisibilityLimit = append(orgVisibilityLimit, structs.VisibleTypeLimited) + orgVisibilityLimit = append(orgVisibilityLimit, int(structs.VisibleTypeLimited)) } condAnd := builder.And( builder.NotIn("`repo_group`.owner_id", builder.Select("`user`.`id`").From("`user`").Where( @@ -118,7 +112,7 @@ func AccessibleGroupCondition(user *user_model.User, orgID int64, unitType unit. cond = cond.Or(condAnd) } if user != nil { - cond = cond.Or(universalGroupPermBuilder("`repo_group`.id", user.ID, orgID)) + 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( From d9c8a28a5f76c09736a40f0c430f5ec745c068fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 17:30:17 -0400 Subject: [PATCH 209/218] refactor: cherry pick addition of `RepoGroup` field to both web and api contexts --- services/context/api.go | 7 + services/context/context.go | 7 +- services/context/group.go | 376 ++++++++++++++++++++++++++++++++++++ 3 files changed, 387 insertions(+), 3 deletions(-) create mode 100644 services/context/group.go 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 e8b1663b22..a992f684f4 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..8f61c50b74 --- /dev/null +++ b/services/context/group.go @@ -0,0 +1,376 @@ +// 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 ctx.Written() { + return + } + group := repoGroup.Group + canAccess, err := group.CanAccess(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 + } + 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, 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 !canAccess && group.Visibility != structs.VisibleTypePublic { + ctx.APIErrorNotFound(nil) + return + } + 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 + } +} From 496140d5375f75678e900a4aaa06150dcea2e78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 18:32:48 -0400 Subject: [PATCH 210/218] refactor: update `groupAssignment` func ensure that groups that have private parents remain inaccessible --- services/context/group.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/services/context/group.go b/services/context/group.go index 8f61c50b74..7cf31a9e2e 100644 --- a/services/context/group.go +++ b/services/context/group.go @@ -120,6 +120,11 @@ func groupAssignment(ctx commonCtx, doer *user_model.User, isSigned bool, handle 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 { @@ -255,6 +260,9 @@ func groupAssignment(ctx commonCtx, doer *user_model.User, isSigned bool, handle } repoGroup.IsGroupAdmin = repoGroup.IsGroupAdmin || isAdmin } + if !repoGroup.IsOwner && !repoGroup.IsGroupAdmin { + canAccess = canAccess && !privateBecauseOfParent + } assign(repoGroup, canAccess) } @@ -296,7 +304,7 @@ func GroupAssignmentWeb(args GroupAssignmentOptions) func(ctx *Context) { is, _ := organization.IsPublicMembership(ctx, ctx.Org.Organization.ID, uid) return is } - ctx.Data["CanReadProjects"] = repoGroup.CanReadUnit(ctx, unit.TypeProjects) + ctx.Data["CanReadProjects"] = repoGroup.CanReadUnit(ctx, ctx.Doer, unit.TypeProjects) ctx.Data["CanCreateOrgRepo"] = repoGroup.CanCreateRepoOrGroup ctx.Data["IsGroupAdmin"] = repoGroup.IsGroupAdmin @@ -356,10 +364,14 @@ func GroupAssignmentAPI() func(ctx *APIContext) { ctx.APIErrorNotFound(nil) return } - - if !canAccess && group.Visibility != structs.VisibleTypePublic { + if ctx.IsSigned { + if !canAccess && group.Visibility != structs.VisibleTypePublic { + ctx.APIErrorNotFound(nil) + return + } + } + if !canAccess { ctx.APIErrorNotFound(nil) - return } ctx.RepoGroup = repoGroup }) From 92df65f9c5f00d67fb411d85268e57b93dcfffca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 18:34:24 -0400 Subject: [PATCH 211/218] fix: ensure group service populates the sort order of newly created groups --- services/group/group.go | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/services/group/group.go b/services/group/group.go index ad48baaeb7..7852bcfd9c 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -27,13 +27,14 @@ func NewGroup(ctx context.Context, g *group_model.Group) error { if len(g.Name) == 0 { return util.NewInvalidArgumentErrorf("empty group name") } - has, err := db.ExistByID[user_model.User](ctx, g.OwnerID) + 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 { @@ -41,6 +42,35 @@ func NewGroup(ctx context.Context, g *group_model.Group) error { } 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 } From 92ff4a62f23111a440ac770e438df6fb40005e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 18:36:45 -0400 Subject: [PATCH 212/218] refactor: update group API endpoints to use `ctx.RepoGroup.Group` --- routers/api/v1/group/group.go | 77 ++++++++++++----------------------- routers/api/v1/group/team.go | 24 ++--------- 2 files changed, 31 insertions(+), 70 deletions(-) diff --git a/routers/api/v1/group/group.go b/routers/api/v1/group/group.go index ced4f8b59b..7515f0c8b0 100644 --- a/routers/api/v1/group/group.go +++ b/routers/api/v1/group/group.go @@ -9,6 +9,7 @@ import ( "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" @@ -19,14 +20,19 @@ import ( group_service "code.gitea.io/gitea/services/group" ) -func createCommonGroup(ctx *context.APIContext, parentGroupID, ownerID int64) (*api.Group, error) { +func createCommonGroup(ctx *context.APIContext, parentGroupID, ownerID int64) *api.Group { if ownerID < 1 { if parentGroupID < 1 { - return nil, errors.New("cannot determine new group's owner") + ctx.APIError(http.StatusUnprocessableEntity, + errors.New("cannot determine new group's owner")) + return nil } npg, err := group_model.GetGroupByID(ctx, parentGroupID) if err != nil { - return nil, err + if group_model.IsErrGroupNotExist(err) { + ctx.APIErrorNotFound() + } + return nil } ownerID = npg.OwnerID } @@ -40,9 +46,19 @@ func createCommonGroup(ctx *context.APIContext, parentGroupID, ownerID int64) (* ParentGroupID: parentGroupID, } if err := group_service.NewGroup(ctx, group); err != nil { - return nil, err + if group_model.IsErrGroupTooDeep(err) { + ctx.APIError(http.StatusUnprocessableEntity, err) + } else if org_model.IsErrOrgNotExist(err) { + ctx.APIErrorNotFound() + } + return nil } - return convert.ToAPIGroup(ctx, group, ctx.Doer) + 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 @@ -72,11 +88,7 @@ func NewGroup(ctx *context.APIContext) { // "$ref": "#/responses/notFound" // "422": // "$ref": "#/responses/validationError" - ag, err := createCommonGroup(ctx, 0, ctx.Org.Organization.ID) - if err != nil { - ctx.APIErrorInternal(err) - return - } + ag := createCommonGroup(ctx, 0, ctx.Org.Organization.ID) ctx.JSON(http.StatusCreated, ag) } @@ -110,14 +122,9 @@ func NewSubGroup(ctx *context.APIContext) { // "$ref": "#/responses/validationError" var ( group *api.Group - err error ) gid := ctx.PathParamInt64("group_id") - group, err = createCommonGroup(ctx, gid, 0) - if err != nil { - ctx.APIErrorInternal(err) - return - } + group = createCommonGroup(ctx, gid, 0) ctx.JSON(http.StatusCreated, group) } @@ -227,16 +234,7 @@ func EditGroup(ctx *context.APIContext) { group *group_model.Group ) form := web.GetForm(ctx).(*api.EditGroupOption) - gid := ctx.PathParamInt64("group_id") - group, err = group_model.GetGroupByID(ctx, gid) - if group_model.IsErrGroupNotExist(err) { - ctx.APIErrorNotFound() - return - } - if err != nil { - ctx.APIErrorInternal(err) - return - } + group = ctx.RepoGroup.Group serviceOpts := &group_service.UpdateOptions{} serviceOpts.Visibility = optional.FromPtr(form.Visibility) @@ -275,20 +273,7 @@ func GetGroup(ctx *context.APIContext) { // "$ref": "#/responses/Group" // "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 - } - apiGroup, err := convert.ToAPIGroup(ctx, group, ctx.Doer) + apiGroup, err := convert.ToAPIGroup(ctx, ctx.RepoGroup.Group, ctx.Doer) if err != nil { ctx.APIErrorInternal(err) return @@ -388,16 +373,8 @@ func GetGroupSubGroups(ctx *context.APIContext) { // "$ref": "#/responses/GroupList" // "404": // "$ref": "#/responses/notFound" - g, err := group_model.GetGroupByID(ctx, ctx.PathParamInt64("group_id")) - if err != nil { - if group_model.IsErrGroupNotExist(err) { - ctx.APIErrorNotFound() - } else { - ctx.APIErrorInternal(err) - } - return - } - err = g.LoadAccessibleSubgroups(ctx, false, ctx.Doer) + g := ctx.RepoGroup.Group + err := g.LoadAccessibleSubgroups(ctx, false, ctx.Doer) if err != nil { ctx.APIErrorInternal(err) return diff --git a/routers/api/v1/group/team.go b/routers/api/v1/group/team.go index 2570ea7136..5251a47232 100644 --- a/routers/api/v1/group/team.go +++ b/routers/api/v1/group/team.go @@ -133,15 +133,8 @@ func EditTeam(ctx *context.APIContext) { // "$ref": "#/responses/notFound" form := web.GetForm(ctx).(*api.CreateOrUpdateRepoGroupTeamOption) - gid := ctx.PathParamInt64("group_id") - group, err := group_model.GetGroupByID(ctx, gid) - if err != nil { - if group_model.IsErrGroupNotExist(err) { - ctx.APIErrorNotFound() - } - ctx.APIErrorInternal(err) - return - } + group := ctx.RepoGroup.Group + team := getTeamFromGroup(ctx, group) gt, err := group_model.FindGroupTeamByTeamID(ctx, group.ID, team.ID) if err != nil { @@ -222,22 +215,13 @@ func IsTeam(ctx *context.APIContext) { // "404": // "$ref": "#/responses/notFound" - 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 - } + group := ctx.RepoGroup.Group team := getTeamFromGroup(ctx, group) if team == nil { return } - if group_model.HasTeamGroup(ctx, group.OwnerID, team.ID, gid) { + if group_model.HasTeamGroup(ctx, group.OwnerID, team.ID, group.ID) { apiTeam, err := convert.ToTeam(ctx, team) if err != nil { ctx.APIErrorInternal(err) From 038cad9754571d5d9a868fe2de393d04cdf2b282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 18:37:35 -0400 Subject: [PATCH 213/218] fix: remove `required` binding from `NewParent` field of `MoveGroupOption` struct to allow moving to a group id of 0 (i.e., the root level) --- modules/structs/repo_group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/structs/repo_group.go b/modules/structs/repo_group.go index 3e0f8fdbc0..1bd48ea71f 100644 --- a/modules/structs/repo_group.go +++ b/modules/structs/repo_group.go @@ -36,7 +36,7 @@ type MoveGroupOption struct { // the new parent group. can be 0 to specify no parent // // required: true - NewParent int64 `json:"newParent" binding:"Required"` + NewParent int64 `json:"newParent"` // the position of this group in its new parent NewPos *int `json:"newPos,omitempty"` } From 2a1b0cd104a56ec9b79f9e147898d6ab6c4d2c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 18:47:08 -0400 Subject: [PATCH 214/218] refactor: update API - use `GroupAssignmentAPI` for routes with a group id param - use `ctx.RepoGroup` fields when determining group membership in `reqGroupMembership` - allow users with write access to a group to also write to repos within it - update "move repo" endpoint to check errors more granularly --- routers/api/v1/api.go | 47 ++++++++++--------------------------- routers/api/v1/repo/repo.go | 9 +++++++ 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 2cc695426c..c504ffe40d 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -70,12 +70,10 @@ import ( "strings" auth_model "code.gitea.io/gitea/models/auth" - 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" repo_model "code.gitea.io/gitea/models/repo" - shared_group_model "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" @@ -440,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 } @@ -538,19 +536,10 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co if ctx.IsUserSiteAdmin() { return } - gid := ctx.PathParamInt64("group_id") - g, err := group_model.GetGroupByID(ctx, gid) - if err != nil { - ctx.APIErrorInternal(err) - return - } - err = g.LoadOwner(ctx) - if err != nil { - ctx.APIErrorInternal(err) - 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) @@ -568,31 +557,21 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co } } - canAccess, err := g.CanAccessAtLevel(ctx, ctx.Doer, mode) - if err != nil { - ctx.APIErrorInternal(err) - return - } - igm, err := shared_group_model.IsGroupMember(ctx, gid, ctx.Doer) + 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 := false - if ctx.IsSigned { - canCreateIn, err = g.CanCreateIn(ctx, ctx.Doer.ID) - if err != nil { - ctx.APIErrorInternal(err) - return - } - } + 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, gid)) + 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 } } @@ -1215,7 +1194,7 @@ func Routes() *web.Router { m.Delete("", user.Unstar) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/group/{group_id}/{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) @@ -1562,7 +1541,7 @@ func Routes() *web.Router { m.Methods("HEAD,GET", "/{ball_type:tarball|zipball|bundle}/*", reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(true), repo.DownloadArchive) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/group/{group_id}/{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 @@ -1578,7 +1557,7 @@ func Routes() *web.Router { Put(notify.ReadRepoNotifications) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/group/{group_id}/{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) @@ -1698,7 +1677,7 @@ func Routes() *web.Router { }) } m.Group("/{username}/{reponame}", fn, repoAssignment(), checkTokenPublicOnly()) - m.Group("/{username}/group/{group_id}/{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 @@ -1899,7 +1878,7 @@ func Routes() *web.Router { Patch(reqGroupMembership(perm.AccessModeAdmin, false), bind(api.CreateOrUpdateRepoGroupTeamOption{}), group.EditTeam). Delete(reqGroupMembership(perm.AccessModeAdmin, false), group.DeleteTeam) }, reqToken(), reqGroupMembership(perm.AccessModeRead, false)) - }, checkTokenPublicOnly()) + }, context.GroupAssignmentAPI(), checkTokenPublicOnly()) }) return m } diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index f92e3dce78..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" @@ -1368,6 +1369,14 @@ func MoveRepoToGroup(ctx *context.APIContext) { 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 } From 2fadac8428f3e631fed6880a6104d4b7c28fdffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 20:12:12 -0400 Subject: [PATCH 215/218] chore: run formatter --- models/group/group.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/models/group/group.go b/models/group/group.go index b8894094f5..4ddc1f4d88 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -217,7 +217,6 @@ func (g *Group) IsPrivateBecauseOfParentPermissions(ctx context.Context, user *u 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 { @@ -456,7 +455,11 @@ func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder 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 { From f5861a3515137c4bf823f2f0e49afdb43b5beb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 21:52:54 -0400 Subject: [PATCH 216/218] fix: bug where group sort order doesn't update due to duplicate elements in spliced slice --- models/group/group.go | 10 +++++++++- modules/container/filter.go | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/models/group/group.go b/models/group/group.go index 4ddc1f4d88..115a455bcf 100644 --- a/models/group/group.go +++ b/models/group/group.go @@ -14,6 +14,7 @@ import ( "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" @@ -434,12 +435,18 @@ func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder if err = ng.LoadSubgroups(ctx, false); err != nil { return err } - siblings = append(append(ng.Subgroups[0:min(newSortOrder, len(ng.Subgroups))], group), ng.Subgroups[newSortOrder:]...) + 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) @@ -463,6 +470,7 @@ func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder 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). diff --git a/modules/container/filter.go b/modules/container/filter.go index 3e27552f1e..6dac7c97f2 100644 --- a/modules/container/filter.go +++ b/modules/container/filter.go @@ -20,6 +20,16 @@ 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)) From ccc8cd3f62a16a291438cba56ad7e20149948921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 22:50:09 -0400 Subject: [PATCH 217/218] fix: repos in private groups being visible to non members --- services/context/repo.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/context/repo.go b/services/context/repo.go index 96ab94c9d2..0eef8999f0 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -598,6 +598,15 @@ func repoAssignmentPrepareRepo(ctx *Context, data *repoAssignmentPrepareDataStru 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 } From ceaa60f6911d0f49c1fd09a5e0a909af32910eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 8 May 2026 23:19:24 -0400 Subject: [PATCH 218/218] fix: handle error when getting group by parms during group assignment --- services/context/group.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/context/group.go b/services/context/group.go index 7cf31a9e2e..80117e2ca9 100644 --- a/services/context/group.go +++ b/services/context/group.go @@ -111,6 +111,10 @@ func groupAssignment(ctx commonCtx, doer *user_model.User, isSigned bool, handle if repoGroup.Group == nil { err = getGroupByParams(ctx, repoGroup, handleNotFound, handleOtherError) } + if err != nil { + handleOtherError("GetGroupByParams", err) + return + } if ctx.Written() { return }