improve submission for how-to

This commit is contained in:
Filip Gralinski 2018-09-01 11:06:42 +02:00
parent 0758ca3239
commit 63dac77974
2 changed files with 7 additions and 7 deletions

View File

@ -166,6 +166,9 @@ defaultBranch SelfHosted = Just "master"
defaultBranch Branches = Nothing defaultBranch Branches = Nothing
challengeHowTo challenge settings repo shownId isIDSet isSSHUploaded mToken = $(widgetFile "challenge-how-to") challengeHowTo challenge settings repo shownId isIDSet isSSHUploaded mToken = $(widgetFile "challenge-how-to")
where myBranch = case appRepoScheme settings of
SelfHosted -> "master" :: Text
_ -> "my-brilliant-branch"
getChallengeSubmissionR :: Text -> Handler Html getChallengeSubmissionR :: Text -> Handler Html
getChallengeSubmissionR name = do getChallengeSubmissionR name = do

View File

@ -104,22 +104,19 @@ $case (appRepoScheme settings)
$of SelfHosted $of SelfHosted
<pre> <pre>
git push origin master git push origin master
<h3>Repos hosted on Gonito.net
<p>If you use a repo hosted here, a submission and evaluation is triggered automatically. You'll see the evaluation results in your console while pushing.
$of Branches $of Branches
<pre> <pre>
git push origin my-brilliant-solution:my-brilliant-solution git push origin my-brilliant-solution:my-brilliant-solution
<h3>Repos hosted on Gonito.net
<p>If you use a repo hosted here, a submission and evaluation is triggered automatically. You'll see the evaluation results in your console while pushing.
<h3>External repos <h3>External repos
<p>If you use an external repo (e.g. at your own of Gitolite or at GitHub), you can configure a webhook. <p>If you use an external repo (e.g. at your own of Gitolite or at GitLab/GitHub), you can configure a webhook.
$maybe token <- mToken $maybe token <- mToken
<p>Your webook is: <p>Your webook is:
<pre> <pre>
#{appRoot settings}/trigger-remotely?token=#{token}&branch=master&challenge=#{challengeName challenge}&url=URL_TO_YOUR_REPO wget --timeout=0 --quiet -O - '#{appRoot settings}/trigger-remotely' --post-data 'token=#{token}&branch=#{myBranch}&challenge=#{challengeName challenge}&url=URL_TO_YOUR_REPO'
<p>(must be POSTed)
<h3>Manual submission <h3>Manual submission