module Octokit::Client::Issues

Overview

Methods for the Issues API

See Also:

Direct including types

Defined in:

octokit/client/issues.cr

Constant Summary

DIRECTIONS = ["asc", "desc"]

Valid directions in which to sort Issues

FILTERS = ["all", "assigned", "created", "mentioned", "subscribed"]

Valid filters for Issues

SORTS = ["created", "updated", "comments"]

Valid sort for Issues

STATES = ["all", "open", "closed"]

Valid states for Issues

Instance Method Summary

Instance Method Detail

def add_assignees(repo, number : Int32, assignees : Array(String | User)) #

Add assignees to an issue.

See Also:

Examples:

Add assignees "watzon" and "asterite" to issue #4 on watzon/cadmium

Octokit.client.add_assignees("watzon/cadmium", 4, ["watzon", "asterite"])

[View source]
def add_comment(repo, number : Int32, comment : String) #

Get a single comment attached to an issue.

See Also:

Examples:

Add a comment to issue #4 on watzon/cadmium

Octokit.client.add_comment("watzon/cadmium", 4, "Plenty of awesome")

[View source]
def close_issue(repo, number : Int32, **options) #

Close an issue

See Also:

Example:

Close issue #4 from watzon/cadmium

@client.close_issue("watzon/cadmium", 4)

[View source]
def create_issue(repo, title, body, **options) #

Create an issue for a repository.

See Also:

Example:

Create a new Issues for a repository

@client = Octokit::Client.new(login: "foo", password: "bar")
@client.create_issue("watzon/cadmium", "Not enough awesome", "You heard me.")

[View source]
def delete_comment(repo, number : Int32) #

Delete a single comment.

See Also:

Examples:

Delete comment #495536069

Octokit.client.delete_comment("watzon/cadmium", 495536069)

[View source]
def issue(repo, number : Int32) #

Get a single issue from a repository

See Also:

Example:

Get issue #4 from watzon/cadmium

Octokit.client.issue("watzon/cadmium", 4)

[View source]
def issue_comment(repo, number : Int32) #

Get a single comment attached to an issue.

See Also:

Examples:

Get comment #495536069 from an issue on watzon/cadmium

Octokit.client.issue_comment("watzon/cadmium", 495536069)

[View source]
def issue_comments(repo, number : Int32) #

Get all comments attached to an issue.

See Also:

Examples:

Get the comments for issue #4 from watzon/cadmium

Octokit.client.issue_comments("watzon/cadmium", 4)

[View source]
def issue_timeline(repo, number : Int32) #

Get the timeline for an issue.

See Also:

Examples:

Get timeline for issue #4 on watzon/cadmium

Octokit.client.issue_timeline("watzon/cadmium", 4)

[View source]
def issues_comments(repo, number : Int32, **options) #

Get all comments attached to issues for the repository.

By default, Issue Comments are ordered by ascending ID.

See Also:

Examples:

Get the comments for issues in the cadmium repository

@client.issues_comments("watzon/cadmium")

Get issues comments, sort by updated descending since a time

@client.issues_comments("watzon/cadmium", sort: :desc, direction: :asc, since: "2010-05-04T23:45:02Z")

[View source]
def list_assignees(repo) #

List the available assignees for issues in a repository.

See Also:

Examples:

Get avaialble assignees on repository watzon/cadmium

Octokit.client.list_assignees("watzon/cadmium")

[View source]
def list_issues(repo = nil, **options) #

List issues for the authenticated user or repository

See Also:

Example:

List issues for a repository

Octokit.client.list_issues("watzon/cadmium")

List issues for the authenticated user across repositories

@client = Octokit::Client.new(login: "foo", password: "bar")
@client.list_issues

[View source]
def lock_issue(repo, number : Int32, **options) #

Lock an issue's conversation, limiting it to collaborators

See Also:

Example:

Lock issue #4 from watzon/cadmium

@client.lock_issue("watzon/cadmium", 4)

[View source]
def org_issues(org, **options) #

List all user issues for a given organization for the authenticated user.

See Also:

Example:

List all issues for a given organization for the authenticated user

@client = Octokit::Client.new(login: "foo", password: "bar")
@client.org_issues

[View source]
def remove_assignees(repo, number : Int32, assignees : Array(String | User)) #

Remove assignees from an issue.

See Also:

Examples:

Remove assignee "asterite" from issue #4 on watzon/cadmium

Octokit.client.remove_assignees("watzon/cadmium", 4, ["asterite"])

[View source]
def reopen_issue(repo, number : Int32, **options) #

Repoen an issue

See Also:

Example:

Repoen issue #4 from watzon/cadmium

@client.reopen_issue("watzon/cadmium", 4)

[View source]
def unlock_issue(repo, number : Int32, **options) #

Unlock an issue's conversation, opening it to all viewers

See Also:

Example:

Lock issue #4 from watzon/cadmium

@client.unlock_issue("watzon/cadmium", 4)

[View source]
def update_comment(repo, number : Int32, comment : String) #

Update a single comment on an issue.

See Also:

Examples:

Update comment #495536069

Octokit.client.update_comment("watzon/cadmium", 495536069, "Plenty of awesome!")

[View source]
def update_issue(repo, number : Int32, **options) #

Update an issue

See Also:

Examples:

Change the title of issue #4

@client.update_issue("watzon/cadmium", 4, title: "New title")

Change only the assignee of issue #4

@client.update_issue("watzon/cadmium", 4, assignee: "watzon")

[View source]
def user_issues(**options) #

List all user issues across owned and member repositories for the authenticated user.

See Also:

Example:

List issues for the authenticated user across owned and member repositories.

@client = Octokit::Client.new(login: "foo", password: "bar")
@client.user_issues

[View source]