mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 19:14:51 +09:00
Rename RepoPatchR to RepoCommitR, we'll use the old name for merge requests
This commit is contained in:
parent
ad8c0ce8b4
commit
e29233a59f
8 changed files with 15 additions and 16 deletions
|
@ -105,7 +105,7 @@
|
||||||
/s/#ShrIdent/r/#RpIdent/c RepoHeadChangesR GET
|
/s/#ShrIdent/r/#RpIdent/c RepoHeadChangesR GET
|
||||||
/s/#ShrIdent/r/#RpIdent/b/#Text RepoBranchR GET
|
/s/#ShrIdent/r/#RpIdent/b/#Text RepoBranchR GET
|
||||||
/s/#ShrIdent/r/#RpIdent/c/#Text RepoChangesR GET
|
/s/#ShrIdent/r/#RpIdent/c/#Text RepoChangesR GET
|
||||||
/s/#ShrIdent/r/#RpIdent/p/#Text RepoPatchR GET
|
/s/#ShrIdent/r/#RpIdent/p/#Text RepoCommitR GET
|
||||||
/s/#ShrIdent/r/#RpIdent/d RepoDevsR GET POST
|
/s/#ShrIdent/r/#RpIdent/d RepoDevsR GET POST
|
||||||
/s/#ShrIdent/r/#RpIdent/d/!new RepoDevNewR GET
|
/s/#ShrIdent/r/#RpIdent/d/!new RepoDevNewR GET
|
||||||
/s/#ShrIdent/r/#RpIdent/d/#ShrIdent RepoDevR GET DELETE POST
|
/s/#ShrIdent/r/#RpIdent/d/#ShrIdent RepoDevR GET DELETE POST
|
||||||
|
|
|
@ -757,8 +757,7 @@ serveCommit shr rp ref patch parents = do
|
||||||
let (author, written) = patchWritten patch
|
let (author, written) = patchWritten patch
|
||||||
mcommitter = patchCommitted patch
|
mcommitter = patchCommitted patch
|
||||||
patchAP = AP.Commit
|
patchAP = AP.Commit
|
||||||
{ commitId =
|
{ commitId = encodeRouteLocal $ RepoCommitR shr rp ref
|
||||||
encodeRouteLocal $ RepoPatchR shr rp ref
|
|
||||||
, commitRepository = encodeRouteLocal $ RepoR shr rp
|
, commitRepository = encodeRouteLocal $ RepoR shr rp
|
||||||
, commitAuthor =
|
, commitAuthor =
|
||||||
makeAuthor encodeRouteHome msharerWritten author
|
makeAuthor encodeRouteHome msharerWritten author
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{- This file is part of Vervis.
|
{- This file is part of Vervis.
|
||||||
-
|
-
|
||||||
- Written in 2018 by fr33domlover <fr33domlover@riseup.net>.
|
- Written in 2018, 2020 by fr33domlover <fr33domlover@riseup.net>.
|
||||||
-
|
-
|
||||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||||
-
|
-
|
||||||
|
@ -32,7 +32,7 @@ import Vervis.Model.Repo
|
||||||
|
|
||||||
changeEntry :: ShrIdent -> RpIdent -> LogEntry -> FeedEntry (Route App)
|
changeEntry :: ShrIdent -> RpIdent -> LogEntry -> FeedEntry (Route App)
|
||||||
changeEntry shr rp le = FeedEntry
|
changeEntry shr rp le = FeedEntry
|
||||||
{ feedEntryLink = RepoPatchR shr rp $ leHash le
|
{ feedEntryLink = RepoCommitR shr rp $ leHash le
|
||||||
, feedEntryUpdated = fst $ leTime le
|
, feedEntryUpdated = fst $ leTime le
|
||||||
, feedEntryTitle = leMessage le
|
, feedEntryTitle = leMessage le
|
||||||
, feedEntryContent = mempty
|
, feedEntryContent = mempty
|
||||||
|
|
|
@ -828,7 +828,7 @@ instance YesodBreadcrumbs App where
|
||||||
RepoChangesR shar repo ref -> ( ref
|
RepoChangesR shar repo ref -> ( ref
|
||||||
, Just $ RepoHeadChangesR shar repo
|
, Just $ RepoHeadChangesR shar repo
|
||||||
)
|
)
|
||||||
RepoPatchR shr rp hash -> ( "Patch " <> hash
|
RepoCommitR shr rp hash -> ( "Commit " <> hash
|
||||||
, Just $ RepoHeadChangesR shr rp
|
, Just $ RepoHeadChangesR shr rp
|
||||||
)
|
)
|
||||||
RepoDevsR shr rp -> ( "Collaboratots"
|
RepoDevsR shr rp -> ( "Collaboratots"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{- This file is part of Vervis.
|
{- This file is part of Vervis.
|
||||||
-
|
-
|
||||||
- Written in 2016, 2018, 2019 by fr33domlover <fr33domlover@riseup.net>.
|
- Written in 2016, 2018, 2019, 2020 by fr33domlover <fr33domlover@riseup.net>.
|
||||||
-
|
-
|
||||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||||
-
|
-
|
||||||
|
@ -26,7 +26,7 @@ module Vervis.Handler.Repo
|
||||||
, getRepoHeadChangesR
|
, getRepoHeadChangesR
|
||||||
, getRepoBranchR
|
, getRepoBranchR
|
||||||
, getRepoChangesR
|
, getRepoChangesR
|
||||||
, getRepoPatchR
|
, getRepoCommitR
|
||||||
, getRepoDevsR
|
, getRepoDevsR
|
||||||
, postRepoDevsR
|
, postRepoDevsR
|
||||||
, getRepoDevNewR
|
, getRepoDevNewR
|
||||||
|
@ -346,8 +346,8 @@ getRepoChangesR shar repo ref = do
|
||||||
VCSDarcs -> getDarcsRepoChanges shar repo ref
|
VCSDarcs -> getDarcsRepoChanges shar repo ref
|
||||||
VCSGit -> getGitRepoChanges shar repo ref
|
VCSGit -> getGitRepoChanges shar repo ref
|
||||||
|
|
||||||
getRepoPatchR :: ShrIdent -> RpIdent -> Text -> Handler TypedContent
|
getRepoCommitR :: ShrIdent -> RpIdent -> Text -> Handler TypedContent
|
||||||
getRepoPatchR shr rp ref = do
|
getRepoCommitR shr rp ref = do
|
||||||
(_, repository) <- runDB $ selectRepo shr rp
|
(_, repository) <- runDB $ selectRepo shr rp
|
||||||
case repoVcs repository of
|
case repoVcs repository of
|
||||||
VCSDarcs -> getDarcsPatch shr rp ref
|
VCSDarcs -> getDarcsPatch shr rp ref
|
||||||
|
@ -515,7 +515,7 @@ postPostReceiveR = do
|
||||||
hashText (Hash b) = decodeUtf8 b
|
hashText (Hash b) = decodeUtf8 b
|
||||||
commitW c =
|
commitW c =
|
||||||
[hamlet|
|
[hamlet|
|
||||||
<a href=@{RepoPatchR shr rp $ hashText $ commitHash c}>
|
<a href=@{RepoCommitR shr rp $ hashText $ commitHash c}>
|
||||||
#{commitTitle c}
|
#{commitTitle c}
|
||||||
|]
|
|]
|
||||||
withUrlRenderer
|
withUrlRenderer
|
||||||
|
@ -582,7 +582,7 @@ postPostReceiveR = do
|
||||||
author <- authorByEmail wauthor
|
author <- authorByEmail wauthor
|
||||||
mcommitter <- traverse (authorByEmail . fst) mcommitted
|
mcommitter <- traverse (authorByEmail . fst) mcommitted
|
||||||
return Commit
|
return Commit
|
||||||
{ commitId = encodeRouteLocal $ RepoPatchR shr rp hash
|
{ commitId = encodeRouteLocal $ RepoCommitR shr rp hash
|
||||||
, commitRepository = encodeRouteLocal $ RepoR shr rp
|
, commitRepository = encodeRouteLocal $ RepoR shr rp
|
||||||
, commitAuthor = second (encodeRouteHome . SharerR) author
|
, commitAuthor = second (encodeRouteHome . SharerR) author
|
||||||
, commitCommitter =
|
, commitCommitter =
|
||||||
|
|
|
@ -151,7 +151,7 @@ getDarcsRepoHeadChanges shar repo = do
|
||||||
else Nothing
|
else Nothing
|
||||||
, collectionPageStartIndex = Nothing
|
, collectionPageStartIndex = Nothing
|
||||||
, collectionPageItems =
|
, collectionPageItems =
|
||||||
map (encodeRouteHome . RepoPatchR shar repo . leHash)
|
map (encodeRouteHome . RepoCommitR shar repo . leHash)
|
||||||
items
|
items
|
||||||
}
|
}
|
||||||
feed = changeFeed shar repo Nothing VCSDarcs items
|
feed = changeFeed shar repo Nothing VCSDarcs items
|
||||||
|
|
|
@ -185,7 +185,7 @@ getGitRepoChanges shar repo ref = do
|
||||||
else Nothing
|
else Nothing
|
||||||
, collectionPageStartIndex = Nothing
|
, collectionPageStartIndex = Nothing
|
||||||
, collectionPageItems =
|
, collectionPageItems =
|
||||||
map (encodeRouteHome . RepoPatchR shar repo . leHash)
|
map (encodeRouteHome . RepoCommitR shar repo . leHash)
|
||||||
items
|
items
|
||||||
}
|
}
|
||||||
feed = changeFeed shar repo (Just ref) VCSGit items
|
feed = changeFeed shar repo (Just ref) VCSGit items
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$# This file is part of Vervis.
|
$# This file is part of Vervis.
|
||||||
$#
|
$#
|
||||||
$# Written in 2016, 2018 by fr33domlover <fr33domlover@riseup.net>.
|
$# Written in 2016, 2018, 2020 by fr33domlover <fr33domlover@riseup.net>.
|
||||||
$#
|
$#
|
||||||
$# ♡ Copying is an act of love. Please copy, reuse and share.
|
$# ♡ Copying is an act of love. Please copy, reuse and share.
|
||||||
$#
|
$#
|
||||||
|
@ -22,7 +22,7 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
<tr>
|
<tr>
|
||||||
<td>#{author}
|
<td>#{author}
|
||||||
<td .hash>
|
<td .hash>
|
||||||
<a href=@{RepoPatchR shr rp hash}>
|
<a href=@{RepoCommitR shr rp hash}>
|
||||||
#{T.take 10 hash}
|
#{T.take 10 hash}
|
||||||
<td>#{message}
|
<td>#{message}
|
||||||
<td>#{time}
|
<td>#{time}
|
||||||
|
|
Loading…
Reference in a new issue