Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci/status_action_type.rb')
-rw-r--r--app/graphql/types/ci/status_action_type.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/graphql/types/ci/status_action_type.rb b/app/graphql/types/ci/status_action_type.rb
index 9f7299c0270..a06b09735b3 100644
--- a/app/graphql/types/ci/status_action_type.rb
+++ b/app/graphql/types/ci/status_action_type.rb
@@ -5,6 +5,9 @@ module Types
class StatusActionType < BaseObject
graphql_name 'StatusAction'
+ field :id, GraphQL::STRING_TYPE, null: false,
+ description: 'ID for a status action.',
+ extras: [:parent]
field :button_title, GraphQL::STRING_TYPE, null: true,
description: 'Title for the button, for example: Retry this job.'
field :icon, GraphQL::STRING_TYPE, null: true,
@@ -17,6 +20,10 @@ module Types
field :title, GraphQL::STRING_TYPE, null: true,
description: 'Title for the action, for example: Retry.'
+ def id(parent:)
+ "#{parent.parent.object.object.class.name}-#{parent.object.object.id}"
+ end
+
def action_method
object[:method]
end