Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f9816c

Browse files
committed
Rename some functions
create -> createRepo createOrganization -> createOrganizationRepo edit -> editRepo
1 parent 7d76dfd commit 0f9816c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Github/Repos.hs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ module Github.Repos (
2222
,BasicAuth
2323

2424
-- ** Create
25-
,create
26-
,createOrganization
25+
,createRepo
26+
,createOrganizationRepo
2727
,newRepo
2828
,NewRepo(..)
2929

3030
-- ** Edit
31-
,edit
31+
,editRepo
3232
,def
3333
,Edit(..)
3434

@@ -159,16 +159,16 @@ newRepo name = NewRepo name Nothing Nothing Nothing Nothing Nothing Nothing
159159
-- |
160160
-- Create a new repository.
161161
--
162-
-- > create (user, password) (newRepo "some_repo") {newRepoHasIssues = Just False}
163-
create :: BasicAuth -> NewRepo -> IO (Either Error Repo)
164-
create auth = githubPost auth ["user", "repos"]
162+
-- > createRepo (user, password) (newRepo "some_repo") {newRepoHasIssues = Just False}
163+
createRepo :: BasicAuth -> NewRepo -> IO (Either Error Repo)
164+
createRepo auth = githubPost auth ["user", "repos"]
165165

166166
-- |
167167
-- Create a new repository for an organization.
168168
--
169-
-- > createOrganization (user, password) "thoughtbot" (newRepo "some_repo") {newRepoHasIssues = Just False}
170-
createOrganization :: BasicAuth -> String -> NewRepo -> IO (Either Error Repo)
171-
createOrganization auth org = githubPost auth ["orgs", org, "repos"]
169+
-- > createOrganizationRepo (user, password) "thoughtbot" (newRepo "some_repo") {newRepoHasIssues = Just False}
170+
createOrganizationRepo :: BasicAuth -> String -> NewRepo -> IO (Either Error Repo)
171+
createOrganizationRepo auth org = githubPost auth ["orgs", org, "repos"]
172172

173173
data Edit = Edit {
174174
editName :: Maybe String
@@ -204,13 +204,13 @@ instance ToJSON Edit where
204204
-- |
205205
-- Edit an existing repository.
206206
--
207-
-- > edit (user, password) "some_user" "some_repo" def {editDescription = Just "some description"}
208-
edit :: BasicAuth
207+
-- > editRepo (user, password) "some_user" "some_repo" def {editDescription = Just "some description"}
208+
editRepo :: BasicAuth
209209
-> String -- ^ owner
210210
-> String -- ^ repository name
211211
-> Edit
212212
-> IO (Either Error Repo)
213-
edit auth user repo body = githubPatch auth ["repos", user, repo] b
213+
editRepo auth user repo body = githubPatch auth ["repos", user, repo] b
214214
where
215215
-- if no name is given, use curent name
216216
b = body {editName = editName body <|> Just repo}

0 commit comments

Comments
 (0)