Module: Gitlab::Client::GroupBoards

Included in:
Gitlab::Client
Defined in:
lib/gitlab/client/group_boards.rb

Overview

Defines methods related to group issue boards.

Instance Method Summary collapse

Instance Method Details

#create_group_board(group, name) ⇒ Gitlab::ObjectifiedHash

Creates a new group issue board.

Examples:

Gitlab.create_group_board(5, 'Documentcloud')

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • name (String)

    The name of the new board.

Returns:



38
39
40
41
# File 'lib/gitlab/client/group_boards.rb', line 38

def create_group_board(group, name)
  body = { name: name }
  post("/groups/#{url_encode group}/boards", body: body)
end

#create_group_board_list(group, board_id, label_id) ⇒ Gitlab::ObjectifiedHash

Creates a new group issue board list.

Examples:

Gitlab.create_group_board_list(5, 1)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • board_id (Integer)

    The ID of the group issue board.

  • label_id (Integer)

    The ID of a label.

Returns:



108
109
110
111
# File 'lib/gitlab/client/group_boards.rb', line 108

def create_group_board_list(group, board_id, label_id)
  body = { label_id: label_id }
  post("/groups/#{url_encode group}/boards/#{board_id}/lists", body: body)
end

#delete_group_board(group, id) ⇒ void

This method returns an undefined value.

Deletes a group issue board.

Examples:

Gitlab.delete_group_board(5, 1)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • id (Integer)

    The ID of the issue board.



70
71
72
# File 'lib/gitlab/client/group_boards.rb', line 70

def delete_group_board(group, id)
  delete("/groups/#{url_encode group}/boards/#{id}")
end

#delete_group_board_list(group, board_id, id) ⇒ void

This method returns an undefined value.

Deletes a group issue board list.

Examples:

Gitlab.delete_group_board_list(5, 1, 1)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • board_id (Integer)

    The ID of the group issue board.

  • list_id (Integer)

    The ID of a boards list.



137
138
139
# File 'lib/gitlab/client/group_boards.rb', line 137

def delete_group_board_list(group, board_id, id)
  delete("/groups/#{url_encode group}/boards/#{board_id}/lists/#{id}")
end

#edit_group_board(group, id, options = {}) ⇒ Gitlab::ObjectifiedHash

Updates a group issue board.

Examples:

Gitlab.edit_group_board(5, 1, { name: 'DocumentCloud2' })
Gitlab.edit_group_board(5, 1, { name: 'DocumentCloud2', assignee_id: 3 })

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • id (Integer)

    The ID of the issue board.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :name(optional) (String)

    The new name of the board.

  • :assignee_id(optional) (Integer)

    The assignee the board should be scoped to.

  • :milestone_id(optional) (Integer)

    The milestone the board should be scoped to.

  • :labels(optional) (String)

    Comma-separated list of label names which the board should be scoped to.

  • :weight(optional) (Integer)

    The weight range from 0 to 9, to which the board should be scoped to.

Returns:



58
59
60
# File 'lib/gitlab/client/group_boards.rb', line 58

def edit_group_board(group, id, options = {})
  put("/groups/#{url_encode group}/boards/#{id}", body: options)
end

#edit_group_board_list(group, board_id, id, options = {}) ⇒ Gitlab::ObjectifiedHash

Updates an existing group issue board list. This call is used to change list position.

Examples:

Gitlab.edit_group_board_list(5, 1, 1, { position: 1 })

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • board_id (Integer)

    The ID of the group issue board.

  • list_id (Integer)

    The ID of a boards list.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :position(required) (String)

    The position of the list.

Returns:



124
125
126
# File 'lib/gitlab/client/group_boards.rb', line 124

def edit_group_board_list(group, board_id, id, options = {})
  put("/groups/#{url_encode group}/boards/#{board_id}/lists/#{id}", body: options)
end

#group_board(group, id) ⇒ Gitlab::ObjectifiedHash

Gets a single group issue board.

Examples:

Gitlab.group_board(5, 1)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • id (Integer)

    The ID of the issue board.

Returns:



26
27
28
# File 'lib/gitlab/client/group_boards.rb', line 26

def group_board(group, id)
  get("/groups/#{url_encode group}/boards/#{id}")
end

#group_board_list(group, board_id, id) ⇒ Gitlab::ObjectifiedHash

Get a single group issue board list.

Examples:

Gitlab.group_board_list(5, 1, 1)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • board_id (Integer)

    The ID of the group issue board.

  • list_id (Integer)

    The ID of a boards list.

Returns:



95
96
97
# File 'lib/gitlab/client/group_boards.rb', line 95

def group_board_list(group, board_id, id)
  get("/groups/#{url_encode group}/boards/#{board_id}/lists/#{id}")
end

#group_board_lists(group, board_id) ⇒ Array<Gitlab::ObjectifiedHash>

Get a list of the boards lists. Does not include open and closed lists

Examples:

Gitlab.group_board_lists(5, 1)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • board_id (Integer)

    The ID of the group issue board.

Returns:



82
83
84
# File 'lib/gitlab/client/group_boards.rb', line 82

def group_board_lists(group, board_id)
  get("/groups/#{url_encode group}/boards/#{board_id}/lists")
end

#group_boards(group) ⇒ Array<Gitlab::ObjectifiedHash>

Lists Issue Boards in the given group.

Examples:

Gitlab.group_boards(5)

Parameters:

  • group (Integer, String)

    The ID or name of a group.

Returns:



14
15
16
# File 'lib/gitlab/client/group_boards.rb', line 14

def group_boards(group)
  get("/groups/#{url_encode group}/boards")
end