From fdc1331543dfce7e701a7464c109480e6654cae7 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:38:22 -0400 Subject: [PATCH 001/168] begin work on base subfeatures From 7a3f0783c12bd5e91b7f9b41aa9fe1cd11ae0f64 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/168] 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 0000000000000..54d17346dc643 --- /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 b42c7525399588fade19954e92fefc39b7be68eb 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/168] 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 0000000000000..c7710d950b4aa --- /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 037443ca1187bf5ab2335881266a1a6e57d4277b 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/168] 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 54d17346dc643..0f0209b4d9107 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 a83db897098ea3c9bdf68ed881b8f9f7b1af0279 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/168] 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 0000000000000..3b6bf66bf7f8e --- /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 0f0209b4d9107..aee073999a9e0 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 87dadc1eaf97af32879f0ea6980d98473d939cc2 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/168] 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 aee073999a9e0..e3482700c91c2 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 01647e2d374912fcf5fb7ce8635db74ce3e37c23 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/168] 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 0000000000000..70808321464bb --- /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 0000000000000..89b3c131cfedd --- /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 fed2afa398c392fb34618f47b1ed78acd792ea38 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/168] 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 c7710d950b4aa..5715accb5cec4 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 d120d6c93bc0270ec591b93ee7f8db14a503caef 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/168] 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 e3482700c91c2..dd546656f5d7c 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 9444b3b25be3f6a3edd91b466b712e39de7fcb2d 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/168] 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 dd546656f5d7c..2c7873716c124 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 b839047586498b6fc10593a5b4a2a4bd2c833d6c 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/168] 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 2c7873716c124..37db7cbc783a3 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 1cd4bf74c25733142cfed75a54058b41fe703ab3 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/168] 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 37db7cbc783a3..0482c5c11bee9 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 bcda6555bfc05f2e82db89d5c1dd6a21542297ed 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/168] 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 0482c5c11bee9..12629dc0b0961 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 f4836af9a0075dc3653c8592c1149b9c6ffaaab0 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/168] 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 12629dc0b0961..c4df33231d7a9 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 f7509f90638a052e708218861459bc223ded811c 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/168] 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 c4df33231d7a9..668914dfd7411 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 58c6f04f4898c39f7177da15a702b73694beafbf 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/168] 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 668914dfd7411..9c39568bf8af1 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 a07db7979bd12ece12e8c36dd835e072de663cca 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/168] 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 9c39568bf8af1..323f963348307 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 c0cc6de440c53501a145a7bcd9a8344c0c802e27 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/168] 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 5715accb5cec4..d855f0143ee59 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 e7658b1b921445ff26597384144c2cb8c5de9fd5 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/168] 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 | 52 +--------- 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, 738 insertions(+), 89 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 3b6bf66bf7f8e..d07e8341da827 100644 --- a/models/group/avatar.go +++ b/models/group/avatar.go @@ -1,66 +1,22 @@ package group import ( + "context" + "net/url" + "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 "" } 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 0000000000000..a578c92933d6f --- /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 323f963348307..c8525af0f55d8 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 - }), - ) -} - -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) + return builder.In(idStr, groupList) } -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 37ec7c3d56552..9f1237e6265c8 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 aaa729c1c9b3c..97857e0f47d76 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 0000000000000..f38096c6c6caa --- /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 0000000000000..0dc19c256009a --- /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 0000000000000..fb2414bb0053c --- /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 0000000000000..afe30576be22a --- /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 0000000000000..3cf690e25e2ea --- /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 0000000000000..63e131243f3ac --- /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 980d86ffdc55c386e2e7a706e321c6d1be81f228 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/168] 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 c8525af0f55d8..824cf318d52de 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 86413c6c287d159c93b1237e3ad60e0c69b54ead 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/168] 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 d855f0143ee59..bb20b04af90b3 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 4fbdfb8f05a27dc451b4e8e906e2cf80e88cf1ec 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/168] 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 70808321464bb..392123cbddc47 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 ac0fbd65a9b97938958b307c93150f42b82b0f4f 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/168] 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 89b3c131cfedd..30c968b97834b 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 fca7dc31ed200e0ab62b29f84f3c8b794c7c1f06 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/168] 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 d07e8341da827..1af58a9fca53c 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 54878c33d278452bcdb350a5df7a05ff51b3b6b0 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/168] [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 819356dfad342..86b04d5c219aa 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 63bfd8f66bbff07c91eabf7f71b7c673f4ec4e95 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/168] 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 15526cb1e6f1f..bae9d1e8b076a 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" @@ -386,6 +387,14 @@ func GetUserRepoPermission(ctx context.Context, repo *repo_model.Repository, use 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 { @@ -433,6 +442,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 9399511509f90ef7dde8e1c528b8fb0df59249eb 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/168] 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 0000000000000..31f11584112c1 --- /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 65fbdfe10146c8a28e37bb815ac8a1dda89f4a43 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/168] 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 0000000000000..95b1d6d98319c --- /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 2ba7b4253cd0c1b35fa9bbe22adbc727e14208ee 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/168] 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 0274f9c5ba4cc..a429e534dfaa6 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 e0ddc36a7df881c258d2a146bf4a9aa4b088c154 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/168] 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 925be83713cd2..0b09da3199250 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -595,6 +595,7 @@ var ( "avatar", // avatar by email hash "avatars", // user avatars by file name "repo-avatars", + "group-avatars", "captcha", "login", // oauth2 login @@ -605,6 +606,8 @@ var ( "explore", "issues", "pulls", + "groups", + "group", "milestones", "notifications", From 2e2dd54503cc5bda01d2735cd3655d85f7aa5a08 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/168] [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 811f83c99976e..66ebbc8717268 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 2101a829d3d5db6a4b0aba9d9f864ade27d880f5 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/168] [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 66ebbc8717268..19df91e6853ea 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 4c24d88b4f157c008f90a91e4d16fbfadbd25a80 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/168] [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 19df91e6853ea..fea94353f7ce2 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 57e73fd1bba9491a8bf7a29644a0985a3b7ec9ec 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/168] [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 96f21ba2aca7a..f56c3146c27ff 100644 --- a/models/repo/org_repo.go +++ b/models/repo/org_repo.go @@ -30,10 +30,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 8c9bce80d5b7f6c669f97ed835f3b135f5c23bd4 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/168] [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 8e42fa3ccdcac..1937280d6e29d 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 61782155145cd78b1c3091308193eb7d6b5e8ede 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/168] [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 ee9994ab0b887..ad31133cd91f7 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" @@ -58,6 +59,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 33d282be208037e11da4fb4980e1bd1921eef28f 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/168] 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 95b1d6d98319c..0cdaa742e6256 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 96119647c17d7a3e05d33cd72a5e92ef486c3dd2 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/168] 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 fea94353f7ce2..b5cb1d8e69a71 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 95f51ab33147ff2b6bb8308a463508e43c708e98 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/168] 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 824cf318d52de..630617e8405e4 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 f944bc305f687c4d70f19247d1a4ed7eac54ce72 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/168] 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 630617e8405e4..ca5e415c6e5f3 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 b71eb2a86a38ac78c54a6d91622d6a6dcd0d7a9b 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/168] [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 fb2414bb0053c..463c349a78407 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 f3a8396b57f6434afa85f8e385ba2c22f9bcbe84 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/168] 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 ca5e415c6e5f3..95219c6e7747f 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 e3375ead80f214234af40172255296ade22a935e 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/168] 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 0000000000000..df408d5592e43 --- /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 0000000000000..2fce9b528659d --- /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 0000000000000..2c1f09ff34d74 --- /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 dfa514db37f21..8f8324dab9f7e 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 + 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 - is_fsck_enabled: true close_issues_via_commit_in_any_branch: false - -- - id: 60 + 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,10 +2037,12 @@ 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 From ea9a14b6f55698c51c874202c8f3f3bbeeb8a2db 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/168] 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 3cf690e25e2ea..7fe48ba30ab8e 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 6782dfba1c0b09411af6f4e22b9a126b6071031f 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/168] 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 0000000000000..99b7e7c1760fd --- /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 ac574bfa517b78b8e706eef5ad11689b298ba673 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/168] 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 95219c6e7747f..38108f3495101 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 0cdaa742e6256..72a8c9790fc3a 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 0000000000000..5ae4eeacdae72 --- /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 b6b5cb925e2af4476b9671b4c87678b4b71b6dfa 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/168] 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 0b57db988b73b..86244b3ab379e 100644 --- a/services/repository/create.go +++ b/services/repository/create.go @@ -52,6 +52,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 { @@ -250,6 +251,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 c58dd4d3dfeea7dc3534bd392465cc7578e248e2 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/168] 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 cfbfb33ab9ed1..29cbaddfa96fb 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -388,7 +388,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() && !canWriteAsMaintainer(ctx) { + if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() && !canWriteAsMaintainer(ctx) { if ctx.FormString("go-get") == "1" { EarlyResponseForGoGetMeta(ctx) return From 9b5646403985cb5494e9579b08da8bc117347429 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/168] 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 c1c85837fc89e..466129670a373 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -119,6 +119,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 f8ab9843b30f4cd1e7fceea0233ec5e5c9807c99 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/168] 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 31f11584112c1..75f94c2708937 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 0dc19c256009a..a2f8a0ccf8211 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 463c349a78407..e26a86f7eda9e 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 afe30576be22a..7a77fdb963183 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 9d8eea4ce82f99bad590a99b3c1636126387a59f 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/168] 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 0000000000000..c4d4904e9a86a --- /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 47ab34d7461593ce8f12d33b6b0b501d22983d09 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/168] 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 8e07685759803..7743ceeb27cf2 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -212,7 +212,7 @@ func repoAssignment() func(ctx *context.APIContext) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() { + if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() { ctx.APIErrorNotFound() return } From dcc2525501770bc709023153bbe8dbfb17c51410 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/168] 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 0cefa6795f4f5..f7037c8ca32bf 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -27949,6 +27949,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 10d961d496bbbf5e9a120a776986dd5692c8d044 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/168] 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 1af58a9fca53c..dbecd0b27eead 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 38108f3495101..a4b0be3cdbc3b 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 bb20b04af90b3..5086a3fc21a99 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 392123cbddc47..85992acdb5309 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 30c968b97834b..2715aecf792e5 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 72a8c9790fc3a..da7931291acb4 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 bae9d1e8b076a..e556081ea7cd8 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" @@ -12,6 +11,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 5ae4eeacdae72..509ffedf5396c 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 ad31133cd91f7..42f1a7caba28d 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 97857e0f47d76..a1ebd89b99f9e 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 f38096c6c6caa..f9d395afbc9b1 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 99b7e7c1760fd..9013f4460820e 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 7fe48ba30ab8e..b22cc3471d3c8 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 63e131243f3ac..b9394fecd1f03 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 1937280d6e29d..9de14e727e895 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 05f8eedd23a63c236ab1de6a48166d4151c08bfb 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/168] 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 e556081ea7cd8..cf7549ee4f867 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -30,8 +30,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 7743ceeb27cf2..303f4bfa25641 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -85,6 +85,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" @@ -212,7 +213,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 29cbaddfa96fb..cfbfb33ab9ed1 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -388,7 +388,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) { } } - if !ctx.Repo.Permission.HasAnyUnitAccessOrEveryoneAccess() && !canWriteAsMaintainer(ctx) { + if !ctx.Repo.Permission.HasAnyUnitAccessOrPublicAccess() && !canWriteAsMaintainer(ctx) { if ctx.FormString("go-get") == "1" { EarlyResponseForGoGetMeta(ctx) return From 8569e3fa71c88f6a5aeccc12c3b860de558d7344 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/168] 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 e26a86f7eda9e..128c208a31608 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 354a98300648d744e407bbdb06274c0cc254eda0 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/168] 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 128c208a31608..8c9382b0160fd 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 b22cc3471d3c8..633d1c3a1ece9 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 1359cf08ef4189fa771aa9f41170c089a5c2cc4d 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/168] 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 a4b0be3cdbc3b..97ca825b215a5 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 5086a3fc21a99..dd823fff403e3 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 85992acdb5309..243d2b6ad374a 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 2715aecf792e5..b024d082ef923 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 509ffedf5396c..53bb9306182d0 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 9f1237e6265c8..3e27552f1e0d6 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 a2f8a0ccf8211..0b869563783e2 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 8c9382b0160fd..fbb4cf122fabb 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 9013f4460820e..282898314eec1 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 7a77fdb963183..5ca3a2eac4478 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 633d1c3a1ece9..add4c074deda4 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 197d3eec8cea6557b57a49b315fc10625d9fd52f 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/168] 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 86244b3ab379e..8b224485b8336 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" @@ -230,6 +231,24 @@ func CreateRepositoryDirectly(ctx context.Context, doer, owner *user_model.User, if opts.ObjectFormatName == "" { opts.ObjectFormatName = git.Sha1ObjectFormat.Name() } + 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 8a0fed821f14d4c6173f0fcadea57f3746884b81 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/168] 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 fbb4cf122fabb..3fa3b01fd1b3d 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 282898314eec1..cbf4b1fe53acf 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 bb05c96dd1de2a025edd139f32998e7721154ec9 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/168] 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 dd823fff403e3..133f8dbd644d7 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 da7931291acb4..8886fa5fef477 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 a429e534dfaa6..0abdf6422cb29 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 b5cb1d8e69a71..a54af300c6dc4 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 53bb9306182d0..bdb326a32e332 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 95c863d300848456a29b74bc079bbf0f84684df0 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/168] 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 466129670a373..7edf6939d9a2b 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -156,6 +156,8 @@ type CreateRepoOption struct { // ObjectFormatName of the underlying git repository // enum: sha1,sha256 ObjectFormatName string `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 c4d4904e9a86a..0bc64fd2534fd 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 303f4bfa25641..1072821a30d8c 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -70,11 +70,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/graceful" @@ -493,6 +497,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) { @@ -1175,6 +1233,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) @@ -1674,6 +1733,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). @@ -1756,7 +1819,15 @@ 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 0000000000000..6f6638eb8ed70 --- /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 bb6bda587db6c..59dbdd6566b02 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -36,6 +36,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" repo_service "code.gitea.io/gitea/services/repository" ) @@ -263,6 +264,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *user_model.User, opt api.Cre TrustModel: repo_model.ToTrustModel(opt.TrustModel), IsTemplate: opt.Template, ObjectFormatName: opt.ObjectFormatName, + GroupID: opt.GroupID, }) if err != nil { if repo_model.IsErrRepoAlreadyExist(err) { @@ -1317,3 +1319,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 93d46c08ef5dac14c72050d35b139a148d3df262 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/168] 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 6f6638eb8ed70..16364f792bd1e 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 59dbdd6566b02..a7d1c77576423 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -1360,7 +1360,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 3fa3b01fd1b3d..65320bf304a00 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 cbf4b1fe53acf..e23e82e098ad4 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 0d2b94f80d78ddb6482671be069a9e9d242230de 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/168] 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 97ca825b215a5..9130d3628c9f4 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 133f8dbd644d7..81387ba091671 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 1072821a30d8c..d2d5ed5faebf8 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -515,12 +515,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 2451cc04ca008ee6dff3dcac4878d2a5b4dcb29f 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/168] 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 0abdf6422cb29..a7e5e850516ec 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 d3cfd295043bf04729abeb786d75e60ac1c8d4cc 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/168] 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 65320bf304a00..e2e4168c93e62 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 e23e82e098ad4..419a18b65c0c8 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 8b224485b8336..96b8ce91e44b0 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 6c19946d57dfc21d51fcdd9817964ddcf74f7a95 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/168] 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 d2d5ed5faebf8..6adba767ccc2e 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -516,7 +516,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 @@ -1229,7 +1228,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) @@ -1731,7 +1730,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() { @@ -1821,8 +1819,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 16364f792bd1e..b663e5e1ff3d6 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 82fe33c02e8e4df3eee6358df57df9874c6f1727 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/168] 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 0bc64fd2534fd..0565ce3fbfcc2 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 b80a9c14ba027..12a3e3c41f690 100644 --- a/routers/api/v1/swagger/options.go +++ b/routers/api/v1/swagger/options.go @@ -225,4 +225,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 0000000000000..b9a0766f34285 --- /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 f7037c8ca32bf..f4d3eaa13bb17 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1279,6 +1279,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": [ @@ -2806,6 +2999,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": [ @@ -23538,6 +23774,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", @@ -24213,6 +24455,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", @@ -25605,6 +25867,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", @@ -26441,6 +26750,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", @@ -29062,6 +29416,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", @@ -29613,6 +29973,21 @@ } } }, + "Group": { + "description": "Group", + "schema": { + "$ref": "#/definitions/Group" + } + }, + "GroupList": { + "description": "GroupList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Group" + } + } + }, "Hook": { "description": "Hook", "schema": { @@ -30318,7 +30693,7 @@ "parameterBodies": { "description": "parameterBodies", "schema": { - "$ref": "#/definitions/LockIssueOption" + "$ref": "#/definitions/MoveGroupOption" } }, "redirect": { From d6a567f58677a083623f1178aefa4776f335e915 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/168] 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 b663e5e1ff3d6..c223666056de4 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 e7a4d2d247da7ab92f37ffc8845872974f623901 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/168] 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 c223666056de4..af41784aea944 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 f4d3eaa13bb17..94a412c61c7a1 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1455,7 +1455,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateGroupOption" + "$ref": "#/definitions/NewGroupOption" } } ], @@ -3025,7 +3025,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateGroupOption" + "$ref": "#/definitions/NewGroupOption" } } ], From e4a09f7d7c1186d53319a4cee42cc60c457886f8 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/168] 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 bdb326a32e332..4ff39b1b53092 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 6adba767ccc2e..aee032bf5bdcc 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1821,6 +1821,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 af41784aea944..cfe267813d690 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 94a412c61c7a1..806fb278e814f 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1287,8 +1287,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", @@ -1305,9 +1305,6 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } }, @@ -1472,6 +1469,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 6b57a9c9076c6dec3d757ac341d8fcf9435583a0 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/168] 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 5ca3a2eac4478..f11f1275be8bc 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 21a56b1969fa367b618f7f763484ba597f650f9c 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/168] 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 dbecd0b27eead..04f507279c30d 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 a578c92933d6f..812fc6ddc9979 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 9130d3628c9f4..cc2ab4a04c106 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 81387ba091671..e502b33be74da 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 243d2b6ad374a..d4e5bc19c8f38 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 b024d082ef923..716770f85efe9 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 8886fa5fef477..e81a4e0aa2361 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 4ff39b1b53092..5fb4fe35616fc 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 0565ce3fbfcc2..ce37bb39801b6 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 cfe267813d690..bb361a19f0d8a 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 a7d1c77576423..947e750597f3f 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -1357,7 +1357,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 b9a0766f34285..65d0fb452bbd7 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 75f94c2708937..82b849318b3e1 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 f9d395afbc9b1..0d5eaf35959a4 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 0b869563783e2..1a8b133bcb241 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 e2e4168c93e62..b4d5daddb7ca2 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 419a18b65c0c8..25c47dafc94b3 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 f11f1275be8bc..5194c7394c1fc 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 add4c074deda4..691752a0e20af 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 b9394fecd1f03..9e64d48dbd3d8 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 206e04e8db7ff96e9e2e3df2359c55acfc6b51ab 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/168] 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 976a236011cc9..b3bece5589c9b 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 e7edace6536cd..e6da3e46b27fc 100644 --- a/tests/integration/oauth_test.go +++ b/tests/integration/oauth_test.go @@ -705,6 +705,10 @@ func TestOAuth_GrantScopesReadRepositoryFailOrganization(t *testing.T) { FullRepoName: "user2/commitsonpr", Private: false, }, + { + FullRepoName: "user2/test_commit_revert", + Private: true, + }, } assert.Equal(t, reposExpected, reposCaptured) From 5c89751e56d79f46a6a32fdfad9ce22509a6566c 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/168] 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 d4e5bc19c8f38..102e567b3be53 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 0a83c62a962e23aca959e317882936feeed61253 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/168] 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 f56c3146c27ff..ef06cd7a9487f 100644 --- a/models/repo/org_repo.go +++ b/models/repo/org_repo.go @@ -35,8 +35,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 7d36de22e7d55398765fbb002e3b5408600d3556 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/168] 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 cc2ab4a04c106..412821696f449 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 da06c451060183a9b4ee1c58a95e1d0c9dbfb77a 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/168] 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 412821696f449..46678a8f6246b 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 205e0c23fa24b8f587b075fe9af97ff16e9cc4a0 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/168] 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 46678a8f6246b..de87cdf3c0b7c 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 b870ad297385d029b11c9d7026b48296aeb71cd7 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/168] 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 46f0c8c2edbae7f73a241e34f174d90a665d160c 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/168] 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 df408d5592e43..803529a474a7f 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 25c47dafc94b3..d98ee68f39bc9 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 f4a51360e6ef86fa4128a2d7b5bd2ecf8234a9f1 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/168] add indices to group_id and group_sort_order column add migration for repository table --- models/migrations/migrations.go | 1 + models/migrations/v1_26/v324.go | 15 +++++++++++++++ models/repo/repo.go | 4 ++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 models/migrations/v1_26/v324.go diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index e8ebb5df43ce1..74935c839fee7 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -398,6 +398,7 @@ func prepareMigrationTasks() []*migration { // Gitea 1.25.0 ends at migration ID number 322 (database version 323) newMigration(323, "Add support for actions concurrency", v1_26.AddActionsConcurrency), + newMigration(324, "Add group_id and group_sort_order columns to repository table", v1_26.AddGroupColumnsToRepositoryTable), } return preparedMigrations } diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go new file mode 100644 index 0000000000000..406bd0b5bc605 --- /dev/null +++ b/models/migrations/v1_26/v324.go @@ -0,0 +1,15 @@ +package v1_26 + +import "xorm.io/xorm" + +func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error { + type Repository struct { + GroupID int64 `xorm:"DEFAULT NULL"` + GroupSortOrder int + } + _, 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 86b04d5c219aa..eba15f720fe01 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 1293d514aac70c7361c937ce2f0007c34f99fbd2 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/168] 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 ce37bb39801b6..3e0f8fdbc0135 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 82b849318b3e1..25d39ffbec79e 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 806fb278e814f..f352e2cf24a14 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -25928,6 +25928,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 e377f00c5383745ac9fccab07d3128409d9e5401 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/168] update repository storage layout as per https://github.com/go-gitea/gitea/issues/1872#issuecomment-3194681583 --- models/repo/repo.go | 71 +++++++++++----- models/repo/transfer.go | 2 +- models/repo/update.go | 4 +- models/repo/wiki.go | 16 ++-- routers/api/v1/admin/adopt.go | 130 ++++++++++++++++++++++-------- 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 | 10 ++- routers/web/web.go | 1 + services/context/repo.go | 25 +++++- services/repository/adopt.go | 6 +- services/repository/create.go | 2 +- services/repository/transfer.go | 18 ++--- 15 files changed, 243 insertions(+), 99 deletions(-) diff --git a/models/repo/repo.go b/models/repo/repo.go index eba15f720fe01..d66aa4638054b 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 @@ -597,13 +605,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 @@ -676,13 +690,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 @@ -701,7 +727,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) @@ -716,25 +742,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 @@ -873,19 +899,20 @@ func GetRepositoriesMapByIDs(ctx context.Context, ids []int64) (map[int64]*Repos } // 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 := IsRepositoryModelExist(ctx, u, repoName) +func IsRepositoryModelOrDirExist(ctx context.Context, u *user_model.User, repoName string, groupID int64) (bool, error) { + has, err := IsRepositoryModelExist(ctx, u, repoName, groupID) if err != nil { return false, err } - isDir, err := util.IsDir(RepoPath(u.Name, repoName)) + isDir, err := util.IsDir(RepoPath(u.Name, repoName, groupID)) return has || isDir, err } -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 3fb8cb69abdaa..f611da1d237a0 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/update.go b/models/repo/update.go index 3228ae11a4eb3..bd7b6546702b9 100644 --- a/models/repo/update.go +++ b/models/repo/update.go @@ -116,14 +116,14 @@ func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, na return err } - has, err := IsRepositoryModelOrDirExist(ctx, owner, name) + has, err := IsRepositoryModelOrDirExist(ctx, owner, name, 0) if err != nil { return fmt.Errorf("IsRepositoryExist: %w", err) } else if has { return ErrRepoAlreadyExist{owner.Name, name} } - repoPath := RepoPath(owner.Name, name) + repoPath := RepoPath(owner.Name, name, 0) isExist, err := util.IsExist(repoPath) if err != nil { log.Error("Unable to check if %s exists. Error: %v", repoPath, err) diff --git a/models/repo/wiki.go b/models/repo/wiki.go index 47c8fa43abcc3..487cc953be7f8 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 c2efed7490c25..42338a1b83438 100644 --- a/routers/api/v1/admin/adopt.go +++ b/routers/api/v1/admin/adopt.go @@ -55,33 +55,10 @@ func ListUnadoptedRepositories(ctx *context.APIContext) { ctx.JSON(http.StatusOK, repoNames) } -// AdoptRepository will adopt an unadopted repository -func AdoptRepository(ctx *context.APIContext) { - // swagger:operation POST /admin/unadopted/{owner}/{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" +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 { @@ -94,12 +71,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 } - isDir, err := util.IsDir(repo_model.RepoPath(ctxUser.Name, repoName)) + isDir, err := util.IsDir(repo_model.RepoPath(ctxUser.Name, repoName, groupID)) if err != nil { ctx.APIErrorInternal(err) return @@ -119,11 +96,38 @@ func AdoptRepository(ctx *context.APIContext) { ctx.Status(http.StatusNoContent) } -// DeleteUnadoptedRepository will delete an unadopted repository -func DeleteUnadoptedRepository(ctx *context.APIContext) { - // swagger:operation DELETE /admin/unadopted/{owner}/{repo} admin adminDeleteUnadoptedRepository +// AdoptRepository will adopt an unadopted repository +func AdoptRepository(ctx *context.APIContext) { + // swagger:operation POST /admin/unadopted/{owner}/{repo} admin adminAdoptRepository // --- - // summary: Delete unadopted files + // 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 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: @@ -140,10 +144,17 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) { // 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 { @@ -156,12 +167,12 @@ func DeleteUnadoptedRepository(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 } - isDir, err := util.IsDir(repo_model.RepoPath(ctxUser.Name, repoName)) + isDir, err := util.IsDir(repo_model.RepoPath(ctxUser.Name, repoName, groupID)) if err != nil { ctx.APIErrorInternal(err) return @@ -171,10 +182,61 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) { return } - if err := repo_service.DeleteUnadoptedRepository(ctx, ctx.Doer, ctxUser, repoName); err != nil { + if err := repo_service.DeleteUnadoptedRepository(ctx, ctx.Doer, ctxUser, repoName, groupID); err != nil { ctx.APIErrorInternal(err) return } ctx.Status(http.StatusNoContent) } + +// DeleteUnadoptedRepository will delete an unadopted repository +func DeleteUnadoptedRepository(ctx *context.APIContext) { + // swagger:operation DELETE /admin/unadopted/{owner}/{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) +} + +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 aee032bf5bdcc..8f34750d8041b 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -68,6 +68,7 @@ import ( "errors" "fmt" "net/http" + "strconv" "strings" actions_model "code.gitea.io/gitea/models/actions" @@ -143,7 +144,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 @@ -189,6 +199,10 @@ func repoAssignment() func(ctx *context.APIContext) { } return } + if repo.GroupID != gid { + ctx.APIErrorNotFound() + return + } repo.Owner = owner ctx.Repo.Repository = repo @@ -1784,8 +1798,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 1bc8abb88cc2e..40e344bdcd8de 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 } - isDir, err := util.IsDir(repo_model.RepoPath(ctxUser.Name, repoName)) + isDir, err := util.IsDir(repo_model.RepoPath(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 06de811f16e11..e044ff8fa5d5f 100644 --- a/routers/web/githttp.go +++ b/routers/web/githttp.go @@ -10,7 +10,7 @@ import ( ) func addOwnerRepoGitHTTPRouters(m *web.Router) { - 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("GET,OPTIONS", "/info/refs", repo.GetInfoRefs) diff --git a/routers/web/goget.go b/routers/web/goget.go index 67e0bee866c12..6a769f973caf2 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 171c1933d4f49..08d6db7c31157 100644 --- a/routers/web/user/setting/adopt.go +++ b/routers/web/user/setting/adopt.go @@ -5,6 +5,8 @@ package setting import ( "path/filepath" + "strconv" + "strings" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" @@ -24,13 +26,17 @@ func AdoptOrDeleteRepository(ctx *context.Context) { ctx.Data["allowDelete"] = allowDelete dir := ctx.FormString("id") + var gid int64 + if len(strings.Split(dir, "/")) > 1 { + gid, _ = strconv.ParseInt(strings.Split(dir, "/")[1], 10, 64) + } action := ctx.FormString("action") ctxUser := ctx.Doer root := user_model.UserPath(ctxUser.LowerName) // 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 @@ -53,7 +59,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 89a570dce0773..f9f3f94e2f4ea 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 cfbfb33ab9ed1..e5d9a13eac86d 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" @@ -329,6 +330,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 @@ -336,9 +338,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)) @@ -422,6 +424,20 @@ func RepoAssignment(ctx *Context) { var err error 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 @@ -468,7 +484,7 @@ func RepoAssignment(ctx *Context) { 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, ) @@ -500,6 +516,9 @@ func RepoAssignment(ctx *Context) { } return } + if repo.GroupID != gid { + ctx.NotFound(nil) + } repo.Owner = ctx.Repo.Owner repoAssignment(ctx, repo) diff --git a/services/repository/adopt.go b/services/repository/adopt.go index 8d8e59b0531af..168656fd5fd87 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -209,12 +209,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 } - repoPath := repo_model.RepoPath(u.Name, repoName) + repoPath := repo_model.RepoPath(u.Name, repoName, groupID) isExist, err := util.IsExist(repoPath) if err != nil { log.Error("Unable to check if %s exists. Error: %v", repoPath, err) @@ -227,7 +227,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 96b8ce91e44b0..f9fa7b925e560 100644 --- a/services/repository/create.go +++ b/services/repository/create.go @@ -362,7 +362,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 98307a447a1c0..fb6d332ed766f 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -107,7 +107,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) @@ -115,7 +115,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) @@ -143,7 +143,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 := repo_model.IsRepositoryModelOrDirExist(ctx, newOwner, repo.Name); err != nil { + if has, err := repo_model.IsRepositoryModelOrDirExist(ctx, newOwner, repo.Name, 0); err != nil { return fmt.Errorf("IsRepositoryExist: %w", err) } else if has { return repo_model.ErrRepoAlreadyExist{ @@ -285,18 +285,18 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName return fmt.Errorf("Failed to create dir %s: %w", dir, err) } - if err := util.Rename(repo_model.RepoPath(oldOwner.Name, repo.Name), repo_model.RepoPath(newOwner.Name, repo.Name)); err != nil { + if err := util.Rename(repo_model.RepoPath(oldOwner.Name, repo.Name, repo.GroupID), repo_model.RepoPath(newOwner.Name, repo.Name, repo.GroupID)); 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 @@ -345,7 +345,7 @@ func changeRepositoryName(ctx context.Context, repo *repo_model.Repository, newR return err } - has, err := repo_model.IsRepositoryModelOrDirExist(ctx, repo.Owner, newRepoName) + has, err := repo_model.IsRepositoryModelOrDirExist(ctx, repo.Owner, newRepoName, repo.GroupID) if err != nil { return fmt.Errorf("IsRepositoryExist: %w", err) } else if has { @@ -356,13 +356,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 7208ebe32d323bbb5632ab1b4a68abc775dcfe5c 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/168] 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 8f34750d8041b..5abb521bd28e2 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1184,7 +1184,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) @@ -1236,7 +1236,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). @@ -1527,11 +1527,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) @@ -1542,7 +1542,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 e2302fa6ce013..e3d84653346ae 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -413,7 +413,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 cd6b0df122206..36d8f2a581789 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -534,7 +534,7 @@ func TestGenerateRepository(t *testing.T) { assert.NoError(t, err) assert.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)) assert.NoError(t, err) assert.True(t, exist) @@ -545,7 +545,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", @@ -557,7 +557,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 8de31c7d72ba0b5724e5a03745354f53f26330aa 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/168] 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 | 171 +++++++++++++++++--------- tests/integration/mirror_pull_test.go | 2 +- tests/integration/pull_merge_test.go | 2 + 6 files changed, 141 insertions(+), 79 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 5abb521bd28e2..6fe1e544335bc 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -71,14 +71,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" @@ -1184,11 +1182,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) @@ -1235,8 +1235,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). @@ -1522,27 +1521,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) @@ -1654,7 +1657,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 1d2b71394bf0e..b2438a54e004c 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 e044ff8fa5d5f..583acd56acef8 100644 --- a/routers/web/githttp.go +++ b/routers/web/githttp.go @@ -10,7 +10,7 @@ import ( ) func addOwnerRepoGitHTTPRouters(m *web.Router) { - 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("GET,OPTIONS", "/info/refs", repo.GetInfoRefs) @@ -22,5 +22,7 @@ func addOwnerRepoGitHTTPRouters(m *web.Router) { 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) - }, optSignInIgnoreCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context.UserAssignmentWeb()) + } + m.Group("/{username}/{reponame}", fn, optSignInIgnoreCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context.UserAssignmentWeb()) + m.Group("/{username}/{group_id}/{reponame}", fn, optSignInIgnoreCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context.UserAssignmentWeb()) } diff --git a/routers/web/web.go b/routers/web/web.go index f9f3f94e2f4ea..6995532c3abe5 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1068,14 +1068,16 @@ func registerWebRoutes(m *web.Router) { }, 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}/settings", func() { + settingsFn := func() { m.Group("", func() { m.Combo("").Get(repo_setting.Settings). Post(web.Bind(forms.RepoSettingForm{}), repo_setting.SettingsPost) @@ -1173,7 +1175,12 @@ func registerWebRoutes(m *web.Router) { 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), ) @@ -1183,8 +1190,10 @@ func registerWebRoutes(m *web.Router) { m.Get("/{username}/{reponame}", optSignIn, 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.Get("/find/*", repo.FindFiles) m.Group("/tree-list", func() { m.Get("/branch/*", context.RepoRefByType(git.RefTypeBranch), repo.TreeList) m.Get("/tag/*", context.RepoRefByType(git.RefTypeTag), repo.TreeList) @@ -1200,11 +1209,13 @@ func registerWebRoutes(m *web.Router) { 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) @@ -1219,25 +1230,31 @@ func registerWebRoutes(m *web.Router) { } // 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}", 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 - m.Group("/{username}/{reponame}/{type:issues}", func() { - // these handlers also check unit permissions internally + 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). @@ -1248,7 +1265,7 @@ func registerWebRoutes(m *web.Router) { }, 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) @@ -1324,10 +1341,12 @@ func registerWebRoutes(m *web.Router) { 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. @@ -1375,10 +1394,12 @@ func registerWebRoutes(m *web.Router) { }, 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", feedEnabled, repo.TagsListFeedRSS) @@ -1386,10 +1407,12 @@ func registerWebRoutes(m *web.Router) { 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", feedEnabled, repo.ReleasesFeedRSS) @@ -1410,25 +1433,33 @@ func registerWebRoutes(m *web.Router) { 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}", 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 @@ -1452,10 +1483,12 @@ func registerWebRoutes(m *web.Router) { }) }) }, 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) @@ -1485,10 +1518,12 @@ func registerWebRoutes(m *web.Router) { m.Group("/workflows/{workflow_name}", func() { m.Get("/badge.svg", 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) @@ -1499,13 +1534,18 @@ func registerWebRoutes(m *web.Router) { 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) + }) + 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}/{reponame}/wiki" + // 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) @@ -1524,13 +1564,18 @@ func registerWebRoutes(m *web.Router) { 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), + ) + 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}/{reponame}/activity" + // 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.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewIssue) @@ -1557,10 +1602,12 @@ func registerWebRoutes(m *web.Router) { }, 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) @@ -1639,21 +1686,25 @@ func registerWebRoutes(m *web.Router) { m.Get("/forks", repo.Forks) m.Get("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}", repo.MustBeNotEmpty, repo.RawDiff) m.Post("/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) - common.AddOwnerRepoGitLFSRoutes(m, optSignInIgnoreCsrf, lfsServerEnabled) // "/{username}/{reponame}/{lfs-paths}": git-lfs support + common.AddOwnerRepoGitLFSRoutes(m, optSignInIgnoreCsrf, lfsServerEnabled) // "/{username}/{group_id}/{reponame}/{lfs-paths}": git-lfs support - addOwnerRepoGitHTTPRouters(m) // "/{username}/{reponame}/{git-paths}": git http support + addOwnerRepoGitHTTPRouters(m) // "/{username}/{group_id}/{reponame}/{git-paths}": git http support m.Group("/notifications", func() { m.Get("", user.Notifications) diff --git a/tests/integration/mirror_pull_test.go b/tests/integration/mirror_pull_test.go index 7902dc10cbffe..108eee98305db 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 e3d84653346ae..c0b2e15ec23ff 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -11,12 +11,14 @@ 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" From ad4177b9467ff10fac4008a65828d87e47143396 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/168] 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 d66aa4638054b..7c46bd8038ae7 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 5ea9718466268..403c91cacf058 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 012c57da291ab..14cce47923024 100644 --- a/modules/indexer/code/elasticsearch/elasticsearch.go +++ b/modules/indexer/code/elasticsearch/elasticsearch.go @@ -318,7 +318,7 @@ func convertResult(searchResult *elastic.SearchResult, kw string, pageSize int) // 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 7fec9431b6d46..75e616975fe2c 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 6fe1e544335bc..e2d3826927bed 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -147,7 +147,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 25aabe6dd2792..278f50631decb 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -1549,7 +1549,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 e5d9a13eac86d..5f88e754369ec 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -433,7 +433,7 @@ func RepoAssignment(ctx *Context) { 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 22f9a1f7409da..0879dcabf878f 100644 --- a/tests/integration/actions_delete_run_test.go +++ b/tests/integration/actions_delete_run_test.go @@ -119,7 +119,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) runIndex := "" 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 4f4456a4e5041..b0cdf3ccc9e65 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -141,7 +141,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++ { @@ -153,7 +153,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) var actionTaskRespAfter api.ActionTaskResponse @@ -323,7 +323,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) @@ -373,7 +373,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{ @@ -465,7 +465,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{ @@ -617,8 +617,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) var fileResponse api.FileResponse diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index 503bda97c93fa..a88056cc59558 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -168,7 +168,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 jobIndex, outcome := range tc.outcome { @@ -206,7 +206,7 @@ jobs: jobID := jobs[jobIndex].ID // 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, jobID)). + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%d/%s/actions/jobs/%d/logs", user2.Name, repo.GroupID, repo.Name, jobID)). 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 9dc0ddb9df8a5..47ac70ef9aa6f 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1401,10 +1401,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: util.ToPointer("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 ae90331962202..8cf74e5ff47a4 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) @@ -71,7 +71,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) @@ -105,7 +105,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) @@ -137,7 +137,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()) @@ -202,7 +202,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 c7f9c85f7c961..24cb5e3ca4a7e 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) @@ -76,7 +76,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) @@ -115,7 +115,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) @@ -128,7 +128,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) @@ -144,9 +144,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) @@ -183,7 +183,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) var apiComment api.Comment @@ -251,13 +251,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) @@ -273,7 +273,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 12acaeae5d1f6..e55602c96d174 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 := new(api.Attachment) @@ -52,7 +52,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 := new([]api.Attachment) @@ -82,7 +82,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) @@ -113,7 +113,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()) @@ -156,7 +156,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) @@ -175,7 +175,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 f6045e1a80518..e0b33804d9353 100644 --- a/tests/integration/api_issue_config_test.go +++ b/tests/integration/api_issue_config_test.go @@ -150,7 +150,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 4324fd37d95c8..4899bccbc0fbc 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{ @@ -62,7 +62,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) @@ -127,7 +127,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 47b1f2cf0da6f..6f8ddbf7af208 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 1196c8d358d67..d27dc99b9e4cc 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) @@ -50,7 +50,7 @@ func TestAPIIssuesMilestone(t *testing.T) { DecodeJSON(t, resp, &apiMilestone2) 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", @@ -62,27 +62,27 @@ func TestAPIIssuesMilestone(t *testing.T) { assert.Nil(t, apiMilestone.Deadline) var apiMilestones []structs.Milestone - 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) DecodeJSON(t, resp, &apiMilestones) 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) DecodeJSON(t, resp, &apiMilestone) 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) DecodeJSON(t, resp, &apiMilestones) 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 c1bfa5aa0ebea..445f4d3116855 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) var issueAPI api.Issue DecodeJSON(t, resp, &issueAPI) @@ -57,24 +57,24 @@ 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) var issueAPI api.Issue DecodeJSON(t, resp, &issueAPI) 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) DecodeJSON(t, resp, &issueAPI) assert.Equal(t, 0, issueAPI.PinOrder) @@ -94,36 +94,36 @@ 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) var issueAPI api.Issue DecodeJSON(t, resp, &issueAPI) 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) var issueAPI3 api.Issue DecodeJSON(t, resp, &issueAPI3) 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) var issueAPI4 api.Issue DecodeJSON(t, resp, &issueAPI4) @@ -143,12 +143,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) var issueList []api.Issue DecodeJSON(t, resp, &issueList) @@ -164,7 +164,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) var prList []api.PullRequest DecodeJSON(t, resp, &prList) @@ -178,7 +178,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) var newPinsAllowed api.NewIssuePinsAllowed diff --git a/tests/integration/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go index 01588f9900d10..b9ba65f4277a7 100644 --- a/tests/integration/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -118,7 +118,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 3862a1389488b..90085d896159a 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 4f751032f8455..14d430fba5a7a 100644 --- a/tests/integration/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -32,7 +32,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) @@ -82,7 +82,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) @@ -92,7 +92,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) @@ -111,7 +111,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, @@ -162,7 +162,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 { @@ -216,7 +216,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 3162051acc4ff..187a728a538fd 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", @@ -76,7 +76,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) @@ -95,7 +95,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 591fb69dfedbe..a4c9fcfda2b00 100644 --- a/tests/integration/api_notification_test.go +++ b/tests/integration/api_notification_test.go @@ -63,7 +63,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) DecodeJSON(t, resp, &apiNL) @@ -72,7 +72,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) DecodeJSON(t, resp, &apiNL) @@ -129,7 +129,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 05143fcf251da..45ab4cf344656 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) var commits []*api.Commit diff --git a/tests/integration/api_pull_review_test.go b/tests/integration/api_pull_review_test.go index 9ffbd9a2673d4..4dfaea29d9185 100644 --- a/tests/integration/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -34,7 +34,7 @@ func TestAPIPullReview(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) @@ -59,14 +59,14 @@ func TestAPIPullReview(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) var review api.PullReview DecodeJSON(t, resp, &review) 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) DecodeJSON(t, resp, &review) @@ -74,7 +74,7 @@ func TestAPIPullReview(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) var reviewComments []*api.PullReviewComment @@ -87,7 +87,7 @@ func TestAPIPullReview(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{ @@ -116,7 +116,7 @@ func TestAPIPullReview(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) @@ -127,7 +127,7 @@ func TestAPIPullReview(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) @@ -136,7 +136,7 @@ func TestAPIPullReview(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) DecodeJSON(t, resp, &review) @@ -144,7 +144,7 @@ func TestAPIPullReview(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) @@ -152,12 +152,12 @@ func TestAPIPullReview(t *testing.T) { DecodeJSON(t, resp, &review) 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{ @@ -185,7 +185,7 @@ func TestAPIPullReview(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{}, @@ -199,7 +199,7 @@ func TestAPIPullReview(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{}, @@ -215,7 +215,7 @@ func TestAPIPullReview(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) DecodeJSON(t, resp, &reviews) @@ -243,19 +243,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) @@ -264,18 +264,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) @@ -286,12 +286,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) @@ -299,12 +299,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) @@ -313,12 +313,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) @@ -329,35 +329,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) } @@ -377,7 +377,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) @@ -387,7 +387,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) @@ -397,7 +397,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) @@ -413,7 +413,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) @@ -433,7 +433,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) @@ -444,7 +444,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 433dce3d5eec5..0dba522ee35e7 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) @@ -152,7 +152,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) @@ -161,7 +161,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) } @@ -182,7 +182,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) 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: "create a failure pr", @@ -296,7 +296,7 @@ func TestAPICreatePullBasePermission(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 base repo @@ -304,7 +304,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) } @@ -324,18 +324,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) } @@ -347,7 +347,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", @@ -378,7 +378,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) @@ -411,7 +411,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" @@ -437,7 +437,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, @@ -449,7 +449,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, @@ -464,7 +464,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) @@ -496,11 +496,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 5df3042437e94..991ad29837866 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 b3b30a33d5ebf..e45dac60692f8 100644 --- a/tests/integration/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -36,7 +36,7 @@ func TestAPIListReleases(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeReadRepository) - 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) var apiReleases []*api.Release DecodeJSON(t, resp, &apiReleases) @@ -82,7 +82,7 @@ func TestAPIListReleases(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, @@ -126,7 +126,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) @@ -173,7 +173,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, @@ -220,7 +220,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", @@ -236,7 +236,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) var release *api.Release @@ -253,7 +253,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) var release *api.Release @@ -263,7 +263,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) var err *api.APIError @@ -318,17 +318,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) } @@ -346,7 +346,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 97c2c0d54b5a6..cb6382687a59e 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 6677885f7eb20..1a17d63dab6cf 100644 --- a/tests/integration/api_repo_avatar_test.go +++ b/tests/integration/api_repo_avatar_test.go @@ -38,7 +38,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) @@ -47,7 +47,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) @@ -62,7 +62,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) } @@ -74,7 +74,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 11e2924e8423e..67b9502523548 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) @@ -45,7 +45,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) @@ -58,7 +58,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) @@ -71,7 +71,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) @@ -82,7 +82,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) }) @@ -99,7 +99,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) @@ -112,7 +112,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 := api.RepoCollaboratorPermission{} @@ -128,7 +128,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) @@ -145,7 +145,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 7cf1083248aaf..c061ed0fd07e9 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -180,7 +180,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) @@ -215,7 +215,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) var fileResponse api.FileResponse @@ -233,7 +233,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) DecodeJSON(t, resp, &fileResponse) @@ -243,7 +243,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{ @@ -258,7 +258,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) @@ -266,14 +266,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) @@ -281,7 +281,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) @@ -289,14 +289,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 59e21316186a5..ff648baa280eb 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) var fileResponse api.FileResponse @@ -80,7 +80,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) var fileResponse api.FileResponse @@ -95,7 +95,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) DecodeJSON(t, resp, &fileResponse) @@ -108,7 +108,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) @@ -117,7 +117,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) @@ -126,7 +126,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 @@ -134,7 +134,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) @@ -143,7 +143,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) @@ -152,7 +152,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 @@ -160,7 +160,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 6e6aae389fcde..8258c6b9f6c8d 100644 --- a/tests/integration/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -134,7 +134,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) @@ -165,7 +165,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) var fileResponse api.FileResponse @@ -195,7 +195,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) DecodeJSON(t, resp, &fileResponse) @@ -213,7 +213,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) DecodeJSON(t, resp, &fileResponse) @@ -227,7 +227,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{ @@ -243,7 +243,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) @@ -252,7 +252,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 @@ -260,7 +260,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) @@ -269,7 +269,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) @@ -278,7 +278,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 @@ -286,7 +286,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 47fe5066a7138..e9fb866d4fad9 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) @@ -142,7 +142,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) @@ -314,7 +314,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) @@ -329,7 +329,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 @@ -343,7 +343,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) @@ -358,7 +358,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) @@ -373,7 +373,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 @@ -387,7 +387,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 edf4f390634e4..fc3980caa8287 100644 --- a/tests/integration/api_repo_files_get_test.go +++ b/tests/integration/api_repo_files_get_test.go @@ -95,13 +95,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 4984559f0c603..d7241484d2b57 100644 --- a/tests/integration/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -93,7 +93,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) var contentsListResponse []*api.ContentsResponse DecodeJSON(t, resp, &contentsListResponse) @@ -105,7 +105,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -116,7 +116,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -130,7 +130,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -144,7 +144,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -153,21 +153,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 6225c96bc6d9b..d795f6ed5dd98 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -97,14 +97,14 @@ func testAPIGetContents(t *testing.T, u *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) var contentsResponse api.ContentsResponse DecodeJSON(t, resp, &contentsResponse) @@ -114,7 +114,7 @@ func testAPIGetContents(t *testing.T, u *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) DecodeJSON(t, resp, &contentsResponse) expectedContentsResponse = getExpectedContentsResponseForContents(repo1.DefaultBranch, refType, lastCommit.ID.String()) @@ -123,7 +123,7 @@ func testAPIGetContents(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/%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) DecodeJSON(t, resp, &contentsResponse) branchCommit, _ := gitRepo.GetBranchCommit(ref) @@ -134,7 +134,7 @@ func testAPIGetContents(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/%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) DecodeJSON(t, resp, &contentsResponse) tagCommit, _ := gitRepo.GetTagCommit(ref) @@ -145,7 +145,7 @@ func testAPIGetContents(t *testing.T, u *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) DecodeJSON(t, resp, &contentsResponse) expectedContentsResponse = getExpectedContentsResponseForContents(ref, refType, commitID) @@ -153,21 +153,21 @@ func testAPIGetContents(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/%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 d4274bdb4042c..3cc16ae662ec1 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) var gitBlobResponse api.GitBlobResponse DecodeJSON(t, resp, &gitBlobResponse) @@ -44,30 +44,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. @@ -75,6 +75,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 c28c4336e2d78..00e8ef93e4282 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) var apiGitHooks []*api.GitHook @@ -63,7 +63,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) var apiGitHooks []*api.GitHook @@ -83,7 +83,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) }) @@ -97,7 +97,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) var apiGitHook *api.GitHook @@ -113,7 +113,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) }) @@ -139,7 +139,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) var apiGitHook2 *api.GitHook @@ -156,7 +156,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) @@ -173,11 +173,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) var apiGitHook2 *api.GitHook @@ -194,7 +194,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 a0445bb80011a..66afaa444edc4 100644 --- a/tests/integration/api_repo_git_tags_test.go +++ b/tests/integration/api_repo_git_tags_test.go @@ -45,7 +45,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) @@ -61,7 +61,7 @@ func TestAPIGitTags(t *testing.T) { assert.Equal(t, util.URLJoin(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) } @@ -74,14 +74,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 ea7630f414567..5ce9e10d10912 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -57,26 +57,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. @@ -84,6 +84,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 f27fcc00d6b3f..ab52b77d9222e 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 3932a8ba2b083..ec9fb93017229 100644 --- a/tests/integration/api_repo_tags_test.go +++ b/tests/integration/api_repo_tags_test.go @@ -56,7 +56,7 @@ func TestAPIRepoTags(t *testing.T) { } // 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) var tag *api.Tag @@ -64,7 +64,7 @@ func TestAPIRepoTags(t *testing.T) { 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 deacd68a49427..3c3c74b1b512b 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -82,66 +82,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}, @@ -565,7 +565,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) @@ -596,7 +596,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) @@ -612,7 +612,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) @@ -625,7 +625,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) @@ -641,7 +641,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) @@ -654,7 +654,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) @@ -673,7 +673,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", @@ -686,7 +686,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", @@ -706,7 +706,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) var reviewers []*api.User @@ -723,7 +723,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) var assignees []*api.User diff --git a/tests/integration/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go index 82d0c54ca8ee8..a9760b1701ed8 100644 --- a/tests/integration/api_repo_topic_test.go +++ b/tests/integration/api_repo_topic_test.go @@ -83,7 +83,7 @@ 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) var topics *api.TopicName @@ -91,21 +91,21 @@ func TestAPIRepoTopic(t *testing.T) { 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). @@ -158,12 +158,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) @@ -171,14 +171,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) DecodeJSON(t, res, &topics) 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 a13a8c346a7cf..f7ec3e5edda95 100644 --- a/tests/integration/eventsource_test.go +++ b/tests/integration/eventsource_test.go @@ -72,7 +72,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 a1fbadec99ede..cf77ba4c8fe70 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 17e8083399284..20e772b53b275 100644 --- a/tests/integration/repo_merge_upstream_test.go +++ b/tests/integration/repo_merge_upstream_test.go @@ -41,7 +41,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: util.ToPointer("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 91539f2429f4c..0cd1889a13c38 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -1029,7 +1029,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) @@ -1621,7 +1621,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 @@ -1643,7 +1643,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) @@ -1720,7 +1720,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 c62a18a0c94e45f805fe1a2bd8a16b617e2a1c9b 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/168] add group ID column to repository table's unique constraint --- models/migrations/v1_26/v324.go | 2 +- models/repo/repo.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index 406bd0b5bc605..b70de1901b79f 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -4,7 +4,7 @@ import "xorm.io/xorm" func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error { type Repository struct { - GroupID int64 `xorm:"DEFAULT NULL"` + GroupID int64 `xorm:"UNIQUE(s) INDEX DEFAULT NULL"` GroupSortOrder int } _, err := x.SyncWithOptions(xorm.SyncOptions{ diff --git a/models/repo/repo.go b/models/repo/repo.go index 7c46bd8038ae7..58effdc945f8d 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 9940611d00eb67975aa0196f89d3e41f455829c0 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/168] 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 58effdc945f8d..c20462c36cc62 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -622,7 +622,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 @@ -693,7 +693,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 } @@ -727,7 +727,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) @@ -736,9 +736,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 2bb46809eb3d51b94c75819aa1699b1bc648e806 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/168] 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 | 2 + 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/compare.go | 11 +++- 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 | 4 +- 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 | 17 +++-- .../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 | 14 ++--- tests/integration/lfs_getobject_test.go | 4 +- tests/integration/repo_search_test.go | 4 +- tests/integration/repo_webhook_test.go | 62 +++++++++---------- 54 files changed, 275 insertions(+), 172 deletions(-) diff --git a/cmd/hook.go b/cmd/hook.go index 1845ade625926..614471461ac7d 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -182,6 +182,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) @@ -255,7 +256,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) } @@ -278,7 +279,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) } @@ -351,6 +352,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, @@ -400,7 +402,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) @@ -415,7 +417,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) } @@ -433,7 +435,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) @@ -446,7 +448,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) } @@ -514,6 +516,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) @@ -627,7 +630,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 f8495929cf98f..b379240fdc7f0 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 c20462c36cc62..0ff79bd0bda39 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -825,11 +825,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 { @@ -841,10 +842,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) @@ -862,7 +864,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 aa6fa31c5e357..d137de8f5bbcc 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 51afd4be00719..985b67322fa81 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -60,10 +60,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]+)?`) + v.anyHashPattern = regexp.MustCompile(`https?://(?:\S+/){4,6}([0-9a-f]{40,64})(/[-+~%./\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]+:`) @@ -79,13 +79,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 85bec5db20c6b..dded67092cafe 100644 --- a/modules/markup/html_issue.go +++ b/modules/markup/html_issue.go @@ -22,6 +22,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 215996b9b9936..d458bc17c985d 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 592bd4cbe4483..1f9e0d8ef88b1 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, @@ -545,10 +549,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 } @@ -556,6 +569,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 55a81f006e2bf..63cb71d85ca9e 100644 --- a/modules/repository/env.go +++ b/modules/repository/env.go @@ -17,6 +17,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" @@ -78,6 +79,7 @@ func FullPushingEnvironment(author, committer *user_model.User, repo *repo_model EnvPRID+"="+strconv.FormatInt(prID, 10), EnvPRIndex+"="+strconv.FormatInt(prIndex, 10), EnvAppURL+"="+setting.AppURL, + EnvRepoGroupID+"="+strconv.FormatInt(repo.GroupID, 10), "SSH_ORIGINAL_COMMAND=gitea-internal", ) diff --git a/modules/repository/push.go b/modules/repository/push.go index cf047847b6ca9..ddbcf9065f4d6 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 e2d3826927bed..d3f41ac047a13 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -181,7 +181,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 1a1710750a282..5f3f96c3146bf 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -631,7 +631,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 41b7f2a43f67b..6083535f0763e 100644 --- a/routers/api/v1/packages/package.go +++ b/routers/api/v1/packages/package.go @@ -355,7 +355,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 278f50631decb..7a8e1523f7b17 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -1623,7 +1623,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 b34e325e5da23..ce8e1e4b4950a 100644 --- a/routers/api/v1/repo/issue_dependency.go +++ b/routers/api/v1/repo/issue_dependency.go @@ -514,7 +514,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 68cc5d65a974f..469960dde0330 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -251,15 +251,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 696634b5e757d..06934128dc26f 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 e8bef7d6c14bb..502ee5f94036b 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 55a11aa3dda83..85bc72f236ffa 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -62,9 +62,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 e111d6689e0ab..5f7f166944de0 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 3dfe4d21da7a5..b3bbf8cba8c9b 100644 --- a/routers/private/serv.go +++ b/routers/private/serv.go @@ -158,7 +158,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) { repoExist = false diff --git a/routers/web/goget.go b/routers/web/goget.go index 6a769f973caf2..9321375c00c14 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 0ec7cfddc5f55..5f121e8ad8275 100644 --- a/routers/web/org/teams.go +++ b/routers/web/org/teams.go @@ -236,7 +236,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 f21f5682318a6..d5eeb6663e715 100644 --- a/routers/web/repo/branch.go +++ b/routers/web/repo/branch.go @@ -160,6 +160,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/compare.go b/routers/web/repo/compare.go index 7750278a8d4bd..5ee30e210b02c 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -14,6 +14,7 @@ import ( "net/url" "path/filepath" "sort" + "strconv" "strings" "code.gitea.io/gitea/models/db" @@ -274,7 +275,15 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo { ci.HeadRepo = baseRepo } } else { - ci.HeadRepo, err = repo_model.GetRepositoryByOwnerAndName(ctx, headInfosSplit[0], headInfosSplit[1]) + var headOwner, headRepo string + var headGID int64 + if len(headInfosSplit) == 2 { + headOwner, headRepo = headInfosSplit[0], headInfosSplit[1] + } else if len(headInfosSplit) >= 3 { + headOwner, headRepo = headInfosSplit[0], headInfosSplit[2] + headGID, _ = strconv.ParseInt(headInfosSplit[1], 10, 64) + } + ci.HeadRepo, err = repo_model.GetRepositoryByOwnerAndName(ctx, headOwner, headRepo, headGID) if err != nil { if repo_model.IsErrRepoNotExist(err) { ctx.NotFound(nil) diff --git a/routers/web/repo/editor_fork.go b/routers/web/repo/editor_fork.go index b78a634c00551..19fb42f0f5f3d 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 f910f0bd40729..de198ce54ccab 100644 --- a/routers/web/repo/editor_util.go +++ b/routers/web/repo/editor_util.go @@ -88,10 +88,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 c7b53dcbfb1b5..99def56214a45 100644 --- a/routers/web/repo/githttp.go +++ b/routers/web/repo/githttp.go @@ -104,7 +104,7 @@ func httpBase(ctx *context.Context) *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 00c06b7d02d84..f9301e15d0192 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 70c548b8cea7f..c00b1d1b1fcfa 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 2bd0abc4c03f7..4f928b233925b 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 6995532c3abe5..96e8c8223a03b 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1211,7 +1211,7 @@ func registerWebRoutes(m *web.Router) { 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() { @@ -1229,10 +1229,10 @@ func registerWebRoutes(m *web.Router) { }) } // 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) @@ -1242,16 +1242,16 @@ func registerWebRoutes(m *web.Router) { 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 @@ -1342,8 +1342,8 @@ func registerWebRoutes(m *web.Router) { }, 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") @@ -1395,8 +1395,8 @@ func registerWebRoutes(m *web.Router) { 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 @@ -1408,8 +1408,8 @@ func registerWebRoutes(m *web.Router) { }, 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 @@ -1434,30 +1434,30 @@ func registerWebRoutes(m *web.Router) { 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}", 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) @@ -1484,8 +1484,8 @@ func registerWebRoutes(m *web.Router) { }) }, 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() { @@ -1519,8 +1519,8 @@ func registerWebRoutes(m *web.Router) { m.Get("/badge.svg", 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() { @@ -1535,11 +1535,11 @@ func registerWebRoutes(m *web.Router) { 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) }) @@ -1565,11 +1565,11 @@ func registerWebRoutes(m *web.Router) { }) }, 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), ) @@ -1603,8 +1603,8 @@ func registerWebRoutes(m *web.Router) { }) }) } - 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() { @@ -1687,8 +1687,8 @@ func registerWebRoutes(m *web.Router) { m.Get("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}", repo.MustBeNotEmpty, repo.RawDiff) m.Post("/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() { @@ -1699,8 +1699,8 @@ func registerWebRoutes(m *web.Router) { 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) common.AddOwnerRepoGitLFSRoutes(m, optSignInIgnoreCsrf, lfsServerEnabled) // "/{username}/{group_id}/{reponame}/{lfs-paths}": git-lfs support diff --git a/services/context/repo.go b/services/context/repo.go index 5f88e754369ec..76370eba67a6d 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -12,6 +12,7 @@ import ( "net/http" "net/url" "path" + "regexp" "strconv" "strings" @@ -347,6 +348,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") @@ -358,6 +361,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(), @@ -496,7 +501,7 @@ func RepoAssignment(ctx *Context) { } // 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 963d0359fd35d..becaa33c7cb14 100644 --- a/services/issue/commit.go +++ b/services/issue/commit.go @@ -120,7 +120,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 5bc3f6b95a4e5..7c77590d70b19 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 81991de434486..5b3c0ce69a964 100644 --- a/services/lfs/server.go +++ b/services/lfs/server.go @@ -42,6 +42,7 @@ import ( type requestContext struct { User string Repo string + GroupID int64 Authorization string Method string } @@ -424,6 +425,7 @@ func getRequestContext(ctx *context.Context) *requestContext { return &requestContext{ User: ctx.PathParam("username"), Repo: strings.TrimSuffix(ctx.PathParam("reponame"), ".git"), + GroupID: ctx.PathParamInt64("group_id"), Authorization: ctx.Req.Header.Get("Authorization"), Method: ctx.Req.Method, } @@ -452,7 +454,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 44c0596dcecd8..aa91edc92446d 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 27b5595fa9998..103411976ddd2 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 ebcaa3e56dc92..9e96ff408b2d4 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 0a2fd30620d22..810ed74494ac0 100644 --- a/services/repository/branch.go +++ b/services/repository/branch.go @@ -568,6 +568,7 @@ func DeleteBranch(ctx context.Context, doer *user_model.User, repo *repo_model.R 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 7fb202f42d68b..23e3f3d94039e 100644 --- a/services/repository/lfs_test.go +++ b/services/repository/lfs_test.go @@ -26,7 +26,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 7c68a7f176308..7bf0eba1bf2e4 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 b0cdf3ccc9e65..c5a56f3149f8d 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -357,7 +357,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) @@ -441,7 +441,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 47ac70ef9aa6f..bbff6af5c884e 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 @@ -1383,7 +1383,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" @@ -1412,7 +1412,7 @@ jobs: var apiForkRepo api.Repository DecodeJSON(t, resp, &apiForkRepo) 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 2147ef9d0d9c7..82cc85081720f 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -4,6 +4,7 @@ package integration import ( + "fmt" "net/http" "net/http/httptest" "net/url" @@ -113,7 +114,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)) @@ -164,14 +165,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) @@ -310,10 +315,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 b30cdfd0fc3b1..c6266470eb5f7 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 d7a89e446d7cd..be62300290981 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 fb55d311ccf63..e60dc29872a5a 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 05c7b272abcd4..1e8caf5282ed5 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, @@ -120,10 +120,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"])) @@ -132,15 +136,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 a726f0349f5cb..788e13c104baa 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", "", "", "", "")) @@ -676,7 +676,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) @@ -707,7 +707,7 @@ 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) + ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame, 0, auth_model.AccessTokenScopeWriteRepository) // automerge will merge immediately if the PR is mergeable and there is no "status check" because no status check also means "all checks passed" // so we must set up a status check to test the auto merge feature @@ -816,7 +816,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 5f13229ba2d2f..ca2897a3aa40f 100644 --- a/tests/integration/lfs_getobject_test.go +++ b/tests/integration/lfs_getobject_test.go @@ -41,7 +41,7 @@ func storeObjectInRepo(t *testing.T, repositoryID int64, content *[]byte) string } func storeAndGetLfsToken(t *testing.T, content *[]byte, 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) @@ -66,7 +66,7 @@ func storeAndGetLfsToken(t *testing.T, content *[]byte, extraHeader *http.Header } func storeAndGetLfs(t *testing.T, content *[]byte, 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 eafb600990403..2c80aea337c79 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 0cd1889a13c38..273a10b156a86 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -63,7 +63,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 { @@ -154,10 +154,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) @@ -186,10 +186,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 @@ -219,7 +219,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") @@ -251,7 +251,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 @@ -335,7 +335,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) @@ -368,10 +368,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) @@ -401,10 +401,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) @@ -417,7 +417,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) @@ -457,7 +457,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) @@ -468,7 +468,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) @@ -508,7 +508,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") @@ -542,7 +542,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 @@ -579,7 +579,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) @@ -613,7 +613,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 @@ -691,9 +691,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{ @@ -738,9 +738,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") @@ -777,10 +777,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") @@ -815,7 +815,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) @@ -921,7 +921,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}) @@ -970,7 +970,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) @@ -999,7 +999,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}) @@ -1597,7 +1597,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}) @@ -1695,7 +1695,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 636d677483033a12a0d2ff71c2d4fd6845915a7d 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/168] 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 d3f41ac047a13..fa9a4484f09fc 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1188,7 +1188,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) @@ -1523,13 +1523,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() { @@ -1539,7 +1539,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) @@ -1659,7 +1659,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 @@ -1806,8 +1806,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 b2438a54e004c..5a6b8456e792e 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 85bc72f236ffa..c7053433fd341 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -62,13 +62,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 583acd56acef8..7a172ca3ce153 100644 --- a/routers/web/githttp.go +++ b/routers/web/githttp.go @@ -24,5 +24,5 @@ func addOwnerRepoGitHTTPRouters(m *web.Router) { m.Methods("GET,OPTIONS", "/objects/pack/pack-{file:[0-9a-f]{40,64}}.idx", repo.GetIdxFile) } m.Group("/{username}/{reponame}", fn, optSignInIgnoreCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context.UserAssignmentWeb()) - m.Group("/{username}/{group_id}/{reponame}", fn, optSignInIgnoreCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context.UserAssignmentWeb()) + m.Group("/{username}/group/{group_id}/{reponame}", fn, optSignInIgnoreCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context.UserAssignmentWeb()) } diff --git a/routers/web/web.go b/routers/web/web.go index 96e8c8223a03b..234cf2515f048 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1074,7 +1074,7 @@ func registerWebRoutes(m *web.Router) { }) } 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 settingsFn := func() { @@ -1180,7 +1180,7 @@ func registerWebRoutes(m *web.Router) { 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), ) @@ -1188,10 +1188,10 @@ func registerWebRoutes(m *web.Router) { // user/org home, including rss feeds like "/{username}/{reponame}.rss" m.Get("/{username}/{reponame}", optSignIn, context.RepoAssignment, context.RepoRefByType(git.RefTypeBranch), repo.SetEditorconfigIfExists, repo.Home) + m.Get("/{username}/group/{group_id}/{reponame}", optSignIn, 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.Get("/find/*", repo.FindFiles) m.Group("/tree-list", func() { @@ -1211,7 +1211,7 @@ func registerWebRoutes(m *web.Router) { 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() { @@ -1229,9 +1229,9 @@ func registerWebRoutes(m *web.Router) { }) } // 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() { @@ -1242,15 +1242,15 @@ func registerWebRoutes(m *web.Router) { 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 @@ -1342,7 +1342,7 @@ func registerWebRoutes(m *web.Router) { }, 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 @@ -1395,7 +1395,7 @@ func registerWebRoutes(m *web.Router) { 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 @@ -1408,7 +1408,7 @@ func registerWebRoutes(m *web.Router) { }, 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 @@ -1434,21 +1434,21 @@ func registerWebRoutes(m *web.Router) { 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}", 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() { @@ -1456,7 +1456,7 @@ func registerWebRoutes(m *web.Router) { 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() { @@ -1484,7 +1484,7 @@ func registerWebRoutes(m *web.Router) { }) }, 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" @@ -1519,7 +1519,7 @@ func registerWebRoutes(m *web.Router) { m.Get("/badge.svg", 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" @@ -1535,7 +1535,7 @@ func registerWebRoutes(m *web.Router) { 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) }) @@ -1565,7 +1565,7 @@ func registerWebRoutes(m *web.Router) { }) }, 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), ) @@ -1603,7 +1603,7 @@ func registerWebRoutes(m *web.Router) { }) }) } - 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 @@ -1687,7 +1687,7 @@ func registerWebRoutes(m *web.Router) { m.Get("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}", repo.MustBeNotEmpty, repo.RawDiff) m.Post("/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 @@ -1699,7 +1699,7 @@ func registerWebRoutes(m *web.Router) { 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) common.AddOwnerRepoGitLFSRoutes(m, optSignInIgnoreCsrf, lfsServerEnabled) // "/{username}/{group_id}/{reponame}/{lfs-paths}": git-lfs support From 91da4046cd4cb4da02d706b67099968fc274060e 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/168] 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 d458bc17c985d..85f58c15ee97c 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 aea4f491f65c5c55335a42cef1dfa008ee1624bf 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/168] 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 b4d5daddb7ca2..37e93df3f86de 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 2cfc6666c075771c727ae052a174ef1bb5c11b96 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/168] 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 37e93df3f86de..0f2e9d7ce913e 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 f6c6de5ae444203ae107548e7ba7abfe511faeb9 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/168] 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 a364591bb8f9b..d7bea22f20cf9 100644 --- a/services/convert/repository.go +++ b/services/convert/repository.go @@ -252,6 +252,8 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR Topics: util.SliceNilAsEmpty(repo.Topics), ObjectFormatName: repo.ObjectFormatName, Licenses: util.SliceNilAsEmpty(repoLicenses.StringList()), + GroupID: repo.GroupID, + GroupSortOrder: repo.GroupSortOrder, } } From fcb0e442ea3c87da8cc062259e180773b17dcf47 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/168] 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 bb361a19f0d8a..abcb33d53cbc5 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 8d5a1494d3cce57f22c4033f57d97b79ccbdd830 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/168] 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 647ab38e143c0..40fbdc5b06163 100644 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ endif 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 TEST_MYSQL_HOST ?= mysql:3306 @@ -292,6 +293,8 @@ generate-swagger: $(SWAGGER_SPEC) ## generate the swagger spec from code comment $(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 0000000000000..caf3b562ae6df --- /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 f352e2cf24a14..6e81efc6e0879 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -673,6 +673,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": [ @@ -1313,7 +1386,7 @@ "application/json" ], "tags": [ - "repositoryGroup" + "repository-group" ], "summary": "Delete a repository group", "operationId": "groupDelete", @@ -4744,6 +4817,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": [ @@ -29870,13 +44979,13 @@ } }, "Compare": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/Compare" } }, "ContentsExtResponse": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/ContentsExtResponse" } @@ -30174,13 +45283,13 @@ } }, "MergeUpstreamRequest": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/MergeUpstreamRequest" } }, "MergeUpstreamResponse": { - "description": "", + "description": "(empty)", "schema": { "$ref": "#/definitions/MergeUpstreamResponse" } From 0f142b88f5abb3ec0471ce3a23ae270ec8a9285c 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/168] sync with main --- models/perm/access/repo_permission.go | 3 ++- routers/web/web.go | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index cf7549ee4f867..e556081ea7cd8 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -30,7 +30,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. diff --git a/routers/web/web.go b/routers/web/web.go index 234cf2515f048..e8795c5e38fb6 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" From fa08d7042b2411795b4ca06c1f727b05de7ad7eb 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/168] 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 20b892b6cc547..c31a4c0c08dad 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 094ad7e6d325558bc55818634f301c68dd64225b 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/168] 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 4110fda0d50b4..84340457431d4 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -200,8 +200,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] @@ -248,16 +257,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 b1dafbd81bcde..2d6bfb94db34c 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 4c0a4aa3948a155d73c59a22d8997d9f42ad2117 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/168] update integration test utilities to tage group id as argument --- 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 | 22 ++- tests/integration/actions_job_token_test.go | 2 +- tests/integration/actions_log_test.go | 8 +- tests/integration/actions_rerun_test.go | 6 +- 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 | 2 +- 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 | 12 +- tests/integration/pull_merge_test.go | 84 +++++------ 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, 256 insertions(+), 243 deletions(-) diff --git a/tests/integration/actions_approve_test.go b/tests/integration/actions_approve_test.go index 04b8bcb715676..c0e45f316e623 100644 --- a/tests/integration/actions_approve_test.go +++ b/tests/integration/actions_approve_test.go @@ -35,7 +35,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() @@ -52,7 +52,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 @@ -63,7 +63,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), @@ -74,7 +74,7 @@ jobs: var apiForkRepo api.Repository DecodeJSON(t, resp, &apiForkRepo) 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 cc61368260529..ad443a97c04fd 100644 --- a/tests/integration/actions_concurrency_test.go +++ b/tests/integration/actions_concurrency_test.go @@ -35,12 +35,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{ @@ -51,7 +50,7 @@ func TestWorkflowConcurrency(t *testing.T) { wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml" wf1FileContent := `name: concurrent-workflow-1 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-1.yml' @@ -65,7 +64,7 @@ jobs: ` wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -79,7 +78,7 @@ jobs: ` wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml" wf3FileContent := `name: concurrent-workflow-3 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-3.yml' @@ -93,7 +92,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) @@ -106,7 +105,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) @@ -115,7 +114,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 @@ -143,7 +142,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() @@ -159,7 +158,7 @@ func TestWorkflowConcurrencyShort(t *testing.T) { wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml" wf1FileContent := `name: concurrent-workflow-1 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-1.yml' @@ -172,7 +171,7 @@ jobs: ` wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -185,7 +184,7 @@ jobs: ` wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml" wf3FileContent := `name: concurrent-workflow-3 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-3.yml' @@ -198,7 +197,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) @@ -211,7 +210,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) @@ -220,7 +219,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 @@ -248,7 +247,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() @@ -264,7 +263,7 @@ func TestWorkflowConcurrencyShortJson(t *testing.T) { wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml" wf1FileContent := `name: concurrent-workflow-1 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-1.yml' @@ -281,7 +280,7 @@ jobs: ` wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -298,7 +297,7 @@ jobs: ` wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml" wf3FileContent := `name: concurrent-workflow-3 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-3.yml' @@ -315,7 +314,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) @@ -328,7 +327,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) @@ -337,7 +336,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 @@ -369,7 +368,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() @@ -389,7 +388,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{ @@ -426,7 +425,7 @@ jobs: var apiForkRepo api.Repository DecodeJSON(t, resp, &apiForkRepo) 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" @@ -514,7 +513,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() @@ -532,7 +531,7 @@ func TestJobConcurrency(t *testing.T) { wf1TreePath := ".gitea/workflows/concurrent-workflow-1.yml" wf1FileContent := `name: concurrent-workflow-1 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-1.yml' @@ -546,7 +545,7 @@ jobs: ` wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -554,7 +553,7 @@ jobs: wf2-job1: runs-on: runner2 outputs: - version: ${{ steps.version_step.outputs.app_version }} + version: ${{ steps.version_step.outputs.app_version }} steps: - id: version_step run: echo "app_version=v1.23.0" >> "$GITHUB_OUTPUT" @@ -568,7 +567,7 @@ jobs: ` wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml" wf3FileContent := `name: concurrent-workflow-3 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-3.yml' @@ -583,9 +582,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) @@ -613,7 +612,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) @@ -672,7 +671,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() @@ -684,7 +683,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' @@ -702,7 +701,7 @@ jobs: wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -719,7 +718,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) @@ -733,7 +732,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) @@ -765,7 +764,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() @@ -801,7 +800,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") @@ -859,7 +858,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() @@ -895,7 +894,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") @@ -1003,7 +1002,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() @@ -1039,7 +1038,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") @@ -1147,7 +1146,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() @@ -1170,7 +1169,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) @@ -1249,7 +1248,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() @@ -1259,7 +1258,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' @@ -1281,7 +1280,7 @@ jobs: ` wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -1303,7 +1302,7 @@ jobs: ` wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml" wf3FileContent := `name: concurrent-workflow-3 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-3.yml' @@ -1320,7 +1319,7 @@ jobs: wf4TreePath := ".gitea/workflows/concurrent-workflow-4.yml" wf4FileContent := `name: concurrent-workflow-4 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-4.yml' @@ -1338,7 +1337,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) @@ -1354,7 +1353,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) @@ -1365,7 +1364,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 @@ -1404,7 +1403,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) @@ -1438,7 +1437,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() @@ -1458,7 +1457,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) @@ -1517,7 +1516,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() @@ -1525,7 +1524,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' @@ -1544,7 +1543,7 @@ jobs: wf2TreePath := ".gitea/workflows/workflow-2.yml" wf2FileContent := `name: Workflow-2 -on: +on: push: paths: - '.gitea/workflows/workflow-2.yml' @@ -1558,7 +1557,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) @@ -1576,7 +1575,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"}) @@ -1616,7 +1615,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() @@ -1624,7 +1623,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' @@ -1638,7 +1637,7 @@ jobs: ` wf2TreePath := ".gitea/workflows/concurrent-workflow-2.yml" wf2FileContent := `name: concurrent-workflow-2 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-2.yml' @@ -1652,7 +1651,7 @@ jobs: ` wf3TreePath := ".gitea/workflows/concurrent-workflow-3.yml" wf3FileContent := `name: concurrent-workflow-3 -on: +on: push: paths: - '.gitea/workflows/concurrent-workflow-3.yml' @@ -1667,7 +1666,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) @@ -1676,7 +1675,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"}) @@ -1695,7 +1694,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 0879dcabf878f..22303a7a69b34 100644 --- a/tests/integration/actions_delete_run_test.go +++ b/tests/integration/actions_delete_run_test.go @@ -119,7 +119,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) runIndex := "" 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 25ed9f71f8aac..8525ce51973c3 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 c5a56f3149f8d..87ccef8a6474e 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -141,7 +141,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++ { @@ -153,7 +153,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) var actionTaskRespAfter api.ActionTaskResponse @@ -323,7 +327,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) @@ -373,7 +377,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{ @@ -465,7 +469,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{ @@ -617,8 +621,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) var fileResponse api.FileResponse diff --git a/tests/integration/actions_job_token_test.go b/tests/integration/actions_job_token_test.go index c4e8e880eb824..ad912497644f2 100644 --- a/tests/integration/actions_job_token_test.go +++ b/tests/integration/actions_job_token_test.go @@ -78,7 +78,7 @@ func testActionsJobTokenAccess(u *url.URL, isFork bool) func(t *testing.T) { func TestActionsJobTokenAccessLFS(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteRepository) + httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", 0, auth_model.AccessTokenScopeWriteUser, auth_model.AccessTokenScopeWriteRepository) t.Run("Create Repository", doAPICreateRepository(httpContext, false, func(t *testing.T, repository structs.Repository) { task := &actions_model.ActionTask{} require.NoError(t, task.GenerateToken()) diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index a88056cc59558..8dad665de5c7a 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -168,7 +168,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 jobIndex, outcome := range tc.outcome { @@ -206,7 +206,11 @@ jobs: jobID := jobs[jobIndex].ID // 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, jobID)). + 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, jobID)). 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 690d661e6c910..74ce556c7e3f7 100644 --- a/tests/integration/actions_rerun_test.go +++ b/tests/integration/actions_rerun_test.go @@ -25,7 +25,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() @@ -33,7 +33,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' @@ -50,7 +50,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 dda4f1421ecee..ffe503de9fc1f 100644 --- a/tests/integration/actions_schedule_test.go +++ b/tests/integration/actions_schedule_test.go @@ -89,7 +89,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, }) @@ -165,7 +165,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)) @@ -239,7 +239,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" @@ -255,7 +255,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 bbff6af5c884e..83bb4999956bc 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1401,7 +1401,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 b0dd0cf04965c..898a429c0ad68 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.ID, "user15", "big_test_private_2", perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.ID, "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.ID, "user15", "big_test_public_1", perm.AccessModeRead, "git-upload-pack", "") + results, extra = private.ServCommand(ctx, deployKey.ID, "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 0dba522ee35e7..cb6ed8e8f166b 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) @@ -150,7 +150,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) @@ -194,7 +194,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) @@ -300,7 +300,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 @@ -328,7 +328,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) @@ -493,7 +493,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) @@ -509,7 +509,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) @@ -566,7 +566,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) @@ -579,7 +579,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 67b9502523548..0d8e29b4df229 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). @@ -88,7 +88,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) }) @@ -97,7 +97,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) @@ -126,7 +126,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) @@ -143,7 +143,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 c061ed0fd07e9..c9fdddbee217a 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -301,7 +301,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 ec50cf52f497a..62c7b8c775250 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 3cc16ae662ec1..5f1fe7f9f37d6 100644 --- a/tests/integration/api_repo_git_blobs_test.go +++ b/tests/integration/api_repo_git_blobs_test.go @@ -67,7 +67,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 5ce9e10d10912..2664ff8479b3b 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -76,7 +76,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 ec9fb93017229..3932a8ba2b083 100644 --- a/tests/integration/api_repo_tags_test.go +++ b/tests/integration/api_repo_tags_test.go @@ -56,7 +56,7 @@ func TestAPIRepoTags(t *testing.T) { } // 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) var tag *api.Tag @@ -64,7 +64,7 @@ func TestAPIRepoTags(t *testing.T) { 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 3c3c74b1b512b..de87caf95ff17 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -407,7 +407,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() @@ -495,7 +495,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 a3cb538d5b045..716ff606f67c5 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -136,13 +136,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 d2f34ef10b2f8..27cf72fd90976 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 c830086e3fa11..5532b5d19fbea 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 5d54eaed122ec..408c330ec42ae 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 5e35ed2a7442f..3339dbd45c383 100644 --- a/tests/integration/git_ssh_redirect_test.go +++ b/tests/integration/git_ssh_redirect_test.go @@ -16,7 +16,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) + apiTestContext := NewAPITestContext(t, "user2", "repo1", 0, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) withKeyFile(t, "my-testing-key", func(keyFile string) { t.Run("CreateUserKey", doAPICreateUserKey(apiTestContext, "test-key", keyFile)) diff --git a/tests/integration/gpg_ssh_git_test.go b/tests/integration/gpg_ssh_git_test.go index 56f9f87783355..85ee2252af9bc 100644 --- a/tests/integration/gpg_ssh_git_test.go +++ b/tests/integration/gpg_ssh_git_test.go @@ -79,14 +79,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) @@ -107,7 +107,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) @@ -121,7 +121,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) @@ -131,7 +131,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) @@ -149,7 +149,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) @@ -161,7 +161,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) @@ -174,7 +174,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) { @@ -185,7 +185,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) { @@ -197,7 +197,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) { @@ -209,7 +209,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) @@ -226,7 +226,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) @@ -243,7 +243,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 6a2cf53ed4850..e2ff1cdc583aa 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 73cafd85c2b32..f2da4693973f3 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 abab65247ba74..c80b60fe75c7d 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, u *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 fc921d62686da..ac9b6791ebb60 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 ddafdf33b837d..b3df3a7592564 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -139,7 +139,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) @@ -174,7 +174,7 @@ func TestPullCreate_TitleEscape(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") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "XSS PR") // check the redirected URL @@ -239,7 +239,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 @@ -277,7 +277,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{ @@ -308,7 +308,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{ @@ -394,7 +394,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 c0b2e15ec23ff..f431ac49dbb8d 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 { req := NewRequest(t, "GET", path.Join(user, repo, "pulls", pullnum)) resp := session.MakeRequest(t, req, http.StatusOK) @@ -77,12 +75,16 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo, pullnum strin Redirect string }{} DecodeJSON(t, resp, &respJSON) + var groupSegment string + if groupID > 0 { + groupSegment = fmt.Sprintf("%d/", groupID) + } - assert.Equal(t, fmt.Sprintf("/%s/%s/pulls/%s", user, repo, pullnum), respJSON.Redirect) + assert.Equal(t, fmt.Sprintf("/%s/%s%s/pulls/%s", user, groupSegment, repo, pullnum), respJSON.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 +117,7 @@ func TestPullMerge(t *testing.T) { 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") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -129,7 +131,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, }) @@ -152,7 +154,7 @@ func TestPullRebase(t *testing.T) { 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") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -166,7 +168,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, }) @@ -189,7 +191,7 @@ func TestPullRebaseMerge(t *testing.T) { 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") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) assert.Equal(t, 3, repo.NumPulls) @@ -203,7 +205,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, }) @@ -226,14 +228,14 @@ func TestPullSquash(t *testing.T) { 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, "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, }) @@ -252,8 +254,8 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { 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, "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) @@ -273,7 +275,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, @@ -292,7 +294,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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) @@ -307,7 +309,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, }) @@ -343,7 +345,7 @@ func TestCantMergeWorkInProgress(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "[wip] This is a pull title") @@ -362,8 +364,8 @@ func TestCantMergeConflict(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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) @@ -404,7 +406,7 @@ func TestCantMergeUnrelated(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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 @@ -472,7 +474,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) @@ -501,7 +503,7 @@ func TestFastForwardOnlyMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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) @@ -536,8 +538,8 @@ func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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) @@ -652,9 +654,9 @@ func TestConflictChecking(t *testing.T) { func TestPullRetargetChildOnBranchDelete(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") - 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), "/") @@ -664,7 +666,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, }) @@ -690,8 +692,8 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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), "/") @@ -703,7 +705,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, }) @@ -730,7 +732,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), "/") @@ -738,7 +740,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, }) @@ -755,7 +757,7 @@ func TestPullMergeIndexerNotifier(t *testing.T) { // create a pull request 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") createPullResp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "Indexer notifier test pull") assert.NoError(t, queue.GetManager().FlushAll(t.Context(), 0)) @@ -789,7 +791,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, }) @@ -834,7 +836,7 @@ func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { defer func() { testDeleteRepository(t, session, "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"}) @@ -927,7 +929,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { defer func() { testDeleteRepository(t, session, "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"}) @@ -1014,7 +1016,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() @@ -1146,7 +1148,7 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") defer testDeleteRepository(t, session, "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"}) diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index 5b13b7187ff7e..39030f2bd94ab 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, }) @@ -247,7 +247,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 49326a594aee6..7fd01c790bc3c 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") url := path.Join("user1", "repo1", "compare", "master...status1") req := NewRequestWithValues(t, "POST", url, @@ -72,7 +72,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 { @@ -128,8 +128,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") url := path.Join("user1", "repo1", "compare", "master...status1") req := NewRequestWithValues(t, "POST", url, @@ -211,7 +211,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) @@ -227,7 +227,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) @@ -235,7 +235,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 7781fd0511ced..0d2c4a44b7e9c 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 666ae44c08347..60e012dc0b522 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -218,7 +218,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, }) @@ -227,7 +227,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 b8f086e2b15ce..6d3936b546bc6 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -95,7 +95,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) { 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", doAPICreateCommitStatus(ctx, path.Base(commitURL), api.CreateStatusOption{ State: commitstatus.CommitStatusState(state), TargetURL: "http://test.ci/", @@ -193,7 +193,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) runBody := doAPICreateCommitStatus(ctx, path.Base(commitURL), api.CreateStatusOption{ State: commitstatus.CommitStatusPending, TargetURL: "http://test.ci/", @@ -224,7 +224,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", doAPICreateCommitStatus(ctx, path.Base(commitURL), api.CreateStatusOption{ State: commitstatus.CommitStatusSuccess, TargetURL: "http://test.ci/", diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index 93ed16323562c..6f4f530a4ac3c 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 ef3028f2936cc..48cdaceebfaba 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 273a10b156a86..1d12aa632a162 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -682,7 +682,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) @@ -931,7 +931,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 doAPICreateCommitStatus(testCtx, commitID, api.CreateStatusOption{ @@ -1029,7 +1029,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) @@ -1314,7 +1314,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}) @@ -1393,7 +1393,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) @@ -1473,7 +1473,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) @@ -1553,7 +1553,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) @@ -1621,7 +1621,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 @@ -1643,7 +1643,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) @@ -1720,7 +1720,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 0f16d41adbccc..cd3dda1a391bc 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 5718156ffad27..c74560f4e416b 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 bf4b2dfd017494ffdb774c9ce4cdc8a5fe78f1d6 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/168] 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 924a10041b0ed..ca503c2f01261 100644 --- a/routers/web/user/package.go +++ b/routers/web/user/package.go @@ -471,7 +471,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 618294d43412f..5a526d7813b84 100644 --- a/services/forms/user_form.go +++ b/services/forms/user_form.go @@ -416,8 +416,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 e98a7abfd69b5388969f423e9836a3251e4c5604 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/168] 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 0000000000000..ab4fbeba22e43 --- /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 6e81efc6e0879..d2b39530cdf94 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -673,6 +673,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": [ @@ -7565,8 +7654,8 @@ "tags": [ "repository" ], - "summary": "Update a branch", - "operationId": "repoUpdateBranchMixin0", + "summary": "Rename a branch", + "operationId": "repoRenameBranchMixin0", "parameters": [ { "type": "string", @@ -7593,7 +7682,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/UpdateBranchRepoOption" + "$ref": "#/definitions/RenameBranchRepoOption" } }, { @@ -8512,7 +8601,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": [ { @@ -8557,6 +8646,9 @@ "200": { "$ref": "#/responses/FileResponse" }, + "201": { + "$ref": "#/responses/FileResponse" + }, "403": { "$ref": "#/responses/error" }, @@ -8746,7 +8838,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateFileOptions" + "$ref": "#/definitions/ApplyDiffPatchFileOptions" } }, { @@ -10227,7 +10319,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" }, @@ -10751,6 +10843,9 @@ "404": { "$ref": "#/responses/error" }, + "413": { + "$ref": "#/responses/error" + }, "422": { "$ref": "#/responses/validationError" }, @@ -11472,6 +11567,9 @@ "404": { "$ref": "#/responses/error" }, + "413": { + "$ref": "#/responses/error" + }, "422": { "$ref": "#/responses/validationError" }, @@ -17588,6 +17686,9 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/error" } } } From 0f5ea4e33eefbef5af5993c9a627306142760734 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/168] 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 42338a1b83438..7b32bf07e6bc4 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 ab4fbeba22e43..4895c793dcf9f 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 d2b39530cdf94..f5d37a8928904 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -682,7 +682,7 @@ "admin" ], "summary": "Adopt unadopted files as a repository", - "operationId": "adminAdoptRepositoryMixin0", + "operationId": "adminAdoptRepositoryInGroup", "parameters": [ { "type": "string", @@ -727,7 +727,7 @@ "admin" ], "summary": "Delete unadopted files", - "operationId": "adminDeleteUnadoptedRepositoryMixin0", + "operationId": "adminDeleteUnadoptedRepositoryInGroup", "parameters": [ { "type": "string", @@ -762,79 +762,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 5e98a24fe01ef26ea28cab695ec903d0b313e74a 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/168] 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 ++-- tests/integration/pull_merge_test.go | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/models/repo/repo_test.go b/models/repo/repo_test.go index ce17789a3ba6d..5385c22ded836 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 636c78009b5b3..3bbb0d06e387a 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 46f2f484175bf..ef1ef351964f7 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 b8c2ea59ddb92..9786b87763cfc 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 680a7f3207e5c..faf14b0c5a7ab 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 8d73fef7f4bf1..772b48515f7e0 100644 --- a/services/repository/transfer_test.go +++ b/services/repository/transfer_test.go @@ -47,10 +47,10 @@ func TestTransferOwnership(t *testing.T) { assert.EqualValues(t, 1, transferredRepo.OwnerID) // repo_transfer.yml id=1 unittest.AssertNotExistsBean(t, &repo_model.RepoTransfer{ID: 1}) - exist, err := util.IsExist(repo_model.RepoPath("org3", "repo3")) + exist, err := util.IsExist(repo_model.RepoPath("org3", "repo3", 0)) assert.NoError(t, err) assert.False(t, exist) - exist, err = util.IsExist(repo_model.RepoPath("user1", "repo3")) + exist, err = util.IsExist(repo_model.RepoPath("user1", "repo3", 0)) assert.NoError(t, err) assert.True(t, exist) unittest.AssertExistsAndLoadBean(t, &activities_model.Action{ diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index f431ac49dbb8d..168d5cc4e6634 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -1190,13 +1190,13 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { func TestPullSquashMergeEmpty(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") - 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() @@ -1212,7 +1212,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, }) From 764b63d44d88547df846e7fefc1075725401dfa2 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/168] 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 caf3b562ae6df..24b4c42dabd17 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 487cc953be7f8..6e7167735776d 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 fa9a4484f09fc..806978173a9c0 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1809,7 +1809,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 0f2e9d7ce913e..1ef3362061dfe 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 4895c793dcf9f..c830fd6661f59 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 de87caf95ff17..3b94156a72465 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -82,66 +82,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 39e86961633f23393911be2a0ea0ad6778e3403d 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/168] 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 d98ee68f39bc9..a726123e94071 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 408d76f27a6a4e47f526e60a5bb51a047779eb1f 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/168] 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 24b4c42dabd17..1c32b4c28cdf6 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 b70de1901b79f..b327157ed5208 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 806978173a9c0..5ea83672be44d 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -143,14 +143,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 469960dde0330..456882819ba1b 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -261,7 +261,6 @@ func GetPullRequestByBaseHead(ctx *context.APIContext) { } else { owner, name = split[0], split[1] } - } else { owner = split[0] gid = ctx.Repo.Repository.GroupID From 09929c485d7f0e283d31ab560b14381726cb2a4d 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/168] 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 0ff79bd0bda39..c622ac60831b3 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -699,6 +699,9 @@ func getGroupSegment(gid int64) string { } func groupSegmentWithTrailingSlash(gid int64) string { + if gid < 1 { + return "" + } return getGroupSegment(gid) + "/" } From 6e9c0915bc7795b02015eebe3590da5ce3b2f126 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/168] 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 8e589eda88d90..cd968e8e98501 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -267,6 +267,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 { @@ -275,19 +283,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 4cf339ef42dff..e76faf312eb63 100644 --- a/modules/templates/util_misc.go +++ b/modules/templates/util_misc.go @@ -61,6 +61,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 0e0e59a55facb250ffa3dae1ce038886613a2fd8 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/168] 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 1c32b4c28cdf6..927157e17e67a 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 263402e92155d3113ef6086964b2bd4d97193812 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/168] update v1_groups.json --- templates/swagger/v1_groups.json | 14018 ++++++++++++++--------------- 1 file changed, 7009 insertions(+), 7009 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index c830fd6661f59..5bf56d2120221 100644 --- a/templates/swagger/v1_groups.json +++ b/templates/swagger/v1_groups.json @@ -1,35 +1,29 @@ { "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": [ { - "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", + "required": true, "type": "string", - "description": "filter by milestone name" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { "type": "integer", @@ -38,149 +32,200 @@ "in": "query" }, { - "type": "integer", "description": "page size of results", "name": "limit", - "in": "query" + "in": "query", + "type": "integer" }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], "responses": { "200": { - "$ref": "#/responses/MilestoneList" + "$ref": "#/responses/TopicNames" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } }, - "post": { + "put": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", + "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": "owner", + "in": "path", + "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateMilestoneOption" + "$ref": "#/definitions/RepoTopicOptions" } }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "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" }, - "201": { - "$ref": "#/responses/Milestone" + "423": { + "$ref": "#/responses/repoArchivedError" } }, "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": "Edit a wiki page", + "operationId": "repoEditWikiPage", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { + "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 release", - "name": "id", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the page", + "name": "pageName" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } }, { "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" + } + ] + }, + "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/WikiPage" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ] }, "delete": { - "operationId": "repoDeleteReleaseAttachment", + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", "parameters": [ { "type": "string", @@ -190,260 +235,163 @@ "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" + "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", + "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" + "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" } }, - "produces": [ - "application/json" - ], "tags": [ "repository" - ], - "summary": "Delete a release attachment" - }, - "patch": { + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { + "get": { "produces": [ - "application/json" + "text/plain" ], "tags": [ "repository" ], - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", + "summary": "Get a commit's diff or patch", + "operationId": "repoDownloadCommitDiffOrPatch", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path" + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", + "name": "diffType", "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/string" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { + "/repos/{owner}/group/{group_id}/{repo}/licenses": { "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" + "$ref": "#/responses/LicensesList" }, "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" + "repository" ], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment", + "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": "index of the issue", - "name": "index", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - } + "type": "string" }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { "get": { - "operationId": "repoGetReleaseByTag", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a team is assigned to a repository", + "operationId": "repoCheckTeam", "parameters": [ { "description": "owner of the repo", @@ -453,57 +401,50 @@ "type": "string" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { "in": "path", "required": true, "type": "string", - "description": "tag name of the release to get", - "name": "tag" + "description": "team name", + "name": "team" }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/Team" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release by tag name" + } }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", + "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" + "required": true }, { "type": "string", @@ -513,19 +454,19 @@ "required": true }, { - "description": "tag name of the release to delete", - "name": "tag", + "description": "team name", + "name": "team", "in": "path", "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": { @@ -535,204 +476,213 @@ "404": { "$ref": "#/responses/notFound" }, + "405": { + "$ref": "#/responses/error" + }, "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" + ] + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", + "summary": "Delete a team from a repository", + "operationId": "repoDeleteTeam", "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", + "name": "repo" + }, + { "in": "path", - "required": true + "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", - "description": "group ID of the repo" + "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { - "get": { + ], "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" + "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": "Get a note corresponding to a single commit from a repository", - "operationId": "repoGetNote", + "summary": "Create a workflow dispatch event", + "operationId": "ActionsDispatchWorkflow", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "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 repo" }, { "type": "string", - "description": "a git ref or commit sha", - "name": "sha", + "description": "id of the workflow", + "name": "workflow_id", "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" + "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", - "name": "group_id" + "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}/git/commits/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a single commit from a repository", - "operationId": "repoGetSingleCommit", + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { - "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')" + "required": true }, { - "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": "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, - "in": "path" + "required": true } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "200": { - "$ref": "#/responses/Commit" + "$ref": "#/responses/AttachmentList" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { - "delete": { - "operationId": "issueDeleteTime", + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a comment attachment", + "operationId": "issueCreateIssueCommentAttachment", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { "type": "string", @@ -744,71 +694,95 @@ { "type": "integer", "format": "int64", - "description": "index of the issue", - "name": "index", + "description": "id of the comment", + "name": "id", "in": "path", "required": true }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of time to delete" + "description": "name of the attachment", + "name": "name", + "in": "query", + "type": "string" }, { + "name": "attachment", + "in": "formData", "required": true, - "in": "path", + "type": "file", + "description": "attachment to upload" + }, + { "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "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": [ - "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", + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo", + "name": "owner" }, { "name": "repo", @@ -818,67 +792,139 @@ "description": "name of the repo" }, { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" + "in": "path", + "required": true, + "type": "string", + "description": "path of the file to create", + "name": "filepath" }, { - "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" + "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" + "description": "group ID of the repo", + "name": "group_id" } + ] + }, + "delete": { + "produces": [ + "application/json" ], - "responses": { - "400": { + "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/forbidden" + "$ref": "#/responses/error" }, "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" + "$ref": "#/responses/error" }, "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" }, "200": { - "$ref": "#/responses/TasksList" + "$ref": "#/responses/FileDeleteResponse" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", + }, + "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 to transfer", + "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 repo to transfer", - "name": "repo", + "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", @@ -889,27 +935,24 @@ } ], "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" + "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" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { - "get": { - "operationId": "repoListReleaseAttachments", + ], + "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", @@ -919,20 +962,27 @@ "type": "string" }, { - "required": true, - "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", + "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", @@ -944,10 +994,40 @@ ], "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$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": [ @@ -956,14 +1036,8 @@ "tags": [ "repository" ], - "summary": "List release's attachments" - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", "parameters": [ { "type": "string", @@ -973,31 +1047,23 @@ "required": true }, { - "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true - }, - { "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path" + "type": "string" }, { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" }, { - "in": "formData", - "type": "file", - "description": "attachment to upload", - "name": "attachment" + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "required": true, @@ -1007,33 +1073,17 @@ "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", + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, "parameters": [ { "type": "string", @@ -1043,132 +1093,137 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "in": "path", "required": true, "type": "integer", - "format": "int64", - "description": "index of the pull request to get", + "description": "this parameter is ignored", "name": "index" }, { - "description": "group ID of the repo", - "name": "group_id", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true, + "type": "integer" + }, + { "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/PullRequest" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request" + } }, "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": [ - "repository" + "issue" ], - "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "repoEditPullRequest", + "operationId": "issueEditCommentDeprecated", + "deprecated": true, "parameters": [ { - "type": "string", - "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { - "name": "repo", - "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { "type": "integer", - "format": "int64", - "description": "index of the pull request to edit", + "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/EditPullRequestOption" + "$ref": "#/definitions/EditIssueCommentOption" } }, { - "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { "tags": [ "repository" ], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive", + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { "in": "path", @@ -1178,24 +1233,47 @@ "name": "repo" }, { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", "in": "path", "required": true }, { - "name": "group_id", + "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { + "422": { + "$ref": "#/responses/validationError" + }, "200": { - "description": "success" + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -1206,43 +1284,110 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { + "/repos/{owner}/group/{group_id}/{repo}/issues": { "get": { - "produces": [ - "application/json" - ], "tags": [ - "repository" + "issue" ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun", + "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": "owner of the repo" }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repo" }, { - "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path", - "required": true + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" }, { - "name": "name", "in": "query", "type": "string", - "description": "name of the artifact" + "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", @@ -1254,63 +1399,17 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/ArtifactsList" + "$ref": "#/responses/IssueList" }, - "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" - } + "404": { + "$ref": "#/responses/notFound" } }, "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": { + "application/json" + ] + }, "post": { "consumes": [ "application/json" @@ -1321,30 +1420,29 @@ "tags": [ "issue" ], - "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopStopWatch", + "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 + "required": true, + "type": "string" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } }, { "description": "group ID of the repo", @@ -1356,52 +1454,62 @@ } ], "responses": { - "409": { - "description": "Cannot stop a non-existent stopwatch" + "423": { + "$ref": "#/responses/repoArchivedError" }, "201": { - "$ref": "#/responses/empty" + "$ref": "#/responses/Issue" }, "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "operationId": "issueListIssueDependencies", + "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" + "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { + "required": true, + "type": "integer", + "format": "int64", "description": "index of the issue", "name": "index", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { "type": "integer", @@ -1410,23 +1518,26 @@ "in": "query" }, { + "type": "integer", "description": "page size of results", "name": "limit", - "in": "query", - "type": "integer" + "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/IssueList" + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -1434,8 +1545,8 @@ } }, "post": { - "summary": "Make the issue in the url depend on the issue in the form.", - "operationId": "issueCreateIssueDependencies", + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction", "parameters": [ { "in": "path", @@ -1453,16 +1564,17 @@ }, { "required": true, - "type": "string", + "type": "integer", + "format": "int64", "description": "index of the issue", "name": "index", "in": "path" }, { - "name": "body", + "name": "content", "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" + "$ref": "#/definitions/EditReactionOption" } }, { @@ -1475,16 +1587,22 @@ } ], "responses": { - "404": { - "description": "the issue does not exist" + "201": { + "$ref": "#/responses/Reaction" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "403": { + "$ref": "#/responses/forbidden" }, - "201": { - "$ref": "#/responses/Issue" + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Reaction" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -1493,7 +1611,11 @@ ] }, "delete": { - "operationId": "issueRemoveIssueDependencies", + "tags": [ + "issue" + ], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction", "parameters": [ { "in": "path", @@ -1503,125 +1625,163 @@ "name": "owner" }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "type": "string", - "description": "index of the issue", - "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" }, { + "name": "content", + "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" - }, - "name": "body", - "in": "body" + "$ref": "#/definitions/EditReactionOption" + } }, { - "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/Issue" + "$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" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Remove an issue dependency" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { - "delete": { - "operationId": "issueRemoveLabel", + "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": "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" }, { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "index of the issue", - "name": "index", + "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 label to remove", - "name": "id" + "description": "id of the release" }, { + "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": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/AttachmentList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "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", + "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", @@ -1631,55 +1791,58 @@ "required": true }, { - "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": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path" + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" }, - "409": { - "description": "Cannot cancel a non-existent stopwatch" + "413": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Attachment" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { "get": { "produces": [ "application/json" @@ -1687,35 +1850,35 @@ "tags": [ "repository" ], - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates", + "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" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/IssueTemplates" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" @@ -1723,90 +1886,125 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "get": { - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses", + "/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": [ { - "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", + "name": "repo" + }, + { + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", "in": "path", "required": true }, { - "description": "sha of the commit", - "name": "sha", - "in": "path", "required": true, - "type": "string" - }, + "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": [ { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], + "required": true, "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], + "required": true, "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": "name of the repo", + "name": "repo", + "in": "path" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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, - "in": "path" + "required": true } ], "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { + "422": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -1814,173 +2012,242 @@ "repository" ] }, - "post": { + "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": "Create a commit status", - "operationId": "repoCreateStatus", + "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" + "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": "name of the repo", - "name": "repo" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "description": "sha of the commit", - "name": "sha", + "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateStatusOption" - } + "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", - "format": "int64" + "type": "integer" } ], "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", + }, + "delete": { + "summary": "Delete a release", + "operationId": "repoDeleteRelease", "parameters": [ { + "description": "owner of the repo", + "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" + "type": "string" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/IssueList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, + "tags": [ + "repository" + ] + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "get": { - "operationId": "notifyGetRepoList", + ], + "tags": [ + "repository" + ], + "summary": "Update a release", + "operationId": "repoEditRelease", "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, - "type": "string", - "description": "name of the repo" + "required": true }, { - "type": "boolean", - "description": "If true, show notifications marked as read. Default value is false", - "name": "all", - "in": "query" + "type": "integer", + "format": "int64", + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true }, { - "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" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } }, { - "in": "query", - "type": "array", - "items": { - "enum": [ - "issue", - "pull", - "commit", - "repository" - ], - "type": "string" - }, - "collectionFormat": "multi", - "description": "filter notifications by subject type", - "name": "subject-type" + "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 }, { - "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" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { "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" + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true }, { "type": "integer", @@ -1995,46 +2262,51 @@ "name": "limit" }, { + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64" + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/NotificationThreadList" + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "notification" + "repository" ], - "summary": "List users's notification threads on a specific repo" - }, - "put": { + "summary": "Get a commit's combined status, by branch/tag/commit reference" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { "produces": [ "application/json" ], "tags": [ - "notification" + "repository" ], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", + "summary": "List a repository's teams", + "operationId": "repoListTeams", "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo" }, { "type": "string", @@ -2043,35 +2315,6 @@ "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, @@ -2082,71 +2325,70 @@ } ], "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/keys": { + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateKeyOption" + "$ref": "#/definitions/MergeUpstreamRequest" } }, { + "format": "int64", + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { - "201": { - "$ref": "#/responses/DeployKey" + "200": { + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" }, "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" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { "get": { "produces": [ "application/json" @@ -2154,91 +2396,29 @@ "tags": [ "repository" ], - "summary": "List a repository's keys", - "operationId": "repoListKeys", + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow", "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" + "description": "owner of the repo" }, { "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" }, { - "description": "name of the repo", - "name": "repo", + "name": "workflow_id", "in": "path", "required": true, - "type": "string" - }, - { "type": "string", - "description": "name of tag to delete", - "name": "tag", - "in": "path", - "required": true + "description": "id of the workflow" }, { "description": "group ID of the repo", @@ -2250,32 +2430,28 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/ActionWorkflow" }, - "405": { - "$ref": "#/responses/empty" + "400": { + "$ref": "#/responses/error" }, - "409": { - "$ref": "#/responses/conflict" + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" + "500": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { "get": { "produces": [ "application/json" @@ -2283,15 +2459,16 @@ "tags": [ "repository" ], - "summary": "Get the tag of a repository by tag name", - "operationId": "repoGetTag", + "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" + "required": true }, { "type": "string", @@ -2301,11 +2478,11 @@ "required": true }, { + "required": true, "type": "string", - "description": "name of tag", - "name": "tag", - "in": "path", - "required": true + "description": "username of the user whose tracked times are to be listed", + "name": "user", + "in": "path" }, { "format": "int64", @@ -2317,20 +2494,8 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/Tag" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "responses": { - "201": { - "$ref": "#/responses/WikiPage" + "$ref": "#/responses/TrackedTimeList" }, "400": { "$ref": "#/responses/error" @@ -2340,111 +2505,110 @@ }, "404": { "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/Label" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } }, - "consumes": [ + "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Create a wiki page", - "operationId": "repoCreateWikiPage", + "summary": "Get a single label", + "operationId": "issueGetLabel", "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", - "required": true + "in": "path" }, { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ] - } - }, - "/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" - ], + }, + "delete": { + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, "tags": [ - "repository" + "issue" ], - "summary": "Gets the metadata of all the entries of the root dir.", - "operationId": "repoGetContentsList", + "summary": "Delete a label", + "operationId": "issueDeleteLabel", "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", - "name": "ref", - "in": "query" + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id" }, { - "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" + "required": true, + "in": "path" } - } + ] }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", + "patch": { + "operationId": "issueEditLabel", "parameters": [ { "in": "path", @@ -2461,20 +2625,27 @@ "required": true }, { - "name": "body", - "in": "body", + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", "required": true, + "type": "integer" + }, + { + "in": "body", "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } + "$ref": "#/definitions/EditLabelOption" + }, + "name": "body" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { @@ -2482,112 +2653,115 @@ "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/FilesResponse" + "$ref": "#/responses/validationError" }, - "403": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Label" } }, "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", + "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 + "in": "path" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { "type": "integer", "format": "int64", - "description": "index of the issue", + "description": "index of issue", "name": "index", "in": "path", "required": true }, { - "required": true, "in": "path", - "description": "group ID of the repo", + "required": true, + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position" + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/LabelList" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" } - } - }, - "put": { + }, + "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": [ - "issue" + "repository" ], - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", + "summary": "Downloads the job logs for a workflow run", + "operationId": "downloadActionsRunJobLogs", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repository" }, { - "required": true, "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "description": "id of the job", + "name": "job_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -2600,109 +2774,99 @@ ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "description": "output blob content" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ] - }, - "post": { - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Add a label to an issue", - "operationId": "issueAddLabel", + "summary": "Lists all jobs for a repository", + "operationId": "listWorkflowJobs", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo", + "name": "owner" }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query", + "type": "string" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" }, { - "name": "group_id", "type": "integer", - "format": "int64", - "required": true, + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { "in": "path", - "description": "group ID of the repo" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/WorkflowJobsList" }, - "404": { - "$ref": "#/responses/notFound" + "400": { + "$ref": "#/responses/error" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "get": { "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "type": "string", @@ -2712,91 +2876,92 @@ "required": true }, { - "format": "int64", - "description": "index of the issue", - "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": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path", - "description": "group ID of the repo" + "in": "path" } - ] - } - }, - "/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" + "$ref": "#/responses/LabelList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest", + } + }, + "post": { + "summary": "Create a label", + "operationId": "issueCreateLabel", "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 - }, - { - "name": "index", - "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge" + "type": "string" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/MergePullRequestOption" + "$ref": "#/definitions/CreateLabelOption" } }, { - "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": { + "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" @@ -2804,8 +2969,8 @@ "tags": [ "repository" ], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge", + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", "parameters": [ { "name": "owner", @@ -2815,75 +2980,83 @@ "description": "owner of the repo" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "description": "index of the pull request to merge", - "name": "index", "in": "path", "required": true, - "type": "integer", - "format": "int64" + "type": "string", + "description": "branch to delete", + "name": "branch" }, { - "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" } ], "responses": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, "204": { "$ref": "#/responses/empty" }, "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } }, - "get": { + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged", + "summary": "Rename a branch", + "operationId": "repoRenameBranch", "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" + "name": "repo", + "in": "path" }, { - "format": "int64", - "description": "index of the pull request", - "name": "index", + "name": "branch", "in": "path", "required": true, - "type": "integer" + "type": "string", + "description": "name of the branch" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/RenameBranchRepoOption" + }, + "name": "body" }, { "required": true, @@ -2895,19 +3068,29 @@ } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { - "description": "pull request has not been merged" + "$ref": "#/responses/notFound" }, - "204": { - "description": "pull request has been merged" + "422": { + "$ref": "#/responses/validationError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { - "delete": { - "summary": "Delete an repo-level runner", - "operationId": "deleteRepoRunner", + }, + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", "parameters": [ { "type": "string", @@ -2917,18 +3100,18 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "id of the runner", - "name": "runner_id", + "name": "branch", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "branch to get" }, { "description": "group ID of the repo", @@ -2940,32 +3123,25 @@ } ], "responses": { - "204": { - "description": "runner has been deleted" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Branch" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "get": { + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner", + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", "parameters": [ { "name": "owner", @@ -2975,18 +3151,30 @@ "description": "owner of the repo" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "name": "runner_id", - "in": "path", - "required": true, "type": "string", - "description": "id of the runner" + "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", @@ -2999,44 +3187,33 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/Note" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", + "put": { "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { "format": "int64", @@ -3046,6 +3223,13 @@ "required": true, "type": "integer" }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/LockIssueOption" + } + }, { "description": "group ID of the repo", "name": "group_id", @@ -3065,9 +3249,10 @@ "404": { "$ref": "#/responses/notFound" } - } - }, - "put": { + }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], @@ -3075,79 +3260,79 @@ "issue" ], "summary": "Lock an issue", - "operationId": "issueLockIssue", + "operationId": "issueLockIssue" + }, + "delete": { + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", "parameters": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { + "description": "index of the issue", "name": "index", "in": "path", "required": true, "type": "integer", - "format": "int64", - "description": "index of the issue" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/LockIssueOption" - } + "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", + "name": "group_id", + "type": "integer" } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "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" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { + "tags": [ + "repository" ], - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", + "summary": "Cancel to dismiss a review for a pull request", + "operationId": "repoUnDismissPullReview", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -3158,67 +3343,101 @@ }, { "format": "int64", - "description": "id of the comment", - "name": "id", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - } - }, - "post": { - "operationId": "issueCreateIssueCommentAttachment", + }, + "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": [ { - "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, - "type": "string" + "required": true }, { - "required": true, "type": "integer", "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path" + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true }, { - "type": "string", - "description": "name of the attachment", - "name": "name", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", "in": "query" }, { - "description": "attachment to upload", - "name": "attachment", - "in": "formData", - "required": true, - "type": "file" + "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", @@ -3230,50 +3449,22 @@ } ], "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" + "200": { + "$ref": "#/responses/CommitList" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, - "consumes": [ - "multipart/form-data" - ], "produces": [ "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a comment attachment" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned pull requests", - "operationId": "repoListPinnedPullRequests", + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", "parameters": [ { "type": "string", @@ -3283,103 +3474,119 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", + "name": "repo" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", "required": true }, { - "description": "group ID of the repo", - "name": "group_id", + "name": "attachment_id", + "in": "path", + "required": true, "type": "integer", + "format": "int64", + "description": "id of the attachment to get" + }, + { "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/PullRequestList" + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { - "get": { + }, "produces": [ - "text/plain" + "application/json" ], "tags": [ - "repository" + "issue" + ] + }, + "delete": { + "produces": [ + "application/json" ], - "summary": "Get a commit's diff or patch", - "operationId": "repoDownloadCommitDiffOrPatch", + "tags": [ + "issue" + ], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "name": "sha", + "name": "index", "in": "path", "required": true, - "type": "string", - "description": "SHA of the commit to get" + "type": "integer", + "format": "int64", + "description": "index of the issue" }, { - "name": "diffType", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", "in": "path", "required": true, - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch" + "type": "integer" }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/string" + "204": { + "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { - "get": { - "produces": [ - "application/json" - ], + }, + "patch": { "tags": [ - "repository" + "issue" ], - "summary": "Lists all artifacts for a repository", - "operationId": "getArtifacts", + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", "parameters": [ { "type": "string", @@ -3389,53 +3596,76 @@ "required": true }, { - "type": "string", - "description": "name of the repository", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the artifact" + "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, "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/ArtifactsList" + "423": { + "$ref": "#/responses/repoArchivedError" }, - "400": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { - "delete": { + }, "consumes": [ "application/json" ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { + "get": { "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction", + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", "parameters": [ { "in": "path", @@ -3452,91 +3682,79 @@ "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, + "type": "integer", + "format": "int64", + "description": "index of the issue" }, { - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/LabelList" }, "404": { "$ref": "#/responses/notFound" } } }, - "get": { - "summary": "Get a list reactions of an issue", - "operationId": "issueGetIssueReactions", + "put": { + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "format": "int64", + "description": "index of the issue", "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" + "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", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/ReactionList" + "$ref": "#/responses/LabelList" }, "403": { "$ref": "#/responses/forbidden" @@ -3550,41 +3768,40 @@ ], "produces": [ "application/json" - ], - "tags": [ - "issue" ] }, "post": { + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", "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" }, { - "format": "int64", - "description": "index of the issue", - "name": "index", "in": "path", "required": true, - "type": "integer" + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" + "$ref": "#/definitions/IssueLabelsOption" + } }, { "format": "int64", @@ -3603,10 +3820,7 @@ "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" + "$ref": "#/responses/LabelList" } }, "consumes": [ @@ -3617,90 +3831,79 @@ ], "tags": [ "issue" - ], - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { + ] + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Create or Update a secret value in a repository", - "operationId": "updateRepoSecret", + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", "parameters": [ { - "description": "owner of the repository", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "type": "string", - "description": "name of the secret", - "name": "secretname", + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } - }, - { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "201": { - "description": "response when creating a secret" - }, "204": { - "description": "response when updating a secret" + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { + "produces": [ "application/json" - ] - }, - "delete": { + ], "tags": [ "repository" ], - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { "in": "path", @@ -3710,144 +3913,142 @@ "name": "repo" }, { - "description": "name of the secret", - "name": "secretname", - "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" }, { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/SecretList" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/branches": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, - "produces": [ + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "consumes": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repository's branches", - "operationId": "repoListBranches", + "summary": "Create a wiki page", + "operationId": "repoCreateWikiPage", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "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" + "required": true, + "type": "string", + "description": "name of the repo" }, { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body", + "in": "body" }, { - "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" } - ] - }, - "post": { - "tags": [ - "repository" ], - "summary": "Create a branch", - "operationId": "repoCreateBranch", + "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, - "type": "string", - "description": "owner of the repo" + "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchRepoOption" - } + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { "201": { - "$ref": "#/responses/Branch" + "$ref": "#/responses/empty" }, "403": { - "description": "The branch is archived or a mirror." + "description": "Not repo writer, user does not have rights to toggle stopwatch" }, "404": { - "description": "The old branch does not exist." + "$ref": "#/responses/notFound" }, "409": { - "description": "The branch with the same name already exists." - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "description": "Cannot start a stopwatch again if it already exists" } }, "consumes": [ @@ -3855,45 +4056,88 @@ ], "produces": [ "application/json" - ] + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "/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" - ], - "summary": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs", + ] + } + }, + "/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": "owner of the repo" + "type": "string" }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repository" + "type": "string" }, { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" }, { - "in": "query", "type": "integer", "description": "page number of results to return (1-based)", - "name": "page" + "name": "page", + "in": "query" }, { "type": "integer", @@ -3911,81 +4155,79 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/WorkflowJobsList" + "$ref": "#/responses/UserList" }, - "400": { - "$ref": "#/responses/error" + "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}/issues/comments/{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": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { + "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path" + "name": "repo" }, { - "format": "int64", - "description": "id of the comment", + "type": "integer", + "description": "id of the tag protect to get", "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], "responses": { "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/TagProtection" }, "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": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", "parameters": [ { "type": "string", @@ -3995,62 +4237,44 @@ "required": true }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo" }, { - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path", "required": true, - "type": "integer" + "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", - "type": "integer" + "name": "group_id" } ], "responses": { "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" } }, + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ] }, "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" ], @@ -4058,17 +4282,17 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit a comment", - "operationId": "issueEditComment", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -4079,8 +4303,7 @@ }, { "type": "integer", - "format": "int64", - "description": "id of the comment to edit", + "description": "id of protected tag", "name": "id", "in": "path", "required": true @@ -4089,145 +4312,148 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditIssueCommentOption" + "$ref": "#/definitions/EditTagProtectionOption" } }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { - "get": { + ], "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/ContentsListResponse" + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "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", + } + } + }, + "/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, - "type": "string", - "description": "owner of the repo" + "required": true }, { - "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" + "name": "repo", + "in": "path" }, { - "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body", - "in": "query", + "type": "integer", + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path", "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", + "description": "group ID of the repo" } - ] - }, - "post": { + ], "responses": { "200": { - "$ref": "#/responses/ContentsListResponse" + "$ref": "#/responses/Issue" }, "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" + "issue" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", + "summary": "Get an issue" + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete an issue", + "operationId": "issueDelete", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "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", + "description": "index of issue to delete", + "name": "index", + "in": "path", + "required": true }, { - "name": "body", - "in": "body", + "type": "integer", + "format": "int64", "required": true, - "schema": { - "$ref": "#/definitions/GetFilesOptions" - } - }, - { "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true + "name": "group_id" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { - "post": { - "operationId": "repoUnDismissPullReview", + ], + "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": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "type": "string", @@ -4236,58 +4462,59 @@ "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" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/PullReview" - }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "201": { + "$ref": "#/responses/Issue" } }, - "produces": [ + "consumes": [ "application/json" ], - "tags": [ - "repository" - ], - "summary": "Cancel to dismiss a review for a pull request" + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { "get": { - "summary": "List a repository's issues", - "operationId": "issueListIssues", + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a workflow run", + "operationId": "listWorkflowRunJobs", "parameters": [ { "type": "string", @@ -4297,81 +4524,23 @@ "required": true }, { - "required": true, - "type": "string", - "description": "name of the repo", + "description": "name of the repository", "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", + "in": "path", + "required": true, "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" + "in": "path", + "required": true, + "type": "integer", + "description": "runid of the workflow run", + "name": "run" }, { "type": "string", - "description": "Only show items in which the given user was mentioned", - "name": "mentioned_by", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", "in": "query" }, { @@ -4381,26 +4550,44 @@ "in": "query" }, { + "in": "query", "type": "integer", "description": "page size of results", - "name": "limit", - "in": "query" + "name": "limit" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "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/IssueList" + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ @@ -4408,141 +4595,71 @@ ], "tags": [ "issue" - ] - }, - "post": { + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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", - "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" + "in": "path" }, - "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": [ { + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id", "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" }, { - "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } - } + ] }, "delete": { - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription", "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" + }, + { + "description": "the milestone to delete, identified by ID and if not available by name", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "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": { @@ -4554,22 +4671,30 @@ } }, "tags": [ - "repository" - ] + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone" }, - "get": { + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ - "repository" + "issue" ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription", + "summary": "Update a milestone", + "operationId": "issueEditMilestone", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { "type": "string", @@ -4579,86 +4704,112 @@ "required": true }, { - "description": "group ID of the repo", + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/WatchInfo" + "$ref": "#/responses/Milestone" }, "404": { - "description": "User is not watching this repo or repo do not exist" + "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { "get": { - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs", + "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 + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ReferenceList" } }, "produces": [ "application/json" - ], - "tags": [ - "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { "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", + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { "required": true, @@ -4668,36 +4819,27 @@ "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" + "description": "sha of the commit", + "name": "sha" }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/ContentsExtResponse" + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -4705,7 +4847,7 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { + "/repos/{owner}/group/{group_id}/{repo}/commits": { "get": { "produces": [ "application/json" @@ -4713,16 +4855,16 @@ "tags": [ "repository" ], - "summary": "List a repository's forks", - "operationId": "listForks", + "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" + }, { "type": "string", "description": "name of the repo", @@ -4731,57 +4873,113 @@ "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", - "type": "integer" + "in": "query" }, { - "description": "page size of results", "name": "limit", "in": "query", - "type": "integer" + "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" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/RepositoryList" + "$ref": "#/responses/CommitList" }, "404": { "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" } } - }, - "post": { + } + }, + "/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 to fork", + "description": "owner of 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 repo to fork" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateForkOption" - } + "required": true }, { "description": "group ID of the repo", @@ -4793,11 +4991,11 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/ActionWorkflowList" }, - "202": { - "$ref": "#/responses/Repository" + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" @@ -4805,21 +5003,16 @@ "404": { "$ref": "#/responses/notFound" }, - "409": { - "description": "The repository with the same name already exists." + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Fork a repository", - "operationId": "createFork" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators": { "get": { "produces": [ "application/json" @@ -4827,49 +5020,47 @@ "tags": [ "repository" ], - "summary": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead", + "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": "owner of the repo" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "in": "path", - "required": true, - "type": "string", - "description": "base of the pull request to get", - "name": "base" + "name": "page", + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" }, { - "required": true, - "type": "string", - "description": "head of the pull request to get", - "name": "head", - "in": "path" + "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 + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/PullRequest" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" @@ -4877,45 +5068,36 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { + "name": "name", + "in": "query", "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true + "description": "name of the artifact" }, { + "format": "int64", + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { @@ -4923,16 +5105,25 @@ "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/GitBlobResponse" + "$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}/pulls/{index}/commits": { + "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { "get": { + "operationId": "repoGetCommitPullRequest", "parameters": [ { "type": "string", @@ -4942,43 +5133,18 @@ "required": true }, { + "type": "string", "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" + "required": true }, { - "name": "files", - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')" + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -4991,7 +5157,7 @@ ], "responses": { "200": { - "$ref": "#/responses/CommitList" + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" @@ -5003,68 +5169,50 @@ "tags": [ "repository" ], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits" + "summary": "Get the merged pull request of the commit" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { - "required": true, "type": "string", - "description": "name of the repository", + "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" + "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" } ], "responses": { "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/BranchProtectionList" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { + }, + "produces": [ + "application/json" + ] + }, + "post": { "parameters": [ { "type": "string", @@ -5081,188 +5229,188 @@ "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" + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + }, + "name": "body", + "in": "body" }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "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": [ - "issue" + "repository" ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin" + "summary": "Create a branch protections for a repository", + "operationId": "repoCreateBranchProtection" } }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "get": { + "operationId": "issueListIssueAttachments", "parameters": [ { "type": "string", - "description": "owner of the repo to sync", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { - "required": true, "type": "string", - "description": "name of the repo to sync", + "description": "name of the repo", "name": "repo", - "in": "path" + "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", + "required": true + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/empty" + "$ref": "#/responses/AttachmentList" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/error" } }, "produces": [ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { - "get": { + "issue" + ], + "summary": "List issue's attachments" + }, + "post": { + "consumes": [ + "multipart/form-data" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Lists all runs for a repository run", - "operationId": "getWorkflowRuns", + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", "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" + "description": "owner of the repo", + "name": "owner" }, { "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "in": "query", - "type": "string", - "description": "triggered by user", - "name": "actor" + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "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", + "description": "name of the attachment", + "name": "name", "in": "query" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/WorkflowRunsList" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Attachment" }, "400": { "$ref": "#/responses/error" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "get": { - "summary": "Get an issue", - "operationId": "issueGetIssue", + "/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", @@ -5279,12 +5427,18 @@ "required": true }, { + "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to get", - "name": "index", - "in": "path" + "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", @@ -5296,44 +5450,39 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Issue" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ "application/json" - ], - "tags": [ - "issue" ] }, "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Delete an issue", - "operationId": "issueDelete", + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", "parameters": [ { + "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path" + "name": "owner" }, { "type": "string", @@ -5343,136 +5492,76 @@ "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" + "description": "username of the collaborator to delete", + "name": "collaborator" }, { "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" - } - }, - { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "404": { "$ref": "#/responses/notFound" }, - "412": { - "$ref": "#/responses/error" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" + "422": { + "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { + } + }, "get": { - "operationId": "repoGetEditorConfig", + "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", - "in": "path" + "name": "owner" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", - "description": "filepath of file to get", - "name": "filepath", + "description": "username of the user to check for being a collaborator", + "name": "collaborator", "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "description": "success" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ @@ -5480,11 +5569,10 @@ ], "tags": [ "repository" - ], - "summary": "Get the EditorConfig definitions of a file in a repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { "get": { "produces": [ "application/json" @@ -5492,57 +5580,51 @@ "tags": [ "repository" ], - "summary": "Check if a team is assigned to a repository", - "operationId": "repoCheckTeam", + "summary": "Get a hook", + "operationId": "repoGetHook", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "type": "string", - "description": "team name", - "name": "team", + "type": "integer", + "format": "int64", + "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" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/Team" + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" } } }, - "put": { - "tags": [ - "repository" - ], - "summary": "Add a team to a repository", - "operationId": "repoAddTeam", + "delete": { + "operationId": "repoDeleteHook", "parameters": [ { "type": "string", @@ -5559,52 +5641,28 @@ "required": true }, { + "description": "id of the hook to delete", + "name": "id", + "in": "path", "required": true, - "type": "string", - "description": "team name", - "name": "team", - "in": "path" + "type": "integer", + "format": "int64" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], - "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": [ @@ -5613,15 +5671,16 @@ "tags": [ "repository" ], - "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam", + "summary": "Delete a hook in a repository" + }, + "patch": { "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo" }, { "required": true, @@ -5631,148 +5690,109 @@ "in": "path" }, { - "type": "string", - "description": "team name", - "name": "team", + "description": "index of the hook", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } - ] - } - }, - "/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" + "responses": { + "200": { + "$ref": "#/responses/Hook" }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "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" - }, - "200": { - "$ref": "#/responses/TagProtection" } }, "produces": [ "application/json" - ] - }, - "delete": { + ], "tags": [ "repository" ], - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", + "summary": "Get languages and number of bytes of code written", + "operationId": "repoGetLanguages", "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": "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", - "name": "group_id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" + "description": "group ID of the repo" } - }, - "produces": [ - "application/json" ] - }, - "patch": { + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { "responses": { "200": { - "$ref": "#/responses/TagProtection" + "$ref": "#/responses/UserList" }, "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", + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", "parameters": [ { "type": "string", @@ -5782,156 +5802,191 @@ "required": true }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repo" }, { - "description": "id of protected tag", - "name": "id", - "in": "path", - "required": true, - "type": "integer" + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditTagProtectionOption" - } + "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" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ] } }, - "/repos/{owner}/group/{group_id}/{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", + "name": "owner" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "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", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } ], "responses": { + "200": { + "schema": { + "type": "file" + }, + "description": "Returns raw file content." + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Repository" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repository", - "operationId": "repoGet" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Delete a repository", - "operationId": "repoDelete", + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", "parameters": [ { + "required": true, "type": "string", - "description": "owner of the repo to delete", + "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "in": "path", "required": true, "type": "string", - "description": "name of the repo to delete", - "name": "repo" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { - "format": "int64", "required": true, - "in": "path", + "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, - "patch": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Edit a repository's properties. Only fields that are set will be changed.", - "operationId": "repoEdit", + "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 to edit", + "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", - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditRepoOption" - } + "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", @@ -5943,25 +5998,22 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { - "get": { - "summary": "Get languages and number of bytes of code written", - "operationId": "repoGetLanguages", + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + }, + "post": { + "operationId": "issueCreateIssueDependencies", "parameters": [ { "type": "string", @@ -5978,31 +6030,49 @@ "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", - "type": "integer" + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, "produces": [ "application/json" ], "tags": [ - "repository" - ] + "issue" + ], + "summary": "Make the issue in the url depend on the issue in the form." } }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { "get": { "produces": [ "application/json" @@ -6010,15 +6080,15 @@ "tags": [ "repository" ], - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", @@ -6028,61 +6098,87 @@ "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/UserList" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/IssueList" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "/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/string" + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } }, "produces": [ - "text/plain" + "application/json" ], "tags": [ "repository" ], - "summary": "Get a pull request diff or patch", - "operationId": "repoDownloadPullDiffOrPatch", + "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", - "required": true + "in": "path" }, { "type": "string", @@ -6092,29 +6188,76 @@ "required": true }, { - "name": "index", + "description": "name of protected branch", + "name": "name", "in": "path", "required": true, + "type": "string" + }, + { "type": "integer", "format": "int64", - "description": "index of the pull request to get" + "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" }, { - "enum": [ - "diff", - "patch" - ], "type": "string", - "description": "whether the output is diff or patch", - "name": "diffType", + "description": "name of the repo", + "name": "repo", "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": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -6125,18 +6268,19 @@ "in": "path" } ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { - "get": { + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ - "application/octet-stream" + "application/json" ], "tags": [ "repository" ], - "summary": "Get a file from a repository", - "operationId": "repoGetRawFile", + "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditBranchProtection", "parameters": [ { "type": "string", @@ -6154,17 +6298,18 @@ }, { "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", + "description": "name of protected branch", + "name": "name", "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", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + }, { "format": "int64", "required": true, @@ -6176,64 +6321,92 @@ ], "responses": { "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } + "$ref": "#/responses/BranchProtection" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/transfer": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/times": { + "get": { + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes", "parameters": [ { - "type": "string", - "description": "owner of the repo to transfer", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { - "required": true, "type": "string", - "description": "name of the repo to transfer", + "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "required": true, - "schema": { - "$ref": "#/definitions/TransferRepoOption" - }, - "description": "Transfer Options", - "name": "body", - "in": "body" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/TrackedTimeList" }, - "202": { - "$ref": "#/responses/Repository" + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" } }, "produces": [ @@ -6241,36 +6414,39 @@ ], "tags": [ "repository" - ], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { "get": { - "produces": [ - "text/plain" - ], - "tags": [ - "repository" - ], - "summary": "Get signing-key.gpg for given repository", - "operationId": "repoSigningKey", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "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 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", @@ -6282,28 +6458,39 @@ ], "responses": { "200": { + "description": "Returns raw file content.", "schema": { - "type": "string" - }, - "description": "GPG armored public key" + "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}/issue_config/validate": { + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { "get": { "tags": [ "repository" ], - "summary": "Returns the validation information for a issue config", - "operationId": "repoValidateIssueConfig", + "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 + "name": "owner" }, { "in": "path", @@ -6314,16 +6501,44 @@ }, { "required": true, - "in": "path", + "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/RepoIssueConfigValidation" + "$ref": "#/responses/GitTreeResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -6334,23 +6549,26 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/notifications": { "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "notification" ], - "summary": "Get a release", - "operationId": "repoGetRelease", + "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" }, { "type": "string", @@ -6360,83 +6578,90 @@ "required": true }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to get" + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all", + "in": "query" }, { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" + "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" }, - "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 + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query", + "type": "array", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "repo", - "in": "path", - "required": true, "type": "string", - "description": "name of the repo" + "format": "date-time", + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to delete", - "name": "id", - "in": "path" + "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", - "format": "int64", - "required": true, + "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" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/NotificationThreadList" } - }, - "tags": [ - "repository" - ] + } }, - "patch": { - "operationId": "repoEditRelease", + "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", @@ -6446,25 +6671,87 @@ "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" + }, + { + "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" }, { - "type": "integer", "format": "int64", - "description": "id of the release to edit", - "name": "id", + "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/EditReleaseOption" + "$ref": "#/definitions/UpdateVariableOption" } }, { @@ -6477,91 +6764,78 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Release" + "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" } }, - "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", + "summary": "Update a repo-level variable" + }, + "post": { "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { - "description": "name of the repo", + "type": "string", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } }, { - "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/WatchInfo" + "201": { + "description": "response when creating a repo-level variable" }, - "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" + "409": { + "description": "variable name already exists." }, - "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "500": { + "$ref": "#/responses/error" } }, "produces": [ @@ -6570,154 +6844,130 @@ "tags": [ "repository" ], - "summary": "Get repo-level runners", - "operationId": "getRepoRunners", + "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", - "name": "owner" + "description": "owner of the repo" }, { - "description": "name of the repo", - "name": "repo", "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", "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" + "format": "int64", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/GitHookList" + "$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}/issues/{index}/subscriptions": { + }, "get": { - "consumes": [ - "application/json" - ], + "responses": { + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ActionVariable" + } + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions", + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", - "description": "name of the repo", + "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": "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" + "required": true }, { - "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" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "/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": "owner of the repo" + "required": true }, { "type": "string", @@ -6727,42 +6977,53 @@ "required": true }, { - "format": "int64", + "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" + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/UserList" - }, "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": "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": { + "summary": "Get the metadata and contents of requested files" + }, + "post": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment", + "summary": "Get the metadata and contents of requested files", + "operationId": "repoGetFileContentsPost", "parameters": [ { "required": true, @@ -6779,20 +7040,18 @@ "required": true }, { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "in": "query", + "type": "string", + "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", + "name": "ref" }, { - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "integer" + "schema": { + "$ref": "#/definitions/GetFilesOptions" + } }, { "description": "group ID of the repo", @@ -6803,18 +7062,41 @@ "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/Attachment" + "$ref": "#/responses/PushMirror" }, - "404": { + "400": { "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - } - }, - "delete": { - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", "parameters": [ { "name": "owner", @@ -6831,21 +7113,12 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", + "type": "string", + "description": "remote name of push mirror", + "name": "name", "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, @@ -6854,33 +7127,17 @@ "name": "group_id", "type": "integer" } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" ] }, - "patch": { + "delete": { + "operationId": "repoDeletePushMirror", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { "in": "path", @@ -6890,102 +7147,64 @@ "name": "repo" }, { - "description": "id of the comment", - "name": "id", + "type": "string", + "description": "remote name of the pushMirror", + "name": "name", "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" - } + "required": true }, { - "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": { - "201": { - "$ref": "#/responses/Attachment" + "204": { + "$ref": "#/responses/empty" }, - "404": { + "400": { "$ref": "#/responses/error" }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment" + "summary": "deletes a push mirror from a repository by remoteName" } }, - "/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", + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_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" + "required": true }, { "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "description": "name of the repository", + "name": "repo", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateActionWorkflowDispatch" - } + "type": "string", + "description": "id of the job", + "name": "job_id", + "in": "path", + "required": true }, { "format": "int64", @@ -6997,25 +7216,27 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" + "200": { + "$ref": "#/responses/WorkflowJob" }, "400": { "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" - }, "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}/reviewers": { + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { "get": { "parameters": [ { @@ -7026,24 +7247,31 @@ "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, + "type": "string" + }, + { "type": "string", - "description": "name of the repo" + "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" + "format": "int64", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/ReferenceList" }, "404": { "$ref": "#/responses/notFound" @@ -7055,49 +7283,73 @@ "tags": [ "repository" ], - "summary": "Return all users that can be requested to review in this repo", - "operationId": "repoGetReviewers" + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs" } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Test a push webhook", - "operationId": "repoTestHook", + "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": "owner", + "in": "path" }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { "type": "integer", "format": "int64", - "description": "id of the hook to test", - "name": "id", + "description": "index of the pull request to get", + "name": "index", "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", + "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", @@ -7108,8 +7360,8 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/ChangedFileList" }, "404": { "$ref": "#/responses/notFound" @@ -7117,8 +7369,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "/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", @@ -7128,57 +7388,78 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "name": "run", + "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", - "description": "id of the run" + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/WorkflowRun" - }, - "400": { - "$ref": "#/responses/error" + "$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" + } }, - "produces": [ + "consumes": [ "application/json" ], - "tags": [ - "repository" - ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun" - }, - "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Delete a workflow run", - "operationId": "deleteActionRun", + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", "parameters": [ { "type": "string", @@ -7189,50 +7470,55 @@ }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "name": "run", + "name": "index", "in": "path", "required": true, "type": "integer", - "description": "runid of the workflow run" + "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", - "format": "int64" + "type": "integer" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, "404": { "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", + "summary": "Test a push webhook", + "operationId": "repoTestHook", "parameters": [ { "type": "string", @@ -7242,37 +7528,26 @@ "required": true }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", - "description": "sha of the commit", - "name": "sha", + "type": "integer", + "format": "int64", + "description": "id of the hook to test", + "name": "id", "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", + "type": "string", + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", + "name": "ref", "in": "query" }, - { - "in": "query", - "type": "integer", - "description": "number of items per page", - "name": "per_page" - }, { "description": "group ID of the repo", "name": "group_id", @@ -7281,93 +7556,89 @@ "required": true, "in": "path" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { + "get": { "responses": { "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/CommentList" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { - "get": { + }, "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, + "type": "string" + }, + { + "in": "query", "type": "string", - "description": "name of the repo", - "name": "repo" + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since" }, { "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "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/ActionWorkflow" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, - "404": { - "$ref": "#/responses/notFound" + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, - "422": { - "$ref": "#/responses/validationError" + { + "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": { + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Enable a workflow", - "operationId": "ActionsEnableWorkflow", + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", "parameters": [ { "description": "owner of the repo", @@ -7377,32 +7648,34 @@ "type": "string" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "204": { - "description": "No Content" - }, "400": { "$ref": "#/responses/error" }, @@ -7412,25 +7685,37 @@ "404": { "$ref": "#/responses/notFound" }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/PushMirrorList" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { - "get": { + }, + "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": "Get the merged pull request of the commit", - "operationId": "repoGetCommitPullRequest", + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", "parameters": [ { "description": "owner of the repo", @@ -7440,41 +7725,40 @@ "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" + "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", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" + "in": "path" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { "get": { - "operationId": "repoGetCombinedStatusByRef", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level runners", + "operationId": "getRepoRunners", "parameters": [ { "type": "string", @@ -7484,43 +7768,24 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "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" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/CombinedStatus" + "$ref": "#/definitions/ActionRunnersResponse" }, "400": { "$ref": "#/responses/error" @@ -7528,26 +7793,11 @@ "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", + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { "parameters": [ { "name": "owner", @@ -7564,47 +7814,65 @@ "description": "name of the repo" }, { + "in": "path", "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "description": "username of the user to subscribe the issue to", + "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" + "304": { + "description": "User can only subscribe itself if he is no admin" }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "description": "Already subscribed" + }, + "201": { + "description": "Successfully Subscribed" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription" + }, "delete": { - "operationId": "issueDeleteLabel", + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "type": "string", @@ -7614,45 +7882,41 @@ "required": true }, { + "name": "index", + "in": "path", + "required": true, "type": "integer", "format": "int64", - "description": "id of the label to delete", - "name": "id", + "description": "index of the issue" + }, + { + "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" + "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 label" - }, - "patch": { - "responses": { - "422": { - "$ref": "#/responses/validationError" }, "200": { - "$ref": "#/responses/Label" + "description": "Already unsubscribed" }, - "404": { - "$ref": "#/responses/notFound" + "201": { + "description": "Successfully Unsubscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" } }, "consumes": [ @@ -7663,9 +7927,13 @@ ], "tags": [ "issue" - ], - "summary": "Update a label", - "operationId": "issueEditLabel", + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "delete": { + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", "parameters": [ { "type": "string", @@ -7682,71 +7950,79 @@ "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" - } + "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", - "type": "integer", - "format": "int64" + "name": "group_id" + } + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "description": "runner has been deleted" + }, + "400": { + "$ref": "#/responses/error" } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] }, "get": { - "tags": [ - "issue" - ], - "summary": "Get a single label", - "operationId": "issueGetLabel", + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner", "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 + "required": true, + "type": "string" }, { + "type": "string", + "description": "id of the runner", + "name": "runner_id", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the label to get", - "name": "id" + "required": true }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/Label" + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -7754,10 +8030,13 @@ }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { "get": { "produces": [ "application/json" @@ -7765,38 +8044,29 @@ "tags": [ "repository" ], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReview", + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "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 pull request", - "name": "index", - "in": "path" + "type": "string", + "description": "name of the repository" }, { - "description": "id of the review", - "name": "id", + "type": "string", + "description": "id of the run", + "name": "run", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { "description": "group ID of the repo", @@ -7809,91 +8079,73 @@ ], "responses": { "200": { - "$ref": "#/responses/PullReview" + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } } }, - "post": { + "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "description": "runid of the workflow run", + "name": "run", "in": "path", "required": true }, { - "name": "id", - "in": "path", - "required": true, + "name": "group_id", "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" + "description": "group ID of the repo" } ], "responses": { "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "204": { + "description": "No Content" }, - "200": { - "$ref": "#/responses/PullReview" + "400": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an pull request", - "operationId": "repoSubmitPullReview" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview", + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", "parameters": [ { "name": "owner", @@ -7903,35 +8155,27 @@ "description": "owner of the repo" }, { + "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path" + "name": "repo" }, { - "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" + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { @@ -7939,55 +8183,81 @@ "$ref": "#/responses/empty" }, "403": { - "$ref": "#/responses/forbidden" + "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}/collaborators": { + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { "get": { + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get signing-key.pub for given repository", + "operationId": "repoSigningKeySSH", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "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" + "required": true, + "type": "string", + "description": "name of the repo" }, { + "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", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/UserList" + "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" @@ -7999,165 +8269,111 @@ "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", + "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", + "description": "name of the repo to sync", "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" + "format": "int64", + "required": true, + "in": "path" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { "get": { - "produces": [ - "application/json" - ], "tags": [ - "issue" + "repository" ], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", + "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 + "required": true, + "type": "string" }, { + "description": "name of the repository", "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" + "type": "string" }, { - "in": "query", + "in": "path", + "required": true, "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before" + "description": "id of the artifact", + "name": "artifact_id" }, { - "name": "page", - "in": "query", + "required": true, + "in": "path", + "description": "group ID of the repo", + "name": "group_id", "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" + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/CommentList" + "$ref": "#/responses/Artifact" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { - "post": { - "tags": [ - "issue" - ], - "summary": "Pin an Issue", - "operationId": "pinIssue", + }, + "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", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { + "description": "name of the repository", + "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "type": "string" }, { - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "id of the artifact", + "name": "artifact_id" }, { "format": "int64", @@ -8169,34 +8385,37 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "204": { - "$ref": "#/responses/empty" + "description": "No Content" }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" } }, + "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": "Unpin an Issue", - "operationId": "unpinIssue", + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch", "parameters": [ { "type": "string", @@ -8206,11 +8425,11 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { "name": "index", @@ -8218,7 +8437,7 @@ "required": true, "type": "integer", "format": "int64", - "description": "index of issue to unpin" + "description": "index of the issue to stop the stopwatch on" }, { "description": "group ID of the repo", @@ -8228,108 +8447,71 @@ "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" + "201": { + "$ref": "#/responses/empty" }, "403": { - "$ref": "#/responses/forbidden" + "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": "Get repository permissions for a user" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { - "operationId": "repoGetIssueConfig", + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", "parameters": [ { + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo to sync", + "name": "owner" }, { "type": "string", - "description": "name of the repo", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/RepoIssueConfig" + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Returns the issue config for a repo" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/topics": { + "/repos/{owner}/group/{group_id}/{repo}/tags": { "get": { "produces": [ "application/json" @@ -8337,32 +8519,32 @@ "tags": [ "repository" ], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", + "summary": "List a repository's tags", + "operationId": "repoListTags", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "type": "integer", "description": "page number of results to return (1-based)", "name": "page", - "in": "query" + "in": "query", + "type": "integer" }, { "type": "integer", - "description": "page size of results", + "description": "page size of results, default maximum page size is 50", "name": "limit", "in": "query" }, @@ -8377,22 +8559,23 @@ ], "responses": { "200": { - "$ref": "#/responses/TopicNames" + "$ref": "#/responses/TagList" }, "404": { "$ref": "#/responses/notFound" } } }, - "put": { - "operationId": "repoUpdateTopics", + "post": { + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -8404,28 +8587,37 @@ { "in": "body", "schema": { - "$ref": "#/definitions/RepoTopicOptions" + "$ref": "#/definitions/CreateTagOption" }, "name": "body" }, { - "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": { - "204": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/invalidTopicsError" + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" } }, "produces": [ @@ -8433,98 +8625,112 @@ ], "tags": [ "repository" - ], - "summary": "Replace list of topics for a repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", + "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", - "in": "path", - "required": true + "name": "owner" }, { - "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": "path", + "required": true }, { - "in": "query", "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true }, { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "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, - "in": "path" + "required": true } ], "responses": { "200": { - "$ref": "#/responses/ReleaseList" + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } }, "post": { - "summary": "Create a release", - "operationId": "repoCreateRelease", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request", + "operationId": "repoSubmitPullReview", "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 + }, + { + "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/CreateReleaseOption" + "$ref": "#/definitions/SubmitPullReviewOptions" }, "name": "body", "in": "body" @@ -8539,135 +8745,81 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Release" + "200": { + "$ref": "#/responses/PullReview" }, "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", + } + }, + "delete": { + "operationId": "repoDeletePullReview", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" - }, - { - "type": "string", - "description": "id of the hook to get", - "name": "id", + "name": "repo", "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/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", + "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", - "description": "id of the hook to get" + "type": "integer", + "format": "int64" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "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 Git hook in a repository", - "operationId": "repoEditGitHook", + "summary": "Delete a specific review from a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { + "get": { "parameters": [ { "type": "string", @@ -8686,29 +8838,31 @@ { "in": "path", "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id" + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/EditGitHookOption" - }, - "name": "body" + "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", - "format": "int64" + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/GitHook" + "$ref": "#/responses/PullReviewCommentList" }, "404": { "$ref": "#/responses/notFound" @@ -8716,11 +8870,24 @@ }, "produces": [ "application/json" - ] + ], + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { + "/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", @@ -8730,70 +8897,42 @@ "type": "string" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "format": "int64", - "description": "index of the issue to create 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", - "description": "group ID of the repo", - "name": "group_id" + "required": true } ], "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" + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } } - }, - "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": { + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { "get": { - "tags": [ - "issue" - ], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline", + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "name": "repo", @@ -8803,38 +8942,12 @@ "description": "name of the repo" }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", + "description": "id of the key to get", + "name": "id", "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" - }, - { + "required": true, "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" }, { "description": "group ID of the repo", @@ -8847,34 +8960,29 @@ ], "responses": { "200": { - "$ref": "#/responses/TimelineList" + "$ref": "#/responses/DeployKey" }, "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", + ] + }, + "delete": { + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "type": "string", @@ -8884,9 +8992,10 @@ "required": true }, { - "type": "string", - "description": "username of the user to check for being a collaborator", - "name": "collaborator", + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", "in": "path", "required": true }, @@ -8900,54 +9009,45 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, "204": { "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - } - }, - "put": { + }, + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs", "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", + "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": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - } + "type": "string" }, { "required": true, @@ -8959,116 +9059,147 @@ } ], "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, "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", + } + }, + "/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", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer" }, { - "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": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/WatchInfo" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Check if user is subscribed to an issue" } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { "get": { - "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": "owner of the repo" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/HookList" + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -9077,16 +9208,15 @@ "produces": [ "application/json" ], - "tags": [ - "repository" - ] - }, - "post": { "tags": [ "repository" ], - "summary": "Create a hook", - "operationId": "repoCreateHook", + "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", @@ -9103,54 +9233,47 @@ "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateHookOption" - } + "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { - "201": { - "$ref": "#/responses/Hook" - }, "404": { - "$ref": "#/responses/notFound" + "description": "pull request has not been merged" + }, + "204": { + "description": "pull request has been merged" } }, - "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", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -9160,123 +9283,71 @@ "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - } - }, - { - "description": "group ID of the repo", - "name": "group_id", + "required": true, "type": "integer", "format": "int64", - "required": true, + "description": "index of the pull request to merge", + "name": "index", "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" - } + "$ref": "#/definitions/MergePullRequestOption" + }, + "name": "body" }, { + "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" + "required": true } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, "423": { "$ref": "#/responses/repoArchivedError" }, - "201": { - "$ref": "#/responses/FileResponse" + "200": { + "$ref": "#/responses/empty" }, - "403": { + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { "$ref": "#/responses/error" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a file in a repository" + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest" }, "delete": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", + "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": "owner", - "in": "path" + "description": "owner of the repo" }, { "type": "string", @@ -9286,59 +9357,41 @@ "required": true }, { - "type": "string", - "description": "path of the file to delete", - "name": "filepath", + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" - }, "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/error" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" } } - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls": { "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", + "operationId": "repoListPullRequests", "parameters": [ { "type": "string", @@ -9349,26 +9402,85 @@ }, { "type": "string", - "description": "name of the repo", + "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", + "description": "Filter by target base branch of the pull request", + "name": "base_branch", "in": "query" }, { - "description": "group ID of the repo", + "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", @@ -9377,47 +9489,27 @@ } ], "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": { + "500": { "$ref": "#/responses/error" }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, "200": { - "$ref": "#/responses/FileResponse" - }, - "201": { - "$ref": "#/responses/FileResponse" + "$ref": "#/responses/PullRequestList" } }, - "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", + "summary": "List a repo's pull requests" + }, + "post": { + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", "parameters": [ { "type": "string", @@ -9433,56 +9525,11 @@ "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" + "$ref": "#/definitions/CreatePullRequestOption" } }, { @@ -9495,17 +9542,23 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "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": [ @@ -9519,20 +9572,23 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Lists all jobs for a workflow run", - "operationId": "listWorkflowRunJobs", + "summary": "Lists all runs for a repository run", + "operationId": "getWorkflowRuns", "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", @@ -9542,42 +9598,59 @@ "required": true }, { - "name": "run", - "in": "path", - "required": true, - "type": "integer", - "description": "runid of the workflow run" + "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" + "name": "page", + "in": "query" }, { + "in": "query", "type": "integer", "description": "page size of results", - "name": "limit", - "in": "query" + "name": "limit" }, { + "format": "int64", + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/WorkflowJobsList" + "$ref": "#/responses/WorkflowRunsList" }, "400": { "$ref": "#/responses/error" @@ -9585,19 +9658,19 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Dismiss a review for a pull request", - "operationId": "repoDismissPullReview", + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", "parameters": [ { "type": "string", @@ -9607,78 +9680,48 @@ "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": "string", + "description": "name of the repo" }, { + "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": { - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { + "/repos/{owner}/group/{group_id}/{repo}/releases": { + "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow", + "summary": "List a repo's releases", + "operationId": "repoListReleases", "parameters": [ { + "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo" + "type": "string" }, { "type": "string", @@ -9688,76 +9731,131 @@ "required": true }, { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "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" }, { - "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" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/ReleaseList" }, "404": { "$ref": "#/responses/notFound" + } + } + }, + "post": { + "responses": { + "201": { + "$ref": "#/responses/Release" }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" + "404": { + "$ref": "#/responses/notFound" }, - "400": { + "409": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { - "post": { - "operationId": "repoCreatePullReviewRequests", + ], + "tags": [ + "repository" + ], + "summary": "Create a release", + "operationId": "repoCreateRelease", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } }, { + "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { + "get": { + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { - "name": "body", - "in": "body", + "name": "repo", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } + "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", @@ -9769,14 +9867,11 @@ } ], "responses": { - "201": { - "$ref": "#/responses/PullReviewList" + "200": { + "$ref": "#/responses/Compare" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, "produces": [ @@ -9784,12 +9879,19 @@ ], "tags": [ "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "get": { + "produces": [ + "text/plain" ], - "summary": "create review requests for a pull request" - }, - "delete": { - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests", + "tags": [ + "repository" + ], + "summary": "Get a pull request diff or patch", + "operationId": "repoDownloadPullDiffOrPatch", "parameters": [ { "type": "string", @@ -9799,27 +9901,36 @@ "required": true }, { + "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": "index of the pull request", - "name": "index", - "in": "path" + "description": "index of the pull request to get", + "name": "index" }, { - "name": "body", - "in": "body", + "name": "diffType", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } + "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", @@ -9831,64 +9942,53 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/string" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { "get": { + "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 + "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" }, { - "type": "integer", - "format": "int64", - "description": "id of the hook to get", - "name": "id", + "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/Hook" + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" @@ -9899,19 +9999,9 @@ ], "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", @@ -9928,69 +10018,109 @@ "required": true }, { - "name": "id", + "type": "string", + "description": "name of tag to delete", + "name": "tag", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to delete" + "required": true }, { - "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" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" } - } - }, - "patch": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a hook in a repository", - "operationId": "repoEditHook", + "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": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "required": true, + "name": "group_id", "type": "integer", "format": "int64", - "description": "index of the hook", - "name": "id", - "in": "path" + "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" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" }, { "description": "group ID of the repo", @@ -10002,22 +10132,25 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Hook" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { + }, + "tags": [ + "repository" + ], + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription" + }, "get": { "tags": [ "repository" ], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS", + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", "parameters": [ { "in": "path", @@ -10033,19 +10166,6 @@ "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", @@ -10056,30 +10176,25 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } + "$ref": "#/responses/WatchInfo" + }, + "404": { + "description": "User is not watching this repo or repo do not exist" } - }, - "produces": [ - "application/octet-stream" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "/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": "owner of the repo" + "required": true }, { "type": "string", @@ -10089,22 +10204,11 @@ "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" + "schema": { + "$ref": "#/definitions/CreateHookOption" + }, + "name": "body", + "in": "body" }, { "description": "group ID of the repo", @@ -10116,34 +10220,13 @@ } ], "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Hook" }, "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" ], @@ -10151,83 +10234,79 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", + "summary": "Create a hook" + }, + "get": { + "operationId": "repoListHooks", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddTimeOption" - } + "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/HookList" } - } - }, - "delete": { - "consumes": [ - "application/json" - ], + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime", + "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, - "type": "string" + "required": true }, { "name": "repo", @@ -10237,47 +10316,50 @@ "description": "name of the repo" }, { - "description": "index of the issue to add tracked time to", - "name": "index", + "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": "integer", - "format": "int64" + "type": "string" }, { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" } - } - }, + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { "get": { - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { "description": "name of the repo", @@ -10287,57 +10369,17 @@ "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/TrackedTimeList" + "$ref": "#/responses/IssueTemplates" }, "404": { "$ref": "#/responses/notFound" @@ -10347,41 +10389,32 @@ "application/json" ], "tags": [ - "issue" - ] + "repository" + ], + "summary": "Get available issue templates for a repository", + "operationId": "repoGetIssueTemplates" } }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors/{name}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { "get": { - "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" + "issue" ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", + "summary": "Get a comment", + "operationId": "issueGetComment", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -10391,11 +10424,12 @@ "required": true }, { - "name": "name", + "description": "id of the comment", + "name": "id", "in": "path", "required": true, - "type": "string", - "description": "remote name of push mirror" + "type": "integer", + "format": "int64" }, { "description": "group ID of the repo", @@ -10405,63 +10439,75 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + } + } }, "delete": { - "operationId": "repoDeletePushMirror", + "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": "owner of the repo" + "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "type": "string", - "description": "remote name of the pushMirror", - "name": "name", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "id of comment to delete" }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "400": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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": { + } + }, + "patch": { + "summary": "Edit a comment", + "operationId": "issueEditComment", "parameters": [ { "description": "owner of the repo", @@ -10471,213 +10517,186 @@ "type": "string" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path" + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } }, { "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", - "format": "int64" + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/PullReviewList" + "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": [ - "repository" + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "get": { + "produces": [ + "application/json" ], - "summary": "List all reviews for a pull request", - "operationId": "repoListPullReviews" - }, - "post": { + "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 }, { - "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "index of the issue", + "name": "index", + "in": "path" }, { - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - } + "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "200": { - "$ref": "#/responses/PullReview" + "$ref": "#/responses/IssueList" }, "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", + } + }, + "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 + "name": "owner" }, { + "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path" + "description": "name of the repo", + "name": "repo" }, { - "required": true, "type": "string", - "description": "id of the artifact", - "name": "artifact_id", - "in": "path" + "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "400": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Artifact" + "description": "the issue does not exist" } }, "produces": [ "application/json" ], "tags": [ - "repository" - ], - "summary": "Gets a specific artifact for a workflow run" + "issue" + ] }, "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" + "200": { + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" @@ -10687,24 +10706,17 @@ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { - "get": { - "tags": [ - "repository" + "issue" ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", + "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", - "required": true + "in": "path" }, { "in": "path", @@ -10713,44 +10725,19 @@ "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", + "description": "index of the issue", + "name": "index", "in": "path", "required": true }, { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } }, { "description": "group ID of the repo", @@ -10760,24 +10747,19 @@ "required": true, "in": "path" } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - }, - "produces": [ - "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/tags": { + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "List a repository's tags", - "operationId": "repoListTags", + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", "parameters": [ { "type": "string", @@ -10794,17 +10776,50 @@ "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", + "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", @@ -10815,18 +10830,19 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TagList" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ] + } }, "post": { + "operationId": "repoCreateStatus", "parameters": [ { "type": "string", @@ -10836,46 +10852,44 @@ "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", + "required": true, + "type": "string" + }, + { "required": true, "type": "string", - "description": "name of the repo" + "description": "sha of the commit", + "name": "sha", + "in": "path" }, { - "schema": { - "$ref": "#/definitions/CreateTagOption" - }, "name": "body", - "in": "body" + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/Tag" + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, "produces": [ @@ -10884,19 +10898,23 @@ "tags": [ "repository" ], - "summary": "Create a new git tag in a repository", - "operationId": "repoCreateTag" + "summary": "Create a commit status" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { + "tags": [ + "repository" + ], + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", "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", @@ -10906,35 +10924,30 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", + "type": "string", + "description": "id of the workflow", + "name": "workflow_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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/Reaction" + "422": { + "$ref": "#/responses/validationError" }, - "201": { - "$ref": "#/responses/Reaction" + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" @@ -10943,227 +10956,132 @@ "$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", + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/forks": { + "post": { "parameters": [ { "in": "path", "required": true, "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to fork", "name": "owner" }, { "type": "string", - "description": "name of the repo", + "description": "name of the repo to fork", "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" + "$ref": "#/definitions/CreateForkOption" }, - "name": "content", - "in": "body" + "name": "body" }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/empty" + "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." } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" - ] + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork" }, "get": { + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a list of reactions from a comment of an issue", - "operationId": "issueGetCommentReactions", + "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", + "name": "owner", "in": "path", "required": true }, { - "name": "id", "in": "path", "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" + }, + { "type": "integer", - "format": "int64", - "description": "id of the comment to edit" + "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/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" + "format": "int64", + "required": true } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { "get": { "tags": [ "repository" ], - "summary": "Downloads the job logs for a workflow run", - "operationId": "downloadActionsRunJobLogs", + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag", "parameters": [ { "type": "string", @@ -11173,34 +11091,31 @@ "required": true }, { - "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "type": "integer", - "description": "id of the job", - "name": "job_id", + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "description": "output blob content" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" @@ -11209,39 +11124,34 @@ "produces": [ "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { - "get": { - "produces": [ - "application/json" - ], + }, + "delete": { "tags": [ "repository" ], - "summary": "Gets a specific workflow job for a workflow run", - "operationId": "getWorkflowJob", + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { + "required": true, "type": "string", - "description": "id of the job", - "name": "job_id", - "in": "path", - "required": true + "description": "tag name of the release to delete", + "name": "tag", + "in": "path" }, { "description": "group ID of the repo", @@ -11253,56 +11163,62 @@ } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/WorkflowJob" - }, - "400": { - "$ref": "#/responses/error" + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { "get": { - "operationId": "repoGetKey", + "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": "owner of the repo", - "name": "owner" + "type": "string" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "name": "id", + "name": "filepath", "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "id of the key to get" + "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" }, { - "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/DeployKey" + "description": "success" }, "404": { "$ref": "#/responses/notFound" @@ -11313,22 +11229,23 @@ ], "tags": [ "repository" - ], - "summary": "Get a repository's key by id" - }, + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { "delete": { "tags": [ - "repository" + "issue" ], - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "type": "string", @@ -11340,78 +11257,90 @@ { "type": "integer", "format": "int64", - "description": "id of the key to delete", + "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, - "in": "path" + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "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}/issues/{index}/assets/{attachment_id}": { + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { "get": { - "tags": [ - "issue" - ], - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "type": "integer", "format": "int64", - "description": "index of the issue", - "name": "index", + "description": "id of the release", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer" }, { - "type": "integer", - "format": "int64", "description": "id of the attachment to get", "name": "attachment_id", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64" }, { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { @@ -11419,22 +11348,27 @@ "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" - ] + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment" }, "delete": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment", + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", "parameters": [ { "type": "string", @@ -11444,88 +11378,88 @@ "required": true }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "name of the repo" }, { + "name": "id", + "in": "path", + "required": true, "type": "integer", "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "id of the release" }, { - "format": "int64", "description": "id of the attachment to delete", "name": "attachment_id", "in": "path", "required": true, - "type": "integer" + "type": "integer", + "format": "int64" }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "204": { + "$ref": "#/responses/empty" } } }, "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", "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" }, { - "description": "index of the issue", - "name": "index", + "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" + "description": "id of the attachment to edit", + "name": "attachment_id" }, { "name": "body", @@ -11535,12 +11469,12 @@ } }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { @@ -11548,86 +11482,43 @@ "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, "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", + "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { + "get": { + "operationId": "repoGetWikiPages", "parameters": [ { - "type": "string", - "description": "owner of the repo to sync", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "name of the repo to sync", + "description": "name of the repo", "name": "repo", "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" - } - ] - } - }, - "/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" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "required": true, - "type": "string", - "description": "name of the repo to transfer", - "name": "repo", - "in": "path" + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -11639,14 +11530,11 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/WikiPageList" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Repository" } }, "produces": [ @@ -11655,24 +11543,23 @@ "tags": [ "repository" ], - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer" + "summary": "Get all wiki pages" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { + "delete": { "tags": [ - "repository" + "issue" ], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", "parameters": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "type": "string", @@ -11682,58 +11569,42 @@ "required": true }, { + "type": "integer", "format": "int64", - "description": "index of the pull request to get", + "description": "index of the issue", "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" + "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", + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/ChangedFileList" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ @@ -11741,167 +11612,252 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", + "/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 }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true - }, - { - "in": "body", "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - }, - "name": "body" + "type": "string", + "description": "name of the repo" }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/FileResponse" + "$ref": "#/responses/Repository" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ + "produces": [ "application/json" - ], + ] + }, + "delete": { "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": { + "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": "Downloads a specific artifact for a workflow run redirects to blob url", - "operationId": "downloadArtifact", + "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": "owner of the repo", - "name": "owner" + "type": "string" }, { - "description": "name of the repository", + "description": "name of the repo to edit", "name": "repo", "in": "path", "required": true, "type": "string" }, { - "name": "artifact_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact" + "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, - "in": "path" + "required": true } ], "responses": { - "400": { - "$ref": "#/responses/error" + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "302": { - "description": "redirect to the blob download" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", + "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": "owner of the repo", - "name": "owner" + "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" + "in": "path", + "required": true, + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "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 number of results to return (1-based)" }, { + "description": "page size of results", "name": "limit", "in": "query", - "type": "integer", - "description": "page size of results" + "type": "integer" }, { + "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/LabelList" + "$ref": "#/responses/PullReviewList" }, "404": { "$ref": "#/responses/notFound" @@ -11909,28 +11865,43 @@ } }, "post": { - "summary": "Create a label", - "operationId": "issueCreateLabel", + "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": "string", - "description": "name of the repo", - "name": "repo" + "type": "integer", + "format": "int64", + "description": "index of the pull request" }, { "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/CreateLabelOption" + "$ref": "#/definitions/CreatePullReviewOptions" } }, { @@ -11946,28 +11917,18 @@ "422": { "$ref": "#/responses/validationError" }, - "201": { - "$ref": "#/responses/Label" + "200": { + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { "get": { - "summary": "Get a list of all commits from a repository", - "operationId": "repoGetAllCommits", + "operationId": "repoListPinnedPullRequests", "parameters": [ { "required": true, @@ -11977,73 +11938,11 @@ "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" + "name": "repo", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -12056,13 +11955,10 @@ ], "responses": { "200": { - "$ref": "#/responses/CommitList" + "$ref": "#/responses/PullRequestList" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" } }, "produces": [ @@ -12070,19 +11966,27 @@ ], "tags": [ "repository" - ] + ], + "summary": "List a repo's pinned pull requests" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { - "get": { - "operationId": "getRepoVariable", + "/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": [ { - "required": true, "type": "string", - "description": "owner of the repo", + "description": "owner of the repository", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -12092,11 +11996,18 @@ "required": true }, { - "name": "variablename", + "description": "name of the secret", + "name": "secretname", "in": "path", "required": true, - "type": "string", - "description": "name of the variable" + "type": "string" + }, + { + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + }, + "name": "body", + "in": "body" }, { "description": "group ID of the repo", @@ -12108,8 +12019,11 @@ } ], "responses": { - "200": { - "$ref": "#/responses/ActionVariable" + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" }, "400": { "$ref": "#/responses/error" @@ -12118,67 +12032,53 @@ "$ref": "#/responses/notFound" } }, - "produces": [ + "consumes": [ "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a repo-level variable" + ] }, - "put": { + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Update a repo-level variable", - "operationId": "updateRepoVariable", + "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 }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repository" }, { - "type": "string", - "description": "name of the variable", - "name": "variablename", + "description": "name of the secret", + "name": "secretname", "in": "path", - "required": true - }, - { - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - }, - "name": "body", - "in": "body" + "required": true, + "type": "string" }, { - "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": { - "201": { - "description": "response when updating a repo-level variable" - }, "204": { - "description": "response when updating a repo-level variable" + "description": "delete one secret of the repository" }, "400": { "$ref": "#/responses/error" @@ -12186,10 +12086,15 @@ "404": { "$ref": "#/responses/notFound" } - } - }, - "post": { - "operationId": "createRepoVariable", + }, + "consumes": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { + "operationId": "repoListTagProtection", "parameters": [ { "type": "string", @@ -12199,47 +12104,24 @@ "required": true }, { - "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "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" + "required": true }, { - "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": { - "400": { - "$ref": "#/responses/error" - }, - "409": { - "description": "variable name already exists." - }, - "500": { - "$ref": "#/responses/error" - }, - "201": { - "description": "response when creating a repo-level variable" + "200": { + "$ref": "#/responses/TagProtectionList" } }, "produces": [ @@ -12248,35 +12130,30 @@ "tags": [ "repository" ], - "summary": "Create a repo-level variable" + "summary": "List tag protections for a repository" }, - "delete": { - "tags": [ - "repository" - ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", + "post": { "parameters": [ { + "required": true, + "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { - "type": "string", - "description": "name of the repository", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + }, + "name": "body" }, { "description": "group ID of the repo", @@ -12288,37 +12165,45 @@ } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" + "422": { + "$ref": "#/responses/validationError" }, - "200": { - "$ref": "#/responses/ActionVariable" + "423": { + "$ref": "#/responses/repoArchivedError" }, "201": { - "description": "response when deleting a variable" + "$ref": "#/responses/TagProtection" }, - "204": { - "description": "response when deleting a variable" + "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/workflows": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List repository workflows", - "operationId": "ActionsListRepositoryWorkflows", + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", "parameters": [ { "type": "string", @@ -12328,24 +12213,74 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "required": true, - "in": "path", - "description": "group ID of the repo", + "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" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/ActionWorkflowList" + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" }, "400": { "$ref": "#/responses/error" @@ -12355,25 +12290,26 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { - "get": { + }, + "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", - "in": "path", - "required": true + "name": "owner" }, { "required": true, @@ -12383,75 +12319,123 @@ "in": "path" }, { - "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", - "name": "sha", + "name": "index", "in": "path", "required": true, - "type": "string" + "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": { - "200": { - "$ref": "#/responses/AnnotatedTag" + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" }, "400": { "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" + "403": { + "$ref": "#/responses/forbidden" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)", - "operationId": "GetAnnotatedTag" + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime" } }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/transfer": { + "post": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "List a repo's stargazers", - "operationId": "repoListStargazers", + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer", "parameters": [ { "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to transfer", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repo to transfer", "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": "Transfer Options", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + } }, { "format": "int64", @@ -12463,39 +12447,34 @@ } ], "responses": { - "200": { - "$ref": "#/responses/UserList" + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" }, "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" - } - }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds", + "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", @@ -12505,30 +12484,74 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "format": "date", - "description": "the date of the activities to be found", - "name": "date", - "in": "query" + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on", + "name": "index", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } }, { - "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": { + "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", @@ -12538,26 +12561,38 @@ "required": true, "in": "path" } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { - "get": { + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { "type": "string", @@ -12567,38 +12602,27 @@ "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, "404": { "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "get": { - "tags": [ - "repository" - ], - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "put": { + "operationId": "repoAddTopic", "parameters": [ { "required": true, @@ -12608,112 +12632,104 @@ "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": "path" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "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" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" } }, "produces": [ "application/json" - ] + ], + "tags": [ + "repository" + ], + "summary": "Add a topic to a repository" }, - "post": { + "delete": { "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/PushMirror" + "422": { + "$ref": "#/responses/invalidTopicsError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", + "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": "owner of the repo" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" - }, - "name": "body" + "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" + "in": "path", + "description": "group ID of the repo" } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "/repos/{owner}/group/{group_id}/{repo}/branches": { "get": { + "summary": "List a repository's branches", + "operationId": "repoListBranches", "parameters": [ { "description": "owner of the repo", @@ -12725,138 +12741,201 @@ { "required": true, "type": "string", - "description": "Name of the repo", + "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" + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { "in": "query", - "enum": [ - "open", - "closed", - "all" - ], + "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", - "default": "open", - "description": "State of pull request", - "name": "state" + "description": "owner of the repo" }, { - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "recentclose", - "leastupdate", - "mostcomment", - "leastcomment", - "priority" - ], "type": "string", - "description": "Type of sort", - "name": "sort" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "description": "ID of the milestone", - "name": "milestone", - "in": "query", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchRepoOption" + } + }, + { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", - "format": "int64" + "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": [ { - "name": "labels", - "in": "query", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "multi", - "description": "Label IDs" + "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": "string", - "description": "Filter by pull request author", - "name": "poster", + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", "in": "query" }, { - "name": "page", - "in": "query", - "minimum": 1, - "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)" + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" }, { - "minimum": 0, - "type": "integer", - "description": "Page size of results", - "name": "limit", - "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", - "description": "group ID of the repo", - "name": "group_id" - } - ], - "responses": { - "500": { - "$ref": "#/responses/error" - }, - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" + "in": "path" } - }, + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repo's pull requests", - "operationId": "repoListPullRequests" - }, - "post": { - "tags": [ - "repository" - ], - "summary": "Create a pull request", - "operationId": "repoCreatePullRequest", + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", "parameters": [ { - "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "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, - "type": "string", - "description": "name of the repo" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePullRequestOption" - } + "required": true }, { "description": "group ID of the repo", @@ -12868,43 +12947,20 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/PullRequest" + "200": { + "$ref": "#/responses/Repository" }, "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}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", "parameters": [ { "type": "string", @@ -12914,18 +12970,19 @@ "required": true }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { - "name": "pageName", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", "in": "path", "required": true, - "type": "string", - "description": "name of the page" + "type": "integer" }, { "name": "group_id", @@ -12937,96 +12994,182 @@ } ], "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WikiPage" } - } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions" }, - "delete": { + "post": { "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" } }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ - "repository" + "issue" ], - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", + "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 + "required": true, + "type": "string", + "description": "owner of the repo" }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "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": "name of the page", - "name": "pageName" + "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" + "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" ] - }, - "patch": { - "operationId": "repoEditWikiPage", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { + "get": { + "operationId": "downloadArtifact", "parameters": [ { - "type": "string", "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" }, { "required": true, "type": "string", - "description": "name of the page", - "name": "pageName", + "description": "name of the repository", + "name": "repo", "in": "path" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body" + "type": "string", + "description": "id of the artifact", + "name": "artifact_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -13038,35 +13181,27 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WikiPage" + "302": { + "description": "redirect to the blob download" }, "400": { "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ + "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a wiki page" + "summary": "Downloads a specific artifact for a workflow run redirects to blob url" } }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { "get": { - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", "parameters": [ { "type": "string", @@ -13076,27 +13211,24 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/RegistrationToken" } }, "produces": [ @@ -13104,12 +13236,52 @@ ], "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}/milestones/{id}": { - "delete": { - "operationId": "issueDeleteMilestone", + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { "parameters": [ { "type": "string", @@ -13119,54 +13291,67 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "type": "string", - "description": "the milestone to delete, identified by ID and if not available by name", + "description": "id of the comment", "name": "id", "in": "path", - "required": true + "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" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } }, + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "Delete a milestone" + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment" }, - "patch": { + "delete": { "tags": [ "issue" ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone", + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "name": "repo", @@ -13176,59 +13361,53 @@ "description": "name of the repo" }, { - "description": "the milestone to edit, identified by ID and if not available by name", + "description": "id of the comment", "name": "id", "in": "path", "required": true, - "type": "string" + "type": "integer", + "format": "int64" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/EditMilestoneOption" - }, - "name": "body" + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/Milestone" + "204": { + "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ] }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", + "patch": { "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "type": "string", @@ -13238,62 +13417,100 @@ "required": true }, { - "description": "the milestone to get, identified by ID and if not available by name", + "type": "integer", + "format": "int64", + "description": "id of the comment", "name": "id", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "description": "group ID of the repo", - "name": "group_id", "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/Milestone" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$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}/topics/{topic}": { - "put": { + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { "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" - }, + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", + "parameters": [ { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "owner of the repo", + "name": "owner", "in": "path", "required": true }, { - "name": "topic", + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the topic to add" + "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", @@ -13305,122 +13522,91 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" + "200": { + "$ref": "#/responses/UserList" }, - "204": { - "$ref": "#/responses/empty" - } - } - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a topic from a repository", - "operationId": "repoDeleteTopic", + "summary": "List a repository's keys", + "operationId": "repoListKeys", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { - "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": "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}/teams": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", - "parameters": [ + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, { + "name": "fingerprint", + "in": "query", "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "description": "fingerprint of the key" }, { - "description": "name of the repo", - "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" }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/TeamList" + "$ref": "#/responses/DeployKeyList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { + } + }, + "post": { "tags": [ - "issue" + "repository" ], - "summary": "Delete a comment", - "operationId": "issueDeleteCommentDeprecated", - "deprecated": true, + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", "parameters": [ { "in": "path", @@ -13437,54 +13623,42 @@ "required": true }, { - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "description": "this parameter is ignored" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } }, { + "description": "group ID of the repo", + "name": "group_id", "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" + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/DeployKey" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - } - }, - "patch": { + }, "consumes": [ "application/json" ], - "deprecated": true, "produces": [ "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment", - "operationId": "issueEditCommentDeprecated", + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { + "post": { "parameters": [ { "type": "string", @@ -13501,55 +13675,45 @@ "required": true }, { + "required": true, "type": "integer", - "description": "this parameter is ignored", + "format": "int64", + "description": "index of issue to pin", "name": "index", - "in": "path", - "required": true + "in": "path" }, { + "name": "group_id", + "type": "integer", "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" + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/Comment" + "404": { + "$ref": "#/responses/notFound" }, "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", + }, + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue" + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", "parameters": [ { "name": "owner", @@ -13559,55 +13723,43 @@ "description": "owner of the repo" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "index", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request" - }, - { + "description": "index of issue to unpin", + "name": "index", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" + "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" } ], "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { "get": { "produces": [ "application/json" @@ -13615,84 +13767,92 @@ "tags": [ "repository" ], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection", + "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" + "in": "path" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/BranchProtectionList" + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" } } - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { "post": { - "operationId": "repoCreateBranchProtection", + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "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": "body", + "required": true, "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" + "$ref": "#/definitions/ApplyDiffPatchFileOptions" }, - "name": "body" + "name": "body", + "in": "body" }, { - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true } ], "responses": { - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/FileResponse" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" - }, "423": { "$ref": "#/responses/repoArchivedError" } @@ -13705,27 +13865,26 @@ ], "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}/activities/feeds": { "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "List issue's attachments", - "operationId": "issueListIssueAttachments", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -13735,78 +13894,23 @@ "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" + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" }, { "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the attachment", - "name": "name", + "description": "page number of results to return (1-based)", + "name": "page", "in": "query" }, { - "in": "formData", - "required": true, - "type": "file", - "description": "attachment to upload", - "name": "attachment" + "name": "limit", + "in": "query", + "type": "integer", + "description": "page size of results" }, { "type": "integer", @@ -13818,115 +13922,102 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "200": { + "$ref": "#/responses/ActivityFeedsList" } } } }, - "/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", + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { + "get": { + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "index", + "description": "id of the hook to get", + "name": "id", "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" - } + "type": "string" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" ], + "tags": [ + "repository" + ] + }, + "delete": { "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { - "get": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List tag protections for a repository", - "operationId": "repoListTagProtection", + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo" }, { - "type": "string", "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 }, { @@ -13937,21 +14028,18 @@ "description": "group ID of the repo", "name": "group_id" } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" - } - } + ] }, - "post": { + "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", - "in": "path", - "required": true + "name": "owner" }, { "type": "string", @@ -13960,112 +14048,93 @@ "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/CreateTagProtectionOption" + "$ref": "#/definitions/EditGitHookOption" } }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, "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", + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", "parameters": [ - { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" - }, { "type": "string", - "description": "name of the repository", - "name": "repo", + "description": "owner of the repo to transfer", + "name": "owner", "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", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "202": { + "$ref": "#/responses/Repository" } }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { "get": { "produces": [ "application/json" @@ -14073,9 +14142,8 @@ "tags": [ "repository" ], - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", "parameters": [ { "type": "string", @@ -14085,32 +14153,34 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "description": "username of the user whose tracked times are to be listed", - "name": "user", - "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, default maximum page size is 50", + "name": "limit", + "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" } ], "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, "400": { "$ref": "#/responses/error" }, @@ -14119,61 +14189,44 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { "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", + "operationId": "repoGetPullRequest", "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, "type": "string" }, { - "name": "page", - "in": "query", + "required": true, "type": "integer", - "description": "page number of results to return (1-based)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path" }, { "name": "group_id", @@ -14183,17 +14236,35 @@ "in": "path", "description": "group ID of the repo" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request" }, - "post": { + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", + "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", @@ -14203,105 +14274,131 @@ "type": "string" }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "name of the repo" }, { - "description": "index of the issue", + "type": "integer", + "format": "int64", + "description": "index of the pull request to edit", "name": "index", "in": "path", - "required": true, - "type": "string" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" + "$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" + }, "201": { - "$ref": "#/responses/Issue" + "$ref": "#/responses/PullRequest" }, - "404": { - "description": "the issue does not exist" - } - } - }, - "delete": { - "responses": { - "200": { - "$ref": "#/responses/Issue" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "post": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Unblock the issue given in the body by the issue in path", - "operationId": "issueRemoveIssueBlocking", + "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" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { + "in": "path", "required": true, - "type": "string", - "description": "index of the issue", - "name": "index", - "in": "path" + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } + "type": "string", + "description": "how to update pull request", + "name": "style", + "in": "query", + "enum": [ + "merge", + "rebase" + ] }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "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}/licenses": { + "/repos/{owner}/group/{group_id}/{repo}/milestones": { "get": { - "summary": "Get repo licenses", - "operationId": "repoGetLicenses", "parameters": [ { "type": "string", @@ -14311,24 +14408,48 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "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, - "in": "path" + "required": true } ], "responses": { "200": { - "$ref": "#/responses/LicensesList" + "$ref": "#/responses/MilestoneList" }, "404": { "$ref": "#/responses/notFound" @@ -14338,28 +14459,23 @@ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/Compare" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList" + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", "parameters": [ { "name": "owner", @@ -14369,89 +14485,47 @@ "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 + "type": "string" }, { - "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch", - "name": "name" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + } }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, "404": { "$ref": "#/responses/notFound" + }, + "201": { + "$ref": "#/responses/Milestone" } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "operationId": "repoDeleteBranchProtection", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { + "get": { "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { "description": "name of the repo", @@ -14461,11 +14535,23 @@ "type": "string" }, { - "type": "string", - "description": "name of protected branch", - "name": "name", + "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 + "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", @@ -14477,34 +14563,33 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "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": "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", + "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": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "name": "repo", @@ -14514,77 +14599,76 @@ "description": "name of the repo" }, { - "name": "name", + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true, + "required": true + }, + { "type": "string", - "description": "name of protected branch" + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - } + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/BranchProtection" + "$ref": "#/responses/TimelineList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" - ] + ], + "tags": [ + "issue" + ], + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline" } }, - "/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" - ], + "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription", + "summary": "List the Git hooks in a repository", + "operationId": "repoListGitHooks", "parameters": [ { "type": "string", @@ -14594,70 +14678,42 @@ "required": true }, { + "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" + "in": "path" }, { - "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" } - ] - }, - "delete": { + ], "responses": { "200": { - "description": "Already unsubscribed" - }, - "201": { - "description": "Successfully Unsubscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" + "$ref": "#/responses/GitHookList" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", + } + } + }, + "/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", - "description": "owner of the repo" + "type": "string" }, { "type": "string", @@ -14667,70 +14723,101 @@ "required": true }, { - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "index of the issue", - "name": "index" + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true }, { - "type": "string", - "description": "username of the user to unsubscribe from an issue", - "name": "user", - "in": "path", + "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" + "required": true + } + ], + "responses": { + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { + }, + "delete": { "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", - "required": true + "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/UpdateRepoAvatarOption" + "$ref": "#/definitions/PullReviewRequestOptions" } }, { - "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" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ @@ -14739,45 +14826,57 @@ "tags": [ "repository" ], - "summary": "Update avatar", - "operationId": "repoUpdateAvatar" - }, - "delete": { + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "get": { "tags": [ "repository" ], - "summary": "Delete avatar", - "operationId": "repoDeleteAvatar", + "summary": "Get repository permissions for a user", + "operationId": "repoGetRepoPermissions", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", + "in": "path", + "required": true + }, + { "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "name of the repo", + "name": "repo" }, { - "name": "repo", + "name": "collaborator", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "username of the collaborator whose permissions are to be obtained" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" } }, "produces": [ @@ -14785,16 +14884,8 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses, by branch/tag/commit reference", - "operationId": "repoListStatusesByRef", "parameters": [ { "type": "string", @@ -14805,68 +14896,36 @@ }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "in": "path", "required": true, - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref" + "type": "integer", + "description": "runid of the workflow run", + "name": "run", + "in": "path" }, { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], "type": "string", - "description": "type of sort", - "name": "sort", + "description": "name of the artifact", + "name": "name", "in": "query" }, { - "type": "string", - "description": "type of state", - "name": "state", - "in": "query", - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ] - }, - { + "description": "group ID of the repo", + "name": "group_id", "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" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/CommitStatusList" + "$ref": "#/responses/ArtifactsList" }, "400": { "$ref": "#/responses/error" @@ -14874,178 +14933,119 @@ "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" - } - ], + "summary": "Lists all artifacts for a repository run", + "operationId": "getArtifactsOfRun" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/assignees": { + "get": { "responses": { - "200": { - "$ref": "#/responses/Branch" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/UserList" } - } - }, - "delete": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", + "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": "owner of the repo" + "required": true }, { - "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" + "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" } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { + "post": { + "consumes": [ + "application/json" ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "summary": "Rename a branch", - "operationId": "repoRenameBranch", + "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", - "required": true + "in": "path" }, { - "type": "string", - "description": "name of the repo", - "name": "repo", "in": "path", - "required": true - }, - { + "required": true, "type": "string", - "description": "name of the branch", - "name": "branch", - "in": "path", - "required": true + "description": "name of the repo", + "name": "repo" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/RenameBranchRepoOption" + "$ref": "#/definitions/UpdateBranchProtectionPriories" } }, { - "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" }, "422": { "$ref": "#/responses/validationError" }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } } } From 12a0ddc6156d8602dcf15a20e15c6228be255e36 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/168] 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 b25a704bec28f..766c70a14b6ae 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 60d2bf0053d4614e5ea227c0e0a52b687d02cd21 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/168] update group swagger definitions --- templates/swagger/v1_groups.json | 14030 ++++++++++++++--------------- 1 file changed, 7015 insertions(+), 7015 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 5bf56d2120221..0a73b3e46fa5e 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,11 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "integer", @@ -32,39 +25,26 @@ "in": "query" }, { + "type": "integer", "description": "page size of results", "name": "limit", - "in": "query", - "type": "integer" + "in": "query" }, { + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/TopicNames" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "responses": { - "204": { - "$ref": "#/responses/empty" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" } }, "produces": [ @@ -73,8 +53,12 @@ "tags": [ "repository" ], - "summary": "Replace list of topics for a repository", - "operationId": "repoUpdateTopics", + "summary": "List a repository's collaborators" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "get": { + "operationId": "getWorkflowRuns", "parameters": [ { "type": "string", @@ -84,64 +68,94 @@ "required": true }, { + "type": "string", + "description": "name of the repository", + "name": "repo", "in": "path", - "required": true, + "required": true + }, + { "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "workflow event name", + "name": "event", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/RepoTopicOptions" - } + "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", + "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" + "format": "int64", + "required": true } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { - "patch": { + ], "responses": { "200": { - "$ref": "#/responses/WikiPage" + "$ref": "#/responses/WorkflowRunsList" }, "400": { "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ + "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a wiki page", - "operationId": "repoEditWikiPage", + "summary": "Lists all runs for a repository run" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -151,69 +165,24 @@ "required": true }, { - "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" - }, - { - "name": "body", - "in": "body", "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } + "$ref": "#/definitions/UpdateRepoAvatarOption" + }, + "name": "body", + "in": "body" }, { - "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" + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/WikiPage" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" @@ -221,11 +190,28 @@ }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] }, "delete": { - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", "parameters": [ { "type": "string", @@ -242,57 +228,27 @@ "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", - "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" + "required": true } - }, - "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": [ { + "required": true, + "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { "type": "string", @@ -302,30 +258,30 @@ "required": true }, { - "type": "string", - "description": "SHA of the commit to get", "name": "sha", "in": "path", - "required": true + "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": "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { @@ -335,109 +291,81 @@ "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/licenses": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/LicensesList" - }, - "404": { - "$ref": "#/responses/notFound" - } }, "produces": [ - "application/json" + "text/plain" ], "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": { + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Check if a team is assigned to a repository", - "operationId": "repoCheckTeam", + "summary": "Update a label", + "operationId": "issueEditLabel", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repo" }, { "in": "path", "required": true, - "type": "string", - "description": "team name", - "name": "team" + "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", - "required": true + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/Team" - }, "404": { "$ref": "#/responses/notFound" }, - "405": { - "$ref": "#/responses/error" + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Label" } } }, - "put": { - "summary": "Add a team to a repository", - "operationId": "repoAddTeam", + "get": { + "operationId": "issueGetLabel", "parameters": [ { "type": "string", @@ -447,18 +375,19 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "description": "team name", - "name": "team", + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", "in": "path", - "required": true, - "type": "string" + "required": true }, { "description": "group ID of the repo", @@ -470,99 +399,80 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/Label" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" } }, "produces": [ "application/json" ], "tags": [ - "repository" - ] + "issue" + ], + "summary": "Get a single label" }, "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam", + "operationId": "issueDeleteLabel", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "type": "string" }, { + "name": "id", "in": "path", "required": true, - "type": "string", - "description": "team name", - "name": "team" + "type": "integer", + "format": "int64", + "description": "id of the label to delete" }, { - "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": { - "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" + "issue" ], - "summary": "Create a workflow dispatch event", - "operationId": "ActionsDispatchWorkflow", + "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": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "name": "repo", @@ -572,48 +482,48 @@ "description": "name of the repo" }, { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", "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" + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "409": { + "description": "Cannot cancel a non-existent stopwatch" }, "204": { - "description": "No Content" + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "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/comments/{id}/assets": { + "/repos/{owner}/group/{group_id}/{repo}/issues": { "get": { "produces": [ "application/json" @@ -621,117 +531,169 @@ "tags": [ "issue" ], - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", + "summary": "List a repository's issues", + "operationId": "issueListIssues", "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", + "name": "repo", "in": "path", - "required": true + "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" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/IssueList" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } } }, "post": { - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], "tags": [ "issue" ], - "summary": "Create a comment attachment", - "operationId": "issueCreateIssueCommentAttachment", + "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 + "description": "owner of the repo", + "name": "owner" }, { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" }, { - "description": "name of the attachment", - "name": "name", - "in": "query", - "type": "string" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } }, { - "name": "attachment", - "in": "formData", "required": true, - "type": "file", - "description": "attachment to upload" - }, - { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, "403": { "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, - "413": { + "412": { "$ref": "#/responses/error" }, "422": { @@ -741,218 +703,241 @@ "$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" + "$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": "Create a file in a repository", - "operationId": "repoCreateFile", + "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": "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" + "type": "string" }, { - "in": "path", "required": true, "type": "string", - "description": "path of the file to create", - "name": "filepath" + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateFileOptions" - } + "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", - "format": "int64", + "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" + "name": "group_id", + "type": "integer", + "format": "int64" } - ] - }, - "delete": { - "produces": [ - "application/json" ], + "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": [ - "repository" + "issue" ], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "type": "string", - "description": "path of the file to delete", - "name": "filepath", + "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, - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - }, - "name": "body", - "in": "body" + "type": "integer" }, { + "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "name": "group_id" } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Attachment" }, "404": { "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" } }, - "consumes": [ + "produces": [ "application/json" ] }, - "get": { + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "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", + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "path of the dir, file, symlink or submodule in the repo", - "name": "filepath", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" }, { - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", - "name": "ref", - "in": "query" + "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, - "in": "path" + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/ContentsResponse" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } - }, - "description": "This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead." + } }, - "put": { + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Update a file in a repository if SHA is set, or create the file if SHA is not set", - "operationId": "repoUpdateFile", + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", "parameters": [ { "description": "owner of the repo", @@ -969,75 +954,60 @@ "type": "string" }, { - "type": "string", - "description": "path of the file to update", - "name": "filepath", + "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", - "required": true, "schema": { - "$ref": "#/definitions/UpdateFileOptions" + "$ref": "#/definitions/EditAttachmentOptions" } }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/FileResponse" + "423": { + "$ref": "#/responses/repoArchivedError" }, "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" - }, - "422": { "$ref": "#/responses/error" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "422": { + "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { "get": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/VariableList" - } - }, - "produces": [ - "application/json" - ], "tags": [ - "repository" + "issue" ], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline", "parameters": [ { "type": "string", @@ -1047,17 +1017,32 @@ "required": true }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", + "required": true + }, + { "required": true, - "type": "string" + "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" + "in": "query" }, { "type": "integer", @@ -1066,194 +1051,187 @@ "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", - "format": "int64" + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TimelineList" + }, + "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, + "/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 + "in": "path" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "in": "path", - "required": true, "type": "integer", - "description": "this parameter is ignored", - "name": "index" - }, - { "format": "int64", - "description": "id of comment to delete", - "name": "id", + "description": "index of the issue to create the stopwatch on", + "name": "index", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "204": { + "201": { "$ref": "#/responses/empty" }, "403": { - "$ref": "#/responses/forbidden" + "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" } - } - }, - "patch": { + }, + "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/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/LanguageStatistics" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], - "summary": "Edit a comment", "tags": [ - "issue" + "repository" ], - "operationId": "issueEditCommentDeprecated", - "deprecated": true, + "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": "owner of the repo" + "required": true }, { - "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": "group_id", "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" + "description": "group ID of the repo" } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "/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": "Dismiss a review for a pull request", - "operationId": "repoDismissPullReview", + "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" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "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": "id of the review", - "name": "id" + "required": true }, { "name": "body", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" + "$ref": "#/definitions/CreateStatusOption" } }, { @@ -1264,40 +1242,16 @@ "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" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "name": "repo", @@ -1306,188 +1260,137 @@ "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" + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true }, { - "enum": [ - "issues", - "pulls" - ], "type": "string", - "description": "filter by type (issues / pulls) if set", - "name": "type", - "in": "query" - }, - { - "name": "milestones", + "description": "type of sort", + "name": "sort", "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" + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ] }, { - "format": "date-time", - "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", + "description": "type of state", + "name": "state", "in": "query", + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], "type": "string" }, { - "name": "created_by", + "name": "page", "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" + "description": "page number of results to return (1-based)" }, { - "in": "query", "type": "integer", "description": "page size of results", - "name": "limit" + "name": "limit", + "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/IssueList" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/CommitStatusList" } }, "produces": [ "application/json" - ] - }, - "post": { - "consumes": [ - "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": [ - "issue" + "repository" ], - "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueCreateIssue", + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "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" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueOption" - } + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/WikiPage" }, "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" - ], + }, + "delete": { "tags": [ - "issue" + "repository" ], - "summary": "Get a list reactions of an issue", - "operationId": "issueGetIssueReactions", + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", "parameters": [ { "type": "string", @@ -1497,44 +1400,34 @@ "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 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", + "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", - "format": "int64" + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/ReactionList" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" @@ -1544,16 +1437,16 @@ } } }, - "post": { - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction", + "patch": { + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo" }, { "type": "string", @@ -1564,18 +1457,17 @@ }, { "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", + "type": "string", + "description": "name of the page", + "name": "pageName", "in": "path" }, { - "name": "content", "in": "body", "schema": { - "$ref": "#/definitions/EditReactionOption" - } + "$ref": "#/definitions/CreateWikiPageOptions" + }, + "name": "body" }, { "name": "group_id", @@ -1587,8 +1479,11 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Reaction" + "200": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" @@ -1596,109 +1491,89 @@ "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/Reaction" + "423": { + "$ref": "#/responses/repoArchivedError" } }, "consumes": [ "application/json" ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" - ] - }, - "delete": { - "tags": [ - "issue" + "repository" ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction", + "summary": "Downloads the job logs for a workflow run", + "operationId": "downloadActionsRunJobLogs", "parameters": [ { + "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "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" }, { - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/empty" + "description": "output blob content" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "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" - } - }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Return all users that can be requested to review in this repo", - "operationId": "repoGetReviewers", + "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": "owner of the repo", - "name": "owner" + "type": "string" }, { "in": "path", @@ -1708,40 +1583,20 @@ "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", + "name": "index", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "integer", + "format": "int64", + "description": "index of the pull request" }, { - "name": "id", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "id of the release" + "description": "id of the review", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -1753,8 +1608,26 @@ } ], "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/PullReview" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/licenses": { + "get": { + "responses": { + "200": { + "$ref": "#/responses/LicensesList" }, "404": { "$ref": "#/responses/notFound" @@ -1766,22 +1639,44 @@ "tags": [ "repository" ], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments" - }, - "post": { - "consumes": [ - "multipart/form-data", - "application/octet-stream" - ], + "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": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", + "summary": "Update a repo-level variable", + "operationId": "updateRepoVariable", "parameters": [ { "type": "string", @@ -1791,39 +1686,33 @@ "required": true }, { + "type": "string", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { + "name": "variablename", "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": "name of the variable" + }, + { + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + }, + "name": "body", + "in": "body" }, { - "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": { @@ -1833,108 +1722,104 @@ "404": { "$ref": "#/responses/notFound" }, - "413": { - "$ref": "#/responses/error" - }, "201": { - "$ref": "#/responses/Attachment" + "description": "response when updating a repo-level variable" + }, + "204": { + "description": "response when updating a repo-level variable" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { - "get": { + }, + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", + "summary": "Create a repo-level variable", + "operationId": "createRepoVariable", "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", + "description": "name of the repository", "name": "repo", - "in": "path" + "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" + "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}/enable": { - "put": { - "responses": { - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" + "201": { + "description": "response when creating a repo-level variable" }, "400": { "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" + "409": { + "description": "variable name already exists." }, - "404": { - "$ref": "#/responses/notFound" + "500": { + "$ref": "#/responses/error" } - }, + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Enable a workflow", - "operationId": "ActionsEnableWorkflow", + "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": "owner of the repo" + "required": true }, { "in": "path", "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo" }, { "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "description": "name of the variable", + "name": "variablename", "in": "path", "required": true }, @@ -1946,123 +1831,139 @@ "type": "integer", "format": "int64" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/contents": { - "post": { - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", + ], + "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": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repository", + "name": "repo" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } + "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 + "required": true, + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/FilesResponse" + "200": { + "$ref": "#/responses/ActionVariable" }, - "403": { + "400": { "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" - ] - }, + ], + "summary": "Get a repo-level variable" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { "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", + "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" + "in": "path", + "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "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", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true }, { "type": "integer", "format": "int64", - "required": true, + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { "get": { "produces": [ "application/json" @@ -2070,8 +1971,8 @@ "tags": [ "repository" ], - "summary": "Get a release", - "operationId": "repoGetRelease", + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReview", "parameters": [ { "type": "string", @@ -2081,63 +1982,86 @@ "required": true }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "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 release to get", + "description": "id of the review", "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" } } }, - "delete": { - "summary": "Delete a release", - "operationId": "repoDeleteRelease", + "post": { + "operationId": "repoSubmitPullReview", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true, "type": "integer", + "format": "int64" + }, + { "format": "int64", - "description": "id of the release to delete", + "description": "id of the review", "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + } }, { "description": "group ID of the repo", @@ -2149,8 +2073,8 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" @@ -2159,51 +2083,53 @@ "$ref": "#/responses/validationError" } }, + "produces": [ + "application/json" + ], "tags": [ "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" ], + "summary": "Submit a pending review to an pull request" + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Update a release", - "operationId": "repoEditRelease", + "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": "owner of the repo" + "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { "type": "integer", "format": "int64", - "description": "id of the release to edit", - "name": "id", + "description": "index of the pull request", + "name": "index", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReleaseOption" - } + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" }, { "description": "group ID of the repo", @@ -2215,18 +2141,28 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Release" - }, "404": { "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { "get": { - "operationId": "repoGetCombinedStatusByRef", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", "parameters": [ { "type": "string", @@ -2237,18 +2173,11 @@ }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "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)", @@ -2256,41 +2185,78 @@ "in": "query" }, { - "in": "query", "type": "integer", "description": "page size of results", - "name": "limit" + "name": "limit", + "in": "query" }, { + "name": "group_id", + "type": "integer", "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } ], "responses": { + "404": { + "$ref": "#/responses/notFound" + }, "200": { - "$ref": "#/responses/CombinedStatus" + "$ref": "#/responses/VariableList" }, "400": { "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get a commit's combined status, by branch/tag/commit reference" + "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": { + "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { "get": { "produces": [ "application/json" @@ -2298,15 +2264,15 @@ "tags": [ "repository" ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", + "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" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "type": "string", @@ -2316,95 +2282,169 @@ "required": true }, { - "format": "int64", + "in": "path", + "required": true, + "type": "string", + "description": "team name", + "name": "team" + }, + { "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/TeamList" + "$ref": "#/responses/Team" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { + }, + "put": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Merge a branch from upstream", - "operationId": "repoMergeUpstream", + "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" }, { - "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/MergeUpstreamResponse" - }, - "400": { - "$ref": "#/responses/error" + "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}/actions/workflows/{workflow_id}": { + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { "get": { + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", + "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": "owner of the repo" + "required": true }, { "in": "path", @@ -2414,44 +2454,17 @@ "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" + "in": "path", + "description": "group ID of the repo" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { "get": { "produces": [ "application/json" @@ -2459,74 +2472,80 @@ "tags": [ "repository" ], - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "required": true, "type": "string", - "description": "username of the user whose tracked times are to be listed", - "name": "user", - "in": "path" + "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" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/TrackedTimeList" + "$ref": "#/responses/GitTreeResponse" }, "400": { "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/registration-token": { "get": { - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a single label", - "operationId": "issueGetLabel", + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", "parameters": [ { "type": "string", @@ -2536,66 +2555,44 @@ "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 }, { + "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" } - ] - }, - "delete": { + ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/RegistrationToken" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label", - "operationId": "issueDeleteLabel", + } + }, + "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, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "required": true, "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" + "in": "path" }, { "description": "group ID of the repo", @@ -2605,10 +2602,23 @@ "required": true, "in": "path" } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] - }, - "patch": { - "operationId": "issueEditLabel", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "operationId": "repoGetRepoPermissions", "parameters": [ { "in": "path", @@ -2625,122 +2635,103 @@ "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" + "type": "string", + "description": "username of the collaborator whose permissions are to be obtained", + "name": "collaborator" }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, "200": { - "$ref": "#/responses/Label" + "$ref": "#/responses/RepoCollaboratorPermission" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Update a label" + "summary": "Get repository permissions for a user" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "operationId": "moveIssuePin", + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "get": { + "operationId": "repoCheckCollaborator", "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" - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue", - "name": "index", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "type": "string", + "description": "username of the user to check for being a collaborator", + "name": "collaborator", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position" + "required": true }, { + "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": { - "404": { - "$ref": "#/responses/notFound" - }, "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Moves the Pin to the given Position" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { - "get": { + "summary": "Check if a user is a collaborator of a repository" + }, + "put": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Downloads the job logs for a workflow run", - "operationId": "downloadActionsRunJobLogs", + "summary": "Add or Update a collaborator to a repository", + "operationId": "repoAddCollaborator", "parameters": [ { "type": "string", @@ -2750,19 +2741,26 @@ "required": true }, { - "name": "repo", - "in": "path", "required": true, "type": "string", - "description": "name of the repository" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { - "type": "integer", - "description": "id of the job", - "name": "job_id", + "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", @@ -2773,100 +2771,87 @@ } ], "responses": { - "200": { - "description": "output blob content" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs", + }, + "delete": { + "operationId": "repoDeleteCollaborator", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "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": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true }, { "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", - "format": "int64", - "required": true + "name": "group_id" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "422": { + "$ref": "#/responses/validationError" }, - "200": { - "$ref": "#/responses/WorkflowJobsList" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { - "get": { + }, "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 all of a repository's labels", - "operationId": "issueListLabels", + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -2876,59 +2861,78 @@ "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true, + "type": "integer" }, { + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } - } + }, + "produces": [ + "application/json" + ] }, - "post": { - "summary": "Create a label", - "operationId": "issueCreateLabel", + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } + "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", @@ -2940,44 +2944,30 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Label" - }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" }, - "422": { - "$ref": "#/responses/validationError" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "204": { + "$ref": "#/responses/empty" } }, - "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", + }, + "patch": { + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { "type": "string", @@ -2987,55 +2977,79 @@ "required": true }, { - "in": "path", "required": true, - "type": "string", - "description": "branch to delete", - "name": "branch" + "type": "integer", + "format": "int64", + "description": "id of the comment", + "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" + } + }, + { "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" + "201": { + "$ref": "#/responses/Attachment" }, - "403": { + "404": { "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - } - }, - "patch": { + }, "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Rename a branch", - "operationId": "repoRenameBranch", + "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": "owner of the repo" + "required": true }, { "required": true, @@ -3045,59 +3059,34 @@ "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/ReferenceList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", + "operationId": "issueGetCommentReactions", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "description": "name of the repo", @@ -3107,99 +3096,119 @@ "type": "string" }, { - "name": "branch", + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", "in": "path", - "required": true, - "type": "string", - "description": "branch to get" + "required": true }, { - "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/Branch" + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { - "get": { + }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a note corresponding to a single commit from a repository", - "operationId": "repoGetNote", + "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", - "description": "owner of the repo" + "type": "string" }, { - "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", - "required": true + "description": "name of the repo" }, { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" }, { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" + "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" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/Note" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { + }, + "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", @@ -3209,26 +3218,26 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "format": "int64", - "description": "index of the issue", - "name": "index", + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "name": "body", - "in": "body", "schema": { - "$ref": "#/definitions/LockIssueOption" - } + "$ref": "#/definitions/EditReactionOption" + }, + "name": "content", + "in": "body" }, { "description": "group ID of the repo", @@ -3240,7 +3249,7 @@ } ], "responses": { - "204": { + "200": { "$ref": "#/responses/empty" }, "403": { @@ -3252,54 +3261,39 @@ }, "consumes": [ "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Lock an issue", - "operationId": "issueLockIssue" - }, - "delete": { - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", + ] + } + }, + "/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", - "name": "owner", - "in": "path" + "description": "owner of the repo to transfer" }, { - "type": "string", - "description": "name of the repo", + "description": "name of the repo to transfer", "name": "repo", "in": "path", - "required": true - }, - { - "description": "index of the issue", - "name": "index", - "in": "path", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "202": { + "$ref": "#/responses/Repository" }, "403": { "$ref": "#/responses/forbidden" @@ -3308,24 +3302,42 @@ "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" - ] + "repository" + ], + "summary": "Accept a repo transfer" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "/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": [ - "repository" + "issue" ], - "summary": "Cancel to dismiss a review for a pull request", - "operationId": "repoUnDismissPullReview", + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction", "parameters": [ { "type": "string", @@ -3335,27 +3347,26 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { - "format": "int64", - "description": "index of the pull request", + "description": "index of the issue", "name": "index", "in": "path", "required": true, - "type": "integer" + "type": "integer", + "format": "int64" }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review" + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } }, { "description": "group ID of the repo", @@ -3365,40 +3376,21 @@ "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": { + }, + "delete": { "tags": [ - "repository" + "issue" ], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -3408,63 +3400,59 @@ "required": true }, { + "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request to get", + "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" - }, - { - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query", - "type": "boolean" + "in": "path" }, { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + }, "get": { - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", "parameters": [ { "type": "string", @@ -3474,119 +3462,119 @@ "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": "index of the issue", "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64" }, { - "name": "attachment_id", - "in": "path", - "required": true, + "in": "query", "type": "integer", - "format": "int64", - "description": "id of the attachment to get" + "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { + "put": { + "operationId": "ActionsEnableWorkflow", "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 }, { - "name": "index", "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" + "type": "string", + "description": "name of the repo", + "name": "repo" }, { - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" } - } - }, - "patch": { + }, + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", + "summary": "Enable a workflow" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { "parameters": [ { "type": "string", @@ -3596,259 +3584,268 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", + "required": true + }, + { "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the page", + "name": "pageName", + "in": "path" }, { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, "type": "integer", - "format": "int64" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "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" + "name": "group_id" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/WikiCommitList" }, "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" - ] + ], + "tags": [ + "repository" + ], + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", + "summary": "List all reviews for a pull request", + "operationId": "repoListPullReviews", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 repo" }, { - "name": "index", "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "index of the issue" + "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" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/PullReviewList" }, "404": { "$ref": "#/responses/notFound" } } }, - "put": { + "post": { "tags": [ - "issue" + "repository" ], - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", + "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": "owner of the repo" + "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "type": "integer", "format": "int64", - "description": "index of the issue", + "description": "index of the pull request", "name": "index", "in": "path", - "required": true, - "type": "integer" + "required": true }, { + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + }, "name": "body", "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "required": true }, { + "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/LabelList" + "422": { + "$ref": "#/responses/validationError" }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ] - }, - "post": { - "summary": "Add a label to an issue", - "operationId": "issueAddLabel", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags": { + "get": { + "operationId": "repoListTags", "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", - "name": "repo" + "description": "name of the repo" }, - { - "in": "path", - "required": true, + { + "in": "query", "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" + "description": "page number of results to return (1-based)", + "name": "page" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "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", - "type": "integer" + "name": "group_id" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/TagList" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" - ] + "repository" + ], + "summary": "List a repository's tags" }, - "delete": { + "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": [ - "issue" + "repository" ], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -3858,153 +3855,152 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "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" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" + "format": "int64", + "required": true, + "in": "path" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "/repos/{owner}/group/{group_id}/{repo}/subscription": { "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", "parameters": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "in": "path", "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo" }, { "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "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": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", + "required": true + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/SecretList" + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "consumes": [ - "application/json" + }, + "tags": [ + "repository" ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription" + }, + "delete": { "tags": [ "repository" ], - "summary": "Create a wiki page", - "operationId": "repoCreateWikiPage", + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", "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" - }, - { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" + "required": true }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "201": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", "parameters": [ { "type": "string", @@ -4014,102 +4010,106 @@ "required": true }, { + "type": "string", "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 create the stopwatch on", + "description": "index of the issue", "name": "index", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "201": { + "204": { "$ref": "#/responses/empty" }, + "400": { + "$ref": "#/responses/error" + }, "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot start a stopwatch again if it already exists" } }, "consumes": [ "application/json" ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "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", + "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 + "in": "path" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "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/RepoIssueConfigValidation" + "$ref": "#/responses/IssueTemplates" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { + "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { "get": { + "operationId": "repoValidateIssueConfig", "parameters": [ { "description": "owner of the repo", @@ -4126,96 +4126,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" - }, - { + "name": "group_id", "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" + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/RepoIssueConfigValidation" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions" + "summary": "Returns the validation information for a issue config" } }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { "get": { - "tags": [ - "repository" - ], - "summary": "Get a specific tag protection for the repository", - "operationId": "repoGetTagProtection", + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "type": "integer", - "description": "id of the tag protect to get", - "name": "id", + "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", - "required": true + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/TagProtection" + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" @@ -4223,40 +4196,49 @@ }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] }, "delete": { - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", + "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 + "required": true, + "type": "string" }, { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "type": "string" }, { + "in": "path", "required": true, - "type": "integer", - "description": "id of protected tag", - "name": "id", - "in": "path" + "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { @@ -4265,6 +4247,67 @@ }, "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": [ @@ -4272,153 +4315,146 @@ ], "tags": [ "repository" - ] - }, - "patch": { - "consumes": [ - "application/json" ], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName" + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditTagProtection", + "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 + "name": "owner" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "integer", - "description": "id of protected tag", - "name": "id", + "type": "string", + "description": "remote name of the pushMirror", + "name": "name", "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/TagProtection" + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { "get": { - "operationId": "issueGetIssue", + "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", - "in": "path", - "required": true + "name": "owner" }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repo" }, { - "type": "integer", - "format": "int64", - "description": "index of the issue to get", "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" }, { - "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": { "200": { - "$ref": "#/responses/Issue" + "$ref": "#/responses/WatchInfo" }, "404": { "$ref": "#/responses/notFound" } }, - "produces": [ + "consumes": [ "application/json" ], - "tags": [ - "issue" - ], - "summary": "Get an issue" - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete an issue", - "operationId": "issueDelete", + "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", - "required": true, - "type": "string" + "in": "path" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { + "in": "query", "type": "integer", - "format": "int64", - "description": "index of issue to delete", - "name": "index", - "in": "path", - "required": true + "description": "page number of results to return (1-based)", + "name": "page" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "type": "integer", @@ -4430,30 +4466,49 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/HookList" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the hooks in a repository", + "operationId": "repoListHooks" }, - "patch": { + "post": { + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueEditIssue", + "summary": "Create a hook", + "operationId": "repoCreateHook", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -4462,59 +4517,54 @@ "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" + "$ref": "#/definitions/CreateHookOption" } }, { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "get": { "responses": { + "400": { + "$ref": "#/responses/error" + }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, - "412": { - "$ref": "#/responses/error" + "409": { + "$ref": "#/responses/conflict" }, - "201": { - "$ref": "#/responses/Issue" + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/TasksList" } }, - "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", + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", "parameters": [ { "type": "string", @@ -4524,24 +4574,11 @@ "required": true }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "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" + "required": true }, { "type": "integer", @@ -4550,10 +4587,10 @@ "in": "query" }, { - "in": "query", "type": "integer", - "description": "page size of results", - "name": "limit" + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -4563,138 +4600,128 @@ "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}": { + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { "get": { - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", "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" - }, - { - "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", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true + }, + { "format": "int64", "required": true, - "in": "path" + "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": [ { - "type": "string", - "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "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 }, { - "description": "the milestone to delete, identified by ID and if not available by name", + "type": "integer", + "format": "int64", + "description": "id of the key to delete", "name": "id", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "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": { "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone" - }, - "patch": { - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone", + "summary": "List repository workflows", + "operationId": "ActionsListRepositoryWorkflows", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -4704,45 +4731,40 @@ "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", - "description": "group ID of the repo" + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/Milestone" + "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}/wiki/revisions/{pageName}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { "get": { - "tags": [ - "repository" - ], - "summary": "Get revisions of a wiki page", - "operationId": "repoGetWikiPageRevisions", + "summary": "Get an issue", + "operationId": "issueGetIssue", "parameters": [ { "name": "owner", @@ -4752,211 +4774,213 @@ "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 + "required": true, + "type": "string" }, { + "name": "index", + "in": "path", + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "index of the issue to get" }, { - "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/WikiCommitList" + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" } }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { - "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" + ] + }, + "delete": { + "tags": [ + "issue" ], - "summary": "Gets the blob of a repository.", - "operationId": "GetBlob", + "summary": "Delete an issue", + "operationId": "issueDelete", "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 }, { + "name": "index", "in": "path", "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha" - }, - { "type": "integer", "format": "int64", + "description": "index of issue to delete" + }, + { "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/GitBlobResponse" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits": { - "get": { + }, + "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": [ - "repository" + "issue" ], - "summary": "Get a list of all commits from a repository", - "operationId": "repoGetAllCommits", + "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" + "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" + "required": true, + "type": "string" }, { - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat", - "in": "query" + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue to edit" }, { - "name": "verification", - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueOption" + } }, { - "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" + } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results (ignored if used with 'path')" + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { + "in": "path", + "required": true, "type": "string", - "description": "commits that match the given specifier will not be listed.", - "name": "not", - "in": "query" + "description": "compare two branches or commits", + "name": "basehead" }, { - "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/CommitList" + "$ref": "#/responses/Compare" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { "get": { "produces": [ "application/json" @@ -4964,15 +4988,15 @@ "tags": [ "repository" ], - "summary": "List repository workflows", - "operationId": "ActionsListRepositoryWorkflows", + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "type": "string", @@ -4981,6 +5005,18 @@ "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", @@ -4992,56 +5028,44 @@ ], "responses": { "200": { - "$ref": "#/responses/ActionWorkflowList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/WikiPageList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's collaborators", - "operationId": "repoListCollaborators", "parameters": [ { + "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo" + "type": "string" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "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)" + "description": "page number of results to return (1-based)", + "name": "page" }, { "type": "integer", @@ -5050,12 +5074,12 @@ "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": { @@ -5065,18 +5089,37 @@ "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/artifacts": { + "/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", - "required": true + "in": "path" }, { "type": "string", @@ -5086,44 +5129,42 @@ "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", - "description": "name of the artifact" + "type": "string" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "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}/commits/{sha}/pull": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { "get": { - "operationId": "repoGetCommitPullRequest", "parameters": [ { "type": "string", @@ -5140,11 +5181,11 @@ "required": true }, { + "required": true, "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path", - "required": true + "description": "id of the hook to get", + "name": "id", + "in": "path" }, { "description": "group ID of the repo", @@ -5157,7 +5198,7 @@ ], "responses": { "200": { - "$ref": "#/responses/PullRequest" + "$ref": "#/responses/GitHook" }, "404": { "$ref": "#/responses/notFound" @@ -5169,114 +5210,117 @@ "tags": [ "repository" ], - "summary": "Get the merged pull request of the commit" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { - "get": { + "summary": "Get a Git hook", + "operationId": "repoGetGitHook" + }, + "delete": { "tags": [ "repository" ], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection", + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", "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 + "required": true, + "type": "string", + "description": "name of the repo" + }, + { + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path" }, { - "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" } ], "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" ] }, - "post": { + "patch": { + "operationId": "repoEditGitHook", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", "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 }, { - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - }, "name": "body", - "in": "body" + "in": "body", + "schema": { + "$ref": "#/definitions/EditGitHookOption" + } }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/GitHook" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a branch protections for a repository", - "operationId": "repoCreateBranchProtection" + "summary": "Edit a Git hook in a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { "get": { - "operationId": "issueListIssueAttachments", "parameters": [ { "type": "string", @@ -5286,64 +5330,75 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" }, { "type": "integer", - "format": "int64", - "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", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/ActivityFeedsList" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" ], "tags": [ - "issue" - ], - "summary": "List issue's attachments" - }, - "post": { - "consumes": [ - "multipart/form-data" + "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": "Create an issue attachment", - "operationId": "issueCreateIssueAttachment", + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -5353,50 +5408,39 @@ "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": "integer" }, { + "description": "id of the label to remove", + "name": "id", + "in": "path", "required": true, - "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", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" @@ -5404,20 +5448,15 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { - "put": { - "tags": [ - "repository" - ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { + "post": { "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", @@ -5427,62 +5466,58 @@ "required": true }, { - "in": "path", - "required": true, - "type": "string", - "description": "username of the user to add or update as a collaborator", - "name": "collaborator" - }, - { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - }, - "name": "body" + "$ref": "#/definitions/UpdateBranchProtectionPriories" + } }, { - "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": { "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "produces": [ + "consumes": [ "application/json" - ] - }, - "delete": { + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a collaborator from a repository", - "operationId": "repoDeleteCollaborator", + "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", - "description": "owner of the repo", - "name": "owner" + "type": "string" }, { "type": "string", @@ -5492,96 +5527,164 @@ "required": true }, { - "in": "path", - "required": true, + "name": "user", + "in": "query", "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator" + "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/GitHookList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { "get": { - "summary": "Check if a user is a collaborator of a repository", - "operationId": "repoCheckCollaborator", + "summary": "Get signing-key.gpg for given repository", + "operationId": "repoSigningKey", "parameters": [ { - "in": "path", - "required": true, - "type": "string", "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", + "name": "owner", "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 }, { - "required": true, - "in": "path", - "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "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" + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } } }, "produces": [ - "application/json" + "text/plain" ], "tags": [ "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/teams": { "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "Get a hook", - "operationId": "repoGetHook", + "summary": "List a repository's teams", + "operationId": "repoListTeams", "parameters": [ { "type": "string", @@ -5591,62 +5694,57 @@ "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 + "required": true, + "type": "string" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Hook" + "$ref": "#/responses/TeamList" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "delete": { - "operationId": "repoDeleteHook", + }, + "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", - "in": "path", - "required": true + "name": "owner" }, { - "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "description": "id of the hook to delete", - "name": "id", + "type": "string", + "description": "id of the job", + "name": "job_id", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { "description": "group ID of the repo", @@ -5658,8 +5756,11 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/WorkflowJob" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -5671,51 +5772,39 @@ "tags": [ "repository" ], - "summary": "Delete a hook in a repository" - }, - "patch": { + "summary": "Gets a specific workflow job for a workflow run", + "operationId": "getWorkflowJob" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { - "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" - } + "required": true }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/Hook" + "$ref": "#/responses/PullRequestList" }, "404": { "$ref": "#/responses/notFound" @@ -5727,15 +5816,15 @@ "tags": [ "repository" ], - "summary": "Edit a hook in a repository", - "operationId": "repoEditHook" + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests" } }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { "get": { "responses": { "200": { - "$ref": "#/responses/LanguageStatistics" + "$ref": "#/responses/ReferenceList" }, "404": { "$ref": "#/responses/notFound" @@ -5747,8 +5836,8 @@ "tags": [ "repository" ], - "summary": "Get languages and number of bytes of code written", - "operationId": "repoGetLanguages", + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", "parameters": [ { "type": "string", @@ -5765,34 +5854,90 @@ "in": "path" }, { - "name": "group_id", - "type": "integer", - "format": "int64", + "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { + "/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": { - "200": { - "$ref": "#/responses/UserList" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "get": { "tags": [ "repository" ], - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead", "parameters": [ { "type": "string", @@ -5802,52 +5947,65 @@ "required": true }, { + "type": "string", + "description": "name 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" + "required": true }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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 }, { - "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": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "put": { "produces": [ - "application/octet-stream" + "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a file from a repository", - "operationId": "repoGetRawFile", + "summary": "Lock an issue", + "operationId": "issueLockIssue", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -5857,57 +6015,57 @@ "required": true }, { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "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" + "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", + "schema": { + "$ref": "#/definitions/LockIssueOption" + } }, { - "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" } ], "responses": { - "200": { - "schema": { - "type": "file" - }, - "description": "Returns raw file content." + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { - "delete": { - "produces": [ + }, + "consumes": [ "application/json" - ], + ] + }, + "delete": { "tags": [ "issue" ], - "summary": "Remove an issue dependency", - "operationId": "issueRemoveIssueDependencies", + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "required": true, @@ -5918,18 +6076,12 @@ }, { "required": true, - "type": "string", + "type": "integer", + "format": "int64", "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", @@ -5940,148 +6092,154 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Issue" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } - } - }, + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { "get": { - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "operationId": "issueListIssueDependencies", + "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 repo", - "name": "repo", - "in": "path", - "required": true + "required": true, + "type": "string" }, { "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" + "description": "name of the repository", + "name": "repo" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", + "type": "string", + "description": "name of the artifact", + "name": "name", "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" } ], "responses": { - "200": { - "$ref": "#/responses/IssueList" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ArtifactsList" } }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ] - }, - "post": { - "operationId": "issueCreateIssueDependencies", + } + }, + "/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 + "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": "string" + "in": "path" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/Issue" + "200": { + "$ref": "#/responses/CommentList" }, "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" + ] + }, + "post": { + "consumes": [ + "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" + "issue" ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", "parameters": [ { "description": "owner of the repo", @@ -6091,11 +6249,26 @@ "type": "string" }, { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "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", @@ -6107,18 +6280,23 @@ } ], "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/IssueList" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Comment" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { "get": { - "operationId": "GetAnnotatedTag", "parameters": [ { "type": "string", @@ -6128,34 +6306,24 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true - }, - { + "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": "name of the repo" }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" @@ -6167,11 +6335,13 @@ "tags": [ "repository" ], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)" + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues" } }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { + "/repos/{owner}/group/{group_id}/{repo}": { "get": { + "operationId": "repoGet", "parameters": [ { "required": true, @@ -6181,18 +6351,11 @@ "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": "string", + "description": "name of the repo" }, { "type": "integer", @@ -6205,7 +6368,7 @@ ], "responses": { "200": { - "$ref": "#/responses/BranchProtection" + "$ref": "#/responses/Repository" }, "404": { "$ref": "#/responses/notFound" @@ -6217,99 +6380,32 @@ "tags": [ "repository" ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection" + "summary": "Get a repository" }, "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", + "summary": "Delete a repository", + "operationId": "repoDelete", "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": "owner of the repo to delete", + "name": "owner" }, - { - "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", + "description": "name of the repo to delete", "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, @@ -6320,207 +6416,133 @@ } ], "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" + "204": { + "$ref": "#/responses/empty" }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "403": { + "$ref": "#/responses/forbidden" }, - { - "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": { + } + }, + "patch": { "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", + "description": "owner of the repo to edit", + "name": "owner", "in": "path", "required": true }, { + "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": "name of the repo to edit" + }, + { + "schema": { + "$ref": "#/definitions/EditRepoOption" + }, + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body" }, { - "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": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ - "application/octet-stream" + "application/json" ], "tags": [ "repository" ], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS" + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit" } }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { "get": { "tags": [ - "repository" + "issue" ], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "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": "sha of the commit", - "name": "sha", - "in": "path" + "description": "optional filter by user (available for issue managers)" }, { - "type": "boolean", - "description": "show all directories and files", - "name": "recursive", - "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" }, { + "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; 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": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "description": "number of items per page", - "name": "per_page", + "description": "page size of results", + "name": "limit", "in": "query", "type": "integer" }, @@ -6534,34 +6556,26 @@ } ], "responses": { - "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" } }, "produces": [ "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "get": { - "consumes": [ - "application/json" - ], + }, + "post": { "produces": [ "application/json" ], "tags": [ - "notification" + "issue" ], - "summary": "List users's notification threads on a specific repo", - "operationId": "notifyGetRepoList", + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", "parameters": [ { "description": "owner of the repo", @@ -6571,86 +6585,55 @@ "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", + "required": true, "type": "string", - "format": "date-time" + "description": "name of the repo" }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" }, { - "description": "page size of results", - "name": "limit", - "in": "query", - "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", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/NotificationThreadList" + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - } + }, + "consumes": [ + "application/json" + ] }, - "put": { + "delete": { "consumes": [ "application/json" ], @@ -6658,134 +6641,128 @@ "application/json" ], "tags": [ - "notification" + "issue" ], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", + "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": "owner of the repo" + "required": true }, { + "type": "string", + "description": "name 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." + "required": true }, { - "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" + "description": "index of the issue to add tracked time to", + "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { - "put": { - "operationId": "updateRepoVariable", + "/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", - "in": "path", - "required": true + "name": "owner" }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "name": "variablename", - "in": "path", - "required": true, - "type": "string", - "description": "name of the variable" + "in": "query", + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } + "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", - "description": "group ID of the repo" + "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" + "200": { + "$ref": "#/responses/ReleaseList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a repo-level variable" + } }, "post": { + "summary": "Create a release", + "operationId": "repoCreateRelease", "parameters": [ { "required": true, @@ -6795,24 +6772,17 @@ "in": "path" }, { + "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true + "in": "path" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateVariableOption" + "$ref": "#/definitions/CreateReleaseOption" } }, { @@ -6826,141 +6796,202 @@ ], "responses": { "201": { - "description": "response when creating a repo-level variable" + "$ref": "#/responses/Release" }, - "400": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" }, "409": { - "description": "variable name already exists." - }, - "500": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } }, - "produces": [ + "consumes": [ "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", + ] + } + }, + "/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, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repo" }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the variable", - "name": "variablename" + "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" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "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" - } - } - }, - "get": { - "responses": { - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/CommitList" }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/ActionVariable" + "409": { + "$ref": "#/responses/EmptyRepository" } }, "produces": [ "application/json" ], + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { "tags": [ "repository" ], - "summary": "Get a repo-level variable", - "operationId": "getRepoVariable", + "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" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", "required": true }, { "type": "string", - "description": "name of the variable", - "name": "variablename", + "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", - "format": "int64", - "required": true + "type": "integer" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { + "/repos/{owner}/group/{group_id}/{repo}/milestones": { "get": { - "operationId": "repoGetFileContents", + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", "parameters": [ { "type": "string", @@ -6970,67 +7001,81 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "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": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", - "name": "ref", + "description": "filter by milestone name", + "name": "name", "in": "query" }, { "in": "query", - "required": true, - "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body" + "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", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, "404": { "$ref": "#/responses/notFound" + } + } + }, + "post": { + "responses": { + "201": { + "$ref": "#/responses/Milestone" }, - "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": [ + "consumes": [ "application/json" ], - "tags": [ - "repository" - ], - "summary": "Get the metadata and contents of requested files" - }, - "post": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { "type": "string", @@ -7039,51 +7084,29 @@ "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" + "$ref": "#/definitions/CreateMilestoneOption" } }, { + "required": true, + "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/ContentsListResponse" + "format": "int64" } - }, - "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}": { + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { "get": { "responses": { "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" @@ -7093,44 +7116,48 @@ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", + "summary": "Get a milestone", + "operationId": "issueGetMilestone", "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 + "required": true, + "type": "string", + "description": "name of the repo" }, { - "type": "string", - "description": "remote name of push mirror", - "name": "name", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id" }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ] }, "delete": { - "operationId": "repoDeletePushMirror", + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", "parameters": [ { "in": "path", @@ -7140,104 +7167,100 @@ "name": "owner" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "string", - "description": "remote name of the pushMirror", - "name": "name", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "204": { "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "responses": { + "200": { + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "deletes a push mirror from a repository by remoteName" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { - "get": { + "summary": "Update a milestone", + "operationId": "issueEditMilestone", "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": "string", - "description": "id of the job", - "name": "job_id", + "description": "the milestone to edit, identified by ID and if not available by name", + "name": "id", "in": "path", "required": true }, { - "format": "int64", - "required": true, - "in": "path", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + }, + { "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "/repos/{owner}/group/{group_id}/{repo}/contents": { "get": { + "operationId": "repoGetContentsList", "parameters": [ { "type": "string", @@ -7247,145 +7270,129 @@ "required": true }, { + "type": "string", "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", + "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", "name": "ref", - "in": "path", - "required": true + "in": "query" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/ReferenceList" + "$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": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { - "get": { + "summary": "Gets the metadata of all the entries of the root dir." + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", + "summary": "Modify multiple files in a repository", + "operationId": "repoChangeFiles", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "description": "name of the repo", "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" + "type": "string" }, { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/ChangedFileList" + "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}/issues/{index}/comments": { + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { "get": { + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", @@ -7395,78 +7402,91 @@ "required": true }, { - "name": "index", - "in": "path", - "required": true, + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "index of the issue" - }, + "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", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query" + "description": "owner of the repo", + "name": "owner" }, { "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", - "in": "query" + "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", - "required": true, - "in": "path" + "format": "int64" } ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { "responses": { "404": { "$ref": "#/responses/notFound" }, + "422": { + "$ref": "#/responses/validationError" + }, "423": { "$ref": "#/responses/repoArchivedError" }, "201": { - "$ref": "#/responses/Comment" + "$ref": "#/responses/BranchProtection" }, "403": { "$ref": "#/responses/forbidden" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { "tags": [ - "issue" + "repository" ], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment", + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits", "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", @@ -7476,41 +7496,61 @@ "required": true }, { - "name": "index", - "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "index of the issue" + "description": "index of the pull request to get", + "name": "index", + "in": "path" }, { - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - }, - "name": "body", - "in": "body" + "type": "integer", + "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", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { - "post": { + ], "responses": { "404": { "$ref": "#/responses/notFound" }, - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/CommitList" } }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { "produces": [ "application/json" ], @@ -7528,156 +7568,153 @@ "required": true }, { - "required": true, - "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { + "in": "path", + "required": true, "type": "integer", "format": "int64", "description": "id of the hook to test", - "name": "id", - "in": "path", - "required": true + "name": "id" }, { - "type": "string", "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", "name": "ref", - "in": "query" + "in": "query", + "type": "string" }, { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { - "get": { + ], "responses": { - "200": { - "$ref": "#/responses/CommentList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "delete": { + "operationId": "issueDeleteComment", "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" + "description": "owner of the repo" }, { + "in": "path", + "required": true, "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" + "description": "name of the repo", + "name": "repo" }, { + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", - "required": true, - "in": "path" + "format": "int64" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { - "get": { + ], + "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": [ - "repository" + "issue" ], - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", + "summary": "Edit a comment", + "operationId": "issueEditComment", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } }, { - "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": { - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" @@ -7685,126 +7722,140 @@ "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/PushMirrorList" + "423": { + "$ref": "#/responses/repoArchivedError" } } }, - "post": { - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - } - }, - "consumes": [ - "application/json" - ], + "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", + "summary": "Get a comment", + "operationId": "issueGetComment", "parameters": [ { + "required": true, + "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { + "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/CreatePushMirrorOption" - } + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id" }, { - "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" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" ], - "summary": "Get repo-level runners", - "operationId": "getRepoRunners", + "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": [ { - "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" + "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 + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { + }, + "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, - "type": "string", - "description": "owner of the repo" + "required": true }, { "name": "repo", @@ -7814,19 +7865,26 @@ "description": "name of the repo" }, { - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true }, { - "description": "username of the user to subscribe the issue to", - "name": "user", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", "in": "path", "required": true, - "type": "string" + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } }, { "required": true, @@ -7838,17 +7896,17 @@ } ], "responses": { - "304": { - "description": "User can only subscribe itself if he is no admin" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, "200": { - "description": "Already subscribed" + "$ref": "#/responses/Comment" }, - "201": { - "description": "Successfully Subscribed" + "204": { + "$ref": "#/responses/empty" } }, "consumes": [ @@ -7860,49 +7918,54 @@ "tags": [ "issue" ], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription" - }, - "delete": { - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", + "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": [ { - "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" + "type": "string" }, { "type": "string", - "description": "username of the user to unsubscribe from an issue", - "name": "user", + "description": "filepath of file to get", + "name": "filepath", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "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" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { @@ -7910,37 +7973,23 @@ "$ref": "#/responses/notFound" }, "200": { - "description": "Already unsubscribed" - }, - "201": { - "description": "Successfully Unsubscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" + "description": "success" } - }, - "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", + "/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", - "required": true + "in": "path" }, { "type": "string", @@ -7950,27 +7999,30 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "id of the runner", - "name": "runner_id" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "204": { - "description": "runner has been deleted" + "200": { + "$ref": "#/responses/TrackedTimeList" }, "400": { "$ref": "#/responses/error" @@ -7982,47 +8034,45 @@ "tags": [ "repository" ] - }, - "get": { - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner", + } + }, + "/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", + "description": "owner of the repo to transfer", "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", + "description": "name of the repo to transfer", + "name": "repo", "in": "path", "required": true }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Repository" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -8030,13 +8080,10 @@ }, "produces": [ "application/json" - ], - "tags": [ - "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { "get": { "produces": [ "application/json" @@ -8044,42 +8091,35 @@ "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, + "summary": "Get repo-level runners", + "operationId": "getRepoRunners", + "parameters": [ + { "type": "string", - "description": "name of the repository" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "id of the run", - "name": "run", + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/WorkflowRun" + "$ref": "#/definitions/ActionRunnersResponse" }, "400": { "$ref": "#/responses/error" @@ -8088,64 +8128,76 @@ "$ref": "#/responses/notFound" } } - }, - "delete": { + } + }, + "/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": [ - "repository" + "issue" ], - "summary": "Delete a workflow run", - "operationId": "deleteActionRun", + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch", "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 repository", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "required": true, "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path", - "required": true + "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", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" + "in": "path" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { - "delete": { - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow", "parameters": [ { "name": "owner", @@ -8162,34 +8214,60 @@ "name": "repo" }, { - "name": "index", + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on" + "required": true }, { + "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": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/ActionWorkflow" + }, + "400": { + "$ref": "#/responses/error" }, "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, - "409": { - "description": "Cannot cancel a non-existent stopwatch" + "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": [ @@ -8199,20 +8277,58 @@ "application/json" ], "tags": [ - "issue" + "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" + } ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + }, "get": { "produces": [ - "text/plain" + "application/json" ], "tags": [ "repository" ], - "summary": "Get signing-key.pub for given repository", - "operationId": "repoSigningKeySSH", + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection", "parameters": [ { "type": "string", @@ -8228,6 +8344,13 @@ "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", @@ -8239,26 +8362,18 @@ ], "responses": { "200": { - "description": "ssh public key", - "schema": { - "type": "string" - } + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { - "post": { + }, + "delete": { "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" } @@ -8269,81 +8384,95 @@ "tags": [ "repository" ], - "summary": "Sync all push mirrored repository", - "operationId": "repoPushMirrorSync", + "summary": "Delete a specific branch protection for the repository", + "operationId": "repoDeleteBranchProtection", "parameters": [ { + "in": "path", + "required": true, "type": "string", - "description": "owner of the repo to sync", - "name": "owner", + "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 to sync", - "name": "repo", + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + "post": { "tags": [ - "repository" - ], - "summary": "Gets a specific artifact for a workflow run", - "operationId": "getArtifact", + "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" + "required": true }, { - "description": "name of the repository", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { + "description": "index of the issue", + "name": "index", "in": "path", "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" + "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", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/Artifact" - }, - "400": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, "produces": [ @@ -8351,29 +8480,36 @@ ] }, "delete": { - "summary": "Deletes a specific artifact for a workflow run", - "operationId": "deleteArtifact", + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { - "description": "name of the repository", - "name": "repo", "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 artifact", - "name": "artifact_id" + "description": "index of the issue", + "name": "index" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } }, { "format": "int64", @@ -8385,37 +8521,26 @@ } ], "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, "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", + ] + }, + "get": { + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "operationId": "issueListIssueDependencies", "parameters": [ { "type": "string", @@ -8425,150 +8550,109 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { + "type": "string", + "description": "index of the issue", "name": "index", "in": "path", - "required": true, + "required": true + }, + { "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on" + "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, - "in": "path" + "required": true } ], "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "200": { + "$ref": "#/responses/IssueList" }, "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" - } - ], + "issue" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "delete": { "responses": { - "200": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" }, - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "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", + "summary": "Delete a release", + "operationId": "repoDeleteRelease", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "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" + "name": "repo", + "in": "path", + "required": true }, { + "name": "id", + "in": "path", + "required": true, "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" + "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", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagList" - }, - "404": { - "$ref": "#/responses/notFound" + "format": "int64" } - } + ] }, - "post": { - "summary": "Create a new git tag in a repository", - "operationId": "repoCreateTag", + "patch": { + "operationId": "repoEditRelease", "parameters": [ { "type": "string", @@ -8578,66 +8662,56 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "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/CreateTagOption" - }, - "name": "body" + "$ref": "#/definitions/EditReleaseOption" + } }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, "200": { - "$ref": "#/responses/Tag" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" } }, - "produces": [ + "consumes": [ "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", + "summary": "Update a release" + }, + "get": { "parameters": [ { "in": "path", @@ -8647,55 +8721,49 @@ "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 + "required": true, + "type": "string", + "description": "name of the repo" }, { "type": "integer", "format": "int64", - "description": "id of the review", + "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", - "required": true + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/PullReview" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "post": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Submit a pending review to an pull request", - "operationId": "repoSubmitPullReview", + "summary": "Get a release", + "operationId": "repoGetRelease" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "get": { "parameters": [ { "type": "string", @@ -8705,109 +8773,154 @@ "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" + "type": "string", + "description": "name of the repo", + "name": "repo" }, { "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - }, - "name": "body", - "in": "body" + "type": "string", + "description": "tag name of the release to get", + "name": "tag", + "in": "path" }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/PullReview" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag" }, "delete": { - "operationId": "repoDeletePullReview", + "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": "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 }, { - "type": "integer", "format": "int64", - "description": "index of the pull request", - "name": "index", + "required": true, "in": "path", - "required": true + "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": [ { - "description": "id of the review", - "name": "id", "in": "path", "required": true, - "type": "integer", - "format": "int64" + "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" }, { - "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": { + "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" @@ -8815,41 +8928,22 @@ "tags": [ "repository" ], - "summary": "Delete a specific review from a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { - "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 + "required": true, + "type": "string", + "description": "owner of the repo" }, { + "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" + "in": "path" }, { "format": "int64", @@ -8859,10 +8953,17 @@ "name": "group_id", "type": "integer" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "get": { "responses": { "200": { - "$ref": "#/responses/PullReviewCommentList" + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -8874,58 +8975,55 @@ "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", + "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": "owner" + }, + { + "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "name of branch/tag/commit", + "name": "ref", "in": "path", "required": true }, { - "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 - } - ], - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } + "required": true, + "in": "path" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { "get": { - "summary": "Get a repository's key by id", - "operationId": "repoGetKey", "parameters": [ { "name": "owner", @@ -8942,40 +9040,50 @@ "description": "name of the repo" }, { - "description": "id of the key to get", - "name": "id", + "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": "integer", - "format": "int64" + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/DeployKey" + "description": "Returns raw file content.", + "schema": { + "type": "file" + } }, "404": { "$ref": "#/responses/notFound" } }, "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ "repository" - ] - }, - "delete": { - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", + ], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + "get": { "parameters": [ { "required": true, @@ -8985,132 +9093,95 @@ "in": "path" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "type": "integer", "format": "int64", - "description": "id of the key to delete", - "name": "id", + "required": true, "in": "path", - "required": true - }, - { "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "type": "integer" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" + "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}/git/refs": { + "/repos/{owner}/group/{group_id}/{repo}/labels": { "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs", + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", "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" + "description": "name of the repo", + "name": "repo" }, { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" }, { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" + "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", - "type": "integer" + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" } - }, + } + }, + "post": { "consumes": [ "application/json" ], @@ -9120,103 +9191,62 @@ "tags": [ "issue" ], - "summary": "Check if user is subscribed to an issue" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { - "get": { + "summary": "Create a label", + "operationId": "issueCreateLabel", "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", - "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" + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" + "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": [ - "repository" + "issue" ], - "summary": "Get a commit's statuses, by branch/tag/commit reference", - "operationId": "repoListStatusesByRef" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { - "get": { + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", "parameters": [ { "type": "string", @@ -9226,47 +9256,47 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", "name": "index", "in": "path", - "required": true + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "404": { - "description": "pull request has not been merged" + "201": { + "$ref": "#/responses/Issue" }, - "204": { - "description": "pull request has been merged" + "404": { + "description": "the issue does not exist" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged" + } }, - "post": { + "delete": { + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", "parameters": [ { "type": "string", @@ -9283,71 +9313,59 @@ "required": true }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", + "type": "string", + "description": "index of the issue", "name": "index", - "in": "path" + "in": "path", + "required": true }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/MergePullRequestOption" - }, - "name": "body" + "$ref": "#/definitions/IssueMeta" + } }, { + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true + "format": "int64" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, "200": { - "$ref": "#/responses/empty" + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" } }, "produces": [ "application/json" ], "tags": [ - "repository" - ], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest" + "issue" + ] }, - "delete": { + "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -9357,208 +9375,219 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", + "type": "string", + "description": "index of the issue", "name": "index", "in": "path", "required": true }, { - "description": "group ID of the repo", - "name": "group_id", + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/IssueList" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { "get": { - "operationId": "repoListPullRequests", + "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", - "required": true + "in": "path" }, { "type": "string", - "description": "Name of the repo", + "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" + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true }, { - "enum": [ - "oldest", - "recentupdate", - "recentclose", - "leastupdate", - "mostcomment", - "leastcomment", - "priority" - ], - "type": "string", - "description": "Type of sort", - "name": "sort", - "in": "query" + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true, + "type": "integer" }, { "type": "integer", "format": "int64", - "description": "ID of the milestone", - "name": "milestone", - "in": "query" + "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": [ { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "multi", - "description": "Label IDs", - "name": "labels", - "in": "query" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true, + "type": "string" }, { - "type": "string", - "description": "Filter by pull request author", - "name": "poster", - "in": "query" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true, + "type": "string" }, { - "minimum": 1, + "in": "path", + "required": true, "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "id of the release", + "name": "id" }, { - "minimum": 0, + "required": true, "type": "integer", - "description": "Page size of results", - "name": "limit", - "in": "query" + "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, - "in": "path" + "in": "path", + "description": "group ID of the repo" } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "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", + "patch": { + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "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" }, { - "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreatePullRequestOption" - } + "$ref": "#/definitions/EditAttachmentOptions" + }, + "name": "body" }, { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Attachment" }, "404": { "$ref": "#/responses/notFound" }, - "409": { - "$ref": "#/responses/error" - }, "422": { "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/PullRequest" } }, "consumes": [ @@ -9572,7 +9601,7 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { "get": { "produces": [ "application/json" @@ -9580,77 +9609,101 @@ "tags": [ "repository" ], - "summary": "Lists all runs for a repository run", - "operationId": "getWorkflowRuns", + "summary": "Lists all jobs for a repository", + "operationId": "listWorkflowJobs", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { + "required": true, "type": "string", "description": "name of the repository", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { "type": "string", - "description": "workflow event name", - "name": "event", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", "in": "query" }, { - "name": "branch", + "description": "page number of results to return (1-based)", + "name": "page", "in": "query", - "type": "string", - "description": "workflow branch" + "type": "integer" }, { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", + "type": "integer", + "description": "page size of results", + "name": "limit", "in": "query" }, { - "description": "triggered by user", - "name": "actor", - "in": "query", - "type": "string" + "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": [ { - "description": "triggering sha of the workflow run", - "name": "head_sha", - "in": "query", - "type": "string" + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true }, { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "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", - "type": "integer" + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/WorkflowRunsList" + "302": { + "description": "redirect to the blob download" }, "400": { "$ref": "#/responses/error" @@ -9658,10 +9711,16 @@ "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "/repos/{owner}/group/{group_id}/{repo}/reviewers": { "get": { "produces": [ "application/json" @@ -9669,22 +9728,66 @@ "tags": [ "repository" ], - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", + "required": true, + "type": "string" + }, + { + "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": "string", - "description": "name of the repo" + "type": "integer" }, { "description": "group ID of the repo", @@ -9696,32 +9799,31 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "204": { + "description": "pull request has been merged" }, - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" + "404": { + "description": "pull request has not been merged" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { - "get": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", + "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" + "required": true }, { "type": "string", @@ -9731,28 +9833,19 @@ "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" - }, - { + "name": "index", + "in": "path", + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "index of the pull request to merge" }, { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } }, { "type": "integer", @@ -9765,46 +9858,42 @@ ], "responses": { "200": { - "$ref": "#/responses/ReleaseList" + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" - } - } - }, - "post": { - "responses": { - "201": { - "$ref": "#/responses/Release" }, - "404": { - "$ref": "#/responses/notFound" + "405": { + "$ref": "#/responses/empty" }, "409": { "$ref": "#/responses/error" }, - "422": { - "$ref": "#/responses/validationError" + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a release", - "operationId": "repoCreateRelease", + "summary": "Merge a pull request" + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -9814,11 +9903,12 @@ "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateReleaseOption" - } + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index" }, { "description": "group ID of the repo", @@ -9828,20 +9918,40 @@ "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}/compare/{basehead}": { - "get": { - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", + "/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, - "type": "string", - "description": "owner of the repo" + "required": true }, { "name": "repo", @@ -9851,24 +9961,28 @@ "description": "name of the repo" }, { - "type": "string", - "description": "compare two branches or commits", - "name": "basehead", - "in": "path", - "required": true + "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, - "in": "path" + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/Compare" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -9876,132 +9990,81 @@ }, "produces": [ "application/json" - ], - "tags": [ - "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + }, "get": { "produces": [ - "text/plain" + "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a pull request diff or patch", - "operationId": "repoDownloadPullDiffOrPatch", + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "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": "index of the pull request to get", + "description": "index of the issue", "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" + "required": true } ], "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" + "200": { + "$ref": "#/responses/LabelList" } - ], + } + }, + "put": { "responses": { "200": { - "$ref": "#/responses/Tag" + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], - "tags": [ - "repository" - ] - }, - "delete": { + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", "parameters": [ { "type": "string", @@ -10011,76 +10074,78 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "type": "string", - "description": "name of tag to delete", - "name": "tag", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true + "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", - "description": "group ID of the repo" + "in": "path" } + ] + }, + "post": { + "consumes": [ + "application/json" ], - "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" + "issue" ], - "summary": "Delete a repository's tag by name", - "operationId": "repoDeleteTag" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { - "put": { - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription", + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "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", @@ -10093,7 +10158,7 @@ ], "responses": { "200": { - "$ref": "#/responses/WatchInfo" + "$ref": "#/responses/LabelList" }, "403": { "$ref": "#/responses/forbidden" @@ -10101,26 +10166,49 @@ "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" - ] - }, - "delete": { + ], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "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": "string" + "type": "integer" }, { "description": "group ID of the repo", @@ -10130,116 +10218,150 @@ "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", + "post": { + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", + "name": "repo" + }, + { + "description": "id of the release", + "name": "id", "in": "path", - "required": true + "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" }, { - "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/WatchInfo" + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" }, "404": { - "description": "User is not watching this repo or repo do not exist" + "$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}/hooks": { + "/repos/{owner}/group/{group_id}/{repo}/transfer": { "post": { - "operationId": "repoCreateHook", "parameters": [ { - "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to transfer", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", - "description": "name of the repo", + "description": "name of the repo to transfer", "name": "repo", "in": "path", "required": true }, { - "schema": { - "$ref": "#/definitions/CreateHookOption" - }, + "description": "Transfer Options", "name": "body", - "in": "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "201": { - "$ref": "#/responses/Hook" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "202": { + "$ref": "#/responses/Repository" } }, - "consumes": [ + "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": "Create a hook" - }, - "get": { - "operationId": "repoListHooks", + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest", "parameters": [ { "in": "path", @@ -10256,57 +10378,61 @@ "required": true }, { + "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" + "format": "int64" }, { + "description": "how to update pull request", + "name": "style", "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "enum": [ + "merge", + "rebase" + ], + "type": "string" }, { - "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": { + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, "200": { - "$ref": "#/responses/HookList" + "$ref": "#/responses/empty" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List the hooks in a repository" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { "get": { - "tags": [ - "repository" - ], - "summary": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead", + "operationId": "issueListIssueCommentAttachments", "parameters": [ { - "type": "string", - "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { "name": "repo", @@ -10316,98 +10442,131 @@ "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" + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id" }, { - "format": "int64", - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "200": { - "$ref": "#/responses/PullRequest" + "404": { + "$ref": "#/responses/error" }, + "200": { + "$ref": "#/responses/AttachmentList" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List comment's attachments" + }, + "post": { + "responses": { "404": { - "$ref": "#/responses/notFound" + "$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" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { - "get": { + ], + "tags": [ + "issue" + ], + "summary": "Create a comment attachment", + "operationId": "issueCreateIssueCommentAttachment", "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, - "type": "string" + "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, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueTemplates" - }, - "404": { - "$ref": "#/responses/notFound" + "required": true } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/file-contents": { "get": { - "consumes": [ - "application/json" - ], + "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.", "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a comment", - "operationId": "issueGetComment", + "summary": "Get the metadata and contents of requested files", + "operationId": "repoGetFileContents", "parameters": [ { "type": "string", @@ -10424,90 +10583,107 @@ "required": true }, { - "description": "id of the comment", - "name": "id", - "in": "path", + "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": "integer", - "format": "int64" + "type": "string", + "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", + "name": "body" }, { - "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": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/ContentsListResponse" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" } } }, - "delete": { + "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": [ - "issue" + "repository" ], - "summary": "Delete a comment", - "operationId": "issueDeleteComment", + "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 + "required": true, + "type": "string" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, + "required": true + }, + { "type": "string", - "description": "name of the repo" + "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", + "name": "ref", + "in": "query" }, { - "name": "id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete" + "schema": { + "$ref": "#/definitions/GetFilesOptions" + } }, { + "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ContentsListResponse" } } - }, - "patch": { - "summary": "Edit a comment", - "operationId": "issueEditComment", + } + }, + "/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", @@ -10517,26 +10693,26 @@ "type": "string" }, { + "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 comment to edit", - "name": "id", + "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/EditIssueCommentOption" - } + "$ref": "#/definitions/EditDeadlineOption" + }, + "name": "body", + "in": "body" }, { "type": "integer", @@ -10548,50 +10724,27 @@ } ], "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { "get": { - "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", - "in": "path" + "name": "owner" }, { "type": "string", @@ -10601,45 +10754,51 @@ "required": true }, { - "required": true, - "type": "string", + "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" - }, - { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "in": "path", + "required": true }, { - "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" } ], "responses": { "200": { - "$ref": "#/responses/IssueList" + "$ref": "#/responses/AttachmentList" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments" }, "post": { - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", "parameters": [ { "in": "path", @@ -10656,18 +10815,25 @@ "name": "repo" }, { - "type": "string", + "format": "int64", "description": "index of the issue", "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } + "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", @@ -10679,87 +10845,144 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Issue" + "400": { + "$ref": "#/responses/error" }, "404": { - "description": "the issue does not exist" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] - }, - "delete": { - "responses": { - "200": { - "$ref": "#/responses/Issue" + "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" + "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": [ - "issue" + "repository" ], - "summary": "Unblock the issue given in the body by the issue in path", - "operationId": "issueRemoveIssueBlocking", + "summary": "List a repository's forks", + "operationId": "listForks", "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { - "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path" }, { - "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" + }, + { + "type": "integer", + "format": "int64", + "required": true, "in": "path", - "required": true + "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" }, { - "name": "body", - "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" - } + "$ref": "#/definitions/CreateForkOption" + }, + "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" + "format": "int64" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "get": { + ], + "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" - ], - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses", + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "get": { + "operationId": "repoGetPullRequestFiles", "parameters": [ { "type": "string", @@ -10776,37 +10999,30 @@ "required": true }, { - "required": true, - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true }, { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], "type": "string", - "description": "type of sort", - "name": "sort", + "description": "skip to given file", + "name": "skip-to", "in": "query" }, { + "name": "whitespace", "in": "query", "enum": [ - "pending", - "success", - "error", - "failure", - "warning" + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" ], "type": "string", - "description": "type of state", - "name": "state" + "description": "whitespace behavior" }, { "type": "integer", @@ -10815,78 +11031,23 @@ "in": "query" }, { - "in": "query", - "type": "integer", "description": "page size of results", - "name": "limit" + "name": "limit", + "in": "query", + "type": "integer" }, { + "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": { - "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" + "$ref": "#/responses/ChangedFileList" }, "404": { "$ref": "#/responses/notFound" @@ -10898,16 +11059,16 @@ "tags": [ "repository" ], - "summary": "Create a commit status" + "summary": "Get changed files for a pull request" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { + "get": { "tags": [ - "repository" + "issue" ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow", + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", "parameters": [ { "name": "owner", @@ -10925,32 +11086,42 @@ }, { "type": "string", - "description": "id of the workflow", - "name": "workflow_id", - "in": "path", - "required": true + "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)", + "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" + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/CommentList" }, "404": { "$ref": "#/responses/notFound" @@ -10961,45 +11132,59 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/forks": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { "post": { "parameters": [ { - "in": "path", - "required": true, "type": "string", - "description": "owner of the repo to fork", - "name": "owner" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repo to fork", + "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" + }, + { + "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/CreateForkOption" - }, - "name": "body" + "$ref": "#/definitions/DismissPullReviewOptions" + } }, { - "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": { - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" + "200": { + "$ref": "#/responses/PullReview" }, "403": { "$ref": "#/responses/forbidden" @@ -11007,8 +11192,8 @@ "404": { "$ref": "#/responses/notFound" }, - "409": { - "description": "The repository with the same name already exists." + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ @@ -11017,71 +11202,103 @@ "tags": [ "repository" ], - "summary": "Fork a repository", - "operationId": "createFork" - }, + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { "get": { - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repository's forks", - "operationId": "listForks", + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, + "type": "string" + }, + { "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", "in": "query" }, { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "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", - "required": true + "format": "int64" } - ] + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/Commit" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { - "get": { + "/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": "Get a release by tag name", - "operationId": "repoGetReleaseByTag", + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", "parameters": [ { "type": "string", @@ -11091,53 +11308,42 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { + "required": true, "type": "string", - "description": "tag name of the release to get", - "name": "tag", - "in": "path", - "required": true + "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", - "description": "group ID of the repo" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" + "in": "path" } - }, - "produces": [ - "application/json" ] }, "delete": { "tags": [ "repository" ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -11147,11 +11353,11 @@ "required": true }, { - "required": true, "type": "string", - "description": "tag name of the release to delete", - "name": "tag", - "in": "path" + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -11163,153 +11369,107 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "404": { "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" } - } + }, + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { "get": { - "summary": "Get the EditorConfig definitions of a file in a repository", - "operationId": "repoGetEditorConfig", + "summary": "Lists all jobs for a workflow run", + "operationId": "listWorkflowRunJobs", "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": "owner of the repo" }, { - "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" + "description": "name of the repository", + "name": "repo" }, { "type": "integer", - "format": "int64", - "required": true, + "description": "runid of the workflow run", + "name": "run", "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" + "required": true }, { "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" }, { "type": "integer", - "format": "int64", - "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", - "format": "int64", - "description": "id of time to delete", - "name": "id", - "in": "path", - "required": true + "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", - "required": true + "format": "int64" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" }, - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/WorkflowJobsList" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { "get": { + "tags": [ + "repository" + ], + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "in": "path", @@ -11319,33 +11479,27 @@ "name": "repo" }, { - "format": "int64", - "description": "id of the release", - "name": "id", + "type": "string", + "description": "id of the runner", + "name": "runner_id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, + "name": "group_id", "type": "integer", - "format": "int64" - }, - { + "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/definitions/ActionRunner" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -11353,12 +11507,7 @@ }, "produces": [ "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment" + ] }, "delete": { "produces": [ @@ -11367,8 +11516,8 @@ "tags": [ "repository" ], - "summary": "Delete a release attachment", - "operationId": "repoDeleteReleaseAttachment", + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", "parameters": [ { "type": "string", @@ -11378,58 +11527,48 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "name": "id", + "description": "id of the runner", + "name": "runner_id", "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release" + "type": "string" }, { - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", "required": true, - "type": "integer", - "format": "int64" - }, - { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { + "204": { + "description": "runner has been deleted" + }, + "400": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" } } - }, - "patch": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { + "get": { "tags": [ "repository" ], - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", "parameters": [ { "name": "owner", @@ -11439,60 +11578,49 @@ "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", + "name": "repo", "in": "path", "required": true, - "type": "integer", - "format": "int64" + "type": "string" }, { + "type": "string", + "description": "branch to get", + "name": "branch", "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", - "required": true, - "in": "path" + "required": true } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/Branch" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { - "get": { - "operationId": "repoGetWikiPages", + }, + "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", @@ -11502,23 +11630,18 @@ "type": "string" }, { + "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" + "required": true }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "required": true, + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path" }, { "description": "group ID of the repo", @@ -11530,36 +11653,30 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WikiPageList" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "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", + } + }, + "patch": { + "summary": "Rename a branch", + "operationId": "repoRenameBranch", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -11569,31 +11686,32 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the branch", + "name": "branch" }, { - "type": "integer", - "format": "int64", - "description": "id of the label to remove", - "name": "id", - "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { + "422": { + "$ref": "#/responses/validationError" + }, "204": { "$ref": "#/responses/empty" }, @@ -11602,23 +11720,22 @@ }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}": { + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { "get": { - "tags": [ - "repository" - ], - "summary": "Get a repository", - "operationId": "repoGet", + "operationId": "repoListTagProtection", "parameters": [ { "type": "string", @@ -11635,182 +11752,182 @@ "description": "name of the repo" }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/TagProtectionList" } }, "produces": [ "application/json" - ] + ], + "tags": [ + "repository" + ], + "summary": "List tag protections for a repository" }, - "delete": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a repository", - "operationId": "repoDelete", + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection", "parameters": [ { "required": true, "type": "string", - "description": "owner of the repo to delete", + "description": "owner of the repo", "name": "owner", "in": "path" }, { "type": "string", - "description": "name of the repo to delete", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "name": "group_id", - "type": "integer", - "format": "int64", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } + }, + { "required": true, "in": "path", - "description": "group ID of the repo" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/TagProtection" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - } - }, - "patch": { - "produces": [ + }, + "consumes": [ "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}/subscriptions/{user}": { + "put": { "parameters": [ { - "description": "owner of the repo to edit", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true, "type": "string" }, { - "description": "name of the repo to edit", + "required": true, + "type": "string", + "description": "name of the repo", "name": "repo", + "in": "path" + }, + { "in": "path", "required": true, - "type": "string" + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index" }, { - "description": "Properties of a repo that you can edit", - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditRepoOption" - } + "required": true, + "type": "string", + "description": "username of the user to subscribe the issue to", + "name": "user", + "in": "path" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "200": { - "$ref": "#/responses/Repository" + "description": "Already subscribed" }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "description": "Successfully Subscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { - "get": { + }, + "consumes": [ + "application/json" + ], "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" - } + "issue" ], + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription" + }, + "delete": { "responses": { "200": { - "$ref": "#/responses/RepoIssueConfig" + "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}/pulls/{index}/reviews": { - "get": { + }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List all reviews for a pull request", - "operationId": "repoListPullReviews", + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", "parameters": [ { "type": "string", @@ -11820,59 +11937,41 @@ "required": true }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { "type": "integer", "format": "int64", - "description": "index of the pull request", + "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)" - }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "type": "string", + "description": "username of the user to unsubscribe from an issue", + "name": "user", + "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/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } - } - }, - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "get": { + "operationId": "repoDownloadPullDiffOrPatch", "parameters": [ { "required": true, @@ -11882,67 +11981,36 @@ "in": "path" }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "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" - }, - { - "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" + "format": "int64", + "description": "index of the pull request to get" }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { - "operationId": "repoListPinnedPullRequests", - "parameters": [ { + "in": "path", "required": true, + "enum": [ + "diff", + "patch" + ], "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "whether the output is diff or patch", + "name": "diffType" }, { - "type": "string", - "description": "name of the repo", - "name": "repo", - "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", @@ -11955,136 +12023,128 @@ ], "responses": { "200": { - "$ref": "#/responses/PullRequestList" + "$ref": "#/responses/string" }, "404": { "$ref": "#/responses/notFound" } }, "produces": [ - "application/json" + "text/plain" ], "tags": [ "repository" ], - "summary": "List a repo's pinned pull requests" + "summary": "Get a pull request diff or patch" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "produces": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { "tags": [ "repository" ], - "summary": "Create or Update a secret value in a repository", - "operationId": "updateRepoSecret", + "summary": "List a repository's branches", + "operationId": "repoListBranches", "parameters": [ { "type": "string", - "description": "owner of the repository", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { + "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true, - "type": "string" + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page" }, { - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - }, - "name": "body", - "in": "body" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/BranchList" } }, - "consumes": [ + "produces": [ "application/json" ] }, - "delete": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", + "summary": "Create a branch", + "operationId": "repoCreateBranch", "parameters": [ { - "type": "string", - "description": "owner of the repository", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "owner of the repo" }, { "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repository" + "description": "name of the repo" }, { - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true, - "type": "string" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "204": { - "description": "delete one secret of the repository" + "201": { + "$ref": "#/responses/Branch" }, - "400": { - "$ref": "#/responses/error" + "403": { + "description": "The branch is archived or a mirror." }, "404": { - "$ref": "#/responses/notFound" + "description": "The old branch does not exist." + }, + "409": { + "description": "The branch with the same name already exists." + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, "consumes": [ @@ -12092,118 +12152,123 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { "get": { - "operationId": "repoListTagProtection", + "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 + "required": true, + "type": "string" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "name": "group_id", "type": "integer", - "format": "int64", + "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" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List tag protections for a repository" - }, + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { "post": { "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo" }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateTagProtectionOption" - }, - "name": "body" + "$ref": "#/definitions/MergeUpstreamRequest" + } }, { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/TagProtection" + "200": { + "$ref": "#/responses/MergeUpstreamResponse" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection" + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "/repos/{owner}/group/{group_id}/{repo}/contents-ext/{filepath}": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", + "summary": "The extended \"contents\" API, to get file metadata and/or content, or list a directory.", + "operationId": "repoGetContentsExt", "parameters": [ { "type": "string", @@ -12220,76 +12285,70 @@ "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": "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 }, { - "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", + "description": "the name of the commit/branch/tag, default to the repositoryโ€™s default branch.", + "name": "ref", "in": "query" }, { + "name": "includes", "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "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": "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" } ], "responses": { "200": { - "$ref": "#/responses/TrackedTimeList" + "$ref": "#/responses/ContentsExtResponse" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "post": { + }, + "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/TrackedTime" + "$ref": "#/responses/FileResponse" }, - "400": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/FileResponse" }, "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" } }, "consumes": [ @@ -12299,182 +12358,122 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", + "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" + "name": "owner", + "in": "path" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "name": "index", + "type": "string", + "description": "path of the file to update", + "name": "filepath", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue" + "required": true }, { "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/AddTimeOption" + "$ref": "#/definitions/UpdateFileOptions" } }, { + "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "name": "group_id" } ] }, - "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" - } - }, + "post": { "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", + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", "parameters": [ { "type": "string", - "description": "owner of the repo to transfer", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo to transfer", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "description": "Transfer Options", + "type": "string", + "description": "path of the file to create", + "name": "filepath", + "in": "path", + "required": true + }, + { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TransferRepoOption" + "$ref": "#/definitions/CreateFileOptions" } }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" + "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", + }, + "delete": { + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", "parameters": [ { "type": "string", @@ -12484,120 +12483,163 @@ "required": true }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { - "type": "integer", - "format": "int64", - "description": "index of the issue to create or update a deadline on", - "name": "index", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "path of the file to delete", + "name": "filepath" }, { "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/EditDeadlineOption" + "$ref": "#/definitions/DeleteFileOptions" } }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" }, "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/error" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/error" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "summary": "Update avatar", - "operationId": "repoUpdateAvatar", + }, + "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, - "type": "string" + "required": true }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "name of the repo" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" - } + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "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" ] - }, - "delete": { + } + }, + "/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": "Delete avatar", - "operationId": "repoDeleteAvatar", + "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" + "name": "owner", + "in": "path" }, { + "in": "path", + "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "name of the repository", + "name": "repo" + }, + { + "type": "string", + "description": "id of the artifact", + "name": "artifact_id", "in": "path", "required": true }, @@ -12609,57 +12651,47 @@ "required": true, "in": "path" } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { - "put": { - "operationId": "repoAddTopic", + ] + }, + "delete": { + "operationId": "deleteArtifact", "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", + "description": "name of the repository", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "type": "string", - "description": "name of the topic to add", - "name": "topic", "in": "path", - "required": true + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "422": { - "$ref": "#/responses/invalidTopicsError" - }, "204": { - "$ref": "#/responses/empty" + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -12671,35 +12703,26 @@ "tags": [ "repository" ], - "summary": "Add a topic to a repository" - }, - "delete": { - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - }, + "summary": "Deletes a specific artifact for a workflow run" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a topic from a repository", - "operationId": "repoDeleteTopic", + "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": "owner of the repo" + "required": true }, { "required": true, @@ -12709,41 +12732,16 @@ "in": "path" }, { - "description": "name of the topic to delete", - "name": "topic", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "group_id", + "name": "key_id", + "in": "query", "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" + "description": "the key_id to search for" }, { - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query", + "type": "string" }, { "type": "integer", @@ -12752,42 +12750,38 @@ "in": "query" }, { + "name": "limit", "in": "query", "type": "integer", - "description": "page size of results", - "name": "limit" + "description": "page size of results" }, { + "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": { "200": { - "$ref": "#/responses/BranchList" + "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } }, "post": { - "summary": "Create a branch", - "operationId": "repoCreateBranch", + "operationId": "repoCreateKey", "parameters": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "type": "string", @@ -12800,33 +12794,27 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateBranchRepoOption" + "$ref": "#/definitions/CreateKeyOption" } }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], "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." + "$ref": "#/responses/DeployKey" }, "404": { - "description": "The old branch does not exist." + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "consumes": [ @@ -12837,20 +12825,21 @@ ], "tags": [ "repository" - ] + ], + "summary": "Add a key to a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/pulls": { "get": { "responses": { "200": { - "$ref": "#/responses/Commit" + "$ref": "#/responses/PullRequestList" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "500": { + "$ref": "#/responses/error" } }, "produces": [ @@ -12859,108 +12848,107 @@ "tags": [ "repository" ], - "summary": "Get a single commit from a repository", - "operationId": "repoGetSingleCommit", + "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" + "required": true }, { "type": "string", - "description": "name of the repo", + "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" + "description": "Filter by target base branch of the pull request", + "name": "base_branch", + "in": "query" }, { - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat", + "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": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", + "type": "integer", + "format": "int64", + "description": "ID of the milestone", + "name": "milestone", "in": "query" }, { - "name": "files", + "collectionFormat": "multi", + "description": "Label IDs", + "name": "labels", "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')" + "type": "array", + "items": { + "format": "int64", + "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}/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" + "description": "Filter by pull request author", + "name": "poster", + "in": "query" }, { - "type": "string", - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true + "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 }, { - "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "get": { + ] + }, + "post": { + "operationId": "repoCreatePullRequest", "parameters": [ { "type": "string", @@ -12977,31 +12965,39 @@ "description": "name of the repo" }, { - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true, - "type": "integer" + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/ReactionList" + "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": [ @@ -13011,131 +13007,166 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a list of reactions from a comment of an issue", - "operationId": "issueGetCommentReactions" - }, - "post": { + "summary": "Create a pull request" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { + "get": { "responses": { "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/TagProtection" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", + "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", - "description": "owner of the repo" + "type": "string" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "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", - "description": "id of the comment to edit", - "name": "id" + "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" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" + "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" }, - { - "required": true, - "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" ] }, - "delete": { + "patch": { "tags": [ - "issue" + "repository" ], - "summary": "Remove a reaction from a comment of an issue", - "operationId": "issueDeleteCommentReaction", + "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", - "in": "path" + "name": "owner" }, { + "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 comment to edit", - "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer", + "description": "id of protected tag", + "name": "id" }, { - "name": "content", + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditReactionOption" + "$ref": "#/definitions/EditTagProtectionOption" } }, { - "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/TagProtection" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" }, - "403": { - "$ref": "#/responses/forbidden" + "423": { + "$ref": "#/responses/repoArchivedError" } }, "consumes": [ @@ -13146,28 +13177,43 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { + "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { "get": { - "operationId": "downloadArtifact", + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "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", - "required": true, - "type": "string" + "in": "path" }, { - "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "string", - "description": "id of the artifact", - "name": "artifact_id", + "description": "SHA of the commit to get", + "name": "sha", "in": "path", "required": true }, @@ -13179,43 +13225,33 @@ "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": { + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { "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", + "in": "path" + }, + { + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + }, + "name": "body" }, { "required": true, @@ -13228,67 +13264,42 @@ ], "responses": { "200": { - "$ref": "#/responses/RegistrationToken" + "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "produces": [ + "consumes": [ "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" - } - } + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "/repos/{owner}/group/{group_id}/{repo}/topics": { "get": { + "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": "owner of the repo" }, { "name": "repo", @@ -13298,91 +13309,76 @@ "description": "name of the repo" }, { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, "type": "integer", - "format": "int64" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id" + "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" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/TopicNames" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment" + ] }, - "delete": { + "put": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics", "parameters": [ { + "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path" + "name": "owner" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } }, { + "name": "group_id", "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" + "description": "group ID of the repo" } ], "responses": { @@ -13390,24 +13386,28 @@ "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "422": { + "$ref": "#/responses/invalidTopicsError" } - }, - "produces": [ - "application/json" - ] - }, - "patch": { + } + } + }, + "/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": "owner of the repo" + "required": true }, { "type": "string", @@ -13417,74 +13417,40 @@ "required": true }, { + "required": true, "type": "integer", "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true + "description": "index of issue to pin", + "name": "index", + "in": "path" }, { + "name": "group_id", "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" + "description": "group ID of the repo" } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, - "422": { - "$ref": "#/responses/validationError" + "403": { + "$ref": "#/responses/forbidden" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + } + }, + "delete": { "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", + "summary": "Unpin an Issue", + "operationId": "unpinIssue", "parameters": [ { "type": "string", @@ -13494,36 +13460,32 @@ "required": true }, { + "description": "name 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": "string" }, { - "in": "query", + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit" + "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", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/UserList" + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" @@ -13534,86 +13496,80 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/keys": { - "get": { - "produces": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { "tags": [ "repository" ], - "summary": "List a repository's keys", - "operationId": "repoListKeys", + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { - "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": "repo", + "in": "path" }, { - "name": "fingerprint", - "in": "query", + "name": "workflow_id", + "in": "path", + "required": true, "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": "id of the workflow" }, { + "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/DeployKeyList" + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "post": { + }, + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { "tags": [ "repository" ], - "summary": "Add a key to a repository", - "operationId": "repoCreateKey", + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", "parameters": [ { + "description": "owner of the repo", + "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" + "type": "string" }, { "type": "string", @@ -13622,13 +13578,6 @@ "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - }, { "description": "group ID of the repo", "name": "group_id", @@ -13639,245 +13588,246 @@ } ], "responses": { - "201": { - "$ref": "#/responses/DeployKey" + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { "post": { + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", "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", + "description": "name of the repo to sync", "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { "404": { "$ref": "#/responses/notFound" }, - "204": { + "200": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" } }, - "tags": [ - "issue" + "produces": [ + "application/json" ], - "summary": "Pin an Issue", - "operationId": "pinIssue" - }, - "delete": { "tags": [ - "issue" - ], - "summary": "Unpin an Issue", - "operationId": "unpinIssue", + "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": "owner of the repo" + "description": "name of the repository", + "name": "repo", + "in": "path" }, { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "name of the secret", + "name": "secretname", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of issue to unpin", - "name": "index", - "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, - "in": "path", - "description": "group ID of the repo" + "required": true } ], "responses": { + "201": { + "description": "response when creating a secret" + }, "204": { - "$ref": "#/responses/empty" + "description": "response when updating a secret" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { + }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive", + "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 repo", + "description": "owner of the repository", "name": "owner", "in": "path" }, { - "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", + "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", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "200": { - "description": "success" - }, "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}/diffpatch": { - "post": { - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch", + "/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": "owner of the repo", - "name": "owner" + "description": "name of the repository" }, { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "id of the run", + "name": "run", "in": "path", "required": true }, { + "format": "int64", "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 + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/FileResponse" - }, "404": { "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "200": { + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" - ], - "tags": [ - "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { - "get": { - "produces": [ - "application/json" - ], + }, + "delete": { "tags": [ "repository" ], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds", + "summary": "Delete a workflow run", + "operationId": "deleteActionRun", "parameters": [ { "type": "string", @@ -13887,30 +13837,18 @@ "required": true }, { - "type": "string", - "description": "name of the repo", + "description": "name of the repository", "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" + "required": true, + "type": "string" }, { - "name": "limit", - "in": "query", "type": "integer", - "description": "page size of results" + "description": "runid of the workflow run", + "name": "run", + "in": "path", + "required": true }, { "type": "integer", @@ -13922,40 +13860,61 @@ } ], "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ActivityFeedsList" } - } + }, + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "get": { - "summary": "Get a Git hook", - "operationId": "repoGetGitHook", + "/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": "owner of the repo" + "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "description": "id of the hook to get", - "name": "id", + "name": "index", "in": "path", "required": true, - "type": "string" + "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", @@ -13967,79 +13926,99 @@ } ], "responses": { - "200": { - "$ref": "#/responses/GitHook" + "201": { + "$ref": "#/responses/PullReviewList" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "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", + "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": "owner of the repo" + "required": true }, { + "type": "string", "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": "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" + "name": "group_id", + "type": "integer", + "format": "int64" } - ] - }, - "patch": { - "summary": "Edit a Git hook in a repository", - "operationId": "repoEditGitHook", + ], + "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": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -14049,81 +14028,74 @@ "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": "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { - "post": { - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "get": { + "operationId": "repoGetArchive", "parameters": [ { - "type": "string", - "description": "owner of the repo to transfer", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "in": "path", "required": true, "type": "string", - "description": "name of the repo to transfer", - "name": "repo" + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "202": { - "$ref": "#/responses/Repository" + "200": { + "description": "success" } }, "produces": [ @@ -14131,19 +14103,12 @@ ], "tags": [ "repository" - ] + ], + "summary": "Get an archive of a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repository's action tasks", - "operationId": "ListActionTasks", "parameters": [ { "type": "string", @@ -14153,80 +14118,95 @@ "required": true }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "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": "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": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/TasksList" } - } + }, + "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, - "type": "string" + "required": true }, { + "required": true, + "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { + "in": "path", "required": true, "type": "integer", "format": "int64", "description": "index of the pull request to get", - "name": "index", - "in": "path" + "name": "index" }, { "name": "group_id", @@ -14236,22 +14216,7 @@ "in": "path", "description": "group ID of the repo" } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request" + ] }, "patch": { "consumes": [ @@ -14267,18 +14232,18 @@ "operationId": "repoEditPullRequest", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "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 the repo" + "required": true }, { "type": "integer", @@ -14289,31 +14254,22 @@ "required": true }, { - "name": "body", - "in": "body", "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", - "type": "integer" + "name": "group_id" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, @@ -14322,83 +14278,73 @@ }, "412": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest", + "summary": "Get a hook", + "operationId": "repoGetHook", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repo" }, { + "format": "int64", + "description": "id of the hook to get", + "name": "id", "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" - ] + "type": "integer" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones": { - "get": { + }, + "delete": { + "summary": "Delete a hook in a repository", + "operationId": "repoDeleteHook", "parameters": [ { "type": "string", @@ -14408,48 +14354,32 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "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" + "required": true }, { + "name": "id", + "in": "path", + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "id of the hook to delete" }, { "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", - "format": "int64", - "required": true + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/MilestoneList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" @@ -14459,216 +14389,133 @@ "application/json" ], "tags": [ - "issue" - ], - "summary": "Get all of a repository's opened milestones", - "operationId": "issueGetMilestonesList" + "repository" + ] }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", + "patch": { + "operationId": "repoEditHook", "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": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateMilestoneOption" - } - }, - { + "description": "owner of the repo", + "name": "owner", "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": "owner of the repo", - "name": "owner" - }, - { "description": "name of the repo", "name": "repo", - "in": "path", - "required": true, - "type": "string" + "in": "path" }, { - "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", + "name": "id", "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" + "type": "integer", + "format": "int64", + "description": "index of the hook" }, { - "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" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/ContentsExtResponse" + "$ref": "#/responses/Hook" }, "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" + "summary": "Edit a hook in a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "/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", - "required": true, - "type": "string" + "in": "path" }, { + "description": "name of the repo", "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": "string" }, { - "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", "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" + "name": "limit" }, { - "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/TimelineList" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/UserList" } }, "produces": [ "application/json" ], "tags": [ - "issue" - ], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline" + "repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List the Git hooks in a repository", - "operationId": "repoListGitHooks", + "summary": "Create a workflow dispatch event", + "operationId": "ActionsDispatchWorkflow", "parameters": [ { "type": "string", @@ -14678,11 +14525,25 @@ "required": true }, { + "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path" + "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", @@ -14694,8 +14555,17 @@ } ], "responses": { - "200": { - "$ref": "#/responses/GitHookList" + "422": { + "$ref": "#/responses/validationError" + }, + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -14703,17 +14573,26 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { - "post": { - "summary": "create review requests for a pull request", - "operationId": "repoCreatePullReviewRequests", + "/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": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo", + "name": "owner" }, { "type": "string", @@ -14723,49 +14602,152 @@ "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", - "description": "index of the pull request", - "name": "index", + "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 }, { - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" + "in": "query", + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all" + }, + { + "items": { + "type": "string" }, - "name": "body", - "in": "body", - "required": true + "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" }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "201": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/NotificationThreadList" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - }, - "delete": { + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "get": { "parameters": [ { "type": "string", @@ -14775,27 +14757,23 @@ "required": true }, { - "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "required": true, "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "name": "group_id", @@ -14807,17 +14785,11 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/SecretList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, "produces": [ @@ -14826,17 +14798,20 @@ "tags": [ "repository" ], - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests" + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets" } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get repository permissions for a user", - "operationId": "repoGetRepoPermissions", + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", "parameters": [ { "type": "string", @@ -14846,46 +14821,57 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "name": "collaborator", - "in": "path", "required": true, "type": "string", - "description": "username of the collaborator whose permissions are to be obtained" + "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", - "format": "int64" + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/RepoCollaboratorPermission" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Note" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "summary": "Create a wiki page", + "operationId": "repoCreateWikiPage", "parameters": [ { "type": "string", @@ -14896,23 +14882,17 @@ }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "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", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } }, { "description": "group ID of the repo", @@ -14924,51 +14904,64 @@ } ], "responses": { - "200": { - "$ref": "#/responses/ArtifactsList" + "201": { + "$ref": "#/responses/WikiPage" }, "400": { "$ref": "#/responses/error" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "produces": [ + "consumes": [ "application/json" ], "tags": [ "repository" - ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { + "/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" - }, - "200": { - "$ref": "#/responses/UserList" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Return all users that have write access and can be assigned to issues", - "operationId": "repoGetAssignees", + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", "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", @@ -14978,36 +14971,31 @@ "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", - "required": true, - "in": "path" + "format": "int64" } ] - } - }, - "/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", + }, + "get": { + "operationId": "repoListPushMirrors", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "in": "path", @@ -15017,36 +15005,48 @@ "name": "repo" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchProtectionPriories" - } + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/PushMirrorList" }, - "404": { - "$ref": "#/responses/notFound" + "400": { + "$ref": "#/responses/error" }, - "422": { - "$ref": "#/responses/validationError" + "403": { + "$ref": "#/responses/forbidden" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get all push mirrors of the repository" } } } -} \ No newline at end of file +} From f5f47ca39a6d58fee4c64389bd9efccde456207f 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/168] fix determinism of repo group swagger output --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 40fbdc5b06163..80280983fa029 100644 --- a/Makefile +++ b/Makefile @@ -272,7 +272,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 06e56b359cfd0446afa83288e92e6198dcbbcbd4 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/168] 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 985b67322fa81..8e43524dc20fa 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -79,7 +79,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 f1d4cd1755f141150d44ef4837092370b23095ad 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/168] 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 48ee2884b4767..2768a2037e3b5 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 48ee2884b4767..2768a2037e3b5 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 48ee2884b4767..2768a2037e3b5 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 7997e49711dfca83b6adaa9ad2c6b14c73b67b95 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/168] 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 b327157ed5208..4dfd3040b60fb 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 c622ac60831b3..46533a4933114 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"` } @@ -830,6 +830,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 0cc4fe83ff1e9d9d65a5615b70bf5c72cbeff197 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/168] 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 d137de8f5bbcc..69259b9e70bb4 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 e576cf0ccabdfb2693496379f56d9b990b9bafc5 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/168] 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 0000000000000..b1b7161055904 --- /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 0000000000000..cb089cd89a7d7 --- /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 0000000000000..e69de29bb2d1d 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 0000000000000..8ad0b1bad6dac --- /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 0000000000000..498b267a8c781 --- /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 0000000000000..0367c0feaa264 --- /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/168] 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 69259b9e70bb4..861573ee87c4a 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 6bc884b9b956cd1777c68e88f0c3175da9989076 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/168] 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 861573ee87c4a..2283bff5dbe95 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 b88f6ac40722a6979022e4cc3eb1502caa23219f 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/168] 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 1ef3362061dfe..d09077cbbf40c 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 96da2924d96ab633101293014328800ca00e1d26 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/168] 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 fb6d332ed766f..39025d65b0c79 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -285,7 +285,7 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName return fmt.Errorf("Failed to create dir %s: %w", dir, err) } - if err := util.Rename(repo_model.RepoPath(oldOwner.Name, repo.Name, repo.GroupID), repo_model.RepoPath(newOwner.Name, repo.Name, repo.GroupID)); err != nil { + if err := util.Rename(repo_model.RepoPath(oldOwner.Name, repo.Name, repo.GroupID), repo_model.RepoPath(newOwner.Name, repo.Name, 0)); err != nil { return fmt.Errorf("rename repository directory: %w", err) } repoRenamed = true @@ -296,7 +296,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 b2cb08210f059901f7c70ad8ccfdc0af562e8486 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/168] 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 8e43524dc20fa..c622bacb09fee 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -82,10 +82,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 28f8ad1ac8db1c5a48631406fc87b2ef5dd047c8 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/168] 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 766c70a14b6ae..ba9db3887ac42 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 c05e38ce0a4ef517a11853ede34372a9beb5b260 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/168] 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 | 8 +- .../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/pull_merge_test.go | 6 +- tests/integration/repo_generate_test.go | 2 +- tests/integration/repo_merge_upstream_test.go | 2 +- tests/integration/utils.go | 18 ++++ 49 files changed, 338 insertions(+), 341 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 87ccef8a6474e..836e64da92bae 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -153,11 +153,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) var actionTaskRespAfter api.ActionTaskResponse @@ -622,11 +619,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) var fileResponse api.FileResponse diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index 8dad665de5c7a..fff6da4240273 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -206,11 +206,8 @@ jobs: jobID := jobs[jobIndex].ID // 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, jobID)). + + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s%s/actions/jobs/%d/logs", user2.Name, maybeGroupSegment(repo.GroupID), repo.Name, jobID)). 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 83bb4999956bc..7cbb3ea2e5823 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1404,7 +1404,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: util.ToPointer("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 82cc85081720f..c05ed1a3930c4 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -4,7 +4,6 @@ package integration import ( - "fmt" "net/http" "net/http/httptest" "net/url" @@ -172,11 +171,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 8cf74e5ff47a4..826b970df6c13 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) @@ -71,7 +71,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) @@ -105,7 +105,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) @@ -137,7 +137,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()) @@ -202,7 +202,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 24cb5e3ca4a7e..d0249d688472e 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) @@ -76,7 +76,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) @@ -115,7 +115,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) @@ -128,7 +128,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) @@ -144,9 +144,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) @@ -183,7 +183,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) var apiComment api.Comment @@ -251,13 +251,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) @@ -273,7 +273,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 e55602c96d174..8b2eb30c8bd58 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 := new(api.Attachment) @@ -52,7 +52,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 := new([]api.Attachment) @@ -82,7 +82,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) @@ -113,7 +113,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()) @@ -156,7 +156,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) @@ -175,7 +175,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 e0b33804d9353..db3d7f821ec7b 100644 --- a/tests/integration/api_issue_config_test.go +++ b/tests/integration/api_issue_config_test.go @@ -150,7 +150,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 4899bccbc0fbc..1b15ba794cee1 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{ @@ -62,7 +62,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) @@ -127,7 +127,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 6f8ddbf7af208..724b73d2f3705 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 d27dc99b9e4cc..ad798b9298808 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) @@ -50,7 +50,7 @@ func TestAPIIssuesMilestone(t *testing.T) { DecodeJSON(t, resp, &apiMilestone2) 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", @@ -62,27 +62,27 @@ func TestAPIIssuesMilestone(t *testing.T) { assert.Nil(t, apiMilestone.Deadline) var apiMilestones []structs.Milestone - 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) DecodeJSON(t, resp, &apiMilestones) 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) DecodeJSON(t, resp, &apiMilestone) 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) DecodeJSON(t, resp, &apiMilestones) 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 445f4d3116855..b25e6f9557300 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) var issueAPI api.Issue DecodeJSON(t, resp, &issueAPI) @@ -57,24 +57,24 @@ 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) var issueAPI api.Issue DecodeJSON(t, resp, &issueAPI) 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) DecodeJSON(t, resp, &issueAPI) assert.Equal(t, 0, issueAPI.PinOrder) @@ -94,36 +94,36 @@ 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) var issueAPI api.Issue DecodeJSON(t, resp, &issueAPI) 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) var issueAPI3 api.Issue DecodeJSON(t, resp, &issueAPI3) 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) var issueAPI4 api.Issue DecodeJSON(t, resp, &issueAPI4) @@ -143,12 +143,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) var issueList []api.Issue DecodeJSON(t, resp, &issueList) @@ -164,7 +164,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) var prList []api.PullRequest DecodeJSON(t, resp, &prList) @@ -178,7 +178,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) var newPinsAllowed api.NewIssuePinsAllowed diff --git a/tests/integration/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go index b9ba65f4277a7..7296db92aafc9 100644 --- a/tests/integration/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -118,7 +118,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 90085d896159a..0980a80643668 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 14d430fba5a7a..603189726b778 100644 --- a/tests/integration/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -32,7 +32,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) @@ -82,7 +82,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) @@ -92,7 +92,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) @@ -111,7 +111,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, @@ -162,7 +162,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 { @@ -216,7 +216,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 187a728a538fd..12c408082258b 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", @@ -76,7 +76,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) @@ -95,7 +95,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 a4c9fcfda2b00..a90c084ca86d9 100644 --- a/tests/integration/api_notification_test.go +++ b/tests/integration/api_notification_test.go @@ -63,7 +63,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) DecodeJSON(t, resp, &apiNL) @@ -72,7 +72,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) DecodeJSON(t, resp, &apiNL) @@ -129,7 +129,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 02df4ae906dd9..c86bf267b1995 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 45ab4cf344656..9a99562cd5dec 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) var commits []*api.Commit diff --git a/tests/integration/api_pull_review_test.go b/tests/integration/api_pull_review_test.go index 4dfaea29d9185..0602243cd3433 100644 --- a/tests/integration/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -34,7 +34,7 @@ func TestAPIPullReview(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) @@ -59,14 +59,14 @@ func TestAPIPullReview(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) var review api.PullReview DecodeJSON(t, resp, &review) 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) DecodeJSON(t, resp, &review) @@ -74,7 +74,7 @@ func TestAPIPullReview(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) var reviewComments []*api.PullReviewComment @@ -87,7 +87,7 @@ func TestAPIPullReview(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{ @@ -116,7 +116,7 @@ func TestAPIPullReview(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) @@ -127,7 +127,7 @@ func TestAPIPullReview(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) @@ -136,7 +136,7 @@ func TestAPIPullReview(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) DecodeJSON(t, resp, &review) @@ -144,7 +144,7 @@ func TestAPIPullReview(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) @@ -152,12 +152,12 @@ func TestAPIPullReview(t *testing.T) { DecodeJSON(t, resp, &review) 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{ @@ -185,7 +185,7 @@ func TestAPIPullReview(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{}, @@ -199,7 +199,7 @@ func TestAPIPullReview(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{}, @@ -215,7 +215,7 @@ func TestAPIPullReview(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) DecodeJSON(t, resp, &reviews) @@ -243,19 +243,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) @@ -264,18 +264,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) @@ -286,12 +286,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) @@ -299,12 +299,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) @@ -313,12 +313,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) @@ -329,35 +329,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) } @@ -377,7 +377,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) @@ -387,7 +387,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) @@ -397,7 +397,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) @@ -413,7 +413,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) @@ -433,7 +433,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) @@ -444,7 +444,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 cb6ed8e8f166b..49bca27a7ed5a 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) @@ -152,7 +152,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) @@ -161,7 +161,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) } @@ -182,7 +182,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) 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: "create a failure pr", @@ -296,7 +296,7 @@ func TestAPICreatePullBasePermission(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 base repo @@ -304,7 +304,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) } @@ -324,18 +324,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) } @@ -347,7 +347,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", @@ -378,7 +378,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) @@ -411,7 +411,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" @@ -437,7 +437,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, @@ -449,7 +449,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, @@ -464,7 +464,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) @@ -496,11 +496,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 991ad29837866..37b8e8eba7d61 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 e45dac60692f8..d34dff66beaaa 100644 --- a/tests/integration/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -36,7 +36,7 @@ func TestAPIListReleases(t *testing.T) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeReadRepository) - 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) var apiReleases []*api.Release DecodeJSON(t, resp, &apiReleases) @@ -82,7 +82,7 @@ func TestAPIListReleases(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, @@ -126,7 +126,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) @@ -173,7 +173,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, @@ -220,7 +220,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", @@ -236,7 +236,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) var release *api.Release @@ -253,7 +253,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) var release *api.Release @@ -263,7 +263,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) var err *api.APIError @@ -318,17 +318,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) } @@ -346,7 +346,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 cb6382687a59e..ce64440343ef0 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 1a17d63dab6cf..7f73bcfffb036 100644 --- a/tests/integration/api_repo_avatar_test.go +++ b/tests/integration/api_repo_avatar_test.go @@ -38,7 +38,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) @@ -47,7 +47,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) @@ -62,7 +62,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) } @@ -74,7 +74,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 0d8e29b4df229..ff5435b8e8f37 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) @@ -45,7 +45,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) @@ -58,7 +58,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) @@ -71,7 +71,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) @@ -82,7 +82,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) }) @@ -99,7 +99,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) @@ -112,7 +112,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 := api.RepoCollaboratorPermission{} @@ -128,7 +128,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) @@ -145,7 +145,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 c9fdddbee217a..864f85cf233a9 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -180,7 +180,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) @@ -215,7 +215,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) var fileResponse api.FileResponse @@ -233,7 +233,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) DecodeJSON(t, resp, &fileResponse) @@ -243,7 +243,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{ @@ -258,7 +258,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) @@ -266,14 +266,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) @@ -281,7 +281,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) @@ -289,14 +289,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 ff648baa280eb..f6ec8db280be8 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) var fileResponse api.FileResponse @@ -80,7 +80,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) var fileResponse api.FileResponse @@ -95,7 +95,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) DecodeJSON(t, resp, &fileResponse) @@ -108,7 +108,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) @@ -117,7 +117,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) @@ -126,7 +126,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 @@ -134,7 +134,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) @@ -143,7 +143,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) @@ -152,7 +152,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 @@ -160,7 +160,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 8258c6b9f6c8d..a5f94cbbf9f08 100644 --- a/tests/integration/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -134,7 +134,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) @@ -165,7 +165,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) var fileResponse api.FileResponse @@ -195,7 +195,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) DecodeJSON(t, resp, &fileResponse) @@ -213,7 +213,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) DecodeJSON(t, resp, &fileResponse) @@ -227,7 +227,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{ @@ -243,7 +243,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) @@ -252,7 +252,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 @@ -260,7 +260,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) @@ -269,7 +269,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) @@ -278,7 +278,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 @@ -286,7 +286,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 e9fb866d4fad9..f22e7db675123 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) @@ -142,7 +142,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) @@ -314,7 +314,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) @@ -329,7 +329,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 @@ -343,7 +343,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) @@ -358,7 +358,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) @@ -373,7 +373,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 @@ -387,7 +387,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 fc3980caa8287..446e5c4dc79bf 100644 --- a/tests/integration/api_repo_files_get_test.go +++ b/tests/integration/api_repo_files_get_test.go @@ -95,13 +95,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 d7241484d2b57..812b0e5d01f7b 100644 --- a/tests/integration/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -93,7 +93,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) var contentsListResponse []*api.ContentsResponse DecodeJSON(t, resp, &contentsListResponse) @@ -105,7 +105,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -116,7 +116,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -130,7 +130,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -144,7 +144,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) DecodeJSON(t, resp, &contentsListResponse) assert.NotNil(t, contentsListResponse) @@ -153,21 +153,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 d795f6ed5dd98..bf75c358241dd 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -97,14 +97,14 @@ func testAPIGetContents(t *testing.T, u *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) var contentsResponse api.ContentsResponse DecodeJSON(t, resp, &contentsResponse) @@ -114,7 +114,7 @@ func testAPIGetContents(t *testing.T, u *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) DecodeJSON(t, resp, &contentsResponse) expectedContentsResponse = getExpectedContentsResponseForContents(repo1.DefaultBranch, refType, lastCommit.ID.String()) @@ -123,7 +123,7 @@ func testAPIGetContents(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/%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) DecodeJSON(t, resp, &contentsResponse) branchCommit, _ := gitRepo.GetBranchCommit(ref) @@ -134,7 +134,7 @@ func testAPIGetContents(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/%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) DecodeJSON(t, resp, &contentsResponse) tagCommit, _ := gitRepo.GetTagCommit(ref) @@ -145,7 +145,7 @@ func testAPIGetContents(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/%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) DecodeJSON(t, resp, &contentsResponse) expectedContentsResponse = getExpectedContentsResponseForContents(ref, refType, commitID) @@ -153,21 +153,21 @@ func testAPIGetContents(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/%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 5f1fe7f9f37d6..fd9f4b2bded54 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) var gitBlobResponse api.GitBlobResponse DecodeJSON(t, resp, &gitBlobResponse) @@ -44,30 +44,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. @@ -75,6 +75,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 00e8ef93e4282..0aec30654d940 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) var apiGitHooks []*api.GitHook @@ -63,7 +63,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) var apiGitHooks []*api.GitHook @@ -83,7 +83,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) }) @@ -97,7 +97,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) var apiGitHook *api.GitHook @@ -113,7 +113,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) }) @@ -139,7 +139,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) var apiGitHook2 *api.GitHook @@ -156,7 +156,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) @@ -173,11 +173,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) var apiGitHook2 *api.GitHook @@ -194,7 +194,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 66afaa444edc4..fb78de7390866 100644 --- a/tests/integration/api_repo_git_tags_test.go +++ b/tests/integration/api_repo_git_tags_test.go @@ -45,7 +45,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) @@ -61,7 +61,7 @@ func TestAPIGitTags(t *testing.T) { assert.Equal(t, util.URLJoin(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) } @@ -74,14 +74,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 2664ff8479b3b..a225dc977b343 100644 --- a/tests/integration/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -57,26 +57,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. @@ -84,6 +84,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 ab52b77d9222e..169cb736a34c8 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 3b94156a72465..926e4ce82dbc0 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -82,66 +82,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}, @@ -565,7 +565,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) @@ -596,7 +596,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) @@ -612,7 +612,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) @@ -625,7 +625,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) @@ -641,7 +641,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) @@ -654,7 +654,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) @@ -673,7 +673,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", @@ -686,7 +686,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", @@ -706,7 +706,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) var reviewers []*api.User @@ -723,7 +723,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) var assignees []*api.User diff --git a/tests/integration/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go index a9760b1701ed8..9d4a15633357b 100644 --- a/tests/integration/api_repo_topic_test.go +++ b/tests/integration/api_repo_topic_test.go @@ -83,7 +83,7 @@ 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) var topics *api.TopicName @@ -91,21 +91,21 @@ func TestAPIRepoTopic(t *testing.T) { 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). @@ -158,12 +158,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) @@ -171,14 +171,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) DecodeJSON(t, res, &topics) 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 1e8caf5282ed5..44f98ee98f778 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -123,11 +123,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 f7ec3e5edda95..c3daa0e25b3f8 100644 --- a/tests/integration/eventsource_test.go +++ b/tests/integration/eventsource_test.go @@ -72,7 +72,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 d67b2db5d0cd7..e0300b6fe6d2f 100644 --- a/tests/integration/migrate_test.go +++ b/tests/integration/migrate_test.go @@ -90,7 +90,7 @@ func TestMigrateGiteaForm(t *testing.T) { req = NewRequestWithValues(t, "POST", link, map[string]string{ "_csrf": htmlDoc.GetCSRF(), "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 c468228b82f17..09c157a25bed4 100644 --- a/tests/integration/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -44,7 +44,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 cf77ba4c8fe70..be1d5dc2dfc54 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/pull_merge_test.go b/tests/integration/pull_merge_test.go index 168d5cc4e6634..a1dfc2532767f 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -75,12 +75,8 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo string, groupI Redirect string }{} DecodeJSON(t, resp, &respJSON) - 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), respJSON.Redirect) + assert.Equal(t, fmt.Sprintf("/%s/%s%s/pulls/%s", user, maybeWebGroupSegment(groupID), repo, pullnum), respJSON.Redirect) pullnumInt, err := strconv.ParseInt(pullnum, 10, 64) assert.NoError(t, err) diff --git a/tests/integration/repo_generate_test.go b/tests/integration/repo_generate_test.go index fca4e92982032..5283313e05f9f 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -62,7 +62,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 20e772b53b275..e4024b1331b86 100644 --- a/tests/integration/repo_merge_upstream_test.go +++ b/tests/integration/repo_merge_upstream_test.go @@ -41,7 +41,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: util.ToPointer("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 0000000000000..38cf18d991458 --- /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 e2c8c0514ad530464cda32d744fcda40561e422e 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/168] 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 7a8e1523f7b17..d14d7e7cde392 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -1549,7 +1549,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 6a23a2e18f2e7b8edaf65a8d64728cd6c6d8044a 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/168] 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 38cf18d991458..7e64ce1319da4 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 c88188846d913b2d57920b8a3b3b55a20faf03f4 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/168] fix `maybeGroupSegment` func, run formatter --- tests/integration/api_repo_test.go | 72 ++++++++++++++-------------- tests/integration/editor_test.go | 2 +- tests/integration/pull_merge_test.go | 2 +- tests/integration/utils.go | 10 +--- 4 files changed, 39 insertions(+), 47 deletions(-) diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 926e4ce82dbc0..2bbab9aa83f35 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -82,66 +82,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 44f98ee98f778..931668098eb58 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -124,7 +124,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/pull_merge_test.go b/tests/integration/pull_merge_test.go index a1dfc2532767f..dd7464b5f1a72 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -76,7 +76,7 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo string, groupI }{} DecodeJSON(t, resp, &respJSON) - assert.Equal(t, fmt.Sprintf("/%s/%s%s/pulls/%s", user, maybeWebGroupSegment(groupID), repo, pullnum), respJSON.Redirect) + assert.Equal(t, fmt.Sprintf("/%s/%s%s/pulls/%s", user, maybeGroupSegment(groupID), repo, pullnum), respJSON.Redirect) pullnumInt, err := strconv.ParseInt(pullnum, 10, 64) assert.NoError(t, err) diff --git a/tests/integration/utils.go b/tests/integration/utils.go index 7e64ce1319da4..166720fc88d97 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 0b8614f348c2ad9dd4d580b7d62d9ebf042251b3 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/168] 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 4dfd3040b60fb..5c67ed5998214 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 46533a4933114..8c214269b76b6 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 4e1e009208d49f641e3f491102967fdf06b67ff5 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/168] 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 c86bf267b1995..02df4ae906dd9 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 1f40523611e3703b88497cb7f9f47e0f41473a45 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/168] 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 403c91cacf058..5ea9718466268 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 2481bf8d9f733db593f4282fb24cb4b9b826444d 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/168] 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 2540481d0ffcc..4d0a0fea1c161 100644 --- a/modules/structs/issue.go +++ b/modules/structs/issue.go @@ -266,8 +266,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 e85b918e35359c0d3120703940c0da354f7c9f7c 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/168] 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 ce8e1e4b4950a..de11c2e1af0a6 100644 --- a/routers/api/v1/repo/issue_dependency.go +++ b/routers/api/v1/repo/issue_dependency.go @@ -514,7 +514,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 8356d6058dbea..bec85755df894 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 b30ca382e3220f7fe8a98c529512411537693e60 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/168] 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 5ea83672be44d..0797815fec56d 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1763,6 +1763,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 3614035831ac1943ea0942e4e4de19fd69c6d16f 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/168] 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 39025d65b0c79..159da303bc2d8 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -356,7 +356,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 fcfef8a32b8ed272ce9c918ab7e3348c81fb2964 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/168] 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 2438db72c5a4a..ea9b036bbf1ec 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 34d699049717f..bca695a1ff1f7 100644 --- a/tests/integration/api_repo_edit_test.go +++ b/tests/integration/api_repo_edit_test.go @@ -398,11 +398,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 e463027ed3c83..a7dd238a963e6 100644 --- a/tests/integration/api_repo_file_diffpatch_test.go +++ b/tests/integration/api_repo_file_diffpatch_test.go @@ -73,12 +73,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 931668098eb58..8336022a4cfa9 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -124,7 +124,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 0da08796dcb39..946a9b4be076a 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -476,19 +476,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 a0e280858bf5d1362d41315ab6607fa715beed4a 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/168] 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 9321375c00c14..be4fd9dd6f05f 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 ce25276884ddd9b648f4b0a258636652746a6d19 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/168] update swagger definitions --- templates/swagger/v1_groups.json | 13976 ++++++++++++++--------------- templates/swagger/v1_json.tmpl | 5 + 2 files changed, 6993 insertions(+), 6988 deletions(-) diff --git a/templates/swagger/v1_groups.json b/templates/swagger/v1_groups.json index 0a73b3e46fa5e..667fbf96dadf7 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", @@ -19,46 +18,56 @@ "required": true }, { + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path" }, { + "name": "group_id", "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", - "format": "int64" + "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": "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": "string", - "description": "triggering sha of the workflow run", - "name": "head_sha", + "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" + "in": "query", + "type": "integer", + "description": "page number of results to return (1-based)" }, { - "description": "page size of results", + "type": "integer", + "description": "page size of results (ignored if used with 'path')", "name": "limit", - "in": "query", - "type": "integer" + "in": "query" + }, + { + "type": "string", + "description": "commits that match the given specifier will not be listed.", + "name": "not", + "in": "query" }, { "in": "path", @@ -127,28 +156,38 @@ ], "responses": { "200": { - "$ref": "#/responses/WorkflowRunsList" - }, - "400": { - "$ref": "#/responses/error" + "$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": "Lists all runs for a repository run" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { - "summary": "Update avatar", - "operationId": "repoUpdateAvatar", + "summary": "Get signing-key.gpg for given repository", + "operationId": "repoSigningKey", "parameters": [ { "type": "string", @@ -164,13 +203,6 @@ "in": "path", "required": true }, - { - "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" - }, - "name": "body", - "in": "body" - }, { "format": "int64", "required": true, @@ -179,39 +211,16 @@ "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" - ], + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "get": { "tags": [ - "repository" + "issue" ], - "summary": "Delete avatar", - "operationId": "repoDeleteAvatar", + "summary": "Get a single label", + "operationId": "issueGetLabel", "parameters": [ { "type": "string", @@ -221,27 +230,42 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { "in": "path", - "description": "group ID of the repo", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id" + }, + { "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path", + "description": "group ID of the repo" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { - "get": { - "summary": "Get a commit's diff or patch", - "operationId": "repoDownloadCommitDiffOrPatch", + }, + "delete": { "parameters": [ { "required": true, @@ -251,29 +275,19 @@ "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" + "description": "name of the repo", + "name": "repo" }, { - "enum": [ - "diff", - "patch" - ], - "type": "string", - "description": "whether the output is diff or patch", - "name": "diffType", + "description": "id of the label to delete", + "name": "id", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64" }, { "description": "group ID of the repo", @@ -285,23 +299,31 @@ } ], "responses": { - "200": { - "$ref": "#/responses/string" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } }, - "produces": [ - "text/plain" - ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { + "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,71 +373,94 @@ "type": "integer", "format": "int64" } + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { + "post": { + "produces": [ + "application/json" ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/Label" - } - } - }, - "get": { - "operationId": "issueGetLabel", + "tags": [ + "repository" + ], + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch", "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": "owner of the repo" }, { - "type": "integer", - "format": "int64", - "description": "id of the label to get", - "name": "id", + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/Label" + "$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": "Get a single label" - }, - "delete": { - "operationId": "issueDeleteLabel", + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", "parameters": [ { "type": "string", @@ -425,47 +470,33 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "id", - "in": "path", "required": true, "type": "integer", "format": "int64", - "description": "id of the label to delete" + "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" - }, - "404": { - "$ref": "#/responses/notFound" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { "delete": { - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", "parameters": [ { "type": "string", @@ -475,41 +506,49 @@ "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", "format": "int64", - "description": "index of the issue to stop the stopwatch on", + "description": "index of the issue", "name": "index", "in": "path", "required": true }, { + "required": true, "type": "integer", "format": "int64", - "required": true, + "description": "id of time to delete", + "name": "id", + "in": "path" + }, + { "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { + "403": { + "$ref": "#/responses/forbidden" + }, "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" + "400": { + "$ref": "#/responses/error" } }, "consumes": [ @@ -520,269 +559,160 @@ ], "tags": [ "issue" - ] + ], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { + "/repos/{owner}/group/{group_id}/{repo}/forks": { "get": { - "produces": [ - "application/json" - ], "tags": [ - "issue" + "repository" ], - "summary": "List a repository's issues", - "operationId": "issueListIssues", + "summary": "List a repository's forks", + "operationId": "listForks", "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" + "description": "owner of the repo", + "name": "owner" }, { - "enum": [ - "issues", - "pulls" - ], "type": "string", - "description": "filter by type (issues / pulls) if set", - "name": "type", - "in": "query" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "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", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", "in": "query" }, { + "name": "limit", "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" + "type": "integer", + "description": "page size of results" }, { - "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/IssueList" + "$ref": "#/responses/RepositoryList" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ] }, "post": { "tags": [ - "issue" + "repository" ], - "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueCreateIssue", + "summary": "Fork a repository", + "operationId": "createFork", "parameters": [ { + "description": "owner of the repo to fork", + "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" + "type": "string" }, { "in": "path", "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repo to fork", "name": "repo" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateIssueOption" + "$ref": "#/definitions/CreateForkOption" } }, { - "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" - }, "404": { "$ref": "#/responses/notFound" }, - "412": { - "$ref": "#/responses/error" + "409": { + "description": "The repository with the same name already exists." }, "422": { "$ref": "#/responses/validationError" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "202": { + "$ref": "#/responses/Repository" }, - "201": { - "$ref": "#/responses/Issue" + "403": { + "$ref": "#/responses/forbidden" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a commit's statuses, by branch/tag/commit reference", - "operationId": "repoListStatusesByRef", + "operationId": "listWorkflowJobs", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "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" + "description": "name of the repository", + "name": "repo" }, { - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], "type": "string", - "description": "type of state", - "name": "state", + "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 number of results to return (1-based)" }, { - "type": "integer", "description": "page size of results", "name": "limit", - "in": "query" + "in": "query", + "type": "integer" }, { "required": true, @@ -794,139 +724,196 @@ } ], "responses": { + "404": { + "$ref": "#/responses/notFound" + }, "200": { - "$ref": "#/responses/CommitStatusList" + "$ref": "#/responses/WorkflowJobsList" }, "400": { "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + "/repos/{owner}/group/{group_id}/{repo}/pulls": { "get": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", "parameters": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "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 the repo", - "name": "repo" + "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": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "ID of the milestone", + "name": "milestone", + "in": "query" }, { - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, - "type": "integer" + "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" + "name": "group_id", + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/PullRequestList" } - }, - "produces": [ - "application/json" - ] + } }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment", + "post": { + "operationId": "repoCreatePullRequest", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "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/CreatePullRequestOption" + } }, { - "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 + "format": "int64" } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" + "403": { + "$ref": "#/responses/forbidden" }, "404": { + "$ref": "#/responses/notFound" + }, + "409": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/PullRequest" } - } - }, - "patch": { + }, "consumes": [ "application/json" ], @@ -934,17 +921,28 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", + "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", - "required": true, - "type": "string" + "in": "path" }, { "description": "name of the repo", @@ -954,27 +952,22 @@ "type": "string" }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "SHA of the commit to get", + "name": "sha" }, { - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", + "name": "diffType", "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } + "required": true, + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch" }, { "description": "group ID of the repo", @@ -986,89 +979,60 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/string" }, "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { "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 + "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" - }, - { "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query" + "description": "name of the repo" }, { + "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" + "format": "int64" }, { + "name": "id", + "in": "path", + "required": true, "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", + "description": "id of the review" }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/TimelineList" + "$ref": "#/responses/PullReviewCommentList" }, "404": { "$ref": "#/responses/notFound" @@ -1076,88 +1040,68 @@ }, "produces": [ "application/json" - ] + ], + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { - "post": { - "operationId": "issueStartStopWatch", + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "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 + "name": "repo" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "200": { + "$ref": "#/responses/PullRequestList" }, "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." + "repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { "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", + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", "parameters": [ { "type": "string", @@ -1174,223 +1118,206 @@ "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", - "description": "group ID of the repo" + "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { - "post": { + ], "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { - "$ref": "#/responses/error" + "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": "Create a commit status", - "operationId": "repoCreateStatus", + "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" + "name": "owner" }, { - "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": "sha of the commit", - "name": "sha", + "description": "id of the artifact", + "name": "artifact_id", "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" + "format": "int64", + "required": true, + "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/Artifact" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } }, - "get": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Deletes a specific artifact for a workflow run", + "operationId": "deleteArtifact", "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": "owner of the repo" }, { "type": "string", - "description": "sha of the commit", - "name": "sha", + "description": "name of the repository", + "name": "repo", "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" + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { + "204": { + "description": "No Content" + }, "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}": { + "/repos/{owner}/group/{group_id}/{repo}/reviewers": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", + "operationId": "repoGetReviewers", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 the page", - "name": "pageName" + "required": true }, { - "format": "int64", - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/WikiPage" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "delete": { + }, + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", + "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", @@ -1407,83 +1334,41 @@ "required": true }, { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "name of the page", - "name": "pageName" + "required": true }, { + "type": "integer", "format": "int64", - "required": true, + "description": "id of the review", + "name": "id", "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" + "required": true }, { + "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body" + "$ref": "#/definitions/DismissPullReviewOptions" + } }, { + "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": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/PullReview" }, "403": { "$ref": "#/responses/forbidden" @@ -1491,11 +1376,11 @@ "404": { "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "422": { + "$ref": "#/responses/validationError" } }, - "consumes": [ + "produces": [ "application/json" ], "tags": [ @@ -1503,98 +1388,102 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { - "get": { - "produces": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { + "put": { "tags": [ - "repository" + "issue" ], - "summary": "Downloads the job logs for a workflow run", - "operationId": "downloadActionsRunJobLogs", + "summary": "Lock an issue", + "operationId": "issueLockIssue", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "type": "integer", - "description": "id of the job", - "name": "job_id", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/LockIssueOption" + } }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "description": "output blob content" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { - "post": { + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] + }, + "delete": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Cancel to dismiss a review for a pull request", - "operationId": "repoUnDismissPullReview", + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", "parameters": [ { - "description": "owner of the repo", - "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo", + "name": "owner" }, { - "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" + "name": "repo", + "in": "path" }, { "type": "integer", "format": "int64", - "description": "id of the review", - "name": "id", + "description": "index of the issue", + "name": "index", "in": "path", "required": true }, @@ -1608,26 +1497,23 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "204": { + "$ref": "#/responses/empty" }, - "200": { - "$ref": "#/responses/PullReview" + "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,113 +1525,119 @@ "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": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Update a repo-level variable", - "operationId": "updateRepoVariable", + "operationId": "updateRepoSecret", "parameters": [ { - "type": "string", - "description": "owner of the repo", - "name": "owner", "in": "path", - "required": true + "required": true, + "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 + "name": "repo" }, { - "name": "variablename", + "description": "name of the secret", + "name": "secretname", "in": "path", "required": true, - "type": "string", - "description": "name of the variable" + "type": "string" }, { - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - }, "name": "body", - "in": "body" + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } }, { + "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": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, "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": { + }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a repo-level variable", - "operationId": "createRepoVariable", - "parameters": [ - { - "in": "path", - "required": true, + "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", - "name": "owner" + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -1756,80 +1648,87 @@ }, { "type": "string", - "description": "name of the variable", - "name": "variablename", + "description": "name of the secret", + "name": "secretname", "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" + "name": "group_id", + "type": "integer" } ], "responses": { - "201": { - "description": "response when creating a repo-level variable" + "204": { + "description": "delete one secret of the repository" }, "400": { "$ref": "#/responses/error" }, - "409": { - "description": "variable name already exists." - }, - "500": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" } } - }, - "delete": { - "produces": [ - "application/json" - ], + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { + "get": { "tags": [ "repository" ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", + "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" + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", "required": true }, { "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "sha of the commit", + "name": "sha" }, { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "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" + }, + { + "name": "per_page", + "in": "query", + "type": "integer", + "description": "number of items per page" }, { - "required": true, - "in": "path", - "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { @@ -1840,17 +1739,23 @@ "$ref": "#/responses/notFound" }, "200": { - "$ref": "#/responses/ActionVariable" - }, - "201": { - "description": "response when deleting a variable" - }, - "204": { - "description": "response when deleting a variable" + "$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": [ { @@ -1861,18 +1766,18 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repository", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { + "required": true, "type": "string", "description": "name of the variable", "name": "variablename", - "in": "path", - "required": true + "in": "path" }, { "description": "group ID of the repo", @@ -1893,26 +1798,10 @@ "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", + } + }, + "put": { + "operationId": "updateRepoVariable", "parameters": [ { "type": "string", @@ -1922,184 +1811,188 @@ "required": true }, { - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true, "type": "string" }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "type": "string", + "description": "name of the variable", + "name": "variablename", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "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", - "required": true + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" + "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" } - } - } - }, - "/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", + "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", - "required": true + "in": "path" }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" - }, - { - "description": "index of the pull request", - "name": "index", + "description": "name of the repository", + "name": "repo", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", + "type": "string", + "description": "name of the variable", + "name": "variablename", "in": "path", "required": true }, { - "required": true, - "in": "path", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + }, + { "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/PullReview" + "201": { + "description": "response when creating a repo-level variable" }, - "404": { - "$ref": "#/responses/notFound" + "400": { + "$ref": "#/responses/error" + }, + "409": { + "description": "variable name already exists." + }, + "500": { + "$ref": "#/responses/error" } - } - }, - "post": { - "operationId": "repoSubmitPullReview", + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "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 - }, - { "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "type": "string" }, { - "description": "index of the pull request", - "name": "index", + "name": "repo", "in": "path", "required": true, - "type": "integer", - "format": "int64" + "type": "string", + "description": "name of the repository" }, { - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", "required": true, - "type": "integer" + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path" }, { - "name": "body", - "in": "body", "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - } - }, - { + "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/PullReview" + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Submit a pending review to an pull request" - }, - "delete": { + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { + "get": { "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,215 +2009,228 @@ "description": "name of the repo" }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", "in": "path", "required": true }, { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" + "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, - "in": "path" + "required": true } ], "responses": { "404": { "$ref": "#/responses/notFound" }, - "204": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/Note" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { - "get": { - "produces": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { + "patch": { "tags": [ - "repository" + "issue" ], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { "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" + "format": "int64", + "description": "index of issue", + "name": "index", + "in": "path", + "required": true }, { + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "204": { + "$ref": "#/responses/empty" }, - "200": { - "$ref": "#/responses/VariableList" + "403": { + "$ref": "#/responses/forbidden" }, - "400": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { "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" + "in": "path", + "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { + "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" + "required": true } ], "responses": { "200": { - "$ref": "#/responses/RepoIssueConfig" + "$ref": "#/responses/GitHookList" }, "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", + "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", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "team name", - "name": "team" + "description": "name of the artifact", + "name": "name", + "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" } ], "responses": { "200": { - "$ref": "#/responses/Team" + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" }, "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" + "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", @@ -2333,13 +2239,53 @@ "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": "team name", - "name": "team", + "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", @@ -2350,28 +2296,32 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "404": { "$ref": "#/responses/notFound" }, - "405": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, - "422": { - "$ref": "#/responses/validationError" + "403": { + "$ref": "#/responses/forbidden" } } - }, - "delete": { + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics": { + "get": { + "tags": [ + "repository" + ], + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "type": "string", @@ -2381,11 +2331,16 @@ "required": true }, { - "description": "team name", - "name": "team", - "in": "path", - "required": true, - "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" }, { "description": "group ID of the repo", @@ -2397,47 +2352,18 @@ } ], "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" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/TopicNames" } }, "produces": [ "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", + ] + }, + "put": { "parameters": [ { "type": "string", @@ -2447,72 +2373,65 @@ "required": true }, { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "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", - "description": "group ID of the repo" + "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + }, + "204": { + "$ref": "#/responses/empty" + } + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "get": { "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "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 - }, - { - "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": "name of the repo" }, { "required": true, @@ -2525,27 +2444,32 @@ ], "responses": { "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" + "$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}/actions/runners/registration-token": { + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { "get": { "produces": [ - "application/json" + "text/plain" ], "tags": [ "repository" ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", + "summary": "Get signing-key.pub for given repository", + "operationId": "repoSigningKeySSH", "parameters": [ { "type": "string", @@ -2555,77 +2479,98 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "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": { - "$ref": "#/responses/RegistrationToken" + "description": "ssh public key", + "schema": { + "type": "string" + } } } - }, - "post": { - "summary": "Get a repository's actions runner registration token", - "operationId": "repoCreateRunnerRegistrationToken", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "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 + "required": true, + "type": "string" }, { + "name": "repo", + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repo" + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true }, { - "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } - }, + } + }, + "patch": { "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "operationId": "repoGetRepoPermissions", + ], + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -2635,27 +2580,42 @@ "required": true }, { + "description": "index of the hook", + "name": "id", "in": "path", "required": true, - "type": "string", - "description": "username of the collaborator whose permissions are to be obtained", - "name": "collaborator" + "type": "integer", + "format": "int64" + }, + { + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + }, + "name": "body" }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/RepoCollaboratorPermission" + "404": { + "$ref": "#/responses/notFound" }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "get": { + "responses": { + "200": { + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" @@ -2667,12 +2627,8 @@ "tags": [ "repository" ], - "summary": "Get repository permissions for a user" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { - "get": { - "operationId": "repoCheckCollaborator", + "summary": "Get a hook", + "operationId": "repoGetHook", "parameters": [ { "type": "string", @@ -2682,37 +2638,63 @@ "required": true }, { + "required": true, + "type": "string", "description": "name of the repo", "name": "repo", + "in": "path" + }, + { + "name": "id", "in": "path", "required": true, - "type": "string" + "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": "username of the user to check for being a collaborator", - "name": "collaborator", + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/IssueTemplates" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, "produces": [ @@ -2721,45 +2703,41 @@ "tags": [ "repository" ], - "summary": "Check if a user is a collaborator of a repository" - }, - "put": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", + "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" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "string", - "description": "username of the user to add or update as a collaborator", - "name": "collaborator", - "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": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - } + "in": "query" }, { "description": "group ID of the repo", @@ -2771,29 +2749,34 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/ContentsListResponse" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - } + }, + "description": "See the POST method. This GET method supports using JSON encoded request body in query parameter.", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] }, - "delete": { - "operationId": "repoDeleteCollaborator", + "post": { + "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 + "required": true, + "type": "string", + "description": "owner of the repo" }, { "type": "string", @@ -2804,10 +2787,17 @@ }, { "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator", - "in": "path", - "required": true + "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", @@ -2819,32 +2809,29 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" + "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": "Delete a collaborator from a repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { "get": { - "tags": [ - "issue" + "produces": [ + "application/json" ], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment", + "tags": [ + "repository" + ], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection", "parameters": [ { "type": "string", @@ -2854,62 +2841,47 @@ "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" + "type": "string" }, { "required": true, "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/TagProtection" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } }, "delete": { - "tags": [ - "issue" - ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", + "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" + "in": "path", + "required": true }, { "type": "string", @@ -2919,84 +2891,75 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", "in": "path", - "required": true - }, - { + "required": true, "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true + "description": "id of protected tag", + "name": "id" }, { + "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": { - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] }, "patch": { - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment", + "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": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { "required": true, "type": "integer", - "format": "int64", - "description": "id of the comment", + "description": "id of protected tag", "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" + "$ref": "#/definitions/EditTagProtectionOption" } }, { @@ -3009,11 +2972,11 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/TagProtection" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" @@ -3021,19 +2984,10 @@ "423": { "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs": { + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { "get": { "produces": [ "application/json" @@ -3041,35 +2995,42 @@ "tags": [ "repository" ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs", + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "required": true, "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/ReferenceList" + "description": "success" }, "404": { "$ref": "#/responses/notFound" @@ -3077,9 +3038,9 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}/permission": { "get": { - "operationId": "issueGetCommentReactions", + "operationId": "repoGetRepoPermissions", "parameters": [ { "required": true, @@ -3089,32 +3050,31 @@ "in": "path" }, { + "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 comment to edit", - "name": "id", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/ReactionList" + "$ref": "#/responses/RepoCollaboratorPermission" }, "403": { "$ref": "#/responses/forbidden" @@ -3123,20 +3083,33 @@ "$ref": "#/responses/notFound" } }, - "consumes": [ + "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": "Get a list of reactions from a comment of an issue" - }, - "post": { - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", "parameters": [ { "description": "owner of the repo", @@ -3146,141 +3119,67 @@ "type": "string" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, + "required": true + }, + { + "in": "query", "type": "string", - "description": "name of the repo" + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since" }, { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id" + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query", + "type": "string", + "format": "date-time" }, { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } + "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" - } - ], - "responses": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" + "format": "int64", + "required": true, + "in": "path" } - }, - "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", + "/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 to transfer" + "description": "owner of the repo" }, { - "description": "name of the repo to transfer", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { "description": "group ID of the repo", @@ -3292,14 +3191,8 @@ } ], "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/RegistrationToken" } }, "produces": [ @@ -3307,83 +3200,55 @@ ], "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" + "repository" ], - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction", + "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" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "description": "index of the issue", - "name": "index", - "in": "path", + "format": "int64", "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - }, - { + "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "type": "integer" } - ] - }, - "delete": { + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues": { + "get": { "tags": [ "issue" ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction", + "summary": "List a repository's issues", + "operationId": "issueListIssues", "parameters": [ { "type": "string", @@ -3393,94 +3258,88 @@ "required": true }, { + "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": "path" + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" + "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": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" + "type": "string", + "description": "search string", + "name": "q", + "in": "query" }, - "200": { - "$ref": "#/responses/empty" + { + "name": "type", + "in": "query", + "enum": [ + "issues", + "pulls" + ], + "type": "string", + "description": "filter by type (issues / pulls) if set" }, - "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 + "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", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "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": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "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": "integer", + "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" + "name": "page", + "in": "query", + "type": "integer" }, { "type": "integer", @@ -3489,91 +3348,92 @@ "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/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { - "put": { - "operationId": "ActionsEnableWorkflow", + }, + "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": [ - { - "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": "owner of the repo", + "name": "owner" }, { "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "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, - "in": "path" + "required": true } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, - "409": { - "$ref": "#/responses/conflict" + "412": { + "$ref": "#/responses/error" }, "422": { "$ref": "#/responses/validationError" }, - "204": { - "description": "No Content" + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Issue" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" - ], - "summary": "Enable a workflow" + "issue" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "/repos/{owner}/group/{group_id}/{repo}/times": { "get": { "parameters": [ { @@ -3591,18 +3451,37 @@ "required": true }, { - "required": true, "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path" + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", + "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", @@ -3613,11 +3492,17 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" } }, "produces": [ @@ -3626,79 +3511,78 @@ "tags": [ "repository" ], - "summary": "Get revisions of a wiki page", - "operationId": "repoGetWikiPageRevisions" + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List all reviews for a pull request", - "operationId": "repoListPullReviews", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { + "description": "id of the release", + "name": "id", "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" + "format": "int64" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/PullReviewList" + "$ref": "#/responses/Attachment" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment" }, - "post": { + "delete": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", "parameters": [ { "type": "string", @@ -3708,137 +3592,58 @@ "required": true }, { + "type": "string", "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", - "name": "index", + "description": "id of the release", + "name": "id", "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", + "description": "id of the attachment to delete", + "name": "attachment_id", "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" - }, + "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": "Create a new git tag in a repository", - "operationId": "repoCreateTag", + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", "parameters": [ { "type": "string", @@ -3854,11 +3659,27 @@ "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/CreateTagOption" + "$ref": "#/definitions/EditAttachmentOptions" } }, { @@ -3869,23 +3690,34 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/subscription": { + "/repos/{owner}/group/{group_id}/{repo}/releases": { "get": { "tags": [ "repository" ], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription", + "summary": "List a repo's releases", + "operationId": "repoListReleases", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "in": "path", @@ -3895,71 +3727,112 @@ "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/WatchInfo" + "$ref": "#/responses/ReleaseList" }, "404": { - "description": "User is not watching this repo or repo do not exist" + "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ] }, - "put": { + "post": { + "tags": [ + "repository" + ], + "summary": "Create a release", + "operationId": "repoCreateRelease", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } }, { - "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" } ], "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "201": { + "$ref": "#/responses/Release" } }, - "tags": [ - "repository" - ], - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription" - }, - "delete": { - "tags": [ - "repository" + "consumes": [ + "application/json" ], - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription", + "produces": [ + "application/json" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/enable": { + "put": { + "operationId": "ActionsEnableWorkflow", "parameters": [ { "type": "string", @@ -3976,83 +3849,111 @@ "required": true }, { - "type": "integer", - "format": "int64", + "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" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "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/{index}/times/{id}": { - "delete": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "patch": { "tags": [ "issue" ], - "summary": "Delete specific tracked time", - "operationId": "issueDeleteTime", + "summary": "Edit a comment", + "operationId": "issueEditComment", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo" }, { "type": "integer", "format": "int64", - "description": "index of the issue", - "name": "index", + "description": "id of the comment to edit", + "name": "id", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of time to delete", - "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" + "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" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" } }, "consumes": [ @@ -4061,25 +3962,26 @@ "produces": [ "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_templates": { + }, "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates", + "summary": "Get a comment", + "operationId": "issueGetComment", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "required": true, @@ -4089,27 +3991,38 @@ "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/IssueTemplates" + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { - "get": { - "operationId": "repoValidateIssueConfig", + }, + "delete": { "parameters": [ { "description": "owner of the repo", @@ -4119,173 +4032,127 @@ "type": "string" }, { + "type": "string", "description": "name of the repo", "name": "repo", + "in": "path", + "required": true + }, + { "in": "path", "required": true, - "type": "string" + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - }, "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": "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", + "summary": "Gets a specific workflow job for a workflow run", + "operationId": "getWorkflowJob", "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", + "description": "name of the repository", "name": "repo", "in": "path" }, { "type": "string", - "description": "name of tag", - "name": "tag", + "description": "id of the job", + "name": "job_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/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" + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/WorkflowJob" + }, + "400": { + "$ref": "#/responses/error" }, "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}": { + "/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": "owner of the repo" + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { + "name": "id", "in": "path", "required": true, - "type": "string", - "description": "remote name of push mirror", - "name": "name" + "type": "integer", + "format": "int64", + "description": "id of the release" }, { "description": "group ID of the repo", @@ -4297,17 +4164,11 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/AttachmentList" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ @@ -4315,92 +4176,117 @@ ], "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", + "post": { + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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": "remote name of the pushMirror", - "name": "name", + "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, - "in": "path" + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "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}/issues/{index}/subscriptions/check": { - "get": { - "tags": [ - "issue" - ], - "summary": "Check if user is subscribed to an issue", - "operationId": "issueCheckSubscription", + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "post": { + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { - "name": "index", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "index of the issue" + "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", @@ -4412,23 +4298,34 @@ } ], "responses": { + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, "200": { - "$ref": "#/responses/WatchInfo" + "$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}/hooks": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, "parameters": [ { "required": true, @@ -4438,133 +4335,137 @@ "in": "path" }, { + "description": "name of the repo", + "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "type": "string" }, { - "in": "query", "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true }, { + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/HookList" + "204": { + "$ref": "#/responses/empty" }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List the hooks in a repository", - "operationId": "repoListHooks" - }, - "post": { - "responses": { - "201": { - "$ref": "#/responses/Hook" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "tags": [ - "repository" + "issue" ], - "summary": "Create a hook", - "operationId": "repoCreateHook", + "summary": "Delete a comment" + }, + "patch": { + "operationId": "issueEditCommentDeprecated", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", "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/CreateHookOption" + "$ref": "#/definitions/EditIssueCommentOption" } }, { - "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}/actions/tasks": { - "get": { + ], + "produces": [ + "application/json" + ], + "summary": "Edit a comment", + "deprecated": true, "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" }, - "409": { - "$ref": "#/responses/conflict" + "200": { + "$ref": "#/responses/Comment" }, - "422": { - "$ref": "#/responses/validationError" + "204": { + "$ref": "#/responses/empty" }, - "200": { - "$ref": "#/responses/TasksList" + "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": [ - "repository" + "issue" ], - "summary": "List a repository's action tasks", - "operationId": "ListActionTasks", + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment", "parameters": [ { "type": "string", @@ -4582,15 +4483,19 @@ }, { "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true }, { + "in": "path", + "required": true, "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id" }, { "description": "group ID of the repo", @@ -4600,26 +4505,24 @@ "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", + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "delete": { "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { "description": "name of the repo", @@ -4631,42 +4534,61 @@ { "type": "integer", "format": "int64", - "description": "id of the key to get", + "description": "id of the comment", "name": "id", "in": "path", "required": true }, { "format": "int64", - "required": true, + "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" + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/DeployKey" + "204": { + "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment" }, - "delete": { + "patch": { "tags": [ - "repository" + "issue" ], - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", "parameters": [ { + "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo" + "type": "string" }, { "type": "string", @@ -4678,7 +4600,7 @@ { "type": "integer", "format": "int64", - "description": "id of the key to delete", + "description": "id of the comment", "name": "id", "in": "path", "required": true @@ -4686,35 +4608,76 @@ { "type": "integer", "format": "int64", - "required": true, + "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" + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { - "get": { + "/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": [ - "repository" + "issue" ], - "summary": "List repository workflows", - "operationId": "ActionsListRepositoryWorkflows", + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription", "parameters": [ { "type": "string", @@ -4731,40 +4694,56 @@ "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", - "required": true + "format": "int64" } - ], + ] + }, + "delete": { "responses": { - "403": { - "$ref": "#/responses/forbidden" + "304": { + "description": "User can only subscribe itself if he is no admin" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" - }, "200": { - "$ref": "#/responses/ActionWorkflowList" + "description": "Already unsubscribed" }, - "400": { - "$ref": "#/responses/error" + "201": { + "description": "Successfully Unsubscribed" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { - "get": { - "summary": "Get an issue", - "operationId": "issueGetIssue", + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", "parameters": [ { "name": "owner", @@ -4774,50 +4753,40 @@ "description": "owner of the repo" }, { + "type": "string", "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", "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to get" + "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", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" + "format": "int64" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" ] - }, - "delete": { - "tags": [ - "issue" - ], - "summary": "Delete an issue", - "operationId": "issueDelete", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "get": { "parameters": [ { "type": "string", @@ -4834,67 +4803,75 @@ "required": true }, { + "format": "int64", + "description": "index of the pull request to get", "name": "index", "in": "path", "required": true, + "type": "integer" + }, + { "type": "integer", - "format": "int64", - "description": "index of issue to delete" + "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": { - "204": { - "$ref": "#/responses/empty" + "description": "page size of results", + "name": "limit", + "in": "query" }, - "403": { - "$ref": "#/responses/forbidden" + { + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query", + "type": "boolean" }, - "404": { - "$ref": "#/responses/notFound" + { + "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" } - } - }, - "patch": { + ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/CommitList" }, "404": { "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "201": { - "$ref": "#/responses/Issue" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueEditIssue", + "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", - "required": true + "in": "path" }, { "description": "name of the repo", @@ -4904,19 +4881,11 @@ "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" - } + "$ref": "#/definitions/UpdateBranchProtectionPriories" + }, + "name": "body" }, { "description": "group ID of the repo", @@ -4926,26 +4895,46 @@ "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}/compare/{basehead}": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", + "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", @@ -4955,207 +4944,175 @@ "required": true }, { + "name": "index", "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" + "description": "index of the pull request to get" }, - "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" + "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": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "description": "whitespace behavior" }, { - "in": "query", "type": "integer", "description": "page number of results to return (1-based)", - "name": "page" + "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", - "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": { "200": { - "$ref": "#/responses/WikiPageList" + "$ref": "#/responses/ChangedFileList" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { + "/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" + "type": "string", + "description": "name of the repo" }, { "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "base of the pull request to get", + "name": "base" }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", + "type": "string", + "description": "head of the pull request to get", + "name": "head", "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" - }, - { + "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": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions" + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/transfer": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun", + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer", "parameters": [ { - "required": true, "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to transfer", "name": "owner", - "in": "path" - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", "in": "path", "required": true }, { - "name": "run", + "description": "name of the repo to transfer", + "name": "repo", "in": "path", "required": true, - "type": "integer", - "description": "runid of the workflow run" + "type": "string" }, { - "description": "name of the artifact", - "name": "name", - "in": "query", - "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", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/ArtifactsList" + "422": { + "$ref": "#/responses/validationError" }, - "400": { - "$ref": "#/responses/error" + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -5163,8 +5120,27 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "get": { + "/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", @@ -5181,11 +5157,12 @@ "required": true }, { - "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path" + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -5195,30 +5172,17 @@ "required": true, "in": "path" } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, + ] + }, + "get": { "produces": [ "application/json" ], "tags": [ - "repository" - ], - "summary": "Get a Git hook", - "operationId": "repoGetGitHook" - }, - "delete": { - "tags": [ - "repository" + "issue" ], - "summary": "Delete a Git hook in a repository", - "operationId": "repoDeleteGitHook", + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", "parameters": [ { "type": "string", @@ -5228,69 +5192,78 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { "required": true, - "type": "string", - "description": "id of the hook to get", - "name": "id", + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/LabelList" } - }, + } + }, + "put": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - }, - "patch": { - "operationId": "repoEditGitHook", + ], + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", "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", - "description": "id of the hook to get", - "name": "id", + "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditGitHookOption" + "$ref": "#/definitions/IssueLabelsOption" } }, { @@ -5304,56 +5277,46 @@ ], "responses": { "200": { - "$ref": "#/responses/GitHook" + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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": { + } + }, + "post": { "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { - "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" + "description": "name of the repo" }, { + "in": "path", + "required": true, "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "index of the issue", + "name": "index" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } }, { "description": "group ID of the repo", @@ -5366,158 +5329,112 @@ ], "responses": { "200": { - "$ref": "#/responses/ActivityFeedsList" + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds" + "summary": "Add a label to an issue", + "operationId": "issueAddLabel" } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { - "delete": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { + "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Remove a label from an issue", - "operationId": "issueRemoveLabel", + "summary": "Get users who subscribed on an issue.", + "operationId": "issueSubscriptions", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "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" + "description": "index of the issue" }, { - "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": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchProtectionPriories" - } + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/keys": { + "get": { "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", + "summary": "List a repository's keys", + "operationId": "repoListKeys", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "type": "string", @@ -5527,24 +5444,16 @@ "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" + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" }, { - "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" + "description": "fingerprint of the key", + "name": "fingerprint" }, { "type": "integer", @@ -5559,54 +5468,42 @@ "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": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/DeployKeyList" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, - "produces": [ + } + }, + "post": { + "consumes": [ "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", + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "type": "string", @@ -5616,28 +5513,38 @@ "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/GitHookList" + "201": { + "$ref": "#/responses/DeployKey" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { "get": { - "summary": "Get signing-key.gpg for given repository", - "operationId": "repoSigningKey", + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReview", "parameters": [ { "description": "owner of the repo", @@ -5654,37 +5561,47 @@ "required": true }, { - "name": "group_id", + "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" + "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" - } + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ - "text/plain" + "application/json" ], "tags": [ "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { - "tags": [ - "repository" - ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", + }, + "post": { + "operationId": "repoSubmitPullReview", "parameters": [ { "type": "string", @@ -5694,73 +5611,111 @@ "required": true }, { + "in": "path", + "required": true, + "type": "string", "description": "name of the repo", - "name": "repo", + "name": "repo" + }, + { + "name": "index", "in": "path", "required": true, - "type": "string" + "type": "integer", + "format": "int64", + "description": "index of the pull request" }, { - "description": "group ID of the repo", - "name": "group_id", + "in": "path", + "required": true, "type": "integer", "format": "int64", + "description": "id of the review", + "name": "id" + }, + { + "name": "body", + "in": "body", "required": true, - "in": "path" + "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/TeamList" + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { - "get": { + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request" + }, + "delete": { "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true, "type": "string" }, { - "type": "string", - "description": "id of the job", - "name": "job_id", + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { - "200": { - "$ref": "#/responses/WorkflowJob" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -5772,39 +5727,47 @@ "tags": [ "repository" ], - "summary": "Gets a specific workflow job for a workflow run", - "operationId": "getWorkflowJob" + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { + "post": { + "summary": "Sync all push mirrored repository", + "operationId": "repoPushMirrorSync", "parameters": [ { - "in": "path", - "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo to sync", + "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 repo to sync", + "name": "repo" }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/PullRequestList" + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -5815,76 +5778,69 @@ ], "tags": [ "repository" - ], - "summary": "List a repo's pinned pull requests", - "operationId": "repoListPinnedPullRequests" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { "get": { "responses": { "200": { - "$ref": "#/responses/ReferenceList" + "$ref": "#/responses/AttachmentList" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } }, "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", "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": "part or full name of the ref", - "name": "ref", "in": "path", "required": true }, { "required": true, - "in": "path", - "description": "group ID of the repo", + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path" + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin", + }, + "post": { + "operationId": "issueCreateIssueCommentAttachment", "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", @@ -5896,48 +5852,72 @@ { "type": "integer", "format": "int64", - "description": "index of issue", - "name": "index", + "description": "id of the comment", + "name": "id", "in": "path", "required": true }, { - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position", - "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" }, { - "type": "integer", - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer", + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/notFound" + "$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}/pulls/{base}/{head}": { + "/repos/{owner}/group/{group_id}/{repo}/assignees": { "get": { - "tags": [ - "repository" - ], - "summary": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead", + "summary": "Return all users that have write access and can be assigned to issues", + "operationId": "repoGetAssignees", "parameters": [ { "type": "string", @@ -5947,38 +5927,24 @@ "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" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/PullRequest" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" @@ -5986,19 +5952,22 @@ }, "produces": [ "application/json" + ], + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Lock an issue", - "operationId": "issueLockIssue", + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", "parameters": [ { "type": "string", @@ -6016,49 +5985,98 @@ }, { "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/LockIssueOption" - } + "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": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/WikiPageList" }, - "403": { - "$ref": "#/responses/forbidden" + "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" - ] - }, - "delete": { + ], + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", + "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", @@ -6068,91 +6086,92 @@ "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": "index of the issue", + "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, - "in": "path" + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "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}/actions/artifacts": { + "/repos/{owner}/group/{group_id}/{repo}/licenses": { "get": { - "summary": "Lists all artifacts for a repository", - "operationId": "getArtifacts", + "summary": "Get repo licenses", + "operationId": "repoGetLicenses", "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" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "type": "string", - "description": "name of the artifact", - "name": "name", - "in": "query" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/LicensesList" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/ArtifactsList" } }, "produces": [ @@ -6163,49 +6182,37 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { + "put": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", "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 }, { + "description": "id of the workflow", + "name": "workflow_id", + "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." + "type": "string" }, { "description": "group ID of the repo", @@ -6217,86 +6224,81 @@ } ], "responses": { - "200": { - "$ref": "#/responses/CommentList" + "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}/mirror-sync": { "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "tags": [ - "issue" + "repository" ], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment", + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo to sync" }, { - "name": "repo", - "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo to sync", + "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/CreateIssueCommentOption" - } - }, - { + "required": true, + "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "type": "integer" } ], "responses": { + "200": { + "$ref": "#/responses/empty" + }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Comment" } - } + }, + "produces": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { + "/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", @@ -6306,11 +6308,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 }, { "required": true, @@ -6323,52 +6325,64 @@ ], "responses": { "200": { - "$ref": "#/responses/IssueList" + "$ref": "#/responses/LanguageStatistics" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues" + } } }, - "/repos/{owner}/group/{group_id}/{repo}": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { "get": { - "operationId": "repoGet", + "operationId": "repoListPullReviews", "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 + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index" }, { - "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" + }, + { + "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" + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/PullReviewList" }, "404": { "$ref": "#/responses/notFound" @@ -6380,92 +6394,60 @@ "tags": [ "repository" ], - "summary": "Get a repository" + "summary": "List all reviews for a pull request" }, - "delete": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a repository", - "operationId": "repoDelete", + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview", "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", + "description": "owner of the repo", + "name": "owner", "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "name": "repo", + "name": "index", "in": "path", "required": true, - "type": "string", - "description": "name of the repo to edit" + "type": "integer", + "format": "int64", + "description": "index of the pull request" }, { "schema": { - "$ref": "#/definitions/EditRepoOption" + "$ref": "#/definitions/CreatePullReviewOptions" }, - "description": "Properties of a repo that you can edit", "name": "body", - "in": "body" + "in": "body", + "required": true }, { - "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" } ], "responses": { "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" @@ -6473,66 +6455,40 @@ "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": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { "get": { + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", + "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", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "format": "int64", + "type": "string", "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" + "required": true }, { "type": "integer", @@ -6547,35 +6503,29 @@ "type": "integer" }, { - "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": { + "200": { + "$ref": "#/responses/IssueList" + }, "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", + "summary": "Make the issue in the url depend on the issue in the form.", + "operationId": "issueCreateIssueDependencies", "parameters": [ { "description": "owner of the repo", @@ -6585,25 +6535,24 @@ "type": "string" }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo" }, { - "format": "int64", + "type": "string", "description": "index of the issue", "name": "index", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/AddTimeOption" + "$ref": "#/definitions/IssueMeta" } }, { @@ -6616,43 +6565,91 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, - "consumes": [ + "produces": [ "application/json" ] }, "delete": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime", + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", "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 }, + { + "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", @@ -6661,39 +6658,48 @@ "required": true }, { - "description": "index of the issue to add tracked time to", - "name": "index", + "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": "integer", - "format": "int64" + "type": "string" + }, + { + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "schema": { + "type": "file" + }, + "description": "Returns raw file content." }, "404": { "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" } - } + }, + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository" } }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { "get": { "produces": [ "application/json" @@ -6701,46 +6707,22 @@ "tags": [ "repository" ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", + "summary": "Get repo-level runners", + "operationId": "getRepoRunners", "parameters": [ { + "description": "owner of the repo", + "name": "owner", "in": "path", "required": true, - "type": "string", - "description": "owner of the repo", - "name": "owner" + "type": "string" }, { - "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" + "required": true, + "type": "string", + "description": "name of the repo" }, { "description": "group ID of the repo", @@ -6753,16 +6735,19 @@ ], "responses": { "200": { - "$ref": "#/responses/ReleaseList" + "$ref": "#/definitions/ActionRunnersResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } } - }, - "post": { - "summary": "Create a release", - "operationId": "repoCreateRelease", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "get": { "parameters": [ { "required": true, @@ -6772,57 +6757,51 @@ "in": "path" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateReleaseOption" - } + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "201": { - "$ref": "#/responses/Release" + "200": { + "$ref": "#/responses/Milestone" }, "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", + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone" + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", "parameters": [ { "type": "string", @@ -6832,116 +6811,56 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "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" + "required": true }, { "type": "string", - "description": "commits that match the given specifier will not be listed.", - "name": "not", - "in": "query" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "200": { - "$ref": "#/responses/CommitList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" } - }, + } + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { - "get": { - "tags": [ - "repository" + "issue" ], - "summary": "Gets the blob of a repository.", - "operationId": "GetBlob", + "summary": "Update a milestone", + "operationId": "issueEditMilestone", "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", @@ -6951,47 +6870,48 @@ "required": true }, { + "in": "path", "required": true, "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path" + "description": "the milestone to edit, identified by ID and if not available by name", + "name": "id" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/GitBlobResponse" - }, - "400": { - "$ref": "#/responses/error" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Milestone" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/milestones": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { + "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Get all of a repository's opened milestones", - "operationId": "issueGetMilestonesList", + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", "parameters": [ { "type": "string", @@ -7001,35 +6921,25 @@ "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" + "description": "name of the repo", + "name": "repo" }, { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } }, { "type": "integer", @@ -7041,41 +6951,83 @@ } ], "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/Issue" } } }, - "post": { + "get": { "responses": { - "201": { - "$ref": "#/responses/Milestone" + "200": { + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", + "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": "owner" + }, + { + "name": "repo", "in": "path", "required": true, - "type": "string" + "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", @@ -7084,32 +7036,35 @@ "in": "path", "required": true }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateMilestoneOption" + "$ref": "#/definitions/IssueMeta" } }, { - "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { - "get": { + ], "responses": { - "200": { - "$ref": "#/responses/Milestone" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" + "description": "the issue does not exist" } }, "produces": [ @@ -7118,29 +7073,47 @@ "tags": [ "issue" ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", + "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 }, { - "name": "repo", + "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, + "required": true + }, + { "type": "string", - "description": "name of the repo" + "description": "the name of the commit/branch/tag, default to the repositoryโ€™s default branch.", + "name": "ref", + "in": "query" }, { - "in": "path", - "required": true, + "name": "includes", + "in": "query", "type": "string", - "description": "the milestone to get, identified by ID and if not available by name", - "name": "id" + "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", @@ -7150,21 +7123,33 @@ "required": true, "in": "path" } - ] - }, - "delete": { - "tags": [ - "issue" ], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone", + "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": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -7173,79 +7158,88 @@ "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": "the milestone to delete, identified by ID and if not available by name", - "name": "id", + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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", + "delete": { + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { - "type": "string", - "description": "name of the repo", - "name": "repo", "in": "path", - "required": true - }, - { + "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": "name of the repo", + "name": "repo" }, { "description": "group ID of the repo", @@ -7255,78 +7249,88 @@ "required": true, "in": "path" } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "tags": [ + "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/contents": { + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { "get": { - "operationId": "repoGetContentsList", + "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" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { "type": "string", - "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", + "description": "part or full name of the ref", "name": "ref", - "in": "query" + "in": "path", + "required": true }, { + "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/ContentsListResponse" + "$ref": "#/responses/ReferenceList" }, "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." - }, + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", + "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 + "required": true, + "type": "string" }, { "description": "name of the repo", @@ -7336,12 +7340,20 @@ "type": "string" }, { - "name": "body", - "in": "body", + "description": "index of the pull request", + "name": "index", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } + "type": "integer", + "format": "int64" + }, + { + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id" }, { "type": "integer", @@ -7353,83 +7365,103 @@ } ], "responses": { - "201": { - "$ref": "#/responses/FilesResponse" + "422": { + "$ref": "#/responses/validationError" + }, + "200": { + "$ref": "#/responses/PullReview" }, "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { "get": { - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - }, - "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" + "required": true }, { + "in": "path", + "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", + "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": "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } - ] - }, - "post": { - "consumes": [ - "application/json" ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + } + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a branch protections for a repository", - "operationId": "repoCreateBranchProtection", + "summary": "Lists all jobs for a workflow run", + "operationId": "listWorkflowRunJobs" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { + "post": { + "operationId": "repoCreateWikiPage", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "type": "string", @@ -7439,47 +7471,68 @@ "required": true }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - }, - "name": "body" + "$ref": "#/definitions/CreateWikiPageOptions" + } }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" - }, "423": { "$ref": "#/responses/repoArchivedError" }, "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/WikiPage" } - } + }, + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a wiki page" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { + "/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 commits for a pull request", - "operationId": "repoGetPullRequestCommits", + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", "parameters": [ { "name": "owner", @@ -7497,51 +7550,112 @@ }, { "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", + "type": "string", + "description": "sha of the commit", + "name": "sha", "in": "path" }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "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" + "in": "query", + "type": "integer" }, { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" + "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 }, { - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query", - "type": "boolean" + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommitList" } }, "produces": [ @@ -7549,57 +7663,90 @@ ] } }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "/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": "Test a push webhook", - "operationId": "repoTestHook", + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", "parameters": [ { + "required": true, "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to transfer", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "description": "name of the repo", - "name": "repo", - "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path" }, { - "in": "path", - "required": true, + "description": "group ID of the repo", + "name": "group_id", "type": "integer", "format": "int64", - "description": "id of the hook to test", - "name": "id" - }, + "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": [ { - "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", - "name": "ref", - "in": "query", - "type": "string" + "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", + "required": true + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" @@ -7607,9 +7754,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { "delete": { - "operationId": "issueDeleteComment", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", "parameters": [ { "name": "owner", @@ -7619,19 +7773,18 @@ "description": "owner of the repo" }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "name of the repo" }, { + "description": "id of the runner", + "name": "runner_id", + "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path" + "type": "string" }, { "required": true, @@ -7644,32 +7797,25 @@ ], "responses": { "204": { - "$ref": "#/responses/empty" + "description": "runner has been deleted" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a comment" + } }, - "patch": { - "consumes": [ - "application/json" - ], + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit a comment", - "operationId": "issueEditComment", + "summary": "Get an repo-level runner", + "operationId": "getRepoRunner", "parameters": [ { "type": "string", @@ -7679,70 +7825,51 @@ "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "description": "id of the comment to edit", - "name": "id", + "type": "string", + "description": "id of the runner", + "name": "runner_id", "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } + "required": true }, { + "name": "group_id", + "type": "integer", "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } ], "responses": { "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" + "$ref": "#/definitions/ActionRunner" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Get a comment", - "operationId": "issueGetComment", + "operationId": "issueGetCommentReactions", "parameters": [ { + "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path" + "name": "owner" }, { "type": "string", @@ -7752,28 +7879,25 @@ "required": true }, { - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "id of the comment", - "name": "id" + "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" + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" + "$ref": "#/responses/ReactionList" }, "403": { "$ref": "#/responses/forbidden" @@ -7784,18 +7908,24 @@ }, "consumes": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue" + }, + "post": { + "operationId": "issuePostCommentReaction", "parameters": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "type": "string", @@ -7805,19 +7935,19 @@ "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" + "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", @@ -7829,8 +7959,11 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" }, "403": { "$ref": "#/responses/forbidden" @@ -7839,98 +7972,102 @@ "$ref": "#/responses/notFound" } }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "Delete a comment", - "operationId": "issueDeleteCommentDeprecated", - "deprecated": true + "summary": "Add a reaction to a comment of an issue" }, - "patch": { - "summary": "Edit a comment", - "operationId": "issueEditCommentDeprecated", + "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 - }, - { - "name": "repo", - "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "format": "int64", - "description": "id of the comment to edit", - "name": "id", "in": "path", "required": true, - "type": "integer" + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id" }, { - "name": "body", + "name": "content", "in": "body", "schema": { - "$ref": "#/definitions/EditIssueCommentOption" + "$ref": "#/definitions/EditReactionOption" } }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { + "200": { + "$ref": "#/responses/empty" + }, "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": { + "/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": "Get the EditorConfig definitions of a file in a repository", - "operationId": "repoGetEditorConfig", + "summary": "create review requests for a pull request", + "operationId": "repoCreatePullReviewRequests", "parameters": [ { "type": "string", @@ -7940,49 +8077,47 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "type": "string", - "description": "filepath of file to get", - "name": "filepath", + "description": "index of the pull request", + "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64" }, { - "name": "ref", - "in": "query", - "type": "string", - "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch." + "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 - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" + "type": "integer", + "format": "int64", + "required": true } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { - "get": { - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, + ] + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests", "parameters": [ { "required": true, @@ -7999,65 +8134,88 @@ "required": true }, { - "type": "string", - "description": "username of the user whose tracked times are to be listed", - "name": "user", + "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", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + }, + { "type": "integer", "format": "int64", "required": true, - "in": "path" + "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" - }, - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { + "get": { "tags": [ - "repository" + "issue" ], - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer", + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", "parameters": [ { "type": "string", - "description": "owner of the repo to transfer", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo to transfer", + "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", @@ -8068,31 +8226,35 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Repository" - }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/ReactionList" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { - "get": { + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get repo-level runners", - "operationId": "getRepoRunners", + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction", "parameters": [ { "type": "string", @@ -8102,83 +8264,89 @@ "required": true }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "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" + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/Reaction" }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { - "post": { - "responses": { "201": { - "$ref": "#/responses/empty" + "$ref": "#/responses/Reaction" }, "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot stop a non-existent stopwatch" } - }, - "consumes": [ - "application/json" - ], + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopStopWatch", + "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": "owner of the repo" + "required": true }, { - "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "name of the repo" }, { + "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", + "name": "index" + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } }, { "description": "group ID of the repo", @@ -8188,37 +8356,47 @@ "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}/actions/workflows/{workflow_id}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "post": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", "parameters": [ { "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo to transfer" }, { + "description": "name of the repo to transfer", + "name": "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 + "type": "string" }, { "description": "group ID of the repo", @@ -8230,44 +8408,32 @@ } ], "responses": { - "200": { - "$ref": "#/responses/ActionWorkflow" - }, - "400": { - "$ref": "#/responses/error" + "202": { + "$ref": "#/responses/Repository" }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/start": { + "post": { "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "409": { + "description": "Cannot start a stopwatch again if it already exists" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" } }, "consumes": [ @@ -8277,10 +8443,10 @@ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditBranchProtection", + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch", "parameters": [ { "type": "string", @@ -8297,18 +8463,12 @@ "description": "name of the repo" }, { - "name": "name", + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - } + "required": true }, { "required": true, @@ -8319,63 +8479,52 @@ "format": "int64" } ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection", + } + }, + "/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 + "required": true, + "type": "string", + "description": "owner of the repo" }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo" }, { - "name": "name", + "name": "topic", "in": "path", "required": true, "type": "string", - "description": "name of protected branch" + "description": "name of the topic to add" }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { "responses": { "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" } }, "produces": [ @@ -8383,49 +8532,17 @@ ], "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": { + }, + "delete": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Make the issue in the url depend on the issue in the form.", - "operationId": "issueCreateIssueDependencies", + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", "parameters": [ { "type": "string", @@ -8435,53 +8552,44 @@ "required": true }, { - "name": "repo", - "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo", + "in": "path" }, { - "description": "index of the issue", - "name": "index", + "name": "topic", "in": "path", "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/Issue" + "422": { + "$ref": "#/responses/invalidTopicsError" }, - "404": { - "description": "the issue does not exist" + "204": { + "$ref": "#/responses/empty" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "404": { + "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "summary": "Remove an issue dependency", - "operationId": "issueRemoveIssueDependencies", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { + "post": { + "operationId": "repoMergeUpstream", "parameters": [ { "in": "path", @@ -8491,56 +8599,58 @@ "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": "repo", + "in": "path" }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" + "$ref": "#/definitions/MergeUpstreamRequest" } }, { + "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/Issue" + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } }, "produces": [ "application/json" ], "tags": [ - "issue" - ] - }, + "repository" + ], + "summary": "Merge a branch from upstream" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tags": { "get": { - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "operationId": "issueListIssueDependencies", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags", + "operationId": "repoListTags", "parameters": [ { "type": "string", @@ -8556,13 +8666,6 @@ "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)", @@ -8570,54 +8673,58 @@ "in": "query" }, { - "name": "limit", - "in": "query", "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": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" + "required": true, + "in": "path" } - }, - "produces": [ - "application/json" ], - "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { - "delete": { "responses": { - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/TagList" }, - "204": { - "$ref": "#/responses/empty" + "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": "Delete a release", - "operationId": "repoDeleteRelease", + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag", "parameters": [ { "type": "string", @@ -8634,12 +8741,11 @@ "required": true }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release to delete" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagOption" + } }, { "required": true, @@ -8650,9 +8756,10 @@ "format": "int64" } ] - }, - "patch": { - "operationId": "repoEditRelease", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { + "get": { "parameters": [ { "type": "string", @@ -8666,90 +8773,86 @@ "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repository" }, { - "format": "int64", - "description": "id of the release to edit", - "name": "id", + "type": "string", + "description": "id of the run", + "name": "run", "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReleaseOption" - } + "required": true }, { - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true + "required": true, + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Update a release" + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun" }, - "get": { + "delete": { + "operationId": "deleteActionRun", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 repo" + "required": true }, { "type": "integer", - "format": "int64", - "description": "id of the release to get", - "name": "id", + "description": "runid of the workflow run", + "name": "run", "in": "path", "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": { - "200": { - "$ref": "#/responses/Release" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" + }, + "204": { + "description": "No Content" } }, "produces": [ @@ -8758,12 +8861,12 @@ "tags": [ "repository" ], - "summary": "Get a release", - "operationId": "repoGetRelease" + "summary": "Delete a workflow run" } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "/repos/{owner}/group/{group_id}/{repo}/teams": { "get": { + "operationId": "repoListTeams", "parameters": [ { "type": "string", @@ -8773,31 +8876,24 @@ "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", + "name": "repo", "in": "path" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/TeamList" }, "404": { "$ref": "#/responses/notFound" @@ -8809,141 +8905,91 @@ "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" - } - } + "summary": "List a repository's teams" } }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "notification" ], - "summary": "Sync all push mirrored repository", - "operationId": "repoPushMirrorSync", + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", "parameters": [ { - "in": "path", - "required": true, "type": "string", - "description": "owner of the repo to sync", - "name": "owner" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "required": true, "type": "string", - "description": "name of the repo to sync", + "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/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "name": "all", + "in": "query", + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false" }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/assignees": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" + { + "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" }, - "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, + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query", "type": "string", - "description": "owner of the repo" + "format": "date-time" }, { - "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "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", @@ -8953,246 +8999,248 @@ "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" + "$ref": "#/responses/NotificationThreadList" } }, - "produces": [ + "consumes": [ "application/json" - ], + ] + }, + "put": { "tags": [ - "repository" + "notification" ], - "summary": "Get a commit's combined status, by branch/tag/commit reference", - "operationId": "repoGetCombinedStatusByRef", + "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" - }, - { - "name": "repo", + "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { "type": "string", - "description": "name of branch/tag/commit", - "name": "ref", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", + "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": "integer", - "description": "page size of results", - "name": "limit", + "type": "string", + "format": "date-time", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", + "name": "last_read_at", "in": "query" }, { - "description": "group ID of the repo", - "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "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}/raw/{filepath}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { + "delete": { + "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" - }, - { - "name": "repo", + "description": "owner of the repo", + "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "name of the 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", - "name": "filepath", + "description": "name of the repo", + "name": "repo", "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" + "in": "path", + "required": true, + "type": "string", + "description": "id of the hook to get", + "name": "id" }, { - "required": true, - "in": "path", - "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "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": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } + "$ref": "#/responses/GitHook" }, "404": { "$ref": "#/responses/notFound" } }, "produces": [ - "application/octet-stream" + "application/json" ], "tags": [ "repository" ], - "summary": "Get a file from a repository", - "operationId": "repoGetRawFile" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { - "get": { + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", "parameters": [ { + "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path" + "name": "owner" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "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" + } }, { - "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" - } + "type": "integer", + "format": "int64" } - }, - "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" + "repository" ], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", "parameters": [ { + "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" + "required": true }, { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true, + "type": "string" }, { - "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" } ], "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/LabelList" } } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Create a label", - "operationId": "issueCreateLabel", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { + "get": { + "summary": "Get the merged pull request of the commit", + "operationId": "repoGetCommitPullRequest", "parameters": [ { "type": "string", @@ -9202,18 +9250,18 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true }, { "format": "int64", @@ -9225,28 +9273,28 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Label" + "200": { + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/blocks": { - "post": { + }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { + "tags": [ + "repository" ], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", "parameters": [ { "type": "string", @@ -9256,47 +9304,42 @@ "required": true }, { + "type": "string", "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" + "required": true }, { - "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" - } + "$ref": "#/definitions/UpdateRepoAvatarOption" + }, + "name": "body" }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } ], "responses": { - "201": { - "$ref": "#/responses/Issue" - }, "404": { - "description": "the issue does not exist" + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" } - } + }, + "produces": [ + "application/json" + ] }, "delete": { - "summary": "Unblock the issue given in the body by the issue in path", - "operationId": "issueRemoveIssueBlocking", + "operationId": "repoDeleteAvatar", "parameters": [ { "type": "string", @@ -9306,25 +9349,11 @@ "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", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } + "description": "name of the repo", + "name": "repo" }, { "required": true, @@ -9336,8 +9365,8 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Issue" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" @@ -9347,25 +9376,20 @@ "application/json" ], "tags": [ - "issue" - ] - }, - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" + "repository" ], - "summary": "List issues that are blocked by this issue", - "operationId": "issueListBlocks", + "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", - "required": true + "in": "path" }, { "type": "string", @@ -9376,23 +9400,11 @@ }, { "type": "string", - "description": "index of the issue", - "name": "index", + "description": "id of the workflow", + "name": "workflow_id", "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", @@ -9403,90 +9415,137 @@ } ], "responses": { + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflow" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/IssueList" + "422": { + "$ref": "#/responses/validationError" } - } - } - }, - "/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": "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", - "in": "path" + "name": "owner" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", "in": "path", - "required": true + "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" }, { - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true, - "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "delete": { + }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a release attachment", - "operationId": "repoDeleteReleaseAttachment", + "summary": "Get a commit's statuses, by branch/tag/commit reference" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { + "get": { + "operationId": "repoListActivityFeeds", "parameters": [ { - "description": "owner of the repo", "name": "owner", "in": "path", "required": true, - "type": "string" + "type": "string", + "description": "owner of the repo" }, { "description": "name of the repo", @@ -9496,79 +9555,81 @@ "type": "string" }, { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id" + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" }, { - "required": true, "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path" + "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" + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/ActivityFeedsList" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "patch": { - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", + }, + "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": [ { - "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 }, { - "format": "int64", - "description": "id of the release", - "name": "id", + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", - "required": true, - "type": "integer" + "required": true }, { + "type": "string", + "description": "compare two branches or commits", + "name": "basehead", "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 }, { "required": true, @@ -9580,44 +9641,43 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/Compare" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "/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": "Lists all jobs for a repository", - "operationId": "listWorkflowJobs", + "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" + "name": "owner", + "in": "path", + "required": true }, { "required": true, @@ -9626,50 +9686,85 @@ "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": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query", - "type": "integer" + "required": true, + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path" }, { + "name": "job_id", + "in": "path", + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "description": "id of the job" }, { + "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer" + "name": "group_id" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/WorkflowJobsList" + "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}/actions/artifacts/{artifact_id}/zip": { - "get": { - "summary": "Downloads a specific artifact for a workflow run redirects to blob url", - "operationId": "downloadArtifact", + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { + "post": { + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue", "parameters": [ { "type": "string", @@ -9679,18 +9774,19 @@ "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": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "id of the artifact", - "name": "artifact_id" + "required": true }, { "type": "integer", @@ -9702,41 +9798,27 @@ } ], "responses": { - "302": { - "description": "redirect to the blob download" - }, - "400": { - "$ref": "#/responses/error" - }, "404": { "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" } - }, - "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", + } + }, + "delete": { + "summary": "Unpin an Issue", + "operationId": "unpinIssue", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -9745,6 +9827,14 @@ "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", @@ -9755,24 +9845,32 @@ } ], "responses": { - "200": { - "$ref": "#/responses/UserList" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "tags": [ + "issue" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { + "/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": [ { - "name": "owner", - "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner", + "in": "path" }, { "required": true, @@ -9782,28 +9880,30 @@ "in": "path" }, { - "format": "int64", - "description": "index of the pull request", - "name": "index", "in": "path", "required": true, - "type": "integer" + "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, - "in": "path" + "required": true } ], "responses": { - "204": { - "description": "pull request has been merged" + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" }, "404": { - "description": "pull request has not been merged" + "$ref": "#/responses/notFound" } }, "produces": [ @@ -9811,19 +9911,21 @@ ], "tags": [ "repository" - ], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged" - }, - "post": { - "operationId": "repoMergePullRequest", + ] + } + }, + "/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", - "required": true + "in": "path" }, { "type": "string", @@ -9833,44 +9935,33 @@ "required": true }, { - "name": "index", + "description": "username of the user whose tracked times are to be listed", + "name": "user", "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": "string" }, { + "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/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" + "$ref": "#/responses/TrackedTimeList" }, - "409": { + "400": { "$ref": "#/responses/error" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ @@ -9878,73 +9969,50 @@ ], "tags": [ "repository" + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { + "produces": [ + "application/json" ], - "summary": "Merge a pull request" - }, - "delete": { "tags": [ "repository" ], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge", + "summary": "List tag protections for a repository", + "operationId": "repoListTagProtection", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { - "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" + "type": "string" }, { - "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" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "200": { + "$ref": "#/responses/TagProtectionList" } - }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { - "delete": { - "tags": [ - "issue" - ], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", + } + }, + "post": { "parameters": [ { "type": "string", @@ -9954,32 +10022,37 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" + "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", - "required": true + "format": "int64" } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/TagProtection" }, "403": { "$ref": "#/responses/forbidden" @@ -9988,41 +10061,48 @@ "$ref": "#/responses/notFound" } }, - "produces": [ + "consumes": [ "application/json" - ] - }, - "get": { + ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { + "get": { + "operationId": "ListActionTasks", "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", - "description": "name of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index" + "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", @@ -10037,34 +10117,33 @@ "404": { "$ref": "#/responses/notFound" }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, "200": { - "$ref": "#/responses/LabelList" - } - } - }, - "put": { - "responses": { - "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/TasksList" + }, + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", + "summary": "List a repository's action tasks" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runs": { + "get": { "parameters": [ { "type": "string", @@ -10074,106 +10153,89 @@ "required": true }, { - "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "name of the repository", + "name": "repo", + "in": "path" }, { - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "name": "event", + "in": "query", + "type": "string", + "description": "workflow event name" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "type": "string", + "description": "workflow branch", + "name": "branch", + "in": "query" }, { - "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": [ + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" + }, { - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true, - "type": "string" + "type": "string", + "description": "triggered by user", + "name": "actor", + "in": "query" }, { "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query" }, { - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true, - "type": "integer" + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/WorkflowRunsList" }, - "403": { - "$ref": "#/responses/forbidden" + "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}/releases/{id}/assets": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { "get": { "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/WikiPage" }, "404": { "$ref": "#/responses/notFound" @@ -10185,51 +10247,53 @@ "tags": [ "repository" ], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments", + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "format": "int64", - "description": "id of the release", - "name": "id", + "name": "pageName", "in": "path", "required": true, - "type": "integer" + "type": "string", + "description": "name of the page" }, { - "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" } ] }, - "post": { - "summary": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", + "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 + "name": "owner" }, { "in": "path", @@ -10239,129 +10303,113 @@ "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" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "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" }, - "413": { - "$ref": "#/responses/error" + "423": { + "$ref": "#/responses/repoArchivedError" } }, "consumes": [ - "multipart/form-data", - "application/octet-stream" - ], - "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer": { - "post": { + ], + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", "parameters": [ { - "description": "owner of the repo to transfer", + "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 transfer", - "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of the repo", + "name": "repo" }, { - "description": "Transfer Options", - "name": "body", - "in": "body", + "description": "name of the page", + "name": "pageName", + "in": "path", "required": true, + "type": "string" + }, + { "schema": { - "$ref": "#/definitions/TransferRepoOption" - } + "$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": { - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" + "format": "int64", + "required": true } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { - "post": { + "/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": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest", + "summary": "Gets the metadata of all the entries of the root dir.", + "operationId": "repoGetContentsList", "parameters": [ { "in": "path", @@ -10378,76 +10426,57 @@ "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" + "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", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/ContentsListResponse" }, "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", + }, + "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": "owner of the repo" + "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id" + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } }, { "in": "path", @@ -10459,114 +10488,37 @@ } ], "responses": { - "404": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/FilesResponse" }, - "200": { - "$ref": "#/responses/AttachmentList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "List comment's attachments" - }, - "post": { - "responses": { - "404": { + "403": { "$ref": "#/responses/error" }, - "413": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/error" }, "423": { "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" } }, "consumes": [ - "multipart/form-data" + "application/json" ], "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": { + "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { "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", + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", "parameters": [ { "type": "string", @@ -10576,121 +10528,119 @@ "required": true }, { - "type": "string", - "description": "name of the repo", - "name": "repo", "in": "path", - "required": true - }, - { + "required": true, "type": "string", - "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", - "name": "ref", - "in": "query" + "description": "name of the repo", + "name": "repo" }, { - "in": "query", "required": true, "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body" + "description": "name of tag", + "name": "tag", + "in": "path" }, { - "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": { "200": { - "$ref": "#/responses/ContentsListResponse" + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ] }, - "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": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", + "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" + "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" + "required": true, + "type": "string" }, { - "name": "body", - "in": "body", + "description": "name of tag to delete", + "name": "tag", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/GetFilesOptions" - } + "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": { + "204": { + "$ref": "#/responses/empty" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/ContentsListResponse" + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { - "post": { - "consumes": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "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", + "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" + "required": true }, { "type": "string", @@ -10700,35 +10650,17 @@ "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" + "name": "group_id", + "type": "integer" } ], "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" }, "404": { "$ref": "#/responses/notFound" @@ -10736,76 +10668,71 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "/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": "owner of the repo", - "name": "owner" + "type": "string" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "integer", - "format": "int64", - "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", + "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": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/UserList" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" ], "tags": [ - "issue" - ], - "summary": "List issue's attachments", - "operationId": "issueListIssueAttachments" - }, - "post": { - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" + "repository" ], - "summary": "Create an issue attachment", - "operationId": "issueCreateIssueAttachment", + "summary": "List a repository's collaborators" + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { + "delete": { "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "in": "path", @@ -10815,174 +10742,186 @@ "name": "repo" }, { + "required": true, + "type": "integer", "format": "int64", "description": "index of the issue", "name": "index", - "in": "path", - "required": true, - "type": "integer" + "in": "path" }, { - "description": "name of the attachment", - "name": "name", - "in": "query", - "type": "string" + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true }, { - "name": "attachment", - "in": "formData", "required": true, - "type": "file", - "description": "attachment to upload" - }, - { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "400": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, "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" + "issue" ], - "summary": "List a repository's forks", - "operationId": "listForks", + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment" + }, + "patch": { + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "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" }, { "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "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", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", - "name": "group_id" + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/RepositoryList" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ] }, - "post": { - "summary": "Fork a repository", - "operationId": "createFork", + "get": { "parameters": [ { - "description": "owner of the repo to fork", + "description": "owner of 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 repo to fork" + "type": "string" }, { - "schema": { - "$ref": "#/definitions/CreateForkOption" - }, - "name": "body", - "in": "body" + "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", + "required": true, + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id" + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "422": { - "$ref": "#/responses/validationError" - }, - "202": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/error" } }, "produces": [ "application/json" ], "tags": [ - "repository" - ] + "issue" + ], + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { "get": { - "operationId": "repoGetPullRequestFiles", + "operationId": "repoGetContents", "parameters": [ { "type": "string", @@ -10992,50 +10931,25 @@ "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 + "required": true, + "type": "string" }, { + "required": true, "type": "string", - "description": "skip to given file", - "name": "skip-to", - "in": "query" + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path" }, { - "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", + "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", + "name": "ref", "in": "query" }, - { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" - }, { "name": "group_id", "type": "integer", @@ -11047,35 +10961,34 @@ ], "responses": { "200": { - "$ref": "#/responses/ChangedFileList" + "$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": "Get changed files for a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { - "get": { + "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": [ - "issue" + "repository" ], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -11085,220 +10998,201 @@ "required": true }, { + "name": "filepath", + "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)", - "name": "page", - "in": "query" + "description": "path of the file to update" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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 + "required": true, + "in": "path" } ], "responses": { - "200": { - "$ref": "#/responses/CommentList" + "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" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + }, "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", - "in": "path", - "required": true + "name": "owner" }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "type": "string", + "description": "path of the file to create", + "name": "filepath", "in": "path", "required": true }, { - "description": "id of the review", - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - } + "$ref": "#/definitions/CreateFileOptions" + }, + "name": "body", + "in": "body" }, { - "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": { - "200": { - "$ref": "#/responses/PullReview" + "201": { + "$ref": "#/responses/FileResponse" }, "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "produces": [ + } + }, + "delete": { + "consumes": [ "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", + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", + "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "a git ref or commit sha", - "name": "sha", + "description": "name of the repo", + "name": "repo", "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" + "required": true, + "type": "string", + "description": "path of the file to delete", + "name": "filepath", + "in": "path" }, { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" + "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" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" }, "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" }, "200": { - "$ref": "#/responses/Commit" + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" } } } }, - "/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", + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "get": { + "operationId": "repoGetRelease", "parameters": [ { "type": "string", @@ -11308,18 +11202,19 @@ "required": true }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "name of the repo" }, { + "in": "path", "required": true, - "type": "string", - "description": "name of the topic to add", - "name": "topic", - "in": "path" + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id" }, { "description": "group ID of the repo", @@ -11329,178 +11224,179 @@ "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 topic from a repository", - "operationId": "repoDeleteTopic", + "summary": "Delete a release", + "operationId": "repoDeleteRelease", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "name of the topic to delete", - "name": "topic", + "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" + "in": "path", + "description": "group ID of the repo" } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "404": { "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/invalidTopicsError" + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "responses": { + "200": { + "$ref": "#/responses/Release" }, - "204": { - "$ref": "#/responses/empty" + "404": { + "$ref": "#/responses/notFound" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { - "get": { - "summary": "Lists all jobs for a workflow run", - "operationId": "listWorkflowRunJobs", + ], + "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": "owner of the repo" + "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", + "description": "name of the repo", + "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" - }, - { - "required": true, + "format": "int64", + "description": "id of the release to edit", + "name": "id", "in": "path", - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" - } - ], - "responses": { - "400": { - "$ref": "#/responses/error" + "required": true }, - "404": { - "$ref": "#/responses/notFound" + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } }, - "200": { - "$ref": "#/responses/WorkflowJobsList" + { + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "/repos/{owner}/group/{group_id}/{repo}/teams/{team}": { "get": { "tags": [ "repository" ], - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner", + "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 + "required": true, + "type": "string", + "description": "owner of the repo" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "string", - "description": "id of the runner", - "name": "runner_id", + "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", - "description": "group ID of the repo" + "in": "path" } ], "responses": { - "200": { - "$ref": "#/definitions/ActionRunner" - }, - "400": { + "405": { "$ref": "#/responses/error" }, + "200": { + "$ref": "#/responses/Team" + }, "404": { "$ref": "#/responses/notFound" } @@ -11509,22 +11405,22 @@ "application/json" ] }, - "delete": { + "put": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete an repo-level runner", - "operationId": "deleteRepoRunner", + "summary": "Add a team to a repository", + "operationId": "repoAddTeam", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { "type": "string", @@ -11534,139 +11430,137 @@ "required": true }, { - "description": "id of the runner", - "name": "runner_id", + "type": "string", + "description": "team name", + "name": "team", "in": "path", - "required": true, - "type": "string" + "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": { "204": { - "description": "runner has been deleted" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { - "get": { + }, + "delete": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", + "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": "owner of the repo" + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "branch to get", - "name": "branch", + "description": "team name", + "name": "team", "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" } ], "responses": { - "200": { - "$ref": "#/responses/Branch" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ] - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", + } + } + }, + "/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, - "type": "string" - }, - { - "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", - "in": "path" + "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" + "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, "404": { "$ref": "#/responses/notFound" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "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", @@ -11679,18 +11573,18 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { + "description": "name of the branch", + "name": "branch", "in": "path", "required": true, - "type": "string", - "description": "name of the branch", - "name": "branch" + "type": "string" }, { "name": "body", @@ -11709,9 +11603,6 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "204": { "$ref": "#/responses/empty" }, @@ -11720,6 +11611,9 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } }, "consumes": [ @@ -11731,64 +11625,69 @@ "tags": [ "repository" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + }, "get": { - "operationId": "repoListTagProtection", + "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", - "in": "path", - "required": true + "name": "owner" }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, + "required": true + }, + { "type": "string", - "description": "name of the repo" + "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", - "description": "group ID of the repo", - "name": "group_id" + "in": "path" } ], "responses": { "200": { - "$ref": "#/responses/TagProtectionList" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "List tag protections for a repository" + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + } }, - "post": { - "produces": [ - "application/json" - ], + "delete": { "tags": [ "repository" ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection", + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { "type": "string", @@ -11798,11 +11697,11 @@ "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagProtectionOption" - } + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path", + "required": true }, { "required": true, @@ -11817,117 +11716,146 @@ "423": { "$ref": "#/responses/repoArchivedError" }, - "201": { - "$ref": "#/responses/TagProtection" + "204": { + "$ref": "#/responses/empty" }, "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } }, - "consumes": [ + "produces": [ "application/json" ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { + "/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, - "type": "string" + "required": true }, { + "in": "path", "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "name of the repository", + "name": "repo" }, { + "type": "integer", + "description": "runid of the workflow run", + "name": "run", "in": "path", - "required": true, + "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", - "description": "index of the issue", - "name": "index" + "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": "username of the user to subscribe the issue to", - "name": "user", - "in": "path" + "description": "name of the repo", + "name": "repo" + }, + { + "type": "string", + "description": "remote name of push mirror", + "name": "name", + "in": "path", + "required": true }, { - "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", "required": true, - "in": "path" + "in": "path", + "description": "group ID of the repo" } ], "responses": { "200": { - "description": "Already subscribed" + "$ref": "#/responses/PushMirror" }, - "201": { - "description": "Successfully Subscribed" + "400": { + "$ref": "#/responses/error" }, - "304": { - "description": "User can only subscribe itself if he is no admin" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" - ], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription" + "repository" + ] }, "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" + "repository" ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", + "summary": "deletes a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", "parameters": [ { "type": "string", @@ -11937,114 +11865,104 @@ "required": true }, { + "description": "name of the repo", "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" }, { "type": "string", - "description": "username of the user to unsubscribe from an issue", - "name": "user", + "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", - "description": "group ID of the repo" + "in": "path" } - ] + ], + "responses": { + "404": { + "$ref": "#/responses/notFound" + }, + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}.{diffType}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { "get": { - "operationId": "repoDownloadPullDiffOrPatch", + "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", - "in": "path" + "name": "owner" }, { + "description": "name of the repository", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { - "name": "index", - "in": "path", - "required": true, + "in": "query", "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" + "description": "page number of results to return (1-based)", + "name": "page" }, { - "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": "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/string" + "$ref": "#/responses/SecretList" }, "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}/actions/variables": { "get": { "tags": [ "repository" ], - "summary": "List a repository's branches", - "operationId": "repoListBranches", + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", "parameters": [ { "type": "string", @@ -12054,17 +11972,17 @@ "required": true }, { - "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "in": "query", "type": "integer", "description": "page number of results to return (1-based)", - "name": "page" + "name": "page", + "in": "query" }, { "type": "integer", @@ -12073,53 +11991,110 @@ "in": "query" }, { - "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", "name": "group_id", - "type": "integer" + "type": "integer", + "format": "int64" } ], "responses": { + "404": { + "$ref": "#/responses/notFound" + }, "200": { - "$ref": "#/responses/BranchList" + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" } }, "produces": [ "application/json" ] - }, - "post": { + } + }, + "/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": "Create a branch", - "operationId": "repoCreateBranch", + "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" + "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 the repo" + "description": "name of protected branch" }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateBranchRepoOption" - }, - "name": "body" + "$ref": "#/definitions/EditBranchProtectionOption" + } }, { "description": "group ID of the repo", @@ -12131,17 +12106,14 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Branch" - }, - "403": { - "description": "The branch is archived or a mirror." + "200": { + "$ref": "#/responses/BranchProtection" }, "404": { - "description": "The old branch does not exist." + "$ref": "#/responses/notFound" }, - "409": { - "description": "The branch with the same name already exists." + "422": { + "$ref": "#/responses/validationError" }, "423": { "$ref": "#/responses/repoArchivedError" @@ -12149,30 +12121,75 @@ }, "consumes": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + ], + "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/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/BranchProtection" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}/tests": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repo's stargazers", - "operationId": "repoListStargazers", + "summary": "Test a push webhook", + "operationId": "repoTestHook", "parameters": [ { "description": "owner of the repo", @@ -12182,22 +12199,24 @@ "type": "string" }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "id of the hook to test", + "name": "id", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page size of results", - "name": "limit", + "type": "string", + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", + "name": "ref", "in": "query" }, { @@ -12208,67 +12227,107 @@ "type": "integer", "format": "int64" } - ] + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { + "/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, + "required": true + }, + { + "enum": [ + "diff", + "patch" + ], "type": "string", - "description": "name of the repo", - "name": "repo" + "description": "whether the output is diff or patch", + "name": "diffType", + "in": "path", + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - } + "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", + "name": "binary", + "in": "query", + "type": "boolean" }, { - "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/MergeUpstreamResponse" + "$ref": "#/responses/string" }, - "400": { - "$ref": "#/responses/error" + "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/json" + "application/octet-stream" ], "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", + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS", "parameters": [ { "type": "string", @@ -12285,23 +12344,17 @@ "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 - }, - { + "required": true, "type": "string", - "description": "the name of the commit/branch/tag, default to the repositoryโ€™s default branch.", - "name": "ref", - "in": "query" + "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": "includes", + "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." + "type": "string" }, { "type": "integer", @@ -12311,98 +12364,99 @@ "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" - ], + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "get": { "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", + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", "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 + "required": true, + "type": "string" }, { - "type": "string", - "description": "path of the file to update", - "name": "filepath", "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", - "required": true, "schema": { - "$ref": "#/definitions/UpdateFileOptions" + "$ref": "#/definitions/CreateBranchProtectionOption" } }, { + "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" } - ] - }, - "post": { + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + }, "consumes": [ "application/json" ], @@ -12412,8 +12466,13 @@ "tags": [ "repository" ], - "summary": "Create a file in a repository", - "operationId": "repoCreateFile", + "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", @@ -12423,57 +12482,63 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "path of the file to create", - "name": "filepath", + "name": "ref", "in": "path", - "required": true + "required": true, + "type": "string", + "description": "name of branch/tag/commit" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateFileOptions" - } + "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" }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "201": { - "$ref": "#/responses/FileResponse" + "200": { + "$ref": "#/responses/CombinedStatus" }, - "403": { + "400": { "$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", + }, + "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", @@ -12483,54 +12548,45 @@ "required": true }, { - "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repo" + "description": "name of the repo", + "name": "repo" }, { - "in": "path", "required": true, - "type": "string", - "description": "path of the file to delete", - "name": "filepath" + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on", + "name": "index", + "in": "path" }, { "name": "body", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/DeleteFileOptions" + "$ref": "#/definitions/EditDeadlineOption" } }, { + "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", "format": "int64", - "required": true, - "in": "path" + "required": true } - ], - "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" }, "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } }, "consumes": [ @@ -12540,12 +12596,14 @@ "application/json" ], "tags": [ - "repository" + "issue" ] - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { "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", + "summary": "List all comments on an issue", + "operationId": "issueGetComments", "parameters": [ { "type": "string", @@ -12555,106 +12613,128 @@ "required": true }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { - "type": "string", - "description": "path of the dir, file, symlink or submodule in the repo", - "name": "filepath", + "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", - "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", - "name": "ref", - "in": "query" + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before" }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ], "responses": { "200": { - "$ref": "#/responses/ContentsResponse" + "$ref": "#/responses/CommentList" }, "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" + "issue" ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { - "get": { + }, + "post": { "responses": { - "200": { - "$ref": "#/responses/Artifact" + "201": { + "$ref": "#/responses/Comment" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Gets a specific artifact for a workflow run", - "operationId": "getArtifact", + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", "parameters": [ { - "required": true, - "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true, + "type": "string" }, { + "name": "repo", "in": "path", "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repo" }, { - "type": "string", - "description": "id of the artifact", - "name": "artifact_id", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true + "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", - "required": true, - "in": "path" + "format": "int64" } ] - }, - "delete": { - "operationId": "deleteArtifact", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { + "get": { + "operationId": "ActionsListRepositoryWorkflows", "parameters": [ { "type": "string", @@ -12663,38 +12743,40 @@ "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" + "description": "name of the repo", + "name": "repo" }, { - "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" } ], "responses": { - "204": { - "description": "No Content" + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/error" + }, + "200": { + "$ref": "#/responses/ActionWorkflowList" }, "400": { "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" + "403": { + "$ref": "#/responses/forbidden" } }, "produces": [ @@ -12703,10 +12785,10 @@ "tags": [ "repository" ], - "summary": "Deletes a specific artifact for a workflow run" + "summary": "List repository workflows" } }, - "/repos/{owner}/group/{group_id}/{repo}/keys": { + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { "get": { "produces": [ "application/json" @@ -12714,88 +12796,70 @@ "tags": [ "repository" ], - "summary": "List a repository's keys", - "operationId": "repoListKeys", + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag", "parameters": [ { + "in": "path", + "required": true, "type": "string", "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "name": "owner" }, { - "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" + "in": "path", + "required": true }, { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" + "name": "tag", + "in": "path", + "required": true, + "type": "string", + "description": "tag name of the release to get" }, { - "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/DeployKeyList" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" } } }, - "post": { - "operationId": "repoCreateKey", + "delete": { "parameters": [ { + "name": "owner", + "in": "path", "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path" + "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" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true }, { "in": "path", @@ -12807,8 +12871,8 @@ } ], "responses": { - "201": { - "$ref": "#/responses/DeployKey" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" @@ -12817,158 +12881,136 @@ "$ref": "#/responses/validationError" } }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "Add a key to a repository" + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag" } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { "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", + "operationId": "issueTrackedTimes", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", - "description": "Name of the repo", - "name": "repo", "in": "path", - "required": true - }, - { + "required": true, "type": "string", - "description": "Filter by target base branch of the pull request", - "name": "base_branch", - "in": "query" + "description": "name of the repo", + "name": "repo" }, { - "default": "open", - "description": "State of pull request", - "name": "state", - "in": "query", - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true, + "type": "integer" }, { - "enum": [ - "oldest", - "recentupdate", - "recentclose", - "leastupdate", - "mostcomment", - "leastcomment", - "priority" - ], "type": "string", - "description": "Type of sort", - "name": "sort", + "description": "optional filter by user (available for issue managers)", + "name": "user", "in": "query" }, { - "type": "integer", - "format": "int64", - "description": "ID of the milestone", - "name": "milestone", + "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" }, - { - "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", + "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", - "minimum": 1, "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { "type": "integer", - "description": "Page size of results", + "description": "page size of results", "name": "limit", - "in": "query", - "minimum": 0 + "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": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + }, + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's tracked times" }, "post": { - "operationId": "repoCreatePullRequest", + "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 }, { - "name": "repo", + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreatePullRequestOption" + "$ref": "#/definitions/AddTimeOption" } }, { @@ -12981,62 +13023,30 @@ } ], "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" + "$ref": "#/responses/TrackedTime" }, - "404": { - "$ref": "#/responses/notFound" + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a specific tag protection for the repository", - "operationId": "repoGetTagProtection", + } + }, + "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" + "required": true }, { "type": "string", @@ -13046,11 +13056,12 @@ "required": true }, { - "description": "id of the tag protect to get", - "name": "id", + "type": "integer", + "format": "int64", + "description": "index of the issue to add tracked time to", + "name": "index", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "description": "group ID of the repo", @@ -13060,35 +13071,72 @@ "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": [ - "repository" + "issue" ], - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", + "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": "owner of the repo" + "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", - "description": "id of protected tag", + "format": "int64", + "description": "id of the label to remove", "name": "id", - "in": "path" + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -13103,27 +13151,35 @@ "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" - ] - }, - "patch": { + ], "tags": [ "repository" ], - "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditTagProtection", + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -13133,58 +13189,60 @@ "required": true }, { - "in": "path", - "required": true, "type": "integer", - "description": "id of protected tag", - "name": "id" + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditTagProtectionOption" + "$ref": "#/definitions/MergePullRequestOption" } }, { + "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/TagProtection" + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" }, "423": { "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { - "get": { + } + }, + "delete": { "responses": { - "200": { - "$ref": "#/responses/PullRequest" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } }, "produces": [ @@ -13193,214 +13251,150 @@ "tags": [ "repository" ], - "summary": "Get the merged pull request of the commit", - "operationId": "repoGetCommitPullRequest", + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { + "in": "path", + "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "name": "repo" }, { - "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path", - "required": true + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path" }, { - "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" } ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { + }, + "get": { + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", "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": "body", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - }, - "name": "body" + "type": "string" }, { - "required": true, + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", "in": "path", - "description": "group ID of the repo", + "required": true + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/FileResponse" + "204": { + "description": "pull request has been merged" }, "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "description": "pull request has not been merged" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" - ], - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/topics": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/check": { "get": { - "tags": [ - "repository" - ], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", + "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": "owner of the repo" + "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" + "description": "name of the repo", + "name": "repo" }, { + "required": true, "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "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", - "required": true, - "in": "path" + "format": "int64" } ], "responses": { - "200": { - "$ref": "#/responses/TopicNames" - }, "404": { "$ref": "#/responses/notFound" + }, + "200": { + "$ref": "#/responses/WatchInfo" } }, - "produces": [ + "consumes": [ "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" - } - } + "issue" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { - "post": { - "tags": [ - "issue" - ], - "summary": "Pin an Issue", - "operationId": "pinIssue", + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { + "operationId": "GetBlob", "parameters": [ { "type": "string", @@ -13410,69 +13404,78 @@ "required": true }, { + "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path", - "required": true + "in": "path" }, { + "description": "sha of the commit", + "name": "sha", + "in": "path", "required": true, - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", - "in": "path" + "type": "string" }, { - "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": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/GitBlobResponse" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - } - }, - "delete": { + }, + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Unpin an Issue", - "operationId": "unpinIssue", + "summary": "Gets the blob of a repository." + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", "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, - "type": "string" + "required": true }, { - "required": true, "type": "integer", - "format": "int64", - "description": "index of issue to unpin", - "name": "index", - "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" }, { "format": "int64", @@ -13484,92 +13487,149 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" } - } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/disable": { - "put": { + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "post": { "tags": [ - "repository" + "issue" ], - "summary": "Disable a workflow", - "operationId": "ActionsDisableWorkflow", + "summary": "Create a label", + "operationId": "issueCreateLabel", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo", + "name": "owner" }, { + "in": "path", "required": true, "type": "string", "description": "name of the repo", - "name": "repo", - "in": "path" + "name": "repo" }, { - "name": "workflow_id", - "in": "path", - "required": true, - "type": "string", - "description": "id of the workflow" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } }, { - "required": true, - "in": "path", "description": "group ID of the repo", "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/Label" }, - "403": { - "$ref": "#/responses/forbidden" + "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}/new_pin_allowed": { + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", + "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" + "type": "string", + "description": "owner of the repo" }, { "type": "string", @@ -13579,64 +13639,80 @@ "required": true }, { - "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/RepoNewIssuePinsAllowed" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { "post": { - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", + "operationId": "ActionsDispatchWorkflow", "parameters": [ { - "type": "string", - "description": "owner of the repo to sync", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", - "description": "name of the repo to sync", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "required": true, + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", "in": "path", - "description": "group ID of the repo", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateActionWorkflowDispatch" + } + }, + { "name": "group_id", "type": "integer", - "format": "int64" + "format": "int64", + "required": true, + "in": "path", + "description": "group ID of the repo" } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "422": { + "$ref": "#/responses/validationError" }, - "200": { - "$ref": "#/responses/empty" + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ @@ -13644,64 +13720,63 @@ ], "tags": [ "repository" - ] + ], + "summary": "Create a workflow dispatch event" } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "operationId": "updateRepoSecret", + "/repos/{owner}/group/{group_id}/{repo}/branches": { + "get": { + "summary": "List a repository's branches", + "operationId": "repoListBranches", "parameters": [ { "type": "string", - "description": "owner of the repository", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { - "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo", "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" - } + "type": "integer", + "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", - "format": "int64", - "required": true + "type": "integer" } ], "responses": { - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/BranchList" } }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ] + }, + "post": { "consumes": [ "application/json" ], @@ -13711,50 +13786,71 @@ "tags": [ "repository" ], - "summary": "Create or Update a secret value in a repository" - }, - "delete": { - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", + "summary": "Create a branch", + "operationId": "repoCreateBranch", "parameters": [ { + "in": "path", "required": true, "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path" + "description": "owner of the repo", + "name": "owner" }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "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/CreateBranchRepoOption" + } }, { + "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": { + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "201": { + "$ref": "#/responses/Branch" + }, + "403": { + "description": "The branch is archived or a mirror." + }, "404": { - "$ref": "#/responses/notFound" + "description": "The old branch does not exist." }, - "204": { - "description": "delete one secret of the repository" + "409": { + "description": "The branch with the same name already exists." + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "patch": { + "responses": { + "201": { + "$ref": "#/responses/Issue" }, - "400": { + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { "$ref": "#/responses/error" } }, @@ -13765,17 +13861,10 @@ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "get": { - "tags": [ - "repository" + "issue" ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun", + "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", @@ -13785,106 +13874,104 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" + "required": true }, { - "type": "string", - "description": "id of the run", - "name": "run", + "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", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } - ], + ] + }, + "get": { "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/WorkflowRun" + "$ref": "#/responses/Issue" }, - "400": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" } }, "produces": [ "application/json" - ] - }, - "delete": { + ], "tags": [ - "repository" + "issue" ], - "summary": "Delete a workflow run", - "operationId": "deleteActionRun", + "summary": "Get an issue", + "operationId": "issueGetIssue", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "type": "integer", - "description": "runid of the workflow run", - "name": "run", + "format": "int64", + "description": "index of the issue to get", + "name": "index", "in": "path", - "required": true + "required": true, + "type": "integer" }, { + "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" } - ], + ] + }, + "delete": { "responses": { "204": { - "description": "No Content" + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } }, - "produces": [ - "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { - "post": { - "produces": [ - "application/json" - ], "tags": [ - "repository" + "issue" ], - "summary": "create review requests for a pull request", - "operationId": "repoCreatePullReviewRequests", + "summary": "Delete an issue", + "operationId": "issueDelete", "parameters": [ { "type": "string", @@ -13894,27 +13981,19 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" - }, - { - "name": "index", + "name": "repo", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the pull request" + "required": true }, { - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - }, - "name": "body", - "in": "body" + "type": "integer", + "format": "int64", + "description": "index of issue to delete", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -13924,28 +14003,19 @@ "required": true, "in": "path" } - ], - "responses": { - "201": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests", + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments", "parameters": [ { "type": "string", @@ -13955,117 +14025,134 @@ "required": true }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "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" - } + "description": "index of the issue", + "name": "index" }, { + "type": "integer", + "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64" + "name": "group_id" } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$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" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { - "get": { + }, + "consumes": [ + "multipart/form-data" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)", - "operationId": "GetAnnotatedTag", + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { - "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "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 + "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", - "description": "group ID of the repo" - } - ], - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" + "in": "path" } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { + "/repos/{owner}/group/{group_id}/{repo}/hooks": { "get": { - "operationId": "repoGetArchive", + "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" + "required": true }, { "required": true, @@ -14075,40 +14162,47 @@ "in": "path" }, { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "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", - "format": "int64" + "type": "integer" } ], "responses": { + "200": { + "$ref": "#/responses/HookList" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get an archive of a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { - "get": { + "summary": "Create a hook", + "operationId": "repoCreateHook", "parameters": [ { "type": "string", @@ -14117,108 +14211,101 @@ "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", + "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": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + }, + "name": "body" }, { + "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" - } - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" + "required": true } - }, - "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" + "201": { + "$ref": "#/responses/Hook" }, "404": { - "$ref": "#/responses/notFound" - } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request", - "operationId": "repoGetPullRequest", + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { + "get": { + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", "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" + "name": "repo" }, { - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "group_id", + "in": "query", "type": "integer", + "description": "page size of results", + "name": "limit" + }, + { "format": "int64", "required": true, "in": "path", - "description": "group ID of the repo" + "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" ] }, - "patch": { + "post": { "consumes": [ "application/json" ], @@ -14228,15 +14315,15 @@ "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": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", "parameters": [ { - "in": "path", "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path" }, { "type": "string", @@ -14246,19 +14333,11 @@ "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" + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePushMirrorOption" + } }, { "type": "integer", @@ -14270,103 +14349,52 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/PushMirror" }, - "412": { + "400": { "$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}/hooks/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a hook", - "operationId": "repoGetHook", + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions", "parameters": [ { + "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path", - "required": true + "in": "path" }, { + "description": "name of the repo", "name": "repo", "in": "path", "required": true, - "type": "string", - "description": "name of the repo" + "type": "string" }, { - "format": "int64", - "description": "id of the hook to get", - "name": "id", + "name": "pageName", "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 + "description": "name of the page" }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to delete" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query", + "type": "integer" }, { "type": "integer", @@ -14378,8 +14406,8 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/WikiCommitList" }, "404": { "$ref": "#/responses/notFound" @@ -14391,9 +14419,18 @@ "tags": [ "repository" ] - }, - "patch": { - "operationId": "repoEditHook", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", "parameters": [ { "type": "string", @@ -14410,260 +14447,289 @@ "in": "path" }, { - "name": "id", - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "index of the hook" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } + "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", - "type": "integer" + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/Hook" + "$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": "Edit a hook in a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { - "get": { - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", + "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", - "name": "owner", - "in": "path" + "description": "owner of the repo" }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page" + "in": "path", + "required": true, + "type": "string", + "description": "filepath of file to get", + "name": "filepath" }, { - "in": "query", - "type": "integer", - "description": "page size of results", - "name": "limit" + "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" + "name": "group_id", + "type": "integer" } ], "responses": { + "200": { + "description": "success" + }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a workflow dispatch event", - "operationId": "ActionsDispatchWorkflow", + "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" + }, + { + "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": "name of the repo", - "name": "repo" + "description": "owner of the repo", + "name": "owner" }, { "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "name": "body", + "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/CreateActionWorkflowDispatch" - } + "$ref": "#/definitions/AddCollaboratorOption" + }, + "name": "body" }, { - "type": "integer", "format": "int64", "required": true, "in": "path", "description": "group ID of the repo", - "name": "group_id" + "name": "group_id", + "type": "integer" } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/notifications": { - "put": { - "consumes": [ + }, + "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": [ - "notification" + "repository" ], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", + "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", + "name": "owner", "in": "path", "required": true }, { + "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" + "description": "name of the repo", + "name": "repo" }, { "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" + "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", - "type": "integer", - "format": "int64" + "name": "group_id" } - ], + ] + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "get": { "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" + "200": { + "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" } - } - }, - "get": { - "consumes": [ - "application/json" - ], + }, "produces": [ "application/json" ], "tags": [ - "notification" + "issue" ], - "summary": "List users's notification threads on a specific repo", - "operationId": "notifyGetRepoList", + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -14673,61 +14739,37 @@ "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" + "name": "index", + "in": "path", + "required": true, + "type": "integer", + "format": "int64", + "description": "index of the issue" }, { "type": "string", "format": "date-time", - "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "description": "if provided, only comments updated since the specified time are returned.", "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", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", "in": "query" }, { - "name": "page", + "description": "page size of results", + "name": "limit", "in": "query", - "type": "integer", - "description": "page number of results to return (1-based)" + "type": "integer" }, { - "type": "integer", - "description": "page size of results", - "name": "limit", + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", "in": "query" }, { @@ -14738,55 +14780,63 @@ "required": true, "in": "path" } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - } + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "/repos/{owner}/group/{group_id}/{repo}/milestones": { "get": { + "operationId": "issueGetMilestonesList", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "name of the repository", "name": "repo", "in": "path", - "required": true + "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" }, { - "type": "integer", "description": "page number of results to return (1-based)", "name": "page", - "in": "query" + "in": "query", + "type": "integer" }, { - "type": "integer", "description": "page size of results", "name": "limit", - "in": "query" + "in": "query", + "type": "integer" }, { - "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" } ], "responses": { "200": { - "$ref": "#/responses/SecretList" + "$ref": "#/responses/MilestoneList" }, "404": { "$ref": "#/responses/notFound" @@ -14796,29 +14846,26 @@ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { - "get": { + "summary": "Get all of a repository's opened milestones" + }, + "post": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a note corresponding to a single commit from a repository", - "operationId": "repoGetNote", + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", "parameters": [ { - "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true + "required": true, + "type": "string" }, { "type": "string", @@ -14828,57 +14875,43 @@ "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" + "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", - "name": "group_id", - "type": "integer" + "description": "group ID of the repo" } ], "responses": { - "200": { - "$ref": "#/responses/Note" + "201": { + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - } + }, + "consumes": [ + "application/json" + ] } }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "summary": "Create a wiki page", - "operationId": "repoCreateWikiPage", + "/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": "owner of the repo" }, { "type": "string", @@ -14887,13 +14920,6 @@ "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } - }, { "description": "group ID of the repo", "name": "group_id", @@ -14903,149 +14929,123 @@ "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" + "$ref": "#/responses/Repository" }, "404": { "$ref": "#/responses/notFound" } }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", + "summary": "Get a repository", + "operationId": "repoGet" + }, + "delete": { + "summary": "Delete a repository", + "operationId": "repoDelete", "parameters": [ { - "name": "owner", "in": "path", "required": true, "type": "string", - "description": "owner of the repo" + "description": "owner of the repo to delete", + "name": "owner" }, { - "description": "name of the repo", + "description": "name of the repo to delete", "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" + "format": "int64", + "required": true, + "in": "path" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } + }, + "produces": [ + "application/json" + ], + "tags": [ + "repository" ] }, - "get": { - "operationId": "repoListPushMirrors", + "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", + "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": "name of the repo", - "name": "repo" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "type": "string" }, { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" + "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" + "in": "path", + "description": "group ID of the repo", + "name": "group_id" } ], "responses": { "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/Repository" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get all push mirrors of the repository" + } } } } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index f5d37a8928904..aa20537840371 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -41453,6 +41453,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 0397779f936b96c733032c0a9f943521ff5ef3dc 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/168] 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 85f58c15ee97c..55d58efa5f7ac 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 47d8dbf84b581740722c34cd6229a3eb5e39cf55 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/168] 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 c7053433fd341..96e955bc10587 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -72,6 +72,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 e6f088a8c79d6a5163f98362f0d84ab8b1ed57a1 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/168] 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 5c48aa14b777785ecc19160a21610042a38702d2 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/168] 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 96e955bc10587..7c01432e98453 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -71,8 +71,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 24b360d173bbe59801a3e9b2b9c58242734a431b 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/168] 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 3243b7a3ab57f429934fe4c53b927e6bd07b22bd 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/168] 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 946a9b4be076a..9fe322dfcc5e2 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -486,9 +486,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 09c157a25bed4..c468228b82f17 100644 --- a/tests/integration/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -44,7 +44,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 34480ad6550f828b539bd47447adc9e324d76511 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/168] use a custom ordered map to create group swagger mixin --- Makefile | 3 +- build_tools/swagger/main.go | 147 +- templates/swagger/v1_groups.json | 15053 +---------------------------- templates/swagger/v1_json.tmpl | 15048 ---------------------------- 4 files changed, 127 insertions(+), 30124 deletions(-) diff --git a/Makefile b/Makefile index 80280983fa029..40fbdc5b06163 100644 --- a/Makefile +++ b/Makefile @@ -272,8 +272,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 927157e17e67a..71a23717cfac0 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) - - 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", - }) + methodMap := v.(OrderedMap) + + 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 667fbf96dadf7..0967ef424bce6 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 aa20537840371..e0ab9d948a1e7 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4833,15054 +4833,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 207931bedf702c82d78227c7ed1bbbec3e3295fd 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/168] 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 8c214269b76b6..444421357d3a7 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -388,7 +388,11 @@ func (repo *Repository) CommitLink(commitID string) (result string) { // APIURL returns the repository API URL func (repo *Repository) APIURL() string { - return setting.AppURL + "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 setting.AppURL + "api/v1/repos/" + url.PathEscape(repo.OwnerName) + "/" + groupSegment + url.PathEscape(repo.Name) } // GetCommitsCountCacheKey returns cache key used for commits count caching. From de80fda79693abc0b8418e179a23b7a913bccfa9 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/168] 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 | 10 +++--- 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, 70 insertions(+), 70 deletions(-) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 9fe322dfcc5e2..7d8c1756a4f2a 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -488,7 +488,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 3ed7baa5ba1d7..412c2ec672603 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -59,27 +59,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) } @@ -89,36 +89,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 c80b60fe75c7d..c9148ea0af247 100644 --- a/tests/integration/pull_comment_test.go +++ b/tests/integration/pull_comment_test.go @@ -101,7 +101,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 ac9b6791ebb60..f9d33811568a2 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 b3df3a7592564..27bded33a16f5 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -138,7 +138,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) @@ -173,7 +173,7 @@ func TestPullCreate(t *testing.T) { func TestPullCreate_TitleEscape(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") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "XSS PR") @@ -237,7 +237,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") @@ -273,7 +273,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") @@ -298,7 +298,7 @@ func TestPullCreatePrFromBaseToFork(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 dd7464b5f1a72..d5f4c3d5ea5a7 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -112,7 +112,7 @@ func TestPullMerge(t *testing.T) { hookTasksLenBefore := len(hookTasks) 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") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -149,7 +149,7 @@ func TestPullRebase(t *testing.T) { hookTasksLenBefore := len(hookTasks) 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") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -186,7 +186,7 @@ func TestPullRebaseMerge(t *testing.T) { hookTasksLenBefore := len(hookTasks) 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") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -223,7 +223,7 @@ func TestPullSquash(t *testing.T) { hookTasksLenBefore := len(hookTasks) 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") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") @@ -249,7 +249,7 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { hookTasksLenBefore := len(hookTasks) 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") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World (Edited!)\n") @@ -289,7 +289,7 @@ func TestPullSquashWithHeadCommitID(t *testing.T) { func TestPullCleanUpAfterMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user2", Name: "repo1"}) @@ -340,7 +340,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { func TestCantMergeWorkInProgress(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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") resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "[wip] This is a pull title") @@ -359,7 +359,7 @@ func TestCantMergeWorkInProgress(t *testing.T) { func TestCantMergeConflict(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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", "conflict", "README.md", "Hello, World (Edited Once)\n") testEditFileToNewBranch(t, session, 0, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") @@ -401,7 +401,7 @@ func TestCantMergeConflict(t *testing.T) { func TestCantMergeUnrelated(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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", "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 @@ -498,7 +498,7 @@ func TestCantMergeUnrelated(t *testing.T) { func TestFastForwardOnlyMerge(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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", "update", "README.md", "Hello, World 2\n") // Use API to create a pr from update to master @@ -533,7 +533,7 @@ func TestFastForwardOnlyMerge(t *testing.T) { func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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", "diverging", "README.md", "Hello, World diverged\n") testEditFile(t, session, 0, "user1", "repo1", "master", "README.md", "Hello, World 2\n") @@ -651,7 +651,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") 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") @@ -687,7 +687,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *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", "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)") @@ -727,7 +727,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") @@ -752,7 +752,7 @@ func TestPullMergeIndexerNotifier(t *testing.T) { onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { // create a pull request 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") createPullResp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "Indexer notifier test pull") @@ -828,7 +828,7 @@ func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { session := loginUser(t, "user1") 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, "") defer func() { testDeleteRepository(t, session, "user1", forkedName) }() @@ -921,7 +921,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) { session := loginUser(t, "user1") user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) forkedName := "repo1-2" - testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", forkedName, "") defer func() { testDeleteRepository(t, session, "user1", forkedName) }() @@ -1141,7 +1141,7 @@ func TestPullNonMergeForAdminWithBranchProtection(t *testing.T) { // create a pull request session := loginUser(t, "user1") forkedName := "repo1-1" - testRepoFork(t, session, "user2", "repo1", "user1", forkedName, "") + testRepoFork(t, session, 0, "user2", "repo1", "user1", forkedName, "") defer testDeleteRepository(t, session, "user1", forkedName) testEditFile(t, session, 0, "user1", forkedName, "master", "README.md", "Hello, World (Edited)\n") diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index 39030f2bd94ab..59a0a6dee76c9 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 7fd01c790bc3c..534288484186f 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") url := path.Join("user1", "repo1", "compare", "master...status1") @@ -127,7 +127,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") @@ -152,7 +152,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) url := path.Join("user1", "repo1", "compare", "master...status1") req := NewRequestWithValues(t, "POST", url, diff --git a/tests/integration/repo_activity_test.go b/tests/integration/repo_activity_test.go index 0d2c4a44b7e9c..ee79cfcd3964b 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 60e012dc0b522..f21ff14e25b88 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -255,7 +255,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 e24f31adf2e62..b3e4c85a23e63 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 @@ -64,13 +64,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 @@ -94,7 +94,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") @@ -104,7 +104,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 5283313e05f9f..bc4ac7262bb02 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -62,7 +62,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 36d8f2a581789..d5fca2355c81a 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -62,7 +62,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") @@ -72,7 +72,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) @@ -142,11 +142,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 = NewRequestWithValues(t, "POST", "/org3/repo3/settings/public_access", map[string]string{ + req = NewRequestWithValues(t, "POST", "/org3/group/129/repo3/settings/public_access", map[string]string{ "_csrf": GetUserCSRFToken(t, session), }) 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 1d12aa632a162..7d3871a58f38c 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -222,7 +222,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 ebe084ccdce08..a6c80efe6ce6f 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 := NewRequestWithValues(t, "POST", path.Join(issueLink, "times", "stopwatch", "start"), map[string]string{ "_csrf": htmlDoc.GetCSRF(), }) diff --git a/tests/integration/workflow_run_api_check_test.go b/tests/integration/workflow_run_api_check_test.go index 6a80bb5118623..36c821814f99f 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 482b231a978361975de0eafda1a389a8e36725d0 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/168] 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 0967ef424bce6..58acc29dc9e27 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 e0ab9d948a1e7..aa20537840371 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4833,6 +4833,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 dce49c9b997be37726e68ba4e4a97867249b288f 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/168] 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 716ff606f67c5..96019c02eddd8 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -140,7 +140,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 f9d33811568a2..3bed190745874 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 27bded33a16f5..fdd587641772b 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -380,7 +380,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 59a0a6dee76c9..274a57b75042e 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 f21ff14e25b88..2796c66444dc7 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -255,7 +255,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 b3e4c85a23e63..37c5a9cd1ae1d 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 bc4ac7262bb02..fca4e92982032 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -62,7 +62,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 8f364fd4211e883cc4df368d0437d76b61f84da9 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/168] 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 444421357d3a7..68d6b03aef7eb 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -390,7 +390,7 @@ func (repo *Repository) CommitLink(commitID string) (result string) { func (repo *Repository) APIURL() string { var groupSegment string if repo.GroupID > 0 { - groupSegment = fmt.Sprintf("group/%d", repo.GroupID) + groupSegment = fmt.Sprintf("group/%d/", repo.GroupID) } return setting.AppURL + "api/v1/repos/" + url.PathEscape(repo.OwnerName) + "/" + groupSegment + url.PathEscape(repo.Name) } From d76108ce5259bf05609b152a393306a132bf90e1 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/168] 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 412c2ec672603..21864ba51dbca 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -149,6 +149,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" @@ -159,7 +161,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 274a57b75042e..88e91d85dda46 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 48cdaceebfaba..e3ca8c1796f4c 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 a6c80efe6ce6f..7171d2b53254f 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 8f926f32fd11f87f6ea44c4476ea7ef2426e9710 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/168] update swagger tool unmarshal json directly into ordered map --- build_tools/swagger/main.go | 176 +- templates/swagger/v1_groups.json | 12464 ++++++++++++++--------------- 2 files changed, 6376 insertions(+), 6264 deletions(-) diff --git a/build_tools/swagger/main.go b/build_tools/swagger/main.go index 71a23717cfac0..c8e9882bdedba 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 58acc29dc9e27..01da0e65db05c 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": { + "/repos/{owner}/group/{group_id}/{repo}": { + "get": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Delete specific tracked time", - "operationId": "issueDeleteTime", + "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 }, { @@ -47,68 +34,36 @@ "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" + "$ref": "#/responses/Repository" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets a specific workflow job for a workflow run", - "operationId": "getWorkflowJob", + "summary": "Delete a repository", + "operationId": "repoDelete", "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" - }, { "type": "string", - "description": "name of the repository", - "name": "repo", + "description": "owner of the repo to delete", + "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "id of the job", - "name": "job_id", + "description": "name of the repo to delete", + "name": "repo", "in": "path", "required": true }, @@ -120,36 +75,49 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections/priority": { - "post": { + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Update the priorities of branch protections for a repository.", - "operationId": "repoUpdateBranchProtectionPriories", + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit", "parameters": [ { - "required": true, "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to edit", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repo", + "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/UpdateBranchProtectionPriories" + "$ref": "#/definitions/EditRepoOption" } }, { @@ -162,57 +130,51 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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": { + "/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" + "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "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": "name of the artifact", + "name": "name", + "in": "query" }, { "description": "group ID of the repo", @@ -225,33 +187,27 @@ ], "responses": { "200": { - "$ref": "#/responses/Milestone" + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Update a milestone", - "operationId": "issueEditMilestone" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", + "summary": "Gets a specific artifact for a workflow run", + "operationId": "getArtifact", "parameters": [ { "type": "string", @@ -261,16 +217,16 @@ "required": true }, { - "description": "name of the repo", + "type": "string", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "the milestone to get, identified by ID and if not available by name", - "name": "id", + "description": "id of the artifact", + "name": "artifact_id", "in": "path", "required": true }, @@ -285,7 +241,10 @@ ], "responses": { "200": { - "$ref": "#/responses/Milestone" + "$ref": "#/responses/Artifact" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -293,6 +252,14 @@ } }, "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Deletes a specific artifact for a workflow run", + "operationId": "deleteArtifact", "parameters": [ { "type": "string", @@ -303,15 +270,15 @@ }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { "type": "string", - "description": "the milestone to delete, identified by ID and if not available by name", - "name": "id", + "description": "id of the artifact", + "name": "artifact_id", "in": "path", "required": true }, @@ -326,21 +293,27 @@ ], "responses": { "204": { - "$ref": "#/responses/empty" + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { - "post": { + "/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", @@ -350,29 +323,18 @@ "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", + "description": "name of the repository", + "name": "repo", "in": "path", "required": true }, { - "enum": [ - "merge", - "rebase" - ], "type": "string", - "description": "how to update pull request", - "name": "style", - "in": "query" + "description": "id of the artifact", + "name": "artifact_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -384,55 +346,60 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "302": { + "description": "redirect to the blob download" }, - "409": { + "400": { "$ref": "#/responses/error" }, - "422": { - "$ref": "#/responses/validationError" - }, - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { + "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": "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "name": "runner_id", - "in": "path", - "required": true, "type": "string", - "description": "id of the runner" + "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", @@ -445,7 +412,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/WorkflowJobsList" }, "400": { "$ref": "#/responses/error" @@ -453,17 +420,19 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get an repo-level runner", - "operationId": "getRepoRunner" - }, - "delete": { + "summary": "Gets a specific workflow job for a workflow run", + "operationId": "getWorkflowJob", "parameters": [ { "type": "string", @@ -473,18 +442,18 @@ "required": true }, { + "type": "string", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "name": "runner_id", - "in": "path", - "required": true, "type": "string", - "description": "id of the runner" + "description": "id of the job", + "name": "job_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -496,8 +465,8 @@ } ], "responses": { - "204": { - "description": "runner has been deleted" + "200": { + "$ref": "#/responses/WorkflowJob" }, "400": { "$ref": "#/responses/error" @@ -505,42 +474,40 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete an repo-level runner", - "operationId": "deleteRepoRunner" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/diffpatch": { - "post": { - "operationId": "repoApplyDiffPatch", + "summary": "Downloads the job logs for a workflow run", + "operationId": "downloadActionsRunJobLogs", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { - "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ApplyDiffPatchFileOptions" - } + "type": "integer", + "description": "id of the job", + "name": "job_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -553,57 +520,39 @@ ], "responses": { "200": { - "$ref": "#/responses/FileResponse" + "description": "output blob content" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/runners": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Apply diff patch to repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { - "delete": { + "summary": "Get repo-level runners", + "operationId": "getRepoRunners", "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" + "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", + "type": "string", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, @@ -617,31 +566,28 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/definitions/ActionRunnersResponse" }, - "403": { - "$ref": "#/responses/forbidden" + "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": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview" - }, - "get": { - "tags": [ - "repository" - ], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReview", + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", "parameters": [ { "type": "string", @@ -657,22 +603,6 @@ "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", @@ -684,15 +614,9 @@ ], "responses": { "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/RegistrationToken" } - }, - "produces": [ - "application/json" - ] + } }, "post": { "produces": [ @@ -701,47 +625,23 @@ "tags": [ "repository" ], - "summary": "Submit a pending review to an pull request", - "operationId": "repoSubmitPullReview", + "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" + "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", + "name": "repo", "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", @@ -753,90 +653,40 @@ ], "responses": { "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/RegistrationToken" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runners/{runner_id}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", + "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": "owner of the repo to sync" + "required": true }, { "type": "string", - "description": "name of the repo to sync", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "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" + "required": true }, { "type": "string", - "description": "sha of the commit", - "name": "sha", + "description": "id of the runner", + "name": "runner_id", "in": "path", "required": true }, @@ -851,7 +701,7 @@ ], "responses": { "200": { - "$ref": "#/responses/GitBlobResponse" + "$ref": "#/definitions/ActionRunner" }, "400": { "$ref": "#/responses/error" @@ -859,80 +709,17 @@ "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" - } - }, + } + }, + "delete": { "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": { + "summary": "Delete an repo-level runner", + "operationId": "deleteRepoRunner", "parameters": [ { "type": "string", @@ -949,12 +736,11 @@ "required": true }, { + "type": "string", + "description": "id of the runner", + "name": "runner_id", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index" + "required": true }, { "description": "group ID of the repo", @@ -966,30 +752,16 @@ } ], "responses": { - "201": { - "$ref": "#/responses/empty" + "204": { + "description": "runner has been deleted" }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" + "400": { + "$ref": "#/responses/error" }, "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": { @@ -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,24 +853,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments": { + "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { "get": { - "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/CommentList" - } - }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", + "summary": "Gets a specific workflow run", + "operationId": "GetWorkflowRun", "parameters": [ { "type": "string", @@ -1109,36 +873,17 @@ }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "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": "id of the run", + "name": "run", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -1148,31 +893,50 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { - "get": { + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", + "summary": "Delete a workflow run", + "operationId": "deleteActionRun", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repo", + "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", @@ -1183,19 +947,19 @@ } ], "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/responses/error" + }, "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}/artifacts": { "get": { "produces": [ "application/json" @@ -1203,23 +967,36 @@ "tags": [ "repository" ], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", + "summary": "Lists all artifacts for a repository run", + "operationId": "getArtifactsOfRun", "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", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, + { + "type": "integer", + "description": "runid of the workflow run", + "name": "run", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the artifact", + "name": "name", + "in": "query" + }, { "description": "group ID of the repo", "name": "group_id", @@ -1231,11 +1008,27 @@ ], "responses": { "200": { - "$ref": "#/responses/RegistrationToken" + "$ref": "#/responses/ArtifactsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } - }, - "post": { + } + }, + "/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", @@ -1245,11 +1038,36 @@ "required": true }, { - "description": "name of the repo", + "type": "string", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true, - "type": "string" + "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", @@ -1262,26 +1080,27 @@ ], "responses": { "200": { - "$ref": "#/responses/RegistrationToken" + "$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": "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", + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", "parameters": [ { "type": "string", @@ -1291,18 +1110,23 @@ "required": true }, { + "type": "string", + "description": "name of the repository", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "in": "path", - "required": true, - "type": "string", - "description": "team name", - "name": "team" + "type": "integer", + "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", @@ -1314,48 +1138,57 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/SecretList" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - }, - "delete": { - "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam", + ], + "tags": [ + "repository" + ], + "summary": "Create or Update a secret value in a repository", + "operationId": "updateRepoSecret", "parameters": [ { "type": "string", - "description": "owner of the repo", + "description": "owner of the repository", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { "type": "string", - "description": "team name", - "name": "team", + "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", @@ -1366,56 +1199,53 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" + "201": { + "description": "response when creating a secret" }, "204": { - "$ref": "#/responses/empty" + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" } - }, - "produces": [ + } + }, + "delete": { + "consumes": [ "application/json" ], - "tags": [ - "repository" - ] - }, - "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Check if a team is assigned to a repository", - "operationId": "repoCheckTeam", + "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 }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "description": "team name", - "name": "team", + "type": "string", + "description": "name of the secret", + "name": "secretname", "in": "path", - "required": true, - "type": "string" + "required": true }, { "description": "group ID of the repo", @@ -1427,19 +1257,19 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Team" + "204": { + "description": "delete one secret of the repository" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts": { + "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { "get": { "produces": [ "application/json" @@ -1447,8 +1277,8 @@ "tags": [ "repository" ], - "summary": "Lists all artifacts for a repository", - "operationId": "getArtifacts", + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", "parameters": [ { "type": "string", @@ -1458,17 +1288,23 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "description": "name of the artifact", - "name": "name", - "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, default maximum page size is 50", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -1481,18 +1317,27 @@ ], "responses": { "200": { - "$ref": "#/responses/ArtifactsList" + "$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}/hooks/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/variables": { "get": { "produces": [ "application/json" @@ -1500,30 +1345,34 @@ "tags": [ "repository" ], - "summary": "Get a hook", - "operationId": "repoGetHook", + "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": "owner of the repo" + "required": true }, { - "description": "name of the repo", + "type": "string", + "description": "name of the repository", "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" + "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", @@ -1536,22 +1385,27 @@ ], "responses": { "200": { - "$ref": "#/responses/Hook" + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } } - }, - "delete": { + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a hook in a repository", - "operationId": "repoDeleteHook", + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", "parameters": [ { "type": "string", @@ -1562,18 +1416,17 @@ }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "name": "id", + "type": "string", + "description": "name of the variable", + "name": "variablename", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the hook to delete" + "required": true }, { "description": "group ID of the repo", @@ -1585,59 +1438,53 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } } }, - "patch": { - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, + "put": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a hook in a repository", - "operationId": "repoEditHook", + "summary": "Update a repo-level variable", + "operationId": "updateRepoVariable", "parameters": [ { + "type": "string", "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", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "description": "index of the hook", - "name": "id", + "type": "string", + "description": "name of the variable", + "name": "variablename", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditHookOption" + "$ref": "#/definitions/UpdateVariableOption" } }, { @@ -1648,99 +1495,59 @@ "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": { + "201": { + "description": "response when updating a repo-level variable" + }, "204": { - "$ref": "#/responses/empty" + "description": "response when updating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "post": { "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { - "delete": { - "deprecated": true, + ], + "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": "owner of the repo" + "required": true }, { - "required": true, "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", + "type": "string", + "description": "name of the variable", + "name": "variablename", "in": "path", "required": true }, { - "name": "id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of comment to delete" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } }, { "description": "group ID of the repo", @@ -1752,49 +1559,29 @@ } ], "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" + "201": { + "description": "response when creating a repo-level variable" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" + "409": { + "description": "variable name already exists." }, - "200": { - "$ref": "#/responses/Comment" + "500": { + "$ref": "#/responses/error" } - }, - "consumes": [ - "application/json" - ], + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Edit a comment", - "operationId": "issueEditCommentDeprecated", - "deprecated": true, + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", "parameters": [ { "type": "string", @@ -1805,33 +1592,18 @@ }, { "type": "string", - "description": "name of the repo", + "description": "name of the repository", "name": "repo", "in": "path", "required": true }, { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", + "type": "string", + "description": "name of the variable", + "name": "variablename", "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", @@ -1840,19 +1612,36 @@ "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}/media/{filepath}": { + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows": { "get": { "produces": [ - "application/octet-stream" + "application/json" ], "tags": [ "repository" ], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS", + "summary": "List repository workflows", + "operationId": "ActionsListRepositoryWorkflows", "parameters": [ { "type": "string", @@ -1868,19 +1657,6 @@ "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", @@ -1892,20 +1668,11 @@ ], "responses": { "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } + "$ref": "#/responses/ActionWorkflowList" + }, + "400": { + "$ref": "#/responses/error" }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { - "post": { - "responses": { "403": { "$ref": "#/responses/forbidden" }, @@ -1915,24 +1682,22 @@ "422": { "$ref": "#/responses/validationError" }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/TagProtection" + "500": { + "$ref": "#/responses/error" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection", + "summary": "Get a workflow", + "operationId": "ActionsGetWorkflow", "parameters": [ { "type": "string", @@ -1949,11 +1714,11 @@ "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagProtectionOption" - } + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -1963,14 +1728,39 @@ "required": true, "in": "path" } - ] - }, - "get": { + ], + "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": "List tag protections for a repository", - "operationId": "repoListTagProtection", + "summary": "Disable a workflow", + "operationId": "ActionsDisableWorkflow", "parameters": [ { "type": "string", @@ -1986,6 +1776,13 @@ "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", @@ -1996,31 +1793,62 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" + "204": { + "description": "No Content" + }, + "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}/actions/runners": { - "get": { + "/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": "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": "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", @@ -2032,35 +1860,41 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "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": "Get repo-level runners", - "operationId": "getRepoRunners" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/tasks": { - "get": { + "summary": "Enable a workflow", + "operationId": "ActionsEnableWorkflow", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -2070,16 +1904,11 @@ "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" + "type": "string", + "description": "id of the workflow", + "name": "workflow_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -2091,6 +1920,9 @@ } ], "responses": { + "204": { + "description": "No Content" + }, "400": { "$ref": "#/responses/error" }, @@ -2105,65 +1937,53 @@ }, "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}": { + "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { "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", + "summary": "List a repository's activity feeds", + "operationId": "repoListActivityFeeds", "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", - "description": "name of the repo" + "required": true }, { - "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." + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" }, { - "type": "string", - "description": "the name of the commit/branch/tag, default to the repositoryโ€™s default branch.", - "name": "ref", + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", "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" + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -2176,7 +1996,7 @@ ], "responses": { "200": { - "$ref": "#/responses/ContentsExtResponse" + "$ref": "#/responses/ActivityFeedsList" }, "404": { "$ref": "#/responses/notFound" @@ -2184,24 +2004,23 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/contents/{filepath}": { + "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { "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", + "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" + "required": true }, { "type": "string", @@ -2211,17 +2030,11 @@ "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": "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", @@ -2234,46 +2047,39 @@ ], "responses": { "200": { - "$ref": "#/responses/ContentsResponse" + "description": "success" }, "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", + } + }, + "/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": [ { - "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" - }, - { - "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", @@ -2284,92 +2090,45 @@ } ], "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" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/avatar": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a file in a repository", - "operationId": "repoCreateFile", + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/CreateFileOptions" + "$ref": "#/definitions/UpdateRepoAvatarOption" } }, { @@ -2380,70 +2139,40 @@ "required": true, "in": "path" } - ] - }, - "delete": { + ], "responses": { - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - } - }, { "description": "group ID of the repo", "name": "group_id", @@ -2452,27 +2181,27 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks": { - "get": { + ], "responses": { - "200": { - "$ref": "#/responses/HookList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List the hooks in a repository", - "operationId": "repoListHooks", + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", "parameters": [ { "type": "string", @@ -2488,18 +2217,6 @@ "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", @@ -2508,17 +2225,32 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + } }, "post": { - "operationId": "repoCreateHook", + "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" + "required": true }, { "type": "string", @@ -2531,7 +2263,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateHookOption" + "$ref": "#/definitions/CreateBranchProtectionOption" } }, { @@ -2545,12 +2277,25 @@ ], "responses": { "201": { - "$ref": "#/responses/Hook" + "$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" ], @@ -2560,11 +2305,8 @@ "tags": [ "repository" ], - "summary": "Create a hook" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { - "delete": { + "summary": "Update the priorities of branch protections for a repository.", + "operationId": "repoUpdateBranchProtectionPriories", "parameters": [ { "type": "string", @@ -2581,12 +2323,11 @@ "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/UpdateBranchProtectionPriories" + } }, { "description": "group ID of the repo", @@ -2598,52 +2339,38 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" }, + "422": { + "$ref": "#/responses/validationError" + }, "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" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/branch_protections/{name}": { "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", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -2653,10 +2380,9 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", + "type": "string", + "description": "name of protected branch", + "name": "name", "in": "path", "required": true }, @@ -2668,21 +2394,32 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } }, - "post": { + "delete": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest", + "summary": "Delete a specific branch protection for the repository", + "operationId": "repoDeleteBranchProtection", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -2692,20 +2429,12 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", - "name": "index", + "type": "string", + "description": "name of protected branch", + "name": "name", "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergePullRequestOption" - } - }, { "description": "group ID of the repo", "name": "group_id", @@ -2716,34 +2445,26 @@ } ], "responses": { - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { + "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "patch": { + "consumes": [ + "application/json" + ], "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", + "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditBranchProtection", "parameters": [ { "type": "string", @@ -2759,52 +2480,18 @@ "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", + "description": "name of protected branch", + "name": "name", "in": "path", "required": true }, { - "description": "Transfer Options", "name": "body", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/TransferRepoOption" + "$ref": "#/definitions/EditBranchProtectionOption" } }, { @@ -2817,30 +2504,22 @@ } ], "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/BranchProtection" }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/branches": { "get": { "produces": [ "application/json" @@ -2848,30 +2527,35 @@ "tags": [ "repository" ], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)", - "operationId": "GetAnnotatedTag", + "summary": "List a repository's branches", + "operationId": "repoListBranches", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" - }, - { + "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "required": true }, { "type": "string", - "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", - "name": "sha", + "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", @@ -2882,19 +2566,11 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/BranchList" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/labels": { + }, "post": { "consumes": [ "application/json" @@ -2903,17 +2579,17 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Create a label", - "operationId": "issueCreateLabel", + "summary": "Create a branch", + "operationId": "repoCreateBranch", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -2923,11 +2599,11 @@ "required": true }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateLabelOption" - }, - "name": "body" + "$ref": "#/definitions/CreateBranchRepoOption" + } }, { "description": "group ID of the repo", @@ -2939,26 +2615,34 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, "201": { - "$ref": "#/responses/Label" + "$ref": "#/responses/Branch" + }, + "403": { + "description": "The branch is archived or a mirror." }, "404": { - "$ref": "#/responses/notFound" + "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": [ - "issue" + "repository" ], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", "parameters": [ { "type": "string", @@ -2975,16 +2659,11 @@ "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": "string", + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -2997,45 +2676,43 @@ ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/Branch" }, "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.", + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Gets the metadata of all the entries of the root dir.", - "operationId": "repoGetContentsList", + "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": "owner of the repo" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "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" + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -3047,17 +2724,32 @@ } ], "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, - "post": { - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Rename a branch", + "operationId": "repoRenameBranch", "parameters": [ { "type": "string", @@ -3073,12 +2765,18 @@ "in": "path", "required": true }, + { + "type": "string", + "description": "name of the branch", + "name": "branch", + "in": "path", + "required": true + }, { "name": "body", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/ChangeFilesOptions" + "$ref": "#/definitions/RenameBranchRepoOption" } }, { @@ -3091,34 +2789,22 @@ } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/validationError" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { + "/repos/{owner}/group/{group_id}/{repo}/collaborators": { "get": { "produces": [ "application/json" @@ -3126,61 +2812,28 @@ "tags": [ "repository" ], - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses", + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" - }, - { - "description": "name of the repo", - "name": "repo", + "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "sha of the commit", - "name": "sha", + "description": "name of the repo", + "name": "repo", "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" + "name": "page", + "in": "query" }, { "type": "integer", @@ -3199,41 +2852,95 @@ ], "responses": { "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" } } - }, - "post": { + } + }, + "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Create a commit status", - "operationId": "repoCreateStatus", + "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" + "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" + "name": "repo", + "in": "path", + "required": true }, { "type": "string", - "description": "sha of the commit", - "name": "sha", + "description": "username of the user to add or update as a collaborator", + "name": "collaborator", "in": "path", "required": true }, @@ -3241,7 +2948,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateStatusOption" + "$ref": "#/definitions/AddCollaboratorOption" } }, { @@ -3254,38 +2961,36 @@ } ], "responses": { - "201": { - "$ref": "#/responses/CommitStatus" + "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}/notifications": { - "get": { + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "notification" + "repository" ], - "summary": "List users's notification threads on a specific repo", - "operationId": "notifyGetRepoList", + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -3295,49 +3000,155 @@ "required": true }, { - "type": "boolean", - "description": "If true, show notifications marked as read. Default value is false", - "name": "all", - "in": "query" - }, + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true + }, { - "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" - } + "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": "array", - "items": { - "type": "string", - "enum": [ - "issue", - "pull", - "commit", - "repository" - ] - }, - "collectionFormat": "multi", - "description": "filter notifications by subject type", - "name": "subject-type", + "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 show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "description": "Only commits after this date will be returned (ISO 8601 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", + "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" }, { @@ -3347,10 +3158,16 @@ "in": "query" }, { - "in": "query", "type": "integer", - "description": "page size of results", - "name": "limit" + "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", @@ -3363,62 +3180,492 @@ ], "responses": { "200": { - "$ref": "#/responses/NotificationThreadList" + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" } - }, - "consumes": [ + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/status": { + "get": { + "produces": [ "application/json" - ] - }, - "put": { + ], "tags": [ - "notification" + "repository" ], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", + "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": "owner of the repo" + "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, - "type": "string" + "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": [ { - "in": "query", "type": "string", - "description": "If true, mark all notifications on this repo. Default value is false", - "name": "all" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "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" + "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 }, { - "description": "Status to mark notifications as. Defaults to read.", - "name": "to-status", - "in": "query", - "type": "string" + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path", + "required": true }, { - "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": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", + "name": "ref", + "in": "query" }, { "description": "group ID of the repo", @@ -3430,28 +3677,33 @@ } ], "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" + "200": { + "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/responses/notFound" } - }, + } + }, + "put": { "consumes": [ "application/json" ], "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { - "get": { - "operationId": "repoGetWikiPageRevisions", + ], + "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" + "in": "path", + "required": true }, { "type": "string", @@ -3462,16 +3714,18 @@ }, { "type": "string", - "description": "name of the page", - "name": "pageName", + "description": "path of the file to update", + "name": "filepath", "in": "path", "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } }, { "description": "group ID of the repo", @@ -3483,59 +3737,45 @@ } ], "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": { + "$ref": "#/responses/FileResponse" + }, + "201": { + "$ref": "#/responses/FileResponse" + }, "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" }, "422": { - "$ref": "#/responses/validationError" - }, - "500": { "$ref": "#/responses/error" }, - "200": { - "$ref": "#/responses/ActionWorkflowList" - }, - "400": { - "$ref": "#/responses/error" + "423": { + "$ref": "#/responses/repoArchivedError" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List repository workflows", - "operationId": "ActionsListRepositoryWorkflows", + "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" + "required": true }, { "type": "string", @@ -3544,41 +3784,20 @@ "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", + "description": "path of the file to create", + "name": "filepath", "in": "path", "required": true }, { - "type": "string", - "description": "username of the collaborator whose permissions are to be obtained", - "name": "collaborator", - "in": "path", - "required": true + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } }, { "description": "group ID of the repo", @@ -3590,27 +3809,35 @@ } ], "responses": { - "200": { - "$ref": "#/responses/RepoCollaboratorPermission" + "201": { + "$ref": "#/responses/FileResponse" }, "403": { - "$ref": "#/responses/forbidden" + "$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": "Get repository permissions for a user" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets/{attachment_id}": { - "get": { + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", "parameters": [ { "type": "string", @@ -3620,27 +3847,26 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { + "type": "string", + "description": "path of the file to delete", + "name": "filepath", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id" + "required": true }, { + "name": "body", + "in": "body", "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path" + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + } }, { "description": "group ID of the repo", @@ -3653,22 +3879,39 @@ ], "responses": { "200": { - "$ref": "#/responses/Attachment" + "$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": [ - "issue" + "repository" ], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment" - }, - "delete": { + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch", "parameters": [ { "type": "string", @@ -3685,20 +3928,12 @@ "required": true }, { + "name": "body", + "in": "body", "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" + "schema": { + "$ref": "#/definitions/ApplyDiffPatchFileOptions" + } }, { "description": "group ID of the repo", @@ -3710,33 +3945,35 @@ } ], "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" }, "423": { "$ref": "#/responses/repoArchivedError" - }, - "204": { - "$ref": "#/responses/empty" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment" - }, - "patch": { + "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" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -3746,27 +3983,17 @@ "required": true }, { - "name": "id", + "type": "string", + "description": "filepath of file to get", + "name": "filepath", "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" + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } + "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", @@ -3778,125 +4005,53 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "description": "success" }, "404": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls": { + "/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": "List a repo's pull requests", - "operationId": "repoListPullRequests", + "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "Name of the repo", + "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", + "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch.", + "name": "ref", "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", + "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", + "name": "body", "in": "query", - "minimum": 0, - "type": "integer", - "description": "Page size of results" + "required": true }, { "description": "group ID of the repo", @@ -3909,52 +4064,51 @@ ], "responses": { "200": { - "$ref": "#/responses/PullRequestList" + "$ref": "#/responses/ContentsListResponse" }, "404": { "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ] + } }, "post": { - "consumes": [ - "application/json" - ], + "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": "Create a pull request", - "operationId": "repoCreatePullRequest", + "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" + "in": "path", + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "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/CreatePullRequestOption" - }, - "name": "body" + "$ref": "#/definitions/GetFilesOptions" + } }, { "description": "group ID of the repo", @@ -3966,41 +4120,32 @@ } ], "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/forks": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -4010,16 +4155,16 @@ "required": true }, { - "in": "query", "type": "integer", "description": "page number of results to return (1-based)", - "name": "page" + "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", @@ -4032,39 +4177,33 @@ ], "responses": { "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/RepositoryList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } }, "post": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "add a push mirror to the repository", - "operationId": "repoAddPushMirror", + "summary": "Fork a repository", + "operationId": "createFork", "parameters": [ { - "in": "path", - "required": true, "type": "string", - "description": "owner of the repo", - "name": "owner" + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repo to fork", "name": "repo", "in": "path", "required": true @@ -4073,7 +4212,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" + "$ref": "#/definitions/CreateForkOption" } }, { @@ -4086,37 +4225,34 @@ } ], "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" + "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" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels/{id}": { - "delete": { + "/repos/{owner}/group/{group_id}/{repo}/git/blobs/{sha}": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Remove a label from an issue", - "operationId": "issueRemoveLabel", + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", "parameters": [ { "type": "string", @@ -4133,20 +4269,11 @@ "required": true }, { + "type": "string", + "description": "sha of the commit", + "name": "sha", "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" + "required": true }, { "description": "group ID of the repo", @@ -4158,22 +4285,19 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/GitBlobResponse" }, - "204": { - "$ref": "#/responses/empty" + "400": { + "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}": { + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}": { "get": { "produces": [ "application/json" @@ -4181,8 +4305,8 @@ "tags": [ "repository" ], - "summary": "Get a workflow", - "operationId": "ActionsGetWorkflow", + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", "parameters": [ { "type": "string", @@ -4192,18 +4316,36 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "description": "id of the workflow", - "name": "workflow_id", + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", "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": "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", @@ -4216,33 +4358,27 @@ ], "responses": { "200": { - "$ref": "#/responses/ActionWorkflow" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Commit" }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/branches/{branch}": { - "patch": { + "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { + "get": { + "produces": [ + "text/plain" + ], "tags": [ "repository" ], - "summary": "Rename a branch", - "operationId": "repoRenameBranch", + "summary": "Get a commit's diff or patch", + "operationId": "repoDownloadCommitDiffOrPatch", "parameters": [ { "type": "string", @@ -4259,18 +4395,22 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the branch", - "name": "branch" + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/RenameBranchRepoOption" - } + "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", @@ -4281,51 +4421,33 @@ "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" + "$ref": "#/responses/string" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/notes/{sha}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", + "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" + "required": true }, { "type": "string", @@ -4336,11 +4458,23 @@ }, { "type": "string", - "description": "branch to get", - "name": "branch", + "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", @@ -4349,14 +4483,30 @@ "required": true, "in": "path" } - ] - }, - "delete": { + ], + "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": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs", "parameters": [ { "type": "string", @@ -4372,13 +4522,6 @@ "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", @@ -4389,25 +4532,16 @@ } ], "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/git/refs/{ref}": { "get": { "produces": [ "application/json" @@ -4415,34 +4549,29 @@ "tags": [ "repository" ], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", + "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" + "required": true }, { "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" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -4455,42 +4584,31 @@ ], "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" + "$ref": "#/responses/ReferenceList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/tags/{sha}": { + "get": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Pin an Issue", - "operationId": "pinIssue", + "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" + "in": "path", + "required": true }, { "type": "string", @@ -4500,10 +4618,9 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", + "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 }, @@ -4515,47 +4632,69 @@ "required": true, "in": "path" } - ] - }, - "delete": { + ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/AnnotatedTag" }, - "204": { - "$ref": "#/responses/empty" + "400": { + "$ref": "#/responses/error" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { + "get": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Unpin an Issue", - "operationId": "unpinIssue", + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", "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": "index", + "type": "string", + "description": "sha of the commit", + "name": "sha", "in": "path", - "required": true, + "required": true + }, + { + "type": "boolean", + "description": "show all directories and files", + "name": "recursive", + "in": "query" + }, + { "type": "integer", - "format": "int64", - "description": "index of issue to unpin" + "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", @@ -4565,27 +4704,30 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { - "get": { + ], "responses": { "200": { - "$ref": "#/responses/DeployKey" + "$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": "Get a repository's key by id", - "operationId": "repoGetKey", + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", "parameters": [ { "type": "string", @@ -4595,19 +4737,23 @@ "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 key to get", - "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" }, { "description": "group ID of the repo", @@ -4617,33 +4763,49 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } }, - "delete": { - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", + "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" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "format": "int64", - "description": "id of the key to delete", - "name": "id", - "in": "path", - "required": true, - "type": "integer" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + } }, { "description": "group ID of the repo", @@ -4655,55 +4817,40 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" } - }, - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/git": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", + "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "name of the repository", + "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", - "name": "limit", - "in": "query" - }, { "description": "group ID of the repo", "name": "group_id", @@ -4715,18 +4862,15 @@ ], "responses": { "200": { - "$ref": "#/responses/SecretList" + "$ref": "#/responses/GitHookList" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/variables/{variablename}": { + "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { "get": { "produces": [ "application/json" @@ -4734,27 +4878,27 @@ "tags": [ "repository" ], - "summary": "Get a repo-level variable", - "operationId": "getRepoVariable", + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", "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", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", - "description": "name of the variable", - "name": "variablename", + "description": "id of the hook to get", + "name": "id", "in": "path", "required": true }, @@ -4769,22 +4913,22 @@ ], "responses": { "200": { - "$ref": "#/responses/ActionVariable" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/GitHook" }, "404": { "$ref": "#/responses/notFound" } } }, - "put": { + "delete": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Update a repo-level variable", - "operationId": "updateRepoVariable", + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", "parameters": [ { "type": "string", @@ -4794,26 +4938,19 @@ "required": true }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "name of the variable", - "name": "variablename", + "description": "id of the hook to get", + "name": "id", "in": "path", "required": true }, - { - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - }, - "name": "body" - }, { "description": "group ID of the repo", "name": "group_id", @@ -4824,25 +4961,23 @@ } ], "responses": { - "201": { - "description": "response when updating a repo-level variable" - }, "204": { - "description": "response when updating a repo-level variable" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "patch": { "produces": [ "application/json" - ] - }, - "post": { - "operationId": "createRepoVariable", + ], + "tags": [ + "repository" + ], + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", "parameters": [ { "type": "string", @@ -4852,24 +4987,24 @@ "required": true }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "required": true, "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path" + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateVariableOption" + "$ref": "#/definitions/EditGitHookOption" } }, { @@ -4882,57 +5017,47 @@ } ], "responses": { - "201": { - "description": "response when creating a repo-level variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "409": { - "description": "variable name already exists." + "200": { + "$ref": "#/responses/GitHook" }, - "500": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Create a repo-level variable" - }, - "delete": { + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/hooks/{id}": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", + "summary": "Get a hook", + "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 repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "description": "name of the variable", - "name": "variablename", + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", "in": "path", - "required": true, - "type": "string" + "required": true }, { "description": "group ID of the repo", @@ -4945,40 +5070,29 @@ ], "responses": { "200": { - "$ref": "#/responses/ActionVariable" - }, - "201": { - "description": "response when deleting a variable" - }, - "204": { - "description": "response when deleting a variable" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { - "get": { + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Returns the validation information for a issue config", - "operationId": "repoValidateIssueConfig", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -4987,6 +5101,14 @@ "in": "path", "required": true }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + }, { "description": "group ID of the repo", "name": "group_id", @@ -4997,28 +5119,23 @@ } ], "responses": { + "204": { + "$ref": "#/responses/empty" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/reactions": { - "delete": { - "consumes": [ - "application/json" - ], + }, + "patch": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Remove a reaction from a comment of an issue", - "operationId": "issueDeleteCommentReaction", + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", "parameters": [ { "type": "string", @@ -5028,26 +5145,26 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "id of the comment to edit", - "name": "id" + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true }, { + "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditReactionOption" - }, - "name": "content" + "$ref": "#/definitions/EditHookOption" + } }, { "description": "group ID of the repo", @@ -5060,17 +5177,24 @@ ], "responses": { "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Hook" }, "404": { "$ref": "#/responses/notFound" } } - }, - "get": { + } + }, + "/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", @@ -5080,19 +5204,25 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "required": true, "type": "integer", "format": "int64", - "description": "id of the comment to edit", + "description": "id of the hook to test", "name": "id", - "in": "path" + "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", @@ -5104,47 +5234,32 @@ } ], "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" + "204": { + "$ref": "#/responses/empty" }, "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" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", + "summary": "Returns the issue config for a repo", + "operationId": "repoGetIssueConfig", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -5153,21 +5268,6 @@ "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", @@ -5179,13 +5279,7 @@ ], "responses": { "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/RepoIssueConfig" }, "404": { "$ref": "#/responses/notFound" @@ -5193,16 +5287,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { + "/repos/{owner}/group/{group_id}/{repo}/issue_config/validate": { "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "List issue's attachments", - "operationId": "issueListIssueAttachments", + "summary": "Returns the validation information for a issue config", + "operationId": "repoValidateIssueConfig", "parameters": [ { "type": "string", @@ -5212,19 +5306,11 @@ "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" + "name": "repo", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -5237,49 +5323,37 @@ ], "responses": { "200": { - "$ref": "#/responses/AttachmentList" + "$ref": "#/responses/RepoIssueConfigValidation" }, "404": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } } - }, - "post": { - "operationId": "issueCreateIssueAttachment", + } + }, + "/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" - }, - { "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 }, { "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData", + "description": "name of the repo", + "name": "repo", + "in": "path", "required": true }, { @@ -5292,38 +5366,16 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/IssueTemplates" }, "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" + "$ref": "#/responses/notFound" } - }, - "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}": { + "/repos/{owner}/group/{group_id}/{repo}/issues": { "get": { "produces": [ "application/json" @@ -5331,15 +5383,15 @@ "tags": [ "issue" ], - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", + "summary": "List a repository's issues", + "operationId": "issueListIssues", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -5349,70 +5401,87 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" }, { - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path" + "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": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "in": "path" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" + "type": "string", + "description": "search string", + "name": "q", + "in": "query" }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "delete": { - "parameters": [ { - "in": "path", - "required": true, + "enum": [ + "issues", + "pulls" + ], "type": "string", - "description": "owner of the repo", - "name": "owner" + "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" }, { - "name": "repo", - "in": "path", - "required": true, "type": "string", - "description": "name of the repo" + "description": "Only show items in which the given user was mentioned", + "name": "mentioned_by", + "in": "query" }, { "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "attachment_id", - "in": "path", - "required": true, "type": "integer", - "format": "int64", - "description": "id of the attachment to delete" + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -5424,27 +5493,26 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/IssueList" }, "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "$ref": "#/responses/notFound" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment" - }, - "patch": { - "operationId": "issueEditIssueAttachment", + "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", @@ -5460,27 +5528,11 @@ "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" + "$ref": "#/definitions/CreateIssueOption" } }, { @@ -5493,49 +5545,37 @@ } ], "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": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "$ref": "#/responses/LicensesList" + "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": [ - "repository" + "issue" ], - "summary": "Get repo licenses", - "operationId": "repoGetLicenses", + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", "parameters": [ { "type": "string", @@ -5552,32 +5592,30 @@ "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" + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since", + "in": "query" }, { "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true + "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", @@ -5590,42 +5628,46 @@ ], "responses": { "200": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/CommentList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "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": { + "summary": "Get a comment", + "operationId": "issueGetComment", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", - "description": "id of the tag protect to get", + "format": "int64", + "description": "id of the comment", "name": "id", "in": "path", "required": true @@ -5641,30 +5683,25 @@ ], "responses": { "200": { - "$ref": "#/responses/TagProtection" + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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" + "issue" ], - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", + "summary": "Delete a comment", + "operationId": "issueDeleteComment", "parameters": [ { "type": "string", @@ -5674,15 +5711,16 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "integer", - "description": "id of protected tag", + "format": "int64", + "description": "id of comment to delete", "name": "id", "in": "path", "required": true @@ -5697,23 +5735,29 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "204": { "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditTagProtection", + "summary": "Edit a comment", + "operationId": "issueEditComment", "parameters": [ { "type": "string", @@ -5723,24 +5767,25 @@ "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": "id of protected tag", + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditTagProtectionOption" + "$ref": "#/definitions/EditIssueCommentOption" } }, { @@ -5753,41 +5798,56 @@ } ], "responses": { - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/Comment" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "204": { + "$ref": "#/responses/empty" }, - "200": { - "$ref": "#/responses/TagProtection" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issue_config": { + "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}/assets": { "get": { - "operationId": "repoGetIssueConfig", + "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" + "in": "path", + "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": "id of the comment", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -5799,39 +5859,33 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/RepoIssueConfig" + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" + } + }, + "post": { + "consumes": [ + "multipart/form-data" ], - "summary": "Returns the issue config for a repo" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/compare/{basehead}": { - "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", + "summary": "Create a comment attachment", + "operationId": "issueCreateIssueCommentAttachment", "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", @@ -5841,12 +5895,26 @@ "required": true }, { - "type": "string", - "description": "compare two branches or commits", - "name": "basehead", + "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", @@ -5857,39 +5925,70 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Compare" + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/keys": { - "post": { - "operationId": "repoCreateKey", + "/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": "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 }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } + "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", @@ -5901,67 +6000,53 @@ } ], "responses": { - "201": { - "$ref": "#/responses/DeployKey" + "200": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "$ref": "#/responses/error" } - }, - "consumes": [ - "application/json" - ], + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Add a key to a repository" - }, - "get": { - "operationId": "repoListKeys", + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", "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" - }, - { - "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" + "in": "path", + "required": true }, { "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true }, { "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -5973,41 +6058,67 @@ } ], "responses": { - "200": { - "$ref": "#/responses/DeployKeyList" + "204": { + "$ref": "#/responses/empty" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, + } + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List a repository's keys" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { - "post": { - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer", + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", "parameters": [ { - "description": "owner of the repo to transfer", + "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 transfer", + "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", @@ -6018,27 +6129,34 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$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": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/trees/{sha}": { - "get": { - "operationId": "GetTree", + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions", "parameters": [ { "type": "string", @@ -6054,30 +6172,13 @@ "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" + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -6089,29 +6190,29 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/GitTreeResponse" + "$ref": "#/responses/ReactionList" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "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", + "issue" + ], + "summary": "Add a reaction to a comment of an issue", + "operationId": "issuePostCommentReaction", "parameters": [ { "type": "string", @@ -6121,28 +6222,27 @@ "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", + "name": "repo", "in": "path", "required": true }, { "type": "integer", "format": "int64", - "description": "id of the review", + "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", @@ -6154,33 +6254,31 @@ ], "responses": { "200": { - "$ref": "#/responses/PullReview" + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, + } + }, + "delete": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { - "post": { - "tags": [ - "repository" + "issue" ], - "summary": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", + "summary": "Remove a reaction from a comment of an issue", + "operationId": "issueDeleteCommentReaction", "parameters": [ { "type": "string", @@ -6190,31 +6288,26 @@ "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 release", + "description": "id of the comment to edit", "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" + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } }, { "description": "group ID of the repo", @@ -6226,27 +6319,19 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" + "200": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/error" } - }, - "consumes": [ - "multipart/form-data", - "application/octet-stream" - ], - "produces": [ - "application/json" - ] - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/pinned": { "get": { "produces": [ "application/json" @@ -6254,30 +6339,22 @@ "tags": [ "repository" ], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments", + "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" + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" - }, - { - "description": "id of the release", - "name": "id", + "name": "repo", "in": "path", - "required": true, - "type": "integer", - "format": "int64" + "required": true }, { "description": "group ID of the repo", @@ -6289,22 +6366,25 @@ } ], "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/AttachmentList" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { "get": { + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", + "summary": "Get an issue", + "operationId": "issueGetIssue", "parameters": [ { "type": "string", @@ -6314,51 +6394,19 @@ "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 issue", + "description": "index of the issue to get", "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" + "required": true }, { "description": "group ID of the repo", @@ -6371,35 +6419,26 @@ ], "responses": { "200": { - "$ref": "#/responses/TrackedTimeList" + "$ref": "#/responses/Issue" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "delete": { "tags": [ "issue" ], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", + "summary": "Delete an issue", + "operationId": "issueDelete", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -6409,19 +6448,12 @@ "required": true }, { - "description": "index of the issue", + "type": "integer", + "format": "int64", + "description": "index of issue to delete", "name": "index", "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddTimeOption" - } + "required": true }, { "description": "group ID of the repo", @@ -6433,11 +6465,8 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" @@ -6447,21 +6476,7 @@ } } }, - "delete": { - "responses": { - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" - } - }, + "patch": { "consumes": [ "application/json" ], @@ -6471,72 +6486,95 @@ "tags": [ "issue" ], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime", + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssue", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { + "type": "string", "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 add tracked time to", + "description": "index of the issue to edit", "name": "index", "in": "path", "required": true }, - { - "description": "group ID of the repo", - "name": "group_id", - "type": "integer", - "format": "int64", - "required": true, - "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": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" } - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets": { "get": { - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments", "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" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "in": "path", + "required": true }, { "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -6547,50 +6585,34 @@ "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" + "$ref": "#/responses/AttachmentList" }, "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" + "$ref": "#/responses/error" } - }, + } + }, + "post": { + "consumes": [ + "multipart/form-data" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a list of all commits from a repository", - "operationId": "repoGetAllCommits", + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -6600,66 +6622,25 @@ "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": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "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", + "description": "name of the attachment", + "name": "name", "in": "query" }, { - "name": "not", - "in": "query", - "type": "string", - "description": "commits that match the given specifier will not be listed." + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true }, { "description": "group ID of the repo", @@ -6669,13 +6650,39 @@ "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}/blocks": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/assets/{attachment_id}": { "get": { - "summary": "List issues that are blocked by this issue", - "operationId": "issueListBlocks", + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", "parameters": [ { "type": "string", @@ -6685,30 +6692,27 @@ "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 issue", "name": "index", "in": "path", - "required": true, - "type": "string" + "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", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -6721,56 +6725,52 @@ ], "responses": { "200": { - "$ref": "#/responses/IssueList" + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$ref": "#/responses/error" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } }, - "post": { + "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", "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 }, { - "in": "path", - "required": true, - "type": "string", + "type": "integer", + "format": "int64", "description": "index of the issue", - "name": "index" + "name": "index", + "in": "path", + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -6782,16 +6782,29 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Issue" + "204": { + "$ref": "#/responses/empty" }, "404": { - "description": "the issue does not exist" + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, - "delete": { - "operationId": "issueRemoveIssueBlocking", + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", "parameters": [ { "type": "string", @@ -6808,17 +6821,26 @@ "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/IssueMeta" + "$ref": "#/definitions/EditAttachmentOptions" } }, { @@ -6831,26 +6853,31 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Issue" + "201": { + "$ref": "#/responses/Attachment" }, "404": { - "$ref": "#/responses/notFound" + "$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": "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", + "summary": "List issues that are blocked by this issue", + "operationId": "issueListBlocks", "parameters": [ { "type": "string", @@ -6860,19 +6887,31 @@ "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": "name of the topic to add", - "name": "topic", + "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", @@ -6883,25 +6922,23 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" } - }, + } + }, + "post": { "produces": [ "application/json" ], "tags": [ - "repository" - ] - }, - "delete": { - "operationId": "repoDeleteTopic", + "issue" + ], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", "parameters": [ { "type": "string", @@ -6918,11 +6955,18 @@ "required": true }, { - "description": "name of the topic to delete", - "name": "topic", + "type": "string", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true, - "type": "string" + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } }, { "description": "group ID of the repo", @@ -6934,35 +6978,23 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" + "description": "the issue does not exist" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a topic from a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/editorconfig/{filepath}": { - "get": { + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get the EditorConfig definitions of a file in a repository", - "operationId": "repoGetEditorConfig", + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", "parameters": [ { "type": "string", @@ -6972,24 +7004,25 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "string", - "description": "filepath of file to get", - "name": "filepath", + "description": "index of the issue", + "name": "index", "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", + "schema": { + "$ref": "#/definitions/IssueMeta" + } }, { "description": "group ID of the repo", @@ -7001,75 +7034,62 @@ } ], "responses": { + "200": { + "$ref": "#/responses/Issue" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "description": "success" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { "get": { + "produces": [ + "application/json" + ], "tags": [ - "repository" + "issue" ], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", + "summary": "List all comments on an issue", + "operationId": "issueGetComments", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 repo" + "required": true }, { - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request to get", - "name": "index" + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "type": "string", - "description": "skip to given file", - "name": "skip-to", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", "in": "query" }, { - "enum": [ - "ignore-all", - "ignore-change", - "ignore-eol", - "show-all" - ], "type": "string", - "description": "whitespace behavior", - "name": "whitespace", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", "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", @@ -7081,26 +7101,32 @@ ], "responses": { "200": { - "$ref": "#/responses/ChangedFileList" + "$ref": "#/responses/CommentList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets/{attachment_id}": { - "get": { + ], + "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" + "in": "path", + "required": true }, { "type": "string", @@ -7112,18 +7138,17 @@ { "type": "integer", "format": "int64", - "description": "id of the release", - "name": "id", + "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" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } }, { "description": "group ID of the repo", @@ -7135,31 +7160,29 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Attachment" + "201": { + "$ref": "#/responses/Comment" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments/{id}": { "delete": { - "produces": [ - "application/json" - ], "tags": [ - "repository" + "issue" ], - "summary": "Delete a release attachment", - "operationId": "repoDeleteReleaseAttachment", + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, "parameters": [ { "type": "string", @@ -7176,20 +7199,19 @@ "required": true }, { - "format": "int64", - "description": "id of the release", - "name": "id", + "type": "integer", + "description": "this parameter is ignored", + "name": "index", "in": "path", - "required": true, - "type": "integer" + "required": true }, { - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true, "type": "integer", - "format": "int64" + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -7204,56 +7226,62 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" } } }, "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", + "summary": "Edit a comment", + "operationId": "issueEditCommentDeprecated", + "deprecated": true, "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", + "description": "this parameter is ignored", + "name": "index", "in": "path", "required": true }, { + "type": "integer", "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", + "description": "id of the comment to edit", + "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditAttachmentOptions" + "$ref": "#/definitions/EditIssueCommentOption" } }, { @@ -7266,43 +7294,64 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/Comment" }, - "422": { - "$ref": "#/responses/validationError" + "204": { + "$ref": "#/responses/empty" }, - "201": { - "$ref": "#/responses/Attachment" + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/transfer/accept": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ - "repository" + "issue" ], - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", + "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": [ { - "in": "path", - "required": true, "type": "string", - "description": "owner of the repo to transfer", - "name": "owner" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repo to transfer", + "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", @@ -7313,8 +7362,8 @@ } ], "responses": { - "202": { - "$ref": "#/responses/Repository" + "201": { + "$ref": "#/responses/IssueDeadline" }, "403": { "$ref": "#/responses/forbidden" @@ -7322,19 +7371,19 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { "get": { + "produces": [ + "application/json" + ], "tags": [ - "repository" + "issue" ], - "summary": "Gets a specific artifact for a workflow run", - "operationId": "getArtifact", + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "operationId": "issueListIssueDependencies", "parameters": [ { "type": "string", @@ -7344,19 +7393,31 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repository" + "required": true }, { "type": "string", - "description": "id of the artifact", - "name": "artifact_id", + "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", @@ -7367,42 +7428,51 @@ } ], "responses": { - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/IssueList" }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/Artifact" } - }, + } + }, + "post": { "produces": [ "application/json" - ] - }, - "delete": { + ], + "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": "owner of the repo" + "required": true }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "id of the artifact", - "name": "artifact_id" + "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", @@ -7414,50 +7484,55 @@ } ], "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" + "201": { + "$ref": "#/responses/Issue" }, "404": { - "$ref": "#/responses/notFound" + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Deletes a specific artifact for a workflow run", - "operationId": "deleteArtifact" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/archive/{archive}": { - "get": { + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", "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 }, { "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", + "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", @@ -7468,64 +7543,51 @@ } ], "responses": { + "200": { + "$ref": "#/responses/Issue" + }, "404": { "$ref": "#/responses/notFound" }, - "200": { - "description": "success" + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/dependencies": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/labels": { "get": { + "produces": [ + "application/json" + ], "tags": [ "issue" ], - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "operationId": "issueListIssueDependencies", + "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": "owner of the repo" + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "type": "string", + "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" - }, - { - "name": "limit", - "in": "query", - "type": "integer", - "description": "page size of results" - }, { "description": "group ID of the repo", "name": "group_id", @@ -7536,26 +7598,33 @@ } ], "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/IssueList" } - }, + } + }, + "put": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - }, - "post": { - "operationId": "issueCreateIssueDependencies", + ], + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -7565,17 +7634,18 @@ "required": true }, { + "type": "integer", + "format": "int64", + "description": "index of the issue", "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "index of the issue" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" + "$ref": "#/definitions/IssueLabelsOption" } }, { @@ -7588,26 +7658,29 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" + "200": { + "$ref": "#/responses/LabelList" }, - "201": { - "$ref": "#/responses/Issue" + "403": { + "$ref": "#/responses/forbidden" }, "404": { - "description": "the issue does not exist" + "$ref": "#/responses/notFound" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Make the issue in the url depend on the issue in the form." - }, - "delete": { - "operationId": "issueRemoveIssueDependencies", + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", "parameters": [ { "type": "string", @@ -7624,7 +7697,8 @@ "required": true }, { - "type": "string", + "type": "integer", + "format": "int64", "description": "index of the issue", "name": "index", "in": "path", @@ -7634,7 +7708,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/IssueMeta" + "$ref": "#/definitions/IssueLabelsOption" } }, { @@ -7648,32 +7722,7 @@ ], "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" + "$ref": "#/responses/LabelList" }, "403": { "$ref": "#/responses/forbidden" @@ -7681,36 +7730,39 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", "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 }, { - "description": "remote name of push mirror", - "name": "name", + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true, - "type": "string" + "required": true }, { "description": "group ID of the repo", @@ -7720,35 +7772,60 @@ "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": [ - "repository" + "issue" ], - "summary": "deletes a push mirror from a repository by remoteName", - "operationId": "repoDeletePushMirror", + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "description": "remote name of the pushMirror", - "name": "name", + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true, - "type": "string" + "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", @@ -7763,57 +7840,116 @@ "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}/git/refs/{ref}": { - "get": { - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" + "/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": [ - "repository" + "issue" ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", + "summary": "Unlock an issue", + "operationId": "issueUnlockIssue", "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 }, { - "required": true, - "type": "string", - "description": "part or full name of the ref", - "name": "ref", - "in": "path" + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -7823,26 +7959,34 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/labels/{id}": { - "get": { - "produces": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin": { + "post": { "tags": [ "issue" ], - "summary": "Get a single label", - "operationId": "issueGetLabel", + "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", @@ -7854,8 +7998,8 @@ { "type": "integer", "format": "int64", - "description": "id of the label to get", - "name": "id", + "description": "index of issue to pin", + "name": "index", "in": "path", "required": true }, @@ -7869,8 +8013,11 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Label" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" @@ -7878,14 +8025,18 @@ } }, "delete": { - "operationId": "issueDeleteLabel", + "tags": [ + "issue" + ], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -7897,8 +8048,8 @@ { "type": "integer", "format": "int64", - "description": "id of the label to delete", - "name": "id", + "description": "index of issue to unpin", + "name": "index", "in": "path", "required": true }, @@ -7915,31 +8066,29 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" } - }, - "tags": [ - "issue" - ], - "summary": "Delete a label" - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/pin/{position}": { "patch": { - "produces": [ - "application/json" - ], "tags": [ "issue" ], - "summary": "Update a label", - "operationId": "issueEditLabel", + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -7951,17 +8100,18 @@ { "type": "integer", "format": "int64", - "description": "id of the label to edit", - "name": "id", + "description": "index of issue", + "name": "index", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditLabelOption" - } + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -7973,31 +8123,31 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Label" + "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}/assignees": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Return all users that have write access and can be assigned to issues", - "operationId": "repoGetAssignees", + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", "parameters": [ { "type": "string", @@ -8007,11 +8157,31 @@ "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": "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", @@ -8024,31 +8194,35 @@ ], "responses": { "200": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/requested_reviewers": { + }, "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "create review requests for a pull request", - "operationId": "repoCreatePullReviewRequests", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -8060,17 +8234,16 @@ { "type": "integer", "format": "int64", - "description": "index of the pull request", + "description": "index of the issue", "name": "index", "in": "path", "required": true }, { - "name": "body", + "name": "content", "in": "body", - "required": true, "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" + "$ref": "#/definitions/EditReactionOption" } }, { @@ -8083,25 +8256,39 @@ } ], "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, "201": { - "$ref": "#/responses/PullReviewList" + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } }, "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -8111,20 +8298,19 @@ "required": true }, { - "name": "index", - "in": "path", - "required": true, "type": "integer", "format": "int64", - "description": "index of the pull request" + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - }, - "name": "body", + "name": "content", "in": "body", - "required": true + "schema": { + "$ref": "#/definitions/EditReactionOption" + } }, { "description": "group ID of the repo", @@ -8136,58 +8322,51 @@ } ], "responses": { - "204": { + "200": { "$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" + "$ref": "#/responses/notFound" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Gets a specific workflow run", - "operationId": "GetWorkflowRun", + "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" + "required": true }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "type": "string", - "description": "id of the run", - "name": "run", + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", "in": "path", "required": true }, @@ -8201,37 +8380,54 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WorkflowRun" + "204": { + "$ref": "#/responses/empty" }, - "400": { - "$ref": "#/responses/error" + "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" } } - }, - "delete": { + } + }, + "/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": "owner of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the repository", - "name": "repo" + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", - "description": "runid of the workflow run", - "name": "run", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", "in": "path", "required": true }, @@ -8245,30 +8441,7 @@ } ], "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": { + "201": { "$ref": "#/responses/empty" }, "403": { @@ -8278,9 +8451,13 @@ "$ref": "#/responses/notFound" }, "409": { - "description": "Cannot cancel a non-existent stopwatch" + "description": "Cannot start a stopwatch again if it already exists" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { + "post": { "consumes": [ "application/json" ], @@ -8290,30 +8467,30 @@ "tags": [ "issue" ], - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", + "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": "owner of the repo" + "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { - "in": "path", - "required": true, "type": "integer", "format": "int64", "description": "index of the issue to stop the stopwatch on", - "name": "index" + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -8323,50 +8500,70 @@ "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}/branches": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { "get": { - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - }, + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "List a repository's branches", - "operationId": "repoListBranches", + "summary": "Get users who subscribed on an issue.", + "operationId": "issueSubscriptions", "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 + }, + { + "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" + "in": "query" }, { + "type": "integer", "description": "page size of results", "name": "limit", - "in": "query", - "type": "integer" + "in": "query" }, { "description": "group ID of the repo", @@ -8376,30 +8573,52 @@ "required": true, "in": "path" } - ] - }, - "post": { + ], + "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": [ { - "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", - "description": "name of the repo" + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchRepoOption" - } + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -8411,22 +8630,17 @@ } ], "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." + "200": { + "$ref": "#/responses/WatchInfo" }, "404": { - "description": "The old branch does not exist." + "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { "consumes": [ "application/json" ], @@ -8434,30 +8648,10 @@ "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" + "issue" ], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription", "parameters": [ { "type": "string", @@ -8474,35 +8668,17 @@ "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", + "description": "index of the issue", + "name": "index", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "username of the user to subscribe the issue to", + "name": "user", "in": "path", "required": true }, @@ -8517,10 +8693,13 @@ ], "responses": { "200": { - "$ref": "#/responses/WatchInfo" + "description": "Already subscribed" }, - "403": { - "$ref": "#/responses/forbidden" + "201": { + "description": "Successfully Subscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" }, "404": { "$ref": "#/responses/notFound" @@ -8528,57 +8707,44 @@ } }, "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ - "repository" + "issue" ], - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription", + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "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" - } - } - }, - "get": { - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", + "description": "index of the issue", + "name": "index", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "username of the user to unsubscribe from an issue", + "name": "user", "in": "path", "required": true }, @@ -8593,21 +8759,30 @@ ], "responses": { "200": { - "$ref": "#/responses/WatchInfo" + "description": "Already unsubscribed" + }, + "201": { + "description": "Successfully Unsubscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" }, "404": { - "description": "User is not watching this repo or repo do not exist" + "$ref": "#/responses/notFound" } - }, - "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": { + "/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", @@ -8617,19 +8792,46 @@ "required": true }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { - "type": "string", - "description": "id of the workflow", - "name": "workflow_id", + "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", @@ -8640,33 +8842,16 @@ } ], "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/TimelineList" }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times": { "get": { "produces": [ "application/json" @@ -8674,15 +8859,15 @@ "tags": [ "issue" ], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -8699,6 +8884,38 @@ "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", @@ -8710,23 +8927,32 @@ ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/TrackedTimeList" }, "404": { "$ref": "#/responses/notFound" } } }, - "put": { - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -8736,18 +8962,18 @@ "required": true }, { - "required": true, "type": "integer", "format": "int64", "description": "index of the issue", "name": "index", - "in": "path" + "in": "path", + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/IssueLabelsOption" + "$ref": "#/definitions/AddTimeOption" } }, { @@ -8761,7 +8987,10 @@ ], "responses": { "200": { - "$ref": "#/responses/LabelList" + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" @@ -8769,7 +8998,9 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "delete": { "consumes": [ "application/json" ], @@ -8777,11 +9008,10 @@ "application/json" ], "tags": [ - "issue" - ] - }, - "post": { - "operationId": "issueAddLabel", + "issue" + ], + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime", "parameters": [ { "type": "string", @@ -8798,19 +9028,12 @@ "required": true }, { + "type": "integer", "format": "int64", - "description": "index of the issue", + "description": "index of the issue to add tracked time to", "name": "index", "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } + "required": true }, { "description": "group ID of the repo", @@ -8822,8 +9045,11 @@ } ], "responses": { - "200": { - "$ref": "#/responses/LabelList" + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/forbidden" @@ -8831,7 +9057,11 @@ "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/times/{id}": { + "delete": { "consumes": [ "application/json" ], @@ -8841,17 +9071,8 @@ "tags": [ "issue" ], - "summary": "Add a label to an issue" - }, - "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", "parameters": [ { "type": "string", @@ -8861,19 +9082,27 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "required": true, "type": "integer", "format": "int64", "description": "index of the issue", "name": "index", - "in": "path" + "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", @@ -8888,6 +9117,9 @@ "204": { "$ref": "#/responses/empty" }, + "400": { + "$ref": "#/responses/error" + }, "403": { "$ref": "#/responses/forbidden" }, @@ -8897,24 +9129,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/languages": { + "/repos/{owner}/group/{group_id}/{repo}/keys": { "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", + "summary": "List a repository's keys", + "operationId": "repoListKeys", "parameters": [ { "type": "string", @@ -8924,11 +9148,35 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, + "required": true + }, + { + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, + { "type": "string", - "description": "name of the repo" + "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", @@ -8938,19 +9186,28 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/artifacts/{artifact_id}/zip": { - "get": { + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Downloads a specific artifact for a workflow run redirects to blob url", - "operationId": "downloadArtifact", + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", "parameters": [ { "type": "string", @@ -8959,20 +9216,20 @@ "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", + "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", @@ -8983,48 +9240,48 @@ } ], "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, "404": { "$ref": "#/responses/notFound" }, - "302": { - "description": "redirect to the blob download" - }, - "400": { - "$ref": "#/responses/error" + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}": { + "/repos/{owner}/group/{group_id}/{repo}/keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get an issue", - "operationId": "issueGetIssue", + "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 }, { - "in": "path", - "required": true, "type": "string", "description": "name of the repo", - "name": "repo" + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", "format": "int64", - "description": "index of the issue to get", - "name": "index", + "description": "id of the key to get", + "name": "id", "in": "path", "required": true }, @@ -9039,7 +9296,7 @@ ], "responses": { "200": { - "$ref": "#/responses/Issue" + "$ref": "#/responses/DeployKey" }, "404": { "$ref": "#/responses/notFound" @@ -9047,13 +9304,18 @@ } }, "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": "owner of the repo" + "required": true }, { "type": "string", @@ -9065,8 +9327,8 @@ { "type": "integer", "format": "int64", - "description": "index of issue to delete", - "name": "index", + "description": "id of the key to delete", + "name": "id", "in": "path", "required": true }, @@ -9080,92 +9342,28 @@ } ], "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" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/labels": { + "get": { "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", + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", "parameters": [ { "type": "string", @@ -9182,28 +9380,15 @@ "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" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "type": "boolean", - "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", - "name": "binary", + "type": "integer", + "description": "page size of results", + "name": "limit", "in": "query" }, { @@ -9217,24 +9402,25 @@ ], "responses": { "200": { - "$ref": "#/responses/string" + "$ref": "#/responses/LabelList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "produces": [ - "text/plain" + "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a pull request diff or patch" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { - "get": { - "operationId": "repoGetPullRequestCommits", + "summary": "Create a label", + "operationId": "issueCreateLabel", "parameters": [ { "type": "string", @@ -9251,36 +9437,66 @@ "required": true }, { - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true, - "type": "integer" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } }, { + "description": "group ID of the repo", + "name": "group_id", "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" + "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": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "name": "verification", - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')" + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "in": "query", - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files" + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -9293,23 +9509,19 @@ ], "responses": { "200": { - "$ref": "#/responses/CommitList" + "$ref": "#/responses/Label" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], + } + }, + "delete": { "tags": [ - "repository" + "issue" ], - "summary": "Get commits for a pull request" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/stopwatch/stop": { - "post": { + "summary": "Delete a label", + "operationId": "issueDeleteLabel", "parameters": [ { "type": "string", @@ -9326,12 +9538,12 @@ "required": true }, { + "type": "integer", "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", + "description": "id of the label to delete", + "name": "id", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "description": "group ID of the repo", @@ -9343,19 +9555,15 @@ } ], "responses": { - "201": { + "204": { "$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" } - }, + } + }, + "patch": { "consumes": [ "application/json" ], @@ -9365,17 +9573,8 @@ "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", + "summary": "Update a label", + "operationId": "issueEditLabel", "parameters": [ { "type": "string", @@ -9392,11 +9591,19 @@ "required": true }, { - "description": "tag name of the release to get", - "name": "tag", + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id", "in": "path", - "required": true, - "type": "string" + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } }, { "description": "group ID of the repo", @@ -9409,22 +9616,27 @@ ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/Label" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/languages": { + "get": { "produces": [ "application/json" - ] - }, - "delete": { + ], "tags": [ "repository" ], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", + "summary": "Get languages and number of bytes of code written", + "operationId": "repoGetLanguages", "parameters": [ { "type": "string", @@ -9434,18 +9646,11 @@ "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" + "required": true }, { "description": "group ID of the repo", @@ -9457,29 +9662,32 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/LanguageStatistics" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/releases/{id}": { + "/repos/{owner}/group/{group_id}/{repo}/licenses": { "get": { - "summary": "Get a release", - "operationId": "repoGetRelease", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo licenses", + "operationId": "repoGetLicenses", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -9488,14 +9696,6 @@ "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", @@ -9507,20 +9707,24 @@ ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/LicensesList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/media/{filepath}": { + "get": { "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ "repository" - ] - }, - "delete": { + ], + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS", "parameters": [ { "type": "string", @@ -9530,19 +9734,24 @@ "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "format": "int64", - "description": "id of the release to delete", - "name": "id", + "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": "integer" + "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", @@ -9554,53 +9763,48 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { + "post": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Delete a release", - "operationId": "repoDeleteRelease" - }, - "patch": { - "summary": "Update a release", - "operationId": "repoEditRelease", + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 edit", - "name": "id", - "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/EditReleaseOption" + "$ref": "#/definitions/MergeUpstreamRequest" } }, { @@ -9614,26 +9818,27 @@ ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones": { + "get": { "produces": [ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { - "post": { - "operationId": "repoCreateWikiPage", + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", "parameters": [ { "type": "string", @@ -9650,11 +9855,28 @@ "required": true }, { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body" + "type": "string", + "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "filter by milestone name", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -9666,48 +9888,33 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/MilestoneList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "post": { "consumes": [ "application/json" ], - "tags": [ - "repository" - ], - "summary": "Create a wiki page" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/avatar": { - "post": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Update avatar", - "operationId": "repoUpdateAvatar", + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -9720,7 +9927,7 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" + "$ref": "#/definitions/CreateMilestoneOption" } }, { @@ -9733,31 +9940,46 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "201": { + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" } } - }, - "delete": { - "summary": "Delete avatar", - "operationId": "repoDeleteAvatar", + } + }, + "/repos/{owner}/group/{group_id}/{repo}/milestones/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, + "required": true + }, + { "type": "string", - "description": "name of the repo" + "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", @@ -9769,38 +9991,27 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{sha}/pull": { - "get": { - "produces": [ - "application/json" - ], + } + }, + "delete": { "tags": [ - "repository" + "issue" ], - "summary": "Get the merged pull request of the commit", - "operationId": "repoGetCommitPullRequest", + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -9810,11 +10021,11 @@ "required": true }, { - "required": true, "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path" + "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", @@ -9826,25 +10037,26 @@ } ], "responses": { - "200": { - "$ref": "#/responses/PullRequest" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/hooks/git/{id}": { - "get": { + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "summary": "Get a Git hook", - "operationId": "repoGetGitHook", + "summary": "Update a milestone", + "operationId": "issueEditMilestone", "parameters": [ { "type": "string", @@ -9861,11 +10073,18 @@ "required": true }, { - "required": true, "type": "string", - "description": "id of the hook to get", + "description": "the milestone to edit, identified by ID and if not available by name", "name": "id", - "in": "path" + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } }, { "description": "group ID of the repo", @@ -9878,34 +10097,36 @@ ], "responses": { "200": { - "$ref": "#/responses/GitHook" + "$ref": "#/responses/Milestone" }, "404": { "$ref": "#/responses/notFound" } } - }, - "delete": { - "operationId": "repoDeleteGitHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/mirror-sync": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ { "type": "string", - "description": "name of the repo", - "name": "repo", + "description": "owner of the repo to sync", + "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "id of the hook to get", - "name": "id", + "description": "name of the repo to sync", + "name": "repo", "in": "path", "required": true }, @@ -9919,31 +10140,35 @@ } ], "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/new_pin_allowed": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Delete a Git hook in a repository" - }, - "patch": { - "summary": "Edit a Git hook in a repository", - "operationId": "repoEditGitHook", + "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" + "required": true }, { "type": "string", @@ -9952,20 +10177,6 @@ "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", @@ -9977,55 +10188,99 @@ ], "responses": { "200": { - "$ref": "#/responses/GitHook" + "$ref": "#/responses/RepoNewIssuePinsAllowed" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/notifications": { + "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/secrets/{secretname}": { - "put": { - "tags": [ - "repository" + "notification" ], - "summary": "Create or Update a secret value in a repository", - "operationId": "updateRepoSecret", + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", "parameters": [ { "type": "string", - "description": "owner of the repository", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, + { + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned", + "name": "status-types", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query" + }, { "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "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" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } + "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", @@ -10037,38 +10292,12 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" + "200": { + "$ref": "#/responses/NotificationThreadList" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ] + } }, - "delete": { - "responses": { - "204": { - "description": "delete one secret of the repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, + "put": { "consumes": [ "application/json" ], @@ -10076,68 +10305,53 @@ "application/json" ], "tags": [ - "repository" + "notification" ], - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", + "summary": "Mark notification threads as read, pinned or unread on a specific repo", + "operationId": "notifyReadRepoList", "parameters": [ { "type": "string", - "description": "owner of the repository", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { - "description": "name of the repository", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "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/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 + "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" }, { - "required": true, "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path" + "description": "Status to mark notifications as. Defaults to read.", + "name": "to-status", + "in": "query" }, { - "name": "workflow_id", - "in": "path", - "required": true, "type": "string", - "description": "id of the workflow" + "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", @@ -10149,37 +10363,22 @@ } ], "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" + "205": { + "$ref": "#/responses/NotificationThreadList" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues": { + "/repos/{owner}/group/{group_id}/{repo}/pulls": { "get": { - "summary": "List a repository's issues", - "operationId": "issueListIssues", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", "parameters": [ { "type": "string", @@ -10189,94 +10388,83 @@ "required": true }, { - "description": "name of the repo", + "type": "string", + "description": "Name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true + }, + { + "type": "string", + "description": "Filter by target base branch of the pull request", + "name": "base_branch", + "in": "query" }, { "enum": [ - "closed", "open", + "closed", "all" ], "type": "string", - "description": "whether issue is open or closed", + "default": "open", + "description": "State of pull request", "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" + "oldest", + "recentupdate", + "recentclose", + "leastupdate", + "mostcomment", + "leastcomment", + "priority" ], "type": "string", - "description": "filter by type (issues / pulls) if set", - "name": "type", + "description": "Type of sort", + "name": "sort", "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", + "type": "integer", + "format": "int64", + "description": "ID of the milestone", + "name": "milestone", "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", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi", + "description": "Label IDs", + "name": "labels", "in": "query" }, { "type": "string", - "description": "Only show items which were created by the given user", - "name": "created_by", + "description": "Filter by pull request author", + "name": "poster", "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)", + "minimum": 1, + "type": "integer", + "default": 1, + "description": "Page number of results to return (1-based)", "name": "page", - "in": "query", - "type": "integer" + "in": "query" }, { - "in": "query", + "minimum": 0, "type": "integer", - "description": "page size of results", - "name": "limit" + "description": "Page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -10289,42 +10477,48 @@ ], "responses": { "200": { - "$ref": "#/responses/IssueList" + "$ref": "#/responses/PullRequestList" }, "404": { "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" } - }, + } + }, + "post": { + "consumes": [ + "application/json" + ], "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", + "repository" + ], + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "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" + "$ref": "#/definitions/CreatePullRequestOption" } }, { @@ -10337,10 +10531,16 @@ } ], "responses": { + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, - "412": { + "409": { "$ref": "#/responses/error" }, "422": { @@ -10348,35 +10548,27 @@ }, "423": { "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { - "patch": { - "operationId": "repoEditPullRequest", + "repository" + ], + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -10385,21 +10577,6 @@ "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", @@ -10410,36 +10587,16 @@ } ], "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, "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." - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { "get": { "produces": [ "application/json" @@ -10447,15 +10604,15 @@ "tags": [ "repository" ], - "summary": "Get a pull request", - "operationId": "repoGetPullRequest", + "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", @@ -10465,10 +10622,16 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", + "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 }, @@ -10491,19 +10654,16 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/subscriptions": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions", + "summary": "Get a pull request", + "operationId": "repoGetPullRequest", "parameters": [ { "type": "string", @@ -10513,32 +10673,20 @@ "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 issue", + "description": "index of the pull request to get", "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", @@ -10550,17 +10698,25 @@ ], "responses": { "200": { - "$ref": "#/responses/UserList" + "$ref": "#/responses/PullRequest" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { - "get": { - "operationId": "repoListPullReviews", + }, + "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", @@ -10570,31 +10726,26 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "description": "index of the pull request", + "type": "integer", + "format": "int64", + "description": "index of the pull request to edit", "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" + "required": true }, { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + } }, { "description": "group ID of the repo", @@ -10606,54 +10757,76 @@ } ], "responses": { - "200": { - "$ref": "#/responses/PullReviewList" + "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": [ - "application/json" + "text/plain" ], "tags": [ "repository" ], - "summary": "List all reviews for a pull request" - }, - "post": { - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", + "summary": "Get a pull request diff or patch", + "operationId": "repoDownloadPullDiffOrPatch", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 repo" + "required": true }, { "type": "integer", "format": "int64", - "description": "index of the pull request", + "description": "index of the pull request to get", "name": "index", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - } + "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", @@ -10666,44 +10839,24 @@ ], "responses": { "200": { - "$ref": "#/responses/PullReview" + "$ref": "#/responses/string" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/stargazers": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/commits": { "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", + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits", "parameters": [ { "type": "string", @@ -10719,6 +10872,14 @@ "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)", @@ -10731,6 +10892,18 @@ "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", @@ -10739,10 +10912,18 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/commits/{ref}/statuses": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/files": { "get": { "produces": [ "application/json" @@ -10750,8 +10931,8 @@ "tags": [ "repository" ], - "summary": "Get a commit's statuses, by branch/tag/commit reference", - "operationId": "repoListStatusesByRef", + "summary": "Get changed files for a pull request", + "operationId": "repoGetPullRequestFiles", "parameters": [ { "type": "string", @@ -10761,56 +10942,49 @@ "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": "index of the pull request to get", + "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref" + "required": true }, { - "description": "type of sort", - "name": "sort", - "in": "query", - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string" + "type": "string", + "description": "skip to given file", + "name": "skip-to", + "in": "query" }, { "enum": [ - "pending", - "success", - "error", - "failure", - "warning" + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" ], "type": "string", - "description": "type of state", - "name": "state", + "description": "whitespace behavior", + "name": "whitespace", "in": "query" }, { + "type": "integer", "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", - "in": "query", - "type": "integer" + "in": "query" }, { "description": "group ID of the repo", @@ -10823,10 +10997,7 @@ ], "responses": { "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/ChangedFileList" }, "404": { "$ref": "#/responses/notFound" @@ -10834,62 +11005,38 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/milestones": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/merge": { "get": { - "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Get all of a repository's opened milestones", - "operationId": "issueGetMilestonesList", + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", "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 }, { "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": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -10899,20 +11046,25 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "204": { + "description": "pull request has been merged" + }, + "404": { + "description": "pull request has not been merged" + } + } }, "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", "parameters": [ { "type": "string", @@ -10928,11 +11080,19 @@ "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/CreateMilestoneOption" + "$ref": "#/definitions/MergePullRequestOption" } }, { @@ -10945,19 +11105,32 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Milestone" + "200": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}": { - "get": { - "summary": "Get a repository", - "operationId": "repoGet", + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", "parameters": [ { "type": "string", @@ -10967,11 +11140,19 @@ "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 merge", + "name": "index", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -10983,36 +11164,62 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Repository" + "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" - ] - }, - "delete": { + ], + "summary": "create review requests for a pull request", + "operationId": "repoCreatePullReviewRequests", "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": "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", @@ -11023,55 +11230,55 @@ } ], "responses": { + "201": { + "$ref": "#/responses/PullReviewList" + }, "404": { "$ref": "#/responses/notFound" }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ], - "summary": "Delete a repository", - "operationId": "repoDelete" + } }, - "patch": { + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a repository's properties. Only fields that are set will be changed.", - "operationId": "repoEdit", + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests", "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": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { "name": "body", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/EditRepoOption" + "$ref": "#/definitions/PullReviewRequestOptions" } }, { @@ -11084,8 +11291,8 @@ } ], "responses": { - "200": { - "$ref": "#/responses/Repository" + "204": { + "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" @@ -11099,40 +11306,108 @@ } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/artifacts": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Lists all artifacts for a repository run", - "operationId": "getArtifactsOfRun", + "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" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", - "description": "runid of the workflow run", - "name": "run", + "format": "int64", + "description": "index of the pull request", + "name": "index", "in": "path", "required": true }, { - "name": "name", - "in": "query", - "type": "string", - "description": "name of the artifact" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + } }, { "description": "group ID of the repo", @@ -11145,27 +11420,27 @@ ], "responses": { "200": { - "$ref": "#/responses/ArtifactsList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators/{collaborator}": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Check if a user is a collaborator of a repository", - "operationId": "repoCheckCollaborator", + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReview", "parameters": [ { "type": "string", @@ -11182,9 +11457,18 @@ "required": true }, { - "type": "string", - "description": "username of the user to check for being a collaborator", - "name": "collaborator", + "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 }, @@ -11198,30 +11482,30 @@ } ], "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" } - }, + } + }, + "post": { "produces": [ "application/json" - ] - }, - "put": { - "summary": "Add or Update a collaborator to a repository", - "operationId": "repoAddCollaborator", + ], + "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" + "required": true }, { "type": "string", @@ -11231,17 +11515,27 @@ "required": true }, { - "type": "string", - "description": "username of the user to add or update as a collaborator", - "name": "collaborator", + "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/AddCollaboratorOption" + "$ref": "#/definitions/SubmitPullReviewOptions" } }, { @@ -11254,25 +11548,16 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/PullReview" }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" - }, - "204": { - "$ref": "#/responses/empty" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } }, "delete": { "produces": [ @@ -11281,8 +11566,8 @@ "tags": [ "repository" ], - "summary": "Delete a collaborator from a repository", - "operationId": "repoDeleteCollaborator", + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview", "parameters": [ { "type": "string", @@ -11299,11 +11584,20 @@ "required": true }, { - "description": "username of the collaborator to delete", - "name": "collaborator", + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", "in": "path", - "required": true, - "type": "string" + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -11318,34 +11612,25 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/file-contents": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/comments": { "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", + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments", "parameters": [ { "type": "string", @@ -11355,23 +11640,26 @@ "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", - "in": "query" + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true }, { - "type": "string", - "description": "The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]}", - "name": "body", - "in": "query", + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", "required": true }, { @@ -11382,26 +11670,27 @@ "required": true, "in": "path" } - ] - }, - "post": { + ], "responses": { "200": { - "$ref": "#/responses/ContentsListResponse" + "$ref": "#/responses/PullReviewCommentList" }, "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`.", + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Get the metadata and contents of requested files", - "operationId": "repoGetFileContentsPost", + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview", "parameters": [ { "type": "string", @@ -11418,62 +11707,28 @@ "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" - }, - { + "description": "index of the pull request", + "name": "index", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo", - "name": "repo" + "required": true }, { "type": "integer", "format": "int64", - "description": "index of issue", - "name": "index", + "description": "id of the review", + "name": "id", "in": "path", "required": true }, { + "name": "body", + "in": "body", "required": true, - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position", - "in": "path" + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } }, { "description": "group ID of the repo", @@ -11485,33 +11740,31 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/PullReview" }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "tags": [ - "issue" - ], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin" + } } }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/pinned": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repo's pinned pull requests", - "operationId": "repoListPinnedPullRequests", + "summary": "Cancel to dismiss a review for a pull request", + "operationId": "repoUnDismissPullReview", "parameters": [ { "type": "string", @@ -11521,11 +11774,27 @@ "required": true }, { - "name": "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 + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { "description": "group ID of the repo", @@ -11538,28 +11807,37 @@ ], "responses": { "200": { - "$ref": "#/responses/PullRequestList" + "$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}/comments": { - "get": { + "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/update": { + "post": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReviewComments", + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -11571,18 +11849,20 @@ { "type": "integer", "format": "int64", - "description": "index of the pull request", + "description": "index of the pull request to get", "name": "index", "in": "path", "required": true }, { - "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id" + "enum": [ + "merge", + "rebase" + ], + "type": "string", + "description": "how to update pull request", + "name": "style", + "in": "query" }, { "description": "group ID of the repo", @@ -11595,18 +11875,24 @@ ], "responses": { "200": { - "$ref": "#/responses/PullReviewCommentList" + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/topics": { + "/repos/{owner}/group/{group_id}/{repo}/push_mirrors": { "get": { "produces": [ "application/json" @@ -11614,22 +11900,22 @@ "tags": [ "repository" ], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "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", @@ -11638,10 +11924,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", @@ -11654,42 +11940,51 @@ ], "responses": { "200": { - "$ref": "#/responses/TopicNames" + "$ref": "#/responses/PushMirrorList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } } }, - "put": { + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Replace list of topics for a repository", - "operationId": "repoUpdateTopics", + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 repo" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/RepoTopicOptions" + "$ref": "#/definitions/CreatePushMirrorOption" } }, { @@ -11701,116 +11996,47 @@ "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" + "$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": "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", + "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", + "description": "name of the repo to sync", "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", @@ -11822,26 +12048,30 @@ ], "responses": { "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } + "$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/octet-stream" + "application/json" ], "tags": [ "repository" ], - "summary": "Get a file from a repository" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs/{job_id}/logs": { - "get": { + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", "parameters": [ { "type": "string", @@ -11852,17 +12082,17 @@ }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "required": true, - "type": "integer", - "description": "id of the job", - "name": "job_id", - "in": "path" + "type": "string", + "description": "remote name of push mirror", + "name": "name", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -11875,51 +12105,49 @@ ], "responses": { "200": { - "description": "output blob content" + "$ref": "#/responses/PushMirror" }, "400": { "$ref": "#/responses/error" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "delete": { "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", + "summary": "deletes a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", "parameters": [ { + "type": "string", + "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string", - "description": "owner of the repo" + "required": true }, { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { - "format": "int64", - "description": "id of the comment", - "name": "id", + "type": "string", + "description": "remote name of the pushMirror", + "name": "name", "in": "path", - "required": true, - "type": "integer" + "required": true }, { "description": "group ID of the repo", @@ -11931,30 +12159,35 @@ } ], "responses": { - "404": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { "$ref": "#/responses/error" }, - "200": { - "$ref": "#/responses/AttachmentList" + "404": { + "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/raw/{filepath}": { + "get": { "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ - "issue" - ] - }, - "post": { - "summary": "Create a comment attachment", - "operationId": "issueCreateIssueCommentAttachment", + "repository" + ], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -11964,26 +12197,18 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", + "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": "name of the attachment", - "name": "name", + "description": "The name of the commit/branch/tag. Default to the repositoryโ€™s default branch", + "name": "ref", "in": "query" }, - { - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData", - "required": true - }, { "description": "group ID of the repo", "name": "group_id", @@ -11994,41 +12219,28 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } }, "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "multipart/form-data" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/lock": { - "put": { + "repository" + ], + "summary": "List a repo's releases", + "operationId": "repoListReleases", "parameters": [ { "type": "string", @@ -12038,26 +12250,35 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "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" }, { - "required": true, "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/LockIssueOption" - } + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -12069,29 +12290,15 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/ReleaseList" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ], - "summary": "Lock an issue", - "operationId": "issueLockIssue" + } }, - "delete": { + "post": { "consumes": [ "application/json" ], @@ -12099,10 +12306,10 @@ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Unlock an issue", - "operationId": "issueUnlockIssue", + "summary": "Create a release", + "operationId": "repoCreateRelease", "parameters": [ { "type": "string", @@ -12112,19 +12319,18 @@ "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 issue" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } }, { "description": "group ID of the repo", @@ -12136,96 +12342,38 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "201": { + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" }, - "204": { - "$ref": "#/responses/empty" + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/reactions": { + "/repos/{owner}/group/{group_id}/{repo}/releases/latest": { "get": { - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "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", + "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", + "operationId": "repoGetLatestRelease", "parameters": [ - { - "in": "path", - "required": true, + { "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -12234,21 +12382,6 @@ "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", @@ -12260,59 +12393,45 @@ ], "responses": { "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/Release" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/releases/tags/{tag}": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Add a reaction to an issue" - }, - "delete": { + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag", "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", - "description": "name of the repo" + "required": true }, { - "format": "int64", - "description": "index of the issue", - "name": "index", + "type": "string", + "description": "tag name of the release to get", + "name": "tag", "in": "path", - "required": true, - "type": "integer" - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } + "required": true }, { "description": "group ID of the repo", @@ -12324,31 +12443,20 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/empty" + "$ref": "#/responses/Release" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + } + }, + "delete": { "tags": [ - "issue" + "repository" ], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/tags": { - "get": { + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", "parameters": [ { "type": "string", @@ -12358,23 +12466,18 @@ "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": "path", + "required": true }, { - "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -12386,25 +12489,28 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TagList" + "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": "List a repository's tags", - "operationId": "repoListTags" - }, - "post": { - "summary": "Create a new git tag in a repository", - "operationId": "repoCreateTag", + "summary": "Get a release", + "operationId": "repoGetRelease", "parameters": [ { "type": "string", @@ -12414,18 +12520,19 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagOption" - } + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -12438,46 +12545,26 @@ ], "responses": { "200": { - "$ref": "#/responses/Tag" + "$ref": "#/responses/Release" }, "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": { + } + }, + "delete": { "tags": [ "repository" ], - "summary": "List a repository's forks", - "operationId": "listForks", + "summary": "Delete a release", + "operationId": "repoDeleteRelease", "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", @@ -12488,15 +12575,11 @@ }, { "type": "integer", - "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", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -12508,43 +12591,57 @@ } ], "responses": { - "200": { - "$ref": "#/responses/RepositoryList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, + } + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" - ] - }, - "post": { + ], "tags": [ "repository" ], - "summary": "Fork a repository", - "operationId": "createFork", + "summary": "Update a release", + "operationId": "repoEditRelease", "parameters": [ { - "required": true, "type": "string", - "description": "owner of the repo to fork", + "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { - "required": true, "type": "string", - "description": "name of the repo to fork", + "description": "name of the repo", "name": "repo", - "in": "path" + "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/CreateForkOption" + "$ref": "#/definitions/EditReleaseOption" } }, { @@ -12557,31 +12654,25 @@ } ], "responses": { - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/Release" }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/releases/{id}/assets": { "get": { - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments", "parameters": [ { "type": "string", @@ -12591,11 +12682,19 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "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", @@ -12608,22 +12707,26 @@ ], "responses": { "200": { - "$ref": "#/responses/Release" + "$ref": "#/responses/AttachmentList" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "post": { + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/actions/jobs": { - "get": { + ], + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", "parameters": [ { "type": "string", @@ -12634,28 +12737,30 @@ }, { "type": "string", - "description": "name of the repository", + "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { - "type": "string", - "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", - "name": "status", - "in": "query" + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true }, { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", + "type": "string", + "description": "name of the attachment", + "name": "name", "in": "query" }, { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData" }, { "description": "group ID of the repo", @@ -12667,37 +12772,38 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WorkflowJobsList" + "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": "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", + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment", "parameters": [ { + "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", - "required": true, - "type": "string" + "required": true }, { "type": "string", @@ -12706,6 +12812,22 @@ "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", @@ -12717,29 +12839,29 @@ ], "responses": { "200": { - "$ref": "#/responses/IssueTemplates" + "$ref": "#/responses/Attachment" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/merge-upstream": { - "post": { + ], + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", "parameters": [ { - "required": true, "type": "string", "description": "owner of the repo", "name": "owner", - "in": "path" + "in": "path", + "required": true }, { "type": "string", @@ -12749,11 +12871,20 @@ "required": true }, { - "in": "body", - "schema": { - "$ref": "#/definitions/MergeUpstreamRequest" - }, - "name": "body" + "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", @@ -12765,57 +12896,64 @@ } ], "responses": { - "200": { - "$ref": "#/responses/MergeUpstreamResponse" - }, - "400": { - "$ref": "#/responses/error" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } - }, + } + }, + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Merge a branch from upstream", - "operationId": "repoMergeUpstream" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{base}/{head}": { - "get": { + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", "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", - "description": "base of the pull request to get", - "name": "base", + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", "in": "path", "required": true }, { - "type": "string", - "description": "head of the pull request to get", - "name": "head", + "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", @@ -12826,47 +12964,72 @@ } ], "responses": { - "200": { - "$ref": "#/responses/PullRequest" + "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": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead" - } - }, - "/repos/{owner}/group/{group_id}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "group ID of the repo", + "name": "group_id", + "type": "integer", + "format": "int64", + "required": true, + "in": "path" + } + ], "responses": { "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/signing-key.gpg": { + "get": { "produces": [ - "application/json" + "text/plain" ], "tags": [ "repository" ], - "summary": "Dismiss a review for a pull request", - "operationId": "repoDismissPullReview", + "summary": "Get signing-key.gpg for given repository", + "operationId": "repoSigningKey", "parameters": [ { "type": "string", @@ -12876,36 +13039,12 @@ "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, - { - "required": true, - "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - }, - "name": "body", - "in": "body" - }, { "description": "group ID of the repo", "name": "group_id", @@ -12914,30 +13053,41 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + } } }, - "/repos/{owner}/group/{group_id}/{repo}/push_mirrors-sync": { - "post": { + "/repos/{owner}/group/{group_id}/{repo}/signing-key.pub": { + "get": { + "produces": [ + "text/plain" + ], "tags": [ "repository" ], - "summary": "Sync all push mirrored repository", - "operationId": "repoPushMirrorSync", + "summary": "Get signing-key.pub for given repository", + "operationId": "repoSigningKeySSH", "parameters": [ { "type": "string", - "description": "owner of the repo to sync", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { - "description": "name of the repo to sync", + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { "description": "group ID of the repo", @@ -12950,24 +13100,15 @@ ], "responses": { "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" + "description": "ssh public key", + "schema": { + "type": "string" + } } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/times": { + "/repos/{owner}/group/{group_id}/{repo}/stargazers": { "get": { "produces": [ "application/json" @@ -12975,8 +13116,8 @@ "tags": [ "repository" ], - "summary": "List a repo's tracked times", - "operationId": "repoTrackedTimes", + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", "parameters": [ { "type": "string", @@ -12986,31 +13127,11 @@ "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" + "in": "path", + "required": true }, { "type": "integer", @@ -13019,10 +13140,10 @@ "in": "query" }, { - "in": "query", "type": "integer", "description": "page size of results", - "name": "limit" + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -13034,39 +13155,28 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" + "$ref": "#/responses/UserList" }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/tags/{tag}": { + "/repos/{owner}/group/{group_id}/{repo}/statuses/{sha}": { "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", + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", "parameters": [ { "type": "string", @@ -13076,52 +13186,56 @@ "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": "name of tag", - "name": "tag", + "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" - } - ] - }, - "delete": { - "operationId": "repoDeleteTag", - "parameters": [ - { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true + "description": "type of sort", + "name": "sort", + "in": "query" }, { - "name": "repo", - "in": "path", - "required": true, + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], "type": "string", - "description": "name of the repo" + "description": "type of state", + "name": "state", + "in": "query" }, { - "required": true, - "type": "string", - "description": "name of tag to delete", - "name": "tag", - "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", @@ -13133,59 +13247,54 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/CommitStatusList" }, - "423": { - "$ref": "#/responses/repoArchivedError" + "400": { + "$ref": "#/responses/error" }, - "204": { - "$ref": "#/responses/empty" + "404": { + "$ref": "#/responses/notFound" } - }, + } + }, + "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", + "summary": "Create a commit status", + "operationId": "repoCreateStatus", "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", - "description": "name of the repo" + "required": true }, { - "in": "path", - "required": true, "type": "string", - "description": "name of the page", - "name": "pageName" + "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", @@ -13197,32 +13306,28 @@ } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "201": { + "$ref": "#/responses/CommitStatus" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } - }, - "tags": [ - "repository" - ] - }, - "patch": { - "consumes": [ + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscribers": { + "get": { + "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Edit a wiki page", - "operationId": "repoEditWikiPage", + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", "parameters": [ { "type": "string", @@ -13232,25 +13337,23 @@ "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": "name of the page", - "name": "pageName", - "in": "path" + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - }, - "name": "body", - "in": "body" + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -13263,50 +13366,33 @@ ], "responses": { "200": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/UserList" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } } - }, + } + }, + "/repos/{owner}/group/{group_id}/{repo}/subscription": { "get": { - "produces": [ - "application/json" - ], "tags": [ "repository" ], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", + "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" - }, - { - "name": "repo", "in": "path", - "required": true, - "type": "string", - "description": "name of the repo" + "required": true }, { "type": "string", - "description": "name of the page", - "name": "pageName", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, @@ -13321,25 +13407,26 @@ ], "responses": { "200": { - "$ref": "#/responses/WikiPage" + "$ref": "#/responses/WatchInfo" }, "404": { - "$ref": "#/responses/notFound" + "description": "User is not watching this repo or repo do not exist" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/wiki/pages": { - "get": { - "summary": "Get all wiki pages", - "operationId": "repoGetWikiPages", + }, + "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": "owner of the repo" + "required": true }, { "type": "string", @@ -13348,18 +13435,6 @@ "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", @@ -13370,37 +13445,37 @@ } ], "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" - }, - "200": { - "$ref": "#/responses/WikiPageList" } - }, - "produces": [ - "application/json" - ], + } + }, + "delete": { "tags": [ "repository" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/branch_protections": { - "get": { + ], + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", "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 }, { "description": "group ID of the repo", @@ -13412,25 +13487,25 @@ } ], "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections": { + "get": { "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", + "summary": "List tag protections for a repository", + "operationId": "repoListTagProtection", "parameters": [ { "type": "string", @@ -13446,13 +13521,6 @@ "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - } - }, { "description": "group ID of the repo", "name": "group_id", @@ -13463,40 +13531,23 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" + "200": { + "$ref": "#/responses/TagProtectionList" } - }, + } + }, + "post": { "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", + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection", "parameters": [ { "type": "string", @@ -13505,26 +13556,19 @@ "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", + "description": "name of the repo", + "name": "repo", "in": "path", "required": true }, { - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - }, "name": "body", - "in": "body" + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } }, { "description": "group ID of the repo", @@ -13536,23 +13580,25 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" + "201": { + "$ref": "#/responses/TagProtection" }, - "200": { - "$ref": "#/responses/BranchProtection" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ] - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/tag_protections/{id}": { "get": { "produces": [ "application/json" @@ -13560,15 +13606,15 @@ "tags": [ "repository" ], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection", + "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" + "required": true }, { "type": "string", @@ -13578,11 +13624,11 @@ "required": true }, { + "type": "integer", + "description": "id of the tag protect to get", + "name": "id", "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch", - "name": "name" + "required": true }, { "description": "group ID of the repo", @@ -13595,7 +13641,7 @@ ], "responses": { "200": { - "$ref": "#/responses/BranchProtection" + "$ref": "#/responses/TagProtection" }, "404": { "$ref": "#/responses/notFound" @@ -13603,7 +13649,14 @@ } }, "delete": { - "operationId": "repoDeleteBranchProtection", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", "parameters": [ { "type": "string", @@ -13620,11 +13673,11 @@ "required": true }, { + "type": "integer", + "description": "id of protected tag", + "name": "id", "in": "path", - "required": true, - "type": "string", - "description": "name of protected branch", - "name": "name" + "required": true }, { "description": "group ID of the repo", @@ -13642,65 +13695,48 @@ "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ + } + }, + "patch": { + "consumes": [ "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", + "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": "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" - }, - { - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat", - "in": "query" + "required": true }, { - "in": "query", - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification" + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true }, { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } }, { "description": "group ID of the repo", @@ -13713,35 +13749,30 @@ ], "responses": { "200": { - "$ref": "#/responses/Commit" + "$ref": "#/responses/TagProtection" }, "404": { "$ref": "#/responses/notFound" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/releases": { + "/repos/{owner}/group/{group_id}/{repo}/tags": { "get": { - "responses": { - "200": { - "$ref": "#/responses/ReleaseList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repo's releases", - "operationId": "repoListReleases", + "summary": "List a repository's tags", + "operationId": "repoListTags", "parameters": [ { "type": "string", @@ -13751,35 +13782,23 @@ "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" + "in": "path", + "required": true }, { - "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" + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -13789,10 +13808,25 @@ "required": true, "in": "path" } - ] + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } }, "post": { - "operationId": "repoCreateRelease", + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag", "parameters": [ { "type": "string", @@ -13802,17 +13836,17 @@ "required": true }, { - "required": true, "type": "string", "description": "name of the repo", "name": "repo", - "in": "path" + "in": "path", + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateReleaseOption" + "$ref": "#/definitions/CreateTagOption" } }, { @@ -13825,32 +13859,28 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Release" + "200": { + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" }, + "405": { + "$ref": "#/responses/empty" + }, "409": { - "$ref": "#/responses/error" + "$ref": "#/responses/conflict" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "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}/tags/{tag}": { "get": { "produces": [ "application/json" @@ -13858,8 +13888,8 @@ "tags": [ "repository" ], - "summary": "List the Git hooks in a repository", - "operationId": "repoListGitHooks", + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", "parameters": [ { "type": "string", @@ -13869,11 +13899,18 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true + }, + { + "type": "string", + "description": "name of tag", + "name": "tag", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -13886,57 +13923,44 @@ ], "responses": { "200": { - "$ref": "#/responses/GitHookList" + "$ref": "#/responses/Tag" }, "404": { "$ref": "#/responses/notFound" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/deadline": { - "post": { - "consumes": [ - "application/json" - ], + }, + "delete": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "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", + "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": "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": "index of the issue to create or update a deadline on", - "name": "index", + "type": "string", + "description": "name of tag to delete", + "name": "tag", "in": "path", "required": true }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditDeadlineOption" - } - }, { "description": "group ID of the repo", "name": "group_id", @@ -13947,31 +13971,37 @@ } ], "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" + "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}/issues/{index}/subscriptions/{user}": { - "put": { - "consumes": [ - "application/json" - ], + "/repos/{owner}/group/{group_id}/{repo}/teams": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription", + "summary": "List a repository's teams", + "operationId": "repoListTeams", "parameters": [ { "type": "string", @@ -13981,24 +14011,60 @@ "required": true }, { + "type": "string", "description": "name of the repo", "name": "repo", "in": "path", - "required": true, - "type": "string" + "required": true }, { - "name": "index", - "in": "path", - "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": { + "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": "username of the user to subscribe the issue to", - "name": "user", + "description": "team name", + "name": "team", "in": "path", "required": true }, @@ -14013,52 +14079,32 @@ ], "responses": { "200": { - "description": "Already subscribed" - }, - "201": { - "description": "Successfully Subscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" + "$ref": "#/responses/Team" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" } } }, - "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" - ], + "put": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", + "summary": "Add a team to a repository", + "operationId": "repoAddTeam", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -14067,18 +14113,10 @@ "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", + "description": "team name", + "name": "team", "in": "path", "required": true }, @@ -14090,52 +14128,52 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/activities/feeds": { - "get": { + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds", + "summary": "Delete a team from a repository", + "operationId": "repoDeleteTeam", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "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 repo" + "required": true }, { - "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": "team name", + "name": "team", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -14147,17 +14185,31 @@ } ], "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" + "204": { + "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/timeline": { + "/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", @@ -14167,26 +14219,31 @@ "required": true }, { + "type": "string", "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 + "type": "string", + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" }, { - "description": "if provided, only comments updated since the specified time are returned.", + "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", + "in": "query" + }, + { "type": "string", - "format": "date-time" + "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", @@ -14200,13 +14257,6 @@ "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", @@ -14218,29 +14268,31 @@ ], "responses": { "200": { - "$ref": "#/responses/TimelineList" + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "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": { + "/repos/{owner}/group/{group_id}/{repo}/times/{user}": { "get": { + "produces": [ + "application/json" + ], "tags": [ "repository" ], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs", + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "deprecated": true, "parameters": [ { "type": "string", @@ -14256,6 +14308,13 @@ "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", @@ -14267,19 +14326,30 @@ ], "responses": { "200": { - "$ref": "#/responses/ReferenceList" + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/issues/comments/{id}": { + "/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", @@ -14296,12 +14366,16 @@ "required": true }, { - "format": "int64", - "description": "id of the comment", - "name": "id", - "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": "group ID of the repo", @@ -14313,54 +14387,44 @@ } ], "responses": { - "404": { - "$ref": "#/responses/notFound" - }, "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" + "$ref": "#/responses/TopicNames" }, - "403": { - "$ref": "#/responses/forbidden" + "404": { + "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], + } + }, + "put": { "produces": [ "application/json" ], "tags": [ - "issue" - ], - "summary": "Get a comment", - "operationId": "issueGetComment" - }, - "delete": { + "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": "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", - "name": "id", - "in": "path", - "required": true + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } }, { "description": "group ID of the repo", @@ -14375,49 +14439,46 @@ "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/topics/{topic}": { + "put": { + "produces": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "Delete a comment", - "operationId": "issueDeleteComment" - }, - "patch": { + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", "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" - }, - { - "name": "id", "in": "path", - "required": true, - "type": "integer", - "format": "int64", - "description": "id of the comment to edit" + "required": true }, { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -14429,61 +14490,47 @@ } ], "responses": { - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "200": { - "$ref": "#/responses/Comment" - }, "204": { "$ref": "#/responses/empty" }, - "403": { - "$ref": "#/responses/forbidden" - }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" } - }, - "consumes": [ - "application/json" - ], + } + }, + "delete": { "produces": [ "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": "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": "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" + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -14495,49 +14542,52 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" + "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" - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/teams": { - "get": { "tags": [ "repository" ], - "summary": "List a repository's teams", - "operationId": "repoListTeams", + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer", "parameters": [ { "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to transfer", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo", + "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", @@ -14548,59 +14598,45 @@ } ], "responses": { - "200": { - "$ref": "#/responses/TeamList" + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } - }, - "produces": [ - "application/json" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/runs/{run}/jobs": { - "get": { + "/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", + "description": "owner of the repo to transfer", "name": "owner", "in": "path", "required": true }, { - "required": true, "type": "string", - "description": "name of the repository", + "description": "name of the repo to transfer", "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", @@ -14612,44 +14648,39 @@ } ], "responses": { - "200": { - "$ref": "#/responses/WorkflowJobsList" + "202": { + "$ref": "#/responses/Repository" }, - "400": { - "$ref": "#/responses/error" + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } - }, + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/transfer/reject": { + "post": { "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", + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", "parameters": [ { "type": "string", - "description": "owner of the repo", + "description": "owner of the repo to transfer", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo", + "description": "name of the repo to transfer", "name": "repo", "in": "path", "required": true @@ -14665,48 +14696,47 @@ ], "responses": { "200": { - "description": "ssh public key", - "schema": { - "type": "string" - } + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } - }, - "produces": [ - "text/plain" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/actions/workflows/{workflow_id}/dispatches": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/new": { "post": { - "summary": "Create a workflow dispatch event", - "operationId": "ActionsDispatchWorkflow", + "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" + "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" + "required": true }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateActionWorkflowDispatch" + "$ref": "#/definitions/CreateWikiPageOptions" } }, { @@ -14719,8 +14749,8 @@ } ], "responses": { - "204": { - "description": "No Content" + "201": { + "$ref": "#/responses/WikiPage" }, "400": { "$ref": "#/responses/error" @@ -14731,36 +14761,22 @@ "404": { "$ref": "#/responses/notFound" }, - "422": { - "$ref": "#/responses/validationError" + "423": { + "$ref": "#/responses/repoArchivedError" } - }, - "produces": [ - "application/json" - ], - "tags": [ - "repository" - ] + } } }, - "/repos/{owner}/group/{group_id}/{repo}/collaborators": { + "/repos/{owner}/group/{group_id}/{repo}/wiki/page/{pageName}": { "get": { - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - }, "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "List a repository's collaborators", - "operationId": "repoListCollaborators", + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", "parameters": [ { "type": "string", @@ -14770,23 +14786,18 @@ "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": "path", + "required": true }, { - "description": "page size of results", - "name": "limit", - "in": "query", - "type": "integer" + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -14796,19 +14807,22 @@ "required": true, "in": "path" } - ] - } - }, - "/repos/{owner}/group/{group_id}/{repo}/git/commits/{sha}.{diffType}": { - "get": { - "produces": [ - "text/plain" ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { "tags": [ "repository" ], - "summary": "Get a commit's diff or patch", - "operationId": "repoDownloadCommitDiffOrPatch", + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", "parameters": [ { "type": "string", @@ -14818,29 +14832,18 @@ "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", + "name": "repo", "in": "path", "required": true }, { - "required": true, - "enum": [ - "diff", - "patch" - ], "type": "string", - "description": "whether the output is diff or patch", - "name": "diffType", - "in": "path" + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true }, { "description": "group ID of the repo", @@ -14852,29 +14855,36 @@ } ], "responses": { - "200": { - "$ref": "#/responses/string" + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } - } - }, - "/repos/{owner}/group/{group_id}/{repo}/issues/{index}/comments": { - "get": { + }, + "patch": { + "consumes": [ + "application/json" + ], "tags": [ - "issue" + "repository" ], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -14884,26 +14894,18 @@ "required": true }, { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", + "type": "string", + "description": "name of the page", + "name": "pageName", "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" + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } }, { "description": "group ID of the repo", @@ -14916,17 +14918,33 @@ ], "responses": { "200": { - "$ref": "#/responses/CommentList" + "$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" - ] - }, - "post": { + ], + "tags": [ + "repository" + ], + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", "parameters": [ { "type": "string", @@ -14944,18 +14962,15 @@ }, { "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - }, - "name": "body" + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" }, { "description": "group ID of the repo", @@ -14967,43 +14982,32 @@ } ], "responses": { - "201": { - "$ref": "#/responses/Comment" - }, - "403": { - "$ref": "#/responses/forbidden" + "200": { + "$ref": "#/responses/WikiPageList" }, "404": { "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" } - }, - "consumes": [ - "application/json" - ], + } + } + }, + "/repos/{owner}/group/{group_id}/{repo}/wiki/revisions/{pageName}": { + "get": { "produces": [ "application/json" ], "tags": [ - "issue" + "repository" ], - "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", + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions", "parameters": [ { - "in": "path", - "required": true, "type": "string", "description": "owner of the repo", - "name": "owner" + "name": "owner", + "in": "path", + "required": true }, { "type": "string", @@ -15013,12 +15017,17 @@ "required": true }, { - "name": "index", + "type": "string", + "description": "name of the page", + "name": "pageName", "in": "path", - "required": true, + "required": true + }, + { "type": "integer", - "format": "int64", - "description": "index of the issue" + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" }, { "description": "group ID of the repo", @@ -15031,21 +15040,12 @@ ], "responses": { "200": { - "$ref": "#/responses/WatchInfo" + "$ref": "#/responses/WikiCommitList" }, "404": { "$ref": "#/responses/notFound" } - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "issue" - ] + } } } } From 9b62e75d99f9d881853b11940feb4b4cf3cafb27 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/168] 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 8336022a4cfa9..a2ab6a5062608 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -127,7 +127,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 3bed190745874..e8c8088c71749 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 fdd587641772b..92ba966d3506a 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -64,14 +64,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 { @@ -92,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/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 88e91d85dda46..59a0a6dee76c9 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 908cb59fc50eea1d4f244385bd83dc82552bf996 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/168] 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 e8795c5e38fb6..dfb1615348b5e 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1249,8 +1249,8 @@ func registerWebRoutes(m *web.Router) { 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 4827259649fd49abdd6cc8fcab9696ac67141e01 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/168] 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 21864ba51dbca..2399f4215b0ff 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -198,7 +198,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 125ed849a44dc70f2e4978435efc98c014666d15 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/168] add group id to file comparison urls --- routers/web/repo/commit.go | 3 ++- routers/web/repo/compare.go | 32 ++++++++++++++++++++------------ routers/web/repo/pull.go | 2 +- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go index 6bb9a8ae770ea..4b3d5a95bd55c 100644 --- a/routers/web/repo/commit.go +++ b/routers/web/repo/commit.go @@ -275,6 +275,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{ @@ -360,7 +361,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.Summary() + " ยท " + 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 5ee30e210b02c..6b1f65b510d9c 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -54,7 +54,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 @@ -85,28 +85,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) } } @@ -718,7 +726,7 @@ func PrepareCompareDiff( ctx.Data["Username"] = ci.HeadUser.Name ctx.Data["Reponame"] = ci.HeadRepo.Name - setCompareContext(ctx, beforeCommit, headCommit, ci.HeadUser.Name, repo.Name) + setCompareContext(ctx, beforeCommit, headCommit, ci.HeadUser.Name, repo.Name, repo.GroupID) return false } diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 4353e00840f92..4f9c0e08fdfd2 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -875,7 +875,7 @@ func viewPullFiles(ctx *context.Context, beforeCommitID, afterCommitID string) { } } - 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 36f278ee154b6881dba0678afc511d7f1fe696da 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/168] 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 2399f4215b0ff..11fb4d9b35875 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -59,9 +59,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 2f825d49926ad9f1cb2f8dffba485413b0de78ce 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/168] 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 8f8324dab9f7e..ef88a22b0ff9b 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 d1d4ae4c919453e4d2dc869c7e8deb90c3c65365 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/168] fix org repo test --- tests/integration/org_test.go | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index 11fb4d9b35875..63e198d732906 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -28,25 +28,33 @@ 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) - - 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())) + 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) + + 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 58e8e3fa025f0d7c01a414337ef3495930d91f9f 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/168] revert changes to cases in `org_test.go` --- tests/integration/org_test.go | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/tests/integration/org_test.go b/tests/integration/org_test.go index 63e198d732906..11fb4d9b35875 100644 --- a/tests/integration/org_test.go +++ b/tests/integration/org_test.go @@ -28,33 +28,25 @@ 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) - - 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())) - } + for sortBy, repos := range cases { + req := NewRequest(t, "GET", "/org3?sort="+sortBy) + resp := session.MakeRequest(t, req, http.StatusOK) + + 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())) } } }) From 74c68db624f5171aa241793976b4fb422a220051 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/168] 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 102e567b3be53..1e9804f2cb1f0 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 c20d0955d1a0976a2904c4285c1593e25eb557b8 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/168] 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 e556081ea7cd8..f2dbcd3a82e27 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -387,7 +387,7 @@ func GetUserRepoPermission(ctx context.Context, repo *repo_model.Repository, use 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 @@ -402,6 +402,11 @@ func GetUserRepoPermission(ctx context.Context, repo *repo_model.Repository, use 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 c669de1b6c2e2b1504335d966328c5168c6c75a6 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 16:06:18 -0500 Subject: [PATCH 165/168] sync with main --- routers/web/web.go | 1 - 1 file changed, 1 deletion(-) diff --git a/routers/web/web.go b/routers/web/web.go index dfb1615348b5e..6451543952d3a 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1192,7 +1192,6 @@ func registerWebRoutes(m *web.Router) { m.Post("/{username}/{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.Get("/find/*", repo.FindFiles) m.Group("/tree-list", func() { m.Get("/branch/*", context.RepoRefByType(git.RefTypeBranch), repo.TreeList) m.Get("/tag/*", context.RepoRefByType(git.RefTypeTag), repo.TreeList) From befb29f749172e5302fe8a4699ba30e9a63d9b9e 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 166/168] 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 1e9804f2cb1f0..87def2efcdef9 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 716770f85efe9..f7a484d6e72ac 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 0ab713f5eafc8cb95350369b5eaa8cce394b6199 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 167/168] fix failing tests --- models/group/group_team.go | 2 +- tests/integration/actions_trigger_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/models/group/group_team.go b/models/group/group_team.go index 87def2efcdef9..44c86e4b9a8b7 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 7cbb3ea2e5823..17057d0ed2e57 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1606,15 +1606,15 @@ 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: +on: pull_request: paths: - 'dir1/**' @@ -1624,10 +1624,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) @@ -1635,11 +1635,11 @@ 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) - testEditFile(t, session, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") // change the file in "dir1" + testEditFile(t, session, repo.GroupID, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") // change the file in "dir1" req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/pulls/%d/update?style=rebase", "user2", repoName, apiPull.Index), // update by rebase map[string]string{ From e0af9b2f48a81fd6fcaff6b8c5b9fa485acb5b31 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 168/168] 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 2c1f09ff34d74..c248870eaf385 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