package github

  1. Overview
  2. Docs

The Issue module gives users access to GitHub's issue API.

val for_repo : ?token:Token.t -> ?creator:string -> ?mentioned:string -> ?assignee:Filter.user -> ?labels:string list -> ?milestone:Filter.milestone -> ?state:Filter.state -> ?sort:Filter.issue_sort -> ?direction:Filter.direction -> user:string -> repo:string -> unit -> Github_t.issue Stream.t

for_repo ?creator ?mentioned ?assignee ?labels ?milestone ?state ?sort ?direction ~user ~repo () is a stream of issues in repo user/repo which were created by user ?creator, mention user ?mentioned, are assigned to user ?assignee, have labels ?labels, are included in milestone ?milestone, and are in state ?state. The stream is sorted by ?sort (default `Created) and ordered by ?direction (default `Desc).

val get : ?token:Token.t -> user:string -> repo:string -> num:int -> unit -> Github_t.issue Response.t Monad.t

get ~user ~repo ~num () is the issue user/repo#num.

val create : ?token:Token.t -> user:string -> repo:string -> issue:Github_t.new_issue -> unit -> Github_t.issue Response.t Monad.t

create ~user ~repo ~issue () is a newly created issue described by issue in repo user/repo.

val update : ?token:Token.t -> user:string -> repo:string -> num:int -> issue:Github_t.update_issue -> unit -> Github_t.issue Response.t Monad.t

update ~user ~repo ~num ~issue () is the updated issue num in user/repo as described by issue.

val events_for_repo : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.repo_issues_event Stream.t

events_for_repo ~user ~repo () is a stream of all issue events for user/repo.

val events : ?token:Token.t -> user:string -> repo:string -> num:int -> unit -> Github_t.repo_issue_event Stream.t

events ~user ~repo ~num () is a stream of all issue events for user/repo#num.

val timeline_events : ?token:Token.t -> user:string -> repo:string -> num:int -> unit -> Github_t.timeline_event Stream.t

timeline_events ~user ~repo ~num () is a stream of all timeline events for user/repo#num.

val comments : ?token:Token.t -> ?since:string -> user:string -> repo:string -> num:int -> unit -> Github_t.issue_comment Stream.t

comments ?since ~user ~repo ~num () is a stream of issue comments for user/repo#num. If ?since, an ISO 8601 format timestamp (YYYY-MM-DDTHH:MM:SSZ), is supplied, only comments updated at or after this time are returned.

val comments_for_repo : ?token:Token.t -> ?sort:Filter.issue_comment_sort -> ?direction:Filter.direction -> ?since:string -> user:string -> repo:string -> unit -> Github_t.issue_comment Stream.t

comments_for_repo ~user ~repo () is a stream of issue comments for repo user/repo sorted by ?sort in ?direction order and having occurred since ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SSZ) ?since.

val create_comment : ?token:Token.t -> user:string -> repo:string -> num:int -> body:string -> unit -> Github_t.issue_comment Response.t Monad.t

create_comment ~user ~repo ~num ~body () is a newly created issue comment on user/repo#num with content body.

val get_comment : ?token:Token.t -> user:string -> repo:string -> id:int64 -> unit -> Github_t.issue_comment Response.t Monad.t

get_comment ~user ~repo ~id () is issue comment id in repo user/repo.

val update_comment : ?token:Token.t -> user:string -> repo:string -> id:int64 -> body:string -> unit -> Github_t.issue_comment Response.t Monad.t

update_comment ~user ~repo ~id ~body () is issue comment id in repo user/repo updated with content body.

val delete_comment : ?token:Token.t -> user:string -> repo:string -> id:int64 -> unit -> unit Response.t Monad.t

delete_comment ~user ~repo ~id () activates after issue comment id has been deleted from repo user/repo.

val labels : ?token:Token.t -> user:string -> repo:string -> num:int -> unit -> Github_t.label Stream.t

labels ~user ~repo ~num () is a stream of all labels applied to issue num in the repo user/repo.

val add_labels : ?token:Token.t -> user:string -> repo:string -> num:int -> labels:string list -> unit -> Github_t.label list Response.t Monad.t

add_labels ~user ~repo ~num ~labels () is the list of labels on issue user/repo#num with labels labels added.

val remove_label : ?token:Token.t -> user:string -> repo:string -> num:int -> name:string -> unit -> Github_t.label list Response.t Monad.t

remove_label ~user ~repo ~num ~name () is the list of labels on issue user/repo#num after name has been removed.

val replace_labels : ?token:Token.t -> user:string -> repo:string -> num:int -> labels:string list -> unit -> Github_t.label list Response.t Monad.t

replace_labels ~user ~repo ~num ~labels () is the list of labels on issue user/repo#num as provided by labels.

val remove_labels : ?token:Token.t -> user:string -> repo:string -> num:int -> unit -> unit Response.t Monad.t

remove_labels ~user ~repo ~num () activates after all labels have been removed from issue user/repo#num.

val is_issue : Github_t.issue -> bool

is_issue issue is true if issue is an actual issue and not a pull request.

val is_pull : Github_t.issue -> bool

is_pull issue is true if issue is a pull request.

OCaml

Innovation. Community. Security.