Class: SupportOps::GitLab::Epics
- Defined in:
- lib/support_ops_gitlab/gitlab/epics.rb
Overview
Single epic > docs.gitlab.com/api/epics/#single-epic
Create a to-do item > docs.gitlab.com/api/epics/#create-a-to-do-item
Defines the class Epics within the module SupportOps::GitLab.
Instance Attribute Summary collapse
-
#_links ⇒ Hash
Various links related to the epic.
-
#add_labels ⇒ Array
Comma-separated label names to add to an issue.
-
#author ⇒ Hash
Information about the epic author.
-
#closed_at ⇒ String
When the epic was closed.
-
#color ⇒ String
The color of the epic.
-
#confidential ⇒ Boolean
Whether the epic should be confidential.
-
#created_at ⇒ String
When the epic was created.
-
#description ⇒ String
The description of the epic.
-
#downvotes ⇒ Integer
The number of downvotes on an epic.
-
#due_date ⇒ String
When the epic is due.
-
#due_date_fixed ⇒ String
The fixed due date of an epic.
-
#due_date_from_inherited_source ⇒ String
When the epic is due (inherited from the source of the epic).
-
#due_date_is_fixed ⇒ Boolean
Whether due date should be sourced from due_date_fixed or from milestones.
-
#group_id ⇒ Integer
The ID of the epic’s group.
-
#id ⇒ Integer
the ID of the epic.
-
#iid ⇒ Integer
The internal ID of the epic.
-
#imported ⇒ Boolean
If the epic was imported.
-
#imported_from ⇒ String
Where the epic was imported from.
-
#labels ⇒ Array
The comma-separated list of labels.
-
#parent_id ⇒ Integer
The ID of a parent epic.
-
#parent_iid ⇒ Integer
The internal ID of a parent epic.
-
#reference ⇒ String
The reference tag for the epic.
-
#references ⇒ Hash
Reference tags for the epic.
-
#remove_labels ⇒ Array
Comma-separated label names to remove from an issue.
-
#start_date ⇒ String
The start date of the epic.
-
#start_date_fixed ⇒ String
The fixed start date of an epic.
-
#start_date_from_inherited_source ⇒ String
The start date of the epic (inherited from the source of the epic).
-
#start_date_is_fixed ⇒ Boolean
Whether start date should be sourced from start_date_fixed or from milestones.
-
#state ⇒ String
The current state of the epic.
-
#state_event ⇒ String
State event for an epic; Set ‘close’ to close the epic and ‘reopen’ to reopen it.
-
#subscribed ⇒ Boolean
If the authenticated user is subscribed to the epic.
-
#title ⇒ String
The title of the epic.
-
#updated_at ⇒ String
When the epic was updated.
-
#upvotes ⇒ Integer
The number of upvotes on an epic.
-
#web_url ⇒ String
The URL of the epic.
Class Method Summary collapse
-
.list(key: value) ⇒ Array
Lists all epics keys for a group.
Instance Method Summary collapse
-
#delete! ⇒ Boolean
Deletes an epic.
-
#issues ⇒ Boolean
List issues on an epic.
-
#notes ⇒ Boolean
List notes on an epic.
-
#save! ⇒ Object
Creates/updates an epic.
Methods inherited from Base
#activate!, #approve!, attributes, #badges, #ban!, #block!, client, #client=, #commits, configure, #contributors, #create_support_pin!, #deactivate!, define_attributes, #diffs, #disable_2fa!, #discussions, #emails, #encoded_path, #events, #find, #find!, #gpg_keys, #hard_delete!, #impersonations, #initialize, #jobs, #latest_pipeline, #members, #memberships, #merge_requests, #move!, #paid?, #pats, #pipeline_variables, #pipelines, #preferences, #projects, readonly_attributes, #reject!, #revoke!, #rotate!, #ssh_keys, #status, #store_original_attributes, #subscribe!, #support_pin, to_hash, #tokens, #unban!, #unblock!, #unsubscribe!, #webhooks
Constructor Details
This class inherits a constructor from SupportOps::GitLab::Base
Instance Attribute Details
#_links ⇒ Hash
Various links related to the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def _links @_links end |
#add_labels ⇒ Array
Comma-separated label names to add to an issue
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def add_labels @add_labels end |
#author ⇒ Hash
Information about the epic author
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def @author end |
#closed_at ⇒ String
When the epic was closed
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def closed_at @closed_at end |
#color ⇒ String
The color of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def color @color end |
#confidential ⇒ Boolean
Whether the epic should be confidential
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def confidential @confidential end |
#created_at ⇒ String
When the epic was created
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def created_at @created_at end |
#description ⇒ String
The description of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def description @description end |
#downvotes ⇒ Integer
The number of downvotes on an epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def downvotes @downvotes end |
#due_date ⇒ String
When the epic is due
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def due_date @due_date end |
#due_date_fixed ⇒ String
The fixed due date of an epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def due_date_fixed @due_date_fixed end |
#due_date_from_inherited_source ⇒ String
When the epic is due (inherited from the source of the epic)
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def due_date_from_inherited_source @due_date_from_inherited_source end |
#due_date_is_fixed ⇒ Boolean
Whether due date should be sourced from due_date_fixed or from milestones
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def due_date_is_fixed @due_date_is_fixed end |
#group_id ⇒ Integer
The ID of the epic’s group
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def group_id @group_id end |
#id ⇒ Integer
the ID of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def id @id end |
#iid ⇒ Integer
The internal ID of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def iid @iid end |
#imported ⇒ Boolean
If the epic was imported
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def imported @imported end |
#imported_from ⇒ String
Where the epic was imported from
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def imported_from @imported_from end |
#labels ⇒ Array
The comma-separated list of labels
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def labels @labels end |
#parent_id ⇒ Integer
The ID of a parent epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def parent_id @parent_id end |
#parent_iid ⇒ Integer
The internal ID of a parent epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def parent_iid @parent_iid end |
#reference ⇒ String
The reference tag for the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def reference @reference end |
#references ⇒ Hash
Reference tags for the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def references @references end |
#remove_labels ⇒ Array
Comma-separated label names to remove from an issue
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def remove_labels @remove_labels end |
#start_date ⇒ String
The start date of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def start_date @start_date end |
#start_date_fixed ⇒ String
The fixed start date of an epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def start_date_fixed @start_date_fixed end |
#start_date_from_inherited_source ⇒ String
The start date of the epic (inherited from the source of the epic)
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def start_date_from_inherited_source @start_date_from_inherited_source end |
#start_date_is_fixed ⇒ Boolean
Whether start date should be sourced from start_date_fixed or from milestones
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def start_date_is_fixed @start_date_is_fixed end |
#state ⇒ String
The current state of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def state @state end |
#state_event ⇒ String
State event for an epic; Set ‘close’ to close the epic and ‘reopen’ to reopen it
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def state_event @state_event end |
#subscribed ⇒ Boolean
If the authenticated user is subscribed to the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def subscribed @subscribed end |
#title ⇒ String
The title of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def title @title end |
#updated_at ⇒ String
When the epic was updated
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def updated_at @updated_at end |
#upvotes ⇒ Integer
The number of upvotes on an epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def upvotes @upvotes end |
#web_url ⇒ String
The URL of the epic
49 50 51 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 49 def web_url @web_url end |
Class Method Details
.list(key: value) ⇒ Array
Lists all epics keys for a group
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 226 def self.list(**args) args[:group_id] = nil unless args[:group_id] raise 'You have to provide a group_id' if args[:group_id].nil? args[:author_id] = nil unless args[:author_id] args[:author_username] = nil unless args[:author_username] args[:labels] = nil unless args[:labels] args[:order_by] = nil unless args[:order_by] args[:sort] = nil unless args[:sort] args[:search] = nil unless args[:search] args[:state] = nil unless args[:state] args[:created_after] = nil unless args[:created_after] args[:created_before] = nil unless args[:created_before] args[:updated_after] = nil unless args[:updated_after] args[:updated_before] = nil unless args[:updated_before] args[:include_ancestor_groups] = nil unless args[:include_ancestor_groups] args[:include_descendant_groups] = nil unless args[:include_descendant_groups] args[:my_reaction_emoji] = nil unless args[:my_reaction_emoji] params = '' params += "active=#{args[:active]}&" unless args[:active].nil? params += "author_id=#{args[:author_id]}&" unless args[:author_id].nil? params += "author_username=#{args[:author_username]}&" unless args[:author_username].nil? params += "labels=#{args[:labels]}&" unless args[:labels].nil? params += "order_by=#{args[:order_by]}&" unless args[:order_by].nil? params += "sort=#{args[:sort]}&" unless args[:sort].nil? params += "search=#{args[:search]}&" unless args[:search].nil? params += "state=#{args[:state]}&" unless args[:state].nil? params += "created_after=#{args[:created_after]}&" unless args[:created_after].nil? params += "created_before=#{args[:created_before]}&" unless args[:created_before].nil? params += "updated_after=#{args[:updated_after]}&" unless args[:updated_after].nil? params += "updated_before=#{args[:updated_before]}&" unless args[:updated_before].nil? params += "include_ancestor_groups=#{args[:include_ancestor_groups]}&" unless args[:include_ancestor_groups].nil? params += "include_descendant_groups=#{args[:include_descendant_groups]}&" unless args[:include_descendant_groups].nil? params += "my_reaction_emoji=#{args[:my_reaction_emoji]}&" unless args[:my_reaction_emoji].nil? array = [] page = 1 loop do response = client.connection.get("groups/#{args[:group_id]}/epics?#{params}&page=#{page}&per_page=100") body = Oj.load(response.body) array += body.map { |e| Epics.new(e) } break if body.count < 100 page += 1 end array end |
Instance Method Details
#delete! ⇒ Boolean
This is inherited from Base#delete!
Deletes an epic
21 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 21 def delete!; end |
#issues ⇒ Boolean
This is inherited from Base#issues
List issues on an epic
23 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 23 def issues; end |
#notes ⇒ Boolean
This is inherited from Base#notes
List notes on an epic
23 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 23 def notes; end |
#save! ⇒ Object
This is inherited from Base#save!
Creates/updates an epic
47 |
# File 'lib/support_ops_gitlab/gitlab/epics.rb', line 47 def save!; end |