module GitHub.Endpoints.Issues.Milestones (
milestonesR,
milestoneR,
createMilestoneR,
updateMilestoneR,
deleteMilestoneR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
milestonesR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Milestone)
milestonesR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "milestones"] []
milestoneR :: Name Owner -> Name Repo -> Id Milestone -> Request k Milestone
milestoneR user repo mid =
query ["repos", toPathPart user, toPathPart repo, "milestones", toPathPart mid] []
createMilestoneR :: Name Owner -> Name Repo -> NewMilestone -> Request 'RW Milestone
createMilestoneR user repo =
command Post ["repos", toPathPart user, toPathPart repo, "milestones"] . encode
updateMilestoneR :: Name Owner -> Name Repo -> Id Milestone -> UpdateMilestone -> Request 'RW Milestone
updateMilestoneR user repo mid =
command Patch ["repos", toPathPart user, toPathPart repo, "milestones", toPathPart mid ] . encode
deleteMilestoneR :: Name Owner -> Name Repo -> Id Milestone -> GenRequest 'MtUnit 'RW ()
deleteMilestoneR user repo mid =
Command Delete
["repos", toPathPart user, toPathPart repo, "milestones", toPathPart mid] mempty