github-0.23: Access to the GitHub API, v3.

LicenseBSD-3-Clause
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

GitHub.Endpoints.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 Owner -> 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 Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector IssueLabel)) Source #

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

labelsOnRepo' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip"

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

A label by name.

label "thoughtbot" "paperclip" "bug"

label' :: Maybe Auth -> Name Owner -> Name Repo -> Name IssueLabel -> IO (Either Error IssueLabel) Source #

A label by name using authentication.

label' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" "bug"

createLabel :: Auth -> Name Owner -> Name Repo -> Name IssueLabel -> String -> IO (Either Error IssueLabel) Source #

Create a label

createLabel (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" "bug" "f29513"

updateLabel Source #

Arguments

:: Auth 
-> Name Owner 
-> Name Repo 
-> Name IssueLabel

old label name

-> Name IssueLabel

new label name

-> String

new color

-> IO (Either Error IssueLabel) 

Update a label

updateLabel (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" "bug" "new-bug" "ff1111"

deleteLabel :: Auth -> Name Owner -> Name Repo -> Name IssueLabel -> IO (Either Error ()) Source #

Delete a label

deleteLabel (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" "bug"

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

The labels on an issue in a repo.

labelsOnIssue "thoughtbot" "paperclip" 585

labelsOnIssue' :: Maybe Auth -> Name Owner -> Name Repo -> Id Issue -> IO (Either Error (Vector IssueLabel)) Source #

The labels on an issue in a repo using authentication.

labelsOnIssue' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" (Id 585)

addLabelsToIssue :: Foldable f => Auth -> Name Owner -> Name Repo -> Id Issue -> f (Name IssueLabel) -> IO (Either Error (Vector IssueLabel)) Source #

Add labels to an issue.

addLabelsToIssue (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" (Id 585) ["Label1" "Label2"]

removeLabelFromIssue :: Auth -> Name Owner -> Name Repo -> Id Issue -> Name IssueLabel -> IO (Either Error ()) Source #

Remove a label from an issue.

removeLabelFromIssue (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" (Id 585) "bug"

replaceAllLabelsForIssue :: Foldable f => Auth -> Name Owner -> 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 (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" (Id 585) ["Label1" "Label2"]

replaceAllLabelsForIssueR :: Foldable f => Name Owner -> Name Repo -> Id Issue -> f (Name IssueLabel) -> Request RW (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 :: Auth -> Name Owner -> Name Repo -> Id Issue -> IO (Either Error ()) Source #

Remove all labels from an issue.

removeAllLabelsFromIssue (BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" (Id 585)

labelsOnMilestone :: Name Owner -> 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 Auth -> Name Owner -> 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 $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip" (Id 2)