github-0.12: Access to the Github API, v3.

Safe HaskellNone
LanguageHaskell98

Github.Issues

Description

The issues API as described on http://developer.github.com/v3/issues/.

Synopsis

Documentation

issue :: String -> String -> Int -> IO (Either Error Issue) Source

Details on a specific issue, given the repo owner and name, and the issue number.

issue "thoughtbot" "paperclip" "462"

issue' :: Maybe GithubAuth -> String -> String -> Int -> IO (Either Error Issue) Source

Details on a specific issue, given the repo owner and name, and the issue number.'

issue' (Just ("github-username", "github-password")) "thoughtbot" "paperclip" "462"

issuesForRepo :: String -> String -> [IssueLimitation] -> IO (Either Error [Issue]) Source

All issues for a repo (given the repo owner and name), with optional restrictions as described in the IssueLimitation data type.

issuesForRepo "thoughtbot" "paperclip" [NoMilestone, OnlyClosed, Mentions "jyurek", Ascending]

issuesForRepo' :: Maybe GithubAuth -> String -> String -> [IssueLimitation] -> IO (Either Error [Issue]) Source

All issues for a repo (given the repo owner and name), with optional restrictions as described in the IssueLimitation data type.

issuesForRepo' (Just ("github-username", "github-password")) "thoughtbot" "paperclip" [NoMilestone, OnlyClosed, Mentions "jyurek", Ascending]

data IssueLimitation Source

A data structure for describing how to filter issues. This is used by issuesForRepo.

Constructors

AnyMilestone

Issues appearing in any milestone. [default]

NoMilestone

Issues without a milestone.

MilestoneId Int

Only issues that are in the milestone with the given id.

Open

Only open issues. [default]

OnlyClosed

Only closed issues.

Unassigned

Issues to which no one has been assigned ownership.

AnyAssignment

All issues regardless of assignment. [default]

AssignedTo String

Only issues assigned to the user with the given login.

Mentions String

Issues which mention the given string, taken to be a user's login.

Labels [String]

A list of labels to filter by.

Ascending

Sort ascending.

Descending

Sort descending. [default]

Since UTCTime

Only issues created since the specified date and time.

PerPage Int

Download this many issues per query

createIssue :: GithubAuth -> String -> String -> NewIssue -> IO (Either Error Issue) Source

Create a new issue.

createIssue (GithubUser (user, password)) user repo
 (newIssue "some_repo") {...}

editIssue :: GithubAuth -> String -> String -> Int -> EditIssue -> IO (Either Error Issue) Source

Edit an issue.

editIssue (GithubUser (user, password)) user repo issue
 editOfIssue {...}