diff --git a/Handler/ShowChallenge.hs b/Handler/ShowChallenge.hs index 79dcdf8..0f4c912 100644 --- a/Handler/ShowChallenge.hs +++ b/Handler/ShowChallenge.hs @@ -166,6 +166,9 @@ defaultBranch SelfHosted = Just "master" defaultBranch Branches = Nothing 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 name = do diff --git a/templates/challenge-how-to.hamlet b/templates/challenge-how-to.hamlet index 800a33d..2fcdeef 100644 --- a/templates/challenge-how-to.hamlet +++ b/templates/challenge-how-to.hamlet @@ -104,22 +104,19 @@ $case (appRepoScheme settings) $of SelfHosted
git push origin master +Repos hosted on Gonito.net +
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
git push origin my-brilliant-solution:my-brilliant-solution -Repos hosted on Gonito.net - -
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. -
External repos -
If you use an external repo (e.g. at your own of Gitolite or at GitHub), you can configure a webhook. +
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
Your webook is:
- #{appRoot settings}/trigger-remotely?token=#{token}&branch=master&challenge=#{challengeName challenge}&url=URL_TO_YOUR_REPO -(must be POSTed) + wget --timeout=0 --quiet -O - '#{appRoot settings}/trigger-remotely' --post-data 'token=#{token}&branch=#{myBranch}&challenge=#{challengeName challenge}&url=URL_TO_YOUR_REPO'
Manual submission