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

Safe HaskellNone
LanguageHaskell2010

Github.Issues.Labels

Description

The API for dealing with labels on Github issues as described on http://developer.github.com/v3/issues/labels/.

Synopsis

Documentation

labelsOnRepo :: Name GithubOwner -> Name Repo -> IO (Either Error (Vector IssueLabel)) Source

All the labels available to use on any issue in the repo.

labelsOnRepo "thoughtbot" "paperclip"

labelsOnRepo' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error (Vector IssueLabel)) Source

All the labels available to use on any issue in the repo using authentication.

labelsOnRepo' (Just (GithubUser (user password))) "thoughtbot" "paperclip"

label :: Name GithubOwner -> Name Repo -> Name IssueLabel -> IO (Either Error IssueLabel) Source

A label by name.

label "thoughtbot" "paperclip" "bug"

label' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> Name IssueLabel -> IO (Either Error IssueLabel) Source

A label by name using authentication.

label' (Just (GithubUser (user password))) "thoughtbot" "paperclip" "bug"

createLabel :: GithubAuth -> Name GithubOwner -> Name Repo -> Name IssueLabel -> String -> IO (Either Error IssueLabel) Source

Create a label

createLabel (GithubUser (user password)) "thoughtbot" "paperclip" "bug" "f29513"

updateLabel Source

Arguments

:: GithubAuth 
-> Name GithubOwner 
-> Name Repo 
-> Name IssueLabel

old label name

-> Name IssueLabel

new label name

-> String

new color

-> IO (Either Error IssueLabel) 

Update a label

updateLabel (GithubUser (user password)) "thoughtbot" "paperclip" "bug" "new-bug" "ff1111"

deleteLabel :: GithubAuth -> Name GithubOwner -> Name Repo -> Name IssueLabel -> IO (Either Error ()) Source

Delete a label

deleteLabel (GithubUser (user password)) "thoughtbot" "paperclip" "bug"

labelsOnIssue :: Name GithubOwner -> Name Repo -> Id Issue -> IO (Either Error (Vector IssueLabel)) Source

The labels on an issue in a repo.

labelsOnIssue "thoughtbot" "paperclip" 585

labelsOnIssue' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> Id Issue -> IO (Either Error (Vector IssueLabel)) Source

The labels on an issue in a repo using authentication.

labelsOnIssue' (Just (GithubUser (user password))) "thoughtbot" "paperclip" (Id 585)

addLabelsToIssue :: Foldable f => GithubAuth -> Name GithubOwner -> Name Repo -> Id Issue -> f (Name IssueLabel) -> IO (Either Error (Vector IssueLabel)) Source

Add labels to an issue.

addLabelsToIssue (GithubUser (user password)) "thoughtbot" "paperclip" (Id 585) ["Label1" "Label2"]

removeLabelFromIssue :: GithubAuth -> Name GithubOwner -> Name Repo -> Id Issue -> Name IssueLabel -> IO (Either Error ()) Source

Remove a label from an issue.

removeLabelFromIssue (GithubUser (user password)) "thoughtbot" "paperclip" (Id 585) "bug"

replaceAllLabelsForIssue :: Foldable f => GithubAuth -> Name GithubOwner -> Name Repo -> Id Issue -> f (Name IssueLabel) -> IO (Either Error (Vector IssueLabel)) Source

Replace all labels on an issue. Sending an empty list will remove all labels from the issue.

replaceAllLabelsForIssue (GithubUser (user password)) "thoughtbot" "paperclip" (Id 585) ["Label1" "Label2"]

replaceAllLabelsForIssueR :: Foldable f => Name GithubOwner -> Name Repo -> Id Issue -> f (Name IssueLabel) -> GithubRequest True (Vector IssueLabel) Source

Replace all labels on an issue. See https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue

Sending an empty list will remove all labels from the issue.

removeAllLabelsFromIssue :: GithubAuth -> Name GithubOwner -> Name Repo -> Id Issue -> IO (Either Error ()) Source

Remove all labels from an issue.

removeAllLabelsFromIssue (GithubUser (user password)) "thoughtbot" "paperclip" (Id 585)

labelsOnMilestone :: Name GithubOwner -> Name Repo -> Id Milestone -> IO (Either Error (Vector IssueLabel)) Source

All the labels on a repo's milestone given the milestone ID.

labelsOnMilestone "thoughtbot" "paperclip" (Id 2)

labelsOnMilestone' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> Id Milestone -> IO (Either Error (Vector IssueLabel)) Source

All the labels on a repo's milestone given the milestone ID using authentication.

labelsOnMilestone' (Just (GithubUser (user password))) "thoughtbot" "paperclip" (Id 2)