Skip to content

Commit f1cf832

Browse files
committed
Drop Github prefix from data names and constructors
1 parent e1e0e31 commit f1cf832

98 files changed

Lines changed: 678 additions & 675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/Gists/Comments/ShowComment.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ main = do
1010

1111
formatComment comment =
1212
(Github.githubOwnerLogin $ Github.gistCommentUser comment) ++ "\n" ++
13-
(formatGithubDate $ Github.gistCommentUpdatedAt comment) ++ "\n\n" ++
13+
(formatDate $ Github.gistCommentUpdatedAt comment) ++ "\n\n" ++
1414
(Github.gistCommentBody comment)
1515

16-
formatGithubDate = show . Github.fromGithubDate
16+
formatDate = show . Github.fromDate

samples/Gists/Comments/ShowComments.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ main = do
1111

1212
formatComment comment =
1313
(Github.githubOwnerLogin $ Github.gistCommentUser comment) ++ "\n" ++
14-
(formatGithubDate $ Github.gistCommentUpdatedAt comment) ++ "\n\n" ++
14+
(formatDate $ Github.gistCommentUpdatedAt comment) ++ "\n\n" ++
1515
(Github.gistCommentBody comment)
1616

17-
formatGithubDate = show . Github.fromGithubDate
17+
formatDate = show . Github.fromDate

samples/GitData/Commits/GitShow.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ formatCommit :: Github.GitCommit -> String
1313
formatCommit commit =
1414
"commit " ++ (fromJust $ Github.gitCommitSha commit) ++
1515
"\nAuthor: " ++ (formatAuthor author) ++
16-
"\nDate: " ++ (show $ Github.fromGithubDate $ Github.gitUserDate author) ++
16+
"\nDate: " ++ (show $ Github.fromDate $ Github.gitUserDate author) ++
1717
"\n\n\t" ++ (Github.gitCommitMessage commit) ++ "\n"
1818
where author = Github.gitCommitAuthor commit
1919

samples/GitData/References/GitCreateReference.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Github.GitData.References
55

66
main :: IO ()
77
main = do
8-
let auth = Auth.GithubOAuth "oauthtoken"
8+
let auth = Auth.OAuth "oauthtoken"
99
newlyCreatedGitRef <- createReference auth "myrepo" "myowner" NewGitReference {
1010
newGitReferenceRef = "refs/heads/fav_tag"
1111
,newGitReferenceSha = "aa218f56b14c9653891f9e74264a383fa43fefbd"

samples/Issues/Comments/ShowComment.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ main = do
1111
formatComment comment =
1212
(Github.githubOwnerLogin $ Github.issueCommentUser comment) ++
1313
" commented " ++
14-
(show $ Github.fromGithubDate $ Github.issueCommentUpdatedAt comment) ++
14+
(show $ Github.fromDate $ Github.issueCommentUpdatedAt comment) ++
1515
"\n" ++ (Github.issueCommentBody comment)

samples/Issues/Comments/ShowComments.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ main = do
1313
formatComment comment =
1414
(Github.githubOwnerLogin $ Github.issueCommentUser comment) ++
1515
" commented " ++
16-
(show $ Github.fromGithubDate $ Github.issueCommentUpdatedAt comment) ++
16+
(show $ Github.fromDate $ Github.issueCommentUpdatedAt comment) ++
1717
"\n" ++ (Github.issueCommentBody comment)

samples/Issues/CreateIssue.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module CreateIssue where
44
import qualified Github.Auth as Github
55
import qualified Github.Issues as Github
66
main = do
7-
let auth = Github.GithubBasicAuth "user" "password"
7+
let auth = Github.BasicAuth "user" "password"
88
newiss = (Github.newIssue "A new issue") {
99
Github.newIssueBody = Just "Issue description text goes here"
1010
}
@@ -16,7 +16,7 @@ main = do
1616
formatIssue issue =
1717
(Github.githubOwnerLogin $ Github.issueUser issue) ++
1818
" opened this issue " ++
19-
(show $ Github.fromGithubDate $ Github.issueCreatedAt issue) ++ "\n" ++
19+
(show $ Github.fromDate $ Github.issueCreatedAt issue) ++ "\n" ++
2020
(Github.issueState issue) ++ " with " ++
2121
(show $ Github.issueComments issue) ++ " comments" ++ "\n\n" ++
2222
(Github.issueTitle issue)

samples/Issues/EditIssue.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import qualified Github.Auth as Github
55
import qualified Github.Issues as Github
66

77
main = do
8-
let auth = Github.GithubBasicAuth "user" "password"
8+
let auth = Github.BasicAuth "user" "password"
99
issueid = 3
1010
edit = Github.editOfIssue { Github.editIssueState = Just "closed" }
1111
possibleIssue <- Github.editIssue auth "thoughtbot" "paperclip" issueid edit
@@ -16,7 +16,7 @@ main = do
1616
formatIssue issue =
1717
(Github.githubOwnerLogin $ Github.issueUser issue) ++
1818
" opened this issue " ++
19-
(show $ Github.fromGithubDate $ Github.issueCreatedAt issue) ++ "\n" ++
19+
(show $ Github.fromDate $ Github.issueCreatedAt issue) ++ "\n" ++
2020
(Github.issueState issue) ++ " with " ++
2121
(show $ Github.issueComments issue) ++ " comments" ++ "\n\n" ++
2222
(Github.issueTitle issue)

samples/Issues/Events/ShowEvent.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ formatEvent event = formatEvent' event (Github.eventType event)
3434
"Issue assigned to " ++ loginName event ++ " on " ++ createdAt event
3535

3636
loginName = Github.githubOwnerLogin . Github.eventActor
37-
createdAt = show . Github.fromGithubDate . Github.eventCreatedAt
37+
createdAt = show . Github.fromDate . Github.eventCreatedAt
3838
withCommitId event f = maybe "" f (Github.eventCommitId event)

samples/Issues/Events/ShowIssueEvents.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ formatEvent event = formatEvent' event (Github.eventType event)
3434
"Issue assigned to " ++ loginName event ++ " on " ++ createdAt event
3535

3636
loginName = Github.githubOwnerLogin . Github.eventActor
37-
createdAt = show . Github.fromGithubDate . Github.eventCreatedAt
37+
createdAt = show . Github.fromDate . Github.eventCreatedAt
3838
withCommitId event f = maybe "" f (Github.eventCommitId event)

0 commit comments

Comments
 (0)