Method: Gitlab::Client::IssueLinks#create_issue_link

Defined in:
lib/gitlab/client/issue_links.rb

Creates a new issue link.

Examples:

Gitlab.create_issue_link(6, 1, 6, 2)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • issue (Integer)

    The ID of an issue.

  • target_project_id (Integer)

    Project ID the target issue is located in.

  • target_issue_iid (Integer)

    The ID of the target issue.

Returns:


31
32
33
# File 'lib/gitlab/client/issue_links.rb', line 31

def create_issue_link(project, issue, target_project_id, target_issue_iid)
  post("/projects/#{url_encode project}/issues/#{issue}/links", body: { target_project_id: target_project_id, target_issue_iid: target_issue_iid })
end