mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 19:44:50 +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/b/#Text RepoBranchR 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/!new RepoDevNewR GET
|
||||
/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
|
||||
mcommitter = patchCommitted patch
|
||||
patchAP = AP.Commit
|
||||
{ commitId =
|
||||
encodeRouteLocal $ RepoPatchR shr rp ref
|
||||
{ commitId = encodeRouteLocal $ RepoCommitR shr rp ref
|
||||
, commitRepository = encodeRouteLocal $ RepoR shr rp
|
||||
, commitAuthor =
|
||||
makeAuthor encodeRouteHome msharerWritten author
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{- 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.
|
||||
-
|
||||
|
@ -32,7 +32,7 @@ import Vervis.Model.Repo
|
|||
|
||||
changeEntry :: ShrIdent -> RpIdent -> LogEntry -> FeedEntry (Route App)
|
||||
changeEntry shr rp le = FeedEntry
|
||||
{ feedEntryLink = RepoPatchR shr rp $ leHash le
|
||||
{ feedEntryLink = RepoCommitR shr rp $ leHash le
|
||||
, feedEntryUpdated = fst $ leTime le
|
||||
, feedEntryTitle = leMessage le
|
||||
, feedEntryContent = mempty
|
||||
|
|
|
@ -828,7 +828,7 @@ instance YesodBreadcrumbs App where
|
|||
RepoChangesR shar repo ref -> ( ref
|
||||
, Just $ RepoHeadChangesR shar repo
|
||||
)
|
||||
RepoPatchR shr rp hash -> ( "Patch " <> hash
|
||||
RepoCommitR shr rp hash -> ( "Commit " <> hash
|
||||
, Just $ RepoHeadChangesR shr rp
|
||||
)
|
||||
RepoDevsR shr rp -> ( "Collaboratots"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{- 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.
|
||||
-
|
||||
|
@ -26,7 +26,7 @@ module Vervis.Handler.Repo
|
|||
, getRepoHeadChangesR
|
||||
, getRepoBranchR
|
||||
, getRepoChangesR
|
||||
, getRepoPatchR
|
||||
, getRepoCommitR
|
||||
, getRepoDevsR
|
||||
, postRepoDevsR
|
||||
, getRepoDevNewR
|
||||
|
@ -346,8 +346,8 @@ getRepoChangesR shar repo ref = do
|
|||
VCSDarcs -> getDarcsRepoChanges shar repo ref
|
||||
VCSGit -> getGitRepoChanges shar repo ref
|
||||
|
||||
getRepoPatchR :: ShrIdent -> RpIdent -> Text -> Handler TypedContent
|
||||
getRepoPatchR shr rp ref = do
|
||||
getRepoCommitR :: ShrIdent -> RpIdent -> Text -> Handler TypedContent
|
||||
getRepoCommitR shr rp ref = do
|
||||
(_, repository) <- runDB $ selectRepo shr rp
|
||||
case repoVcs repository of
|
||||
VCSDarcs -> getDarcsPatch shr rp ref
|
||||
|
@ -515,7 +515,7 @@ postPostReceiveR = do
|
|||
hashText (Hash b) = decodeUtf8 b
|
||||
commitW c =
|
||||
[hamlet|
|
||||
<a href=@{RepoPatchR shr rp $ hashText $ commitHash c}>
|
||||
<a href=@{RepoCommitR shr rp $ hashText $ commitHash c}>
|
||||
#{commitTitle c}
|
||||
|]
|
||||
withUrlRenderer
|
||||
|
@ -582,7 +582,7 @@ postPostReceiveR = do
|
|||
author <- authorByEmail wauthor
|
||||
mcommitter <- traverse (authorByEmail . fst) mcommitted
|
||||
return Commit
|
||||
{ commitId = encodeRouteLocal $ RepoPatchR shr rp hash
|
||||
{ commitId = encodeRouteLocal $ RepoCommitR shr rp hash
|
||||
, commitRepository = encodeRouteLocal $ RepoR shr rp
|
||||
, commitAuthor = second (encodeRouteHome . SharerR) author
|
||||
, commitCommitter =
|
||||
|
|
|
@ -151,7 +151,7 @@ getDarcsRepoHeadChanges shar repo = do
|
|||
else Nothing
|
||||
, collectionPageStartIndex = Nothing
|
||||
, collectionPageItems =
|
||||
map (encodeRouteHome . RepoPatchR shar repo . leHash)
|
||||
map (encodeRouteHome . RepoCommitR shar repo . leHash)
|
||||
items
|
||||
}
|
||||
feed = changeFeed shar repo Nothing VCSDarcs items
|
||||
|
|
|
@ -185,7 +185,7 @@ getGitRepoChanges shar repo ref = do
|
|||
else Nothing
|
||||
, collectionPageStartIndex = Nothing
|
||||
, collectionPageItems =
|
||||
map (encodeRouteHome . RepoPatchR shar repo . leHash)
|
||||
map (encodeRouteHome . RepoCommitR shar repo . leHash)
|
||||
items
|
||||
}
|
||||
feed = changeFeed shar repo (Just ref) VCSGit items
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$# 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.
|
||||
$#
|
||||
|
@ -22,7 +22,7 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|||
<tr>
|
||||
<td>#{author}
|
||||
<td .hash>
|
||||
<a href=@{RepoPatchR shr rp hash}>
|
||||
<a href=@{RepoCommitR shr rp hash}>
|
||||
#{T.take 10 hash}
|
||||
<td>#{message}
|
||||
<td>#{time}
|
||||
|
|
Loading…
Reference in a new issue