Class: Infrawrench::JiraProjectsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.jira.projects

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ JiraProjectsNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of JiraProjectsNamespace.

Parameters:



8475
8476
8477
# File 'lib/infrawrench/client.rb', line 8475

def initialize(transport)
  @transport = transport
end

Instance Method Details

#issue_types(key:, org_id: nil, request_options: nil) ⇒ Array<Hash>

List issue types valid in a project

Reads the project's own create metadata rather than the global issue-type list, so the picker cannot offer a type the project's scheme would reject. Subtasks are excluded.

Requires permission: jira:read.

GET /api/org/orgId/jira/projects/key/issue-types

Raises on 400: Bad request

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • key (String)
  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • key: (String)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Array<Hash>)

    Parsed JSON, shaped as Array<JiraIssueType> — see sig/infrawrench/sdk.rbs.

Raises:



8498
8499
8500
8501
8502
8503
8504
8505
# File 'lib/infrawrench/client.rb', line 8498

def issue_types(key:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/jira/projects/{key}/issue-types",
    path_params: { "orgId" => org_id, "key" => key },
    request_options: request_options
  )
end

#list(org_id: nil, request_options: nil) ⇒ Array<Hash>

List Jira projects

Backs the project picker, so nobody has to know a project key by hand.

Requires permission: jira:read.

GET /api/org/orgId/jira/projects

Raises on 400: Bad request

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Array<Hash>)

    Parsed JSON, shaped as Array<JiraProject> — see sig/infrawrench/sdk.rbs.

Raises:



8523
8524
8525
8526
8527
8528
8529
8530
# File 'lib/infrawrench/client.rb', line 8523

def list(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/jira/projects",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end