diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cc22996 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "gomod" # See documentation for possible values https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#package-ecosystem- + directory: "/" # Location of package manifests + target-branch: "dev" + schedule: + interval: "weekly" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..1cd3021 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ +## What + +_what the PR changes_ + +## Why + +_why these changes were made_ + +## Test Plan + +_how did you verify these changes did what you expected_ + +## Env Vars + +_did you add, remove, or rename any environment variables_ + +## Checklist + +- [ ] Tested all changes locally diff --git a/README.md b/README.md index 15b7eb3..e3ae5f0 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,5 @@ go vet *.go - [x] Move Hide Vote to create instead of after you vote :skull: - [ ] Display the reason why a user is on the results page of a running poll - [ ] Display minimum time left that a poll is open +- [ ] Move routes to their own functions +- [ ] Change HTTP resposne codes to be `http.something` instead of just a number diff --git a/main.go b/main.go index 89b8c04..c58400e 100644 --- a/main.go +++ b/main.go @@ -67,6 +67,15 @@ func main() { ) oidcClient.setupOidcClient(os.Getenv("VOTE_OIDC_ID"), os.Getenv("VOTE_OIDC_SECRET")) InitConstitution() + + if (DEV_DISABLE_ACTIVE_FILTERS) { + logging.Logger.WithFields(logrus.Fields{"method": "main init"}).Warning("Dev disable active filters is set!") + } + + if (DEV_FORCE_IS_EVALS) { + logging.Logger.WithFields(logrus.Fields{"method": "main init"}).Warning("Dev force evals is set!") + } + r.GET("/auth/login", csh.AuthRequest) r.GET("/auth/callback", csh.AuthCallback) r.GET("/auth/logout", csh.AuthLogout) @@ -300,8 +309,6 @@ func main() { UserId: claims.UserInfo.Username, } - fmt.Println(poll.Options) - for _, option := range poll.Options { optionRankStr := c.PostForm(option) optionRank, err := strconv.Atoi(optionRankStr)