Repo Team Management Functions #526

Closed
opened 2021-06-30 23:00:47 +00:00 by 6543 · 0 comments
Owner
// ListTeams list a repository's teams
func ListTeams(ctx *context.APIContext) {
       // swagger:operation GET /repos/{owner}/{repo}/teams repository repoListTeams
       // ---
       // summary: List a repository's teams
       // 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:
       //   "200":
       //     "$ref": "#/responses/TeamList"
}

// AddTeam add a team to a repository
func AddTeam(ctx *context.APIContext) {
       // swagger:operation PUT /repos/{owner}/{repo}/teams/{team} repository repoAddTeam
       // ---
       // summary: Add a team to a repository
       // produces:
       // - application/json
       // parameters:
       // - name: owner
       //   in: path
       //   description: owner of the repo
       //   type: string
       //   required: true
       // - name: repo
       //   in: path
       //   description: name of the repo
       //   type: string
       //   required: true
       // - name: team
       //   in: path
       //   description: team name
       //   type: string
       //   required: true
       // responses:
       //   "204":
       //     "$ref": "#/responses/empty"
}

// DeleteTeam delete a team from a repository
func DeleteTeam(ctx *context.APIContext) {
       // swagger:operation DELETE /repos/{owner}/{repo}/teams/{team} repository repoDeleteTeam
       // ---
       // summary: Delete a team from a repository
       // produces:
       // - application/json
       // parameters:
       // - name: owner
       //   in: path
       //   description: owner of the repo
       //   type: string
       //   required: true
       // - name: repo
       //   in: path
       //   description: name of the repo
       //   type: string
       //   required: true
       // - name: team
       //   in: path
       //   description: team name
       //   type: string
       //   required: true
       // responses:
       //   "204":
       //     "$ref": "#/responses/empty"

// IsTeam check if a team is assigned to a repository
func IsTeam(ctx *context.APIContext) {
       // swagger:operation GET /repos/{owner}/{repo}/teams/{team} repository repoCheckTeam
       // ---
       // summary: Check if a team is assigned to a repository
       // produces:
       // - application/json
       // parameters:
       // - name: owner
       //   in: path
       //   description: owner of the repo
       //   type: string
       //   required: true
       // - name: repo
       //   in: path
       //   description: name of the repo
       //   type: string
       //   required: true
       // - name: team
       //   in: path
       //   description: team name
       //   type: string
       //   required: true
       // responses:
       //   "200":
       //     "$ref": "#/responses/Team"
}
``` // ListTeams list a repository's teams func ListTeams(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/teams repository repoListTeams // --- // summary: List a repository's teams // 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: // "200": // "$ref": "#/responses/TeamList" } // AddTeam add a team to a repository func AddTeam(ctx *context.APIContext) { // swagger:operation PUT /repos/{owner}/{repo}/teams/{team} repository repoAddTeam // --- // summary: Add a team to a repository // produces: // - application/json // parameters: // - name: owner // in: path // description: owner of the repo // type: string // required: true // - name: repo // in: path // description: name of the repo // type: string // required: true // - name: team // in: path // description: team name // type: string // required: true // responses: // "204": // "$ref": "#/responses/empty" } // DeleteTeam delete a team from a repository func DeleteTeam(ctx *context.APIContext) { // swagger:operation DELETE /repos/{owner}/{repo}/teams/{team} repository repoDeleteTeam // --- // summary: Delete a team from a repository // produces: // - application/json // parameters: // - name: owner // in: path // description: owner of the repo // type: string // required: true // - name: repo // in: path // description: name of the repo // type: string // required: true // - name: team // in: path // description: team name // type: string // required: true // responses: // "204": // "$ref": "#/responses/empty" // IsTeam check if a team is assigned to a repository func IsTeam(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/teams/{team} repository repoCheckTeam // --- // summary: Check if a team is assigned to a repository // produces: // - application/json // parameters: // - name: owner // in: path // description: owner of the repo // type: string // required: true // - name: repo // in: path // description: name of the repo // type: string // required: true // - name: team // in: path // description: team name // type: string // required: true // responses: // "200": // "$ref": "#/responses/Team" } ```
6543 added this to the v0.15.0 milestone 2021-06-30 23:00:47 +00:00
6543 added the
kind/feature
label 2021-06-30 23:00:47 +00:00
6543 self-assigned this 2021-08-12 14:54:36 +00:00
6543 added the
has/pull
label 2021-08-12 21:46:07 +00:00
lunny closed this issue 2021-08-13 15:56:51 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/go-sdk#526
No description provided.