Module: Gitlab::Client::ResourceStateEvents

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

Overview

Defines methods related to resource state events.

Instance Method Summary collapse

Instance Method Details

#issue_state_event(project, issue_iid, id) ⇒ Object

Returns a single state event for a specific project issue

Examples:

Gitlab.issue_state_event(5, 42, 1)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • issue_iid (Integer)

    The IID of an issue.

  • id (Integer)

    The ID of a resource event.

Returns:

  • Gitlab::ObjectifiedHash



28
29
30
# File 'lib/gitlab/client/resource_state_events.rb', line 28

def issue_state_event(project, issue_iid, id)
  get("/projects/#{url_encode project}/issues/#{issue_iid}/resource_state_events/#{id}")
end

#issue_state_events(project, issue_iid) ⇒ Array<Gitlab::ObjectifiedHash>

Gets a list of all state events for a single issue.

Examples:

Gitlab.issue_state_events(5, 42)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • issue_iid (Integer)

    The IID of an issue.

Returns:



15
16
17
# File 'lib/gitlab/client/resource_state_events.rb', line 15

def issue_state_events(project, issue_iid)
  get("/projects/#{url_encode project}/issues/#{issue_iid}/resource_state_events")
end

#merge_request_state_event(project, merge_request_iid, id) ⇒ Object

Returns a single state event for a specific project merge request

Examples:

Gitlab.merge_request_state_event(5, 42, 1)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • merge_request_iid (Integer)

    The IID of an merge request.

  • id (Integer)

    The ID of a state event.

Returns:

  • Gitlab::ObjectifiedHash



53
54
55
# File 'lib/gitlab/client/resource_state_events.rb', line 53

def merge_request_state_event(project, merge_request_iid, id)
  get("/projects/#{url_encode project}/merge_requests/#{merge_request_iid}/resource_state_events/#{id}")
end

#merge_request_state_events(project, merge_request_iid) ⇒ Array<Gitlab::ObjectifiedHash>

Gets a list of all state events for a single merge request.

Examples:

Gitlab.merge_request_state_events(5, 42)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • merge_request_iid (Integer)

    The IID of a merge request.

Returns:



40
41
42
# File 'lib/gitlab/client/resource_state_events.rb', line 40

def merge_request_state_events(project, merge_request_iid)
  get("/projects/#{url_encode project}/merge_requests/#{merge_request_iid}/resource_state_events")
end