├── script ├── .gitignore ├── build ├── test ├── startdb ├── server ├── setup ├── update ├── bootstrap └── deploy ├── config ├── robots.txt ├── test-settings.yml ├── favicon.ico ├── routes ├── models ├── settings.yml └── keter.yml ├── Setup.hs ├── test ├── Spec.hs ├── Handler │ └── CommonSpec.hs └── TestImport.hs ├── .halcyon └── sandbox-extra-apps ├── templates ├── default-layout.hamlet ├── sign_in.hamlet ├── _repository.hamlet ├── repository.hamlet ├── milestone.hamlet ├── repositories.hamlet ├── issue.hamlet └── default-layout-wrapper.hamlet ├── app ├── main.hs ├── devel.hs └── DevelMain.hs ├── static └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.svg ├── Import.hs ├── .dir-locals.el ├── .gitignore ├── .ghci ├── app.json ├── Import └── NoFoundation.hs ├── Model.hs ├── Handler ├── Common.hs ├── Repo.hs ├── Milestone.hs ├── Home.hs └── Issue.hs ├── Settings └── StaticFiles.hs ├── .travis.yml ├── LICENSE.md ├── README.md ├── Settings.hs ├── ScrumBut.cabal ├── Foundation.hs ├── cabal.config ├── Application.hs └── GitHub.hs /script/.gitignore: -------------------------------------------------------------------------------- 1 | credentials 2 | -------------------------------------------------------------------------------- /config/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /test/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover #-} 2 | -------------------------------------------------------------------------------- /config/test-settings.yml: -------------------------------------------------------------------------------- 1 | database: 2 | database: ScrumBut_test 3 | -------------------------------------------------------------------------------- /.halcyon/sandbox-extra-apps: -------------------------------------------------------------------------------- 1 | alex-3.1.4 2 | happy-1.19.5 3 | yesod-bin-1.4.3.6 4 | -------------------------------------------------------------------------------- /config/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jspahrsummers/ScrumBut/HEAD/config/favicon.ico -------------------------------------------------------------------------------- /script/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Builds the project. 4 | 5 | set -e 6 | 7 | yesod build 8 | -------------------------------------------------------------------------------- /templates/default-layout.hamlet: -------------------------------------------------------------------------------- 1 | $maybe msg <- mmsg 2 |
4 | Please
5 | sign in
6 | to continue.
7 |
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jspahrsummers/ScrumBut/HEAD/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jspahrsummers/ScrumBut/HEAD/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jspahrsummers/ScrumBut/HEAD/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/Import.hs:
--------------------------------------------------------------------------------
1 | module Import
2 | ( module Import
3 | ) where
4 |
5 | import Foundation as Import
6 | import Import.NoFoundation as Import
7 |
--------------------------------------------------------------------------------
/app/devel.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE PackageImports #-}
2 | import "ScrumBut" Application (develMain)
3 | import Prelude (IO)
4 |
5 | main :: IO ()
6 | main = develMain
7 |
--------------------------------------------------------------------------------
/templates/_repository.hamlet:
--------------------------------------------------------------------------------
1 | #{GH.milestoneDescription milestone}
3 |
4 |
2 | Signed in as: #{show userId}
3 | Sign out
4 |
5 | #{GH.issueBody issue}
3 |
4 | $maybe _ <- myEstimate
5 | #{GH.repoNWO repo}
2 |
3 |
4 | $forall milestone <- milestones
5 |
#{GH.milestoneTitle milestone}
2 |
5 | $forall issue <- issues
6 |
User
6 |
7 | $forall repo <- sort userRepos
8 | ^{_repository repo}
9 |
10 |
Orgs
11 |
12 |
13 | $forall repo <- sort orgRepos
14 | ^{_repository repo}
15 |
--------------------------------------------------------------------------------
/config/routes:
--------------------------------------------------------------------------------
1 | /static StaticR Static appStatic
2 | /auth AuthR Auth getAuth
3 |
4 | /favicon.ico FaviconR GET
5 | /robots.txt RobotsR GET
6 |
7 | / HomeR GET
8 | /repos/#Text/#Text RepoR GET
9 | /repos/#Text/#Text/milestones/#Integer MilestoneR GET
10 | /repos/#Text/#Text/issues/#Integer IssueR GET POST
11 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ScrumBut",
3 | "description": "Scrum, but with GitHub Issues",
4 | "repository": "https://github.com/jspahrsummers/ScrumBut",
5 | "env": {
6 | "BUILDPACK_URL": "https://github.com/mietek/haskell-on-heroku",
7 | "GITHUB_CLIENT_ID": "",
8 | "GITHUB_CLIENT_SECRET": ""
9 | },
10 | "addons": [
11 | "heroku-postgresql:hobby-dev"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/Import/NoFoundation.hs:
--------------------------------------------------------------------------------
1 | module Import.NoFoundation
2 | ( module Import
3 | ) where
4 |
5 | import ClassyPrelude.Yesod as Import
6 | import Model as Import
7 | import Settings as Import
8 | import Settings.StaticFiles as Import
9 | import Yesod.Auth as Import
10 | import Yesod.Core.Types as Import (loggerSet)
11 | import Yesod.Default.Config2 as Import
12 |
--------------------------------------------------------------------------------
/script/update:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Resolves Cabal dependencies again, picking specific versions and saving them
4 | # to cabal.config, then installs the chosen dependencies. This script is meant
5 | # to be run whenever the Cabal dependency version constraints have been
6 | # adjusted, or when new versions of dependencies are available.
7 |
8 | set -e
9 |
10 | cabal update
11 | cabal freeze --enable-tests --max-backjumps=-1
12 | cabal install -j --only-dependencies
13 |
--------------------------------------------------------------------------------
/script/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Performs an initial bootstrap of the project, installing all dependencies
4 | # required for development. This script can also be used to reinstall or upgrade
5 | # dependencies when the requirements have changed.
6 |
7 | set -e
8 | export SCRIPT_DIR=$(dirname "$0")
9 |
10 | brew update
11 | brew install postgresql
12 |
13 | cabal update
14 | cabal install -j alex happy yesod-bin
15 | cabal install -j --only-dependencies --enable-tests
16 |
17 | . "$SCRIPT_DIR/startdb"
18 |
--------------------------------------------------------------------------------
/test/Handler/CommonSpec.hs:
--------------------------------------------------------------------------------
1 | module Handler.CommonSpec (spec) where
2 |
3 | import TestImport
4 |
5 | spec :: Spec
6 | spec = withApp $ do
7 | describe "robots.txt" $ do
8 | it "gives a 200" $ do
9 | get RobotsR
10 | statusIs 200
11 | it "has correct User-agent" $ do
12 | get RobotsR
13 | bodyContains "User-agent: *"
14 | describe "favicon.ico" $ do
15 | it "gives a 200" $ do
16 | get FaviconR
17 | statusIs 200
18 |
--------------------------------------------------------------------------------
/script/deploy:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Deploys the current branch to Heroku. Any arguments (like --force) are passed
4 | # through to `git push` unmodified.
5 |
6 | set -e
7 | export SCRIPT_DIR=$(dirname "$0")
8 |
9 | branch=$(git symbolic-ref --short HEAD)
10 | git push "$@" heroku "$branch:master"
11 |
12 | dynos=$(heroku ps | wc -l)
13 | if [ "$dynos" -eq "0" ]
14 | then
15 | heroku run -s PX build
16 | heroku ps:scale web=1
17 |
18 | git commit --amend --no-edit
19 | git push "$@" --force heroku "$branch:master"
20 | fi
21 |
22 | heroku open
23 |
--------------------------------------------------------------------------------
/templates/issue.hamlet:
--------------------------------------------------------------------------------
1 |
##{GH.issueNumber issue}: #{GH.issueTitle issue}
2 |
6 | $forall (user, estimate) <- otherEstimates
7 |