A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
Merge branch 'feat/1.0.4/comment' into feat/plugin/connector/github
LinkinStar6a8d5e5984a1
diff --cc Makefileindex 1914a49d,90ce5bc1..1decc473--- a/Makefile+++ b/Makefile@@@ -5,16 -5,16 +5,16 @@@ BIN=answeDIR_SRC=./cmd/answerDOCKER_CMD=docker- #GO_ENV=CGO_ENABLED=0+ GO_ENV=CGO_ENABLED=0 GO111MODULE=onRevision=$(shell git rev-parse --short HEAD)-GO_FLAGS=-ldflags="-X main.Version=$(VERSION) -X 'main.Revision=$(Revision)' -X 'main.Time=`date`' -extldflags -static"+GO_FLAGS=-ldflags="-X answercmd.Version=$(VERSION) -X 'answercmd.Revision=$(Revision)' -X 'answercmd.Time=`date`' -extldflags -static"GO=$(GO_ENV) $(shell which go)- build:- @$(GO_ENV) $(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)+ build: generate+ @$(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)# https://dev.to/thewraven/universal-macos-binaries-with-go-1-16-3mm3- universal:+ universal: generate@GOOS=darwin GOARCH=amd64 $(GO_ENV) $(GO) build $(GO_FLAGS) -o ${BIN}_amd64 $(DIR_SRC)@GOOS=darwin GOARCH=arm64 $(GO_ENV) $(GO) build $(GO_FLAGS) -o ${BIN}_arm64 $(DIR_SRC)@lipo -create -output ${BIN} ${BIN}_amd64 ${BIN}_arm64diff --cc go.modindex 8e98cca2,1db48ddb..16b4b896--- a/go.mod+++ b/go.mod@@@ -22,10 -23,9 +23,10 @@@ requiregithub.com/jinzhu/copier v0.3.5github.com/jinzhu/now v1.1.5github.com/lib/pq v1.10.7- github.com/mattn/go-sqlite3 v1.14.16+ github.com/microcosm-cc/bluemonday v1.0.21github.com/mojocn/base64Captcha v1.3.5github.com/ory/dockertest/v3 v3.9.1+ github.com/otiai10/copy v1.7.0github.com/robfig/cron/v3 v3.0.1github.com/segmentfault/pacman v1.0.2github.com/segmentfault/pacman/contrib/cache/memory v0.0.0-20221219081300-f734f4a16aa0@@@ -70,8 -72,8 +73,9 @@@ requiregithub.com/gogo/protobuf v1.3.2 // indirectgithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirectgithub.com/golang/snappy v0.0.4 // indirect+ github.com/google/go-cmp v0.5.9 // indirectgithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect+ github.com/gorilla/css v1.0.0 // indirectgithub.com/gosimple/unidecode v1.0.1 // indirectgithub.com/hashicorp/hcl v1.0.0 // indirectgithub.com/imdario/mergo v0.3.12 // indirectdiff --cc internal/migrations/migrations.goindex b67bd77d,7b53293e..67c42e96--- a/internal/migrations/migrations.go+++ b/internal/migrations/migrations.go@@@ -55,7 -55,7 +55,8 @@@ var migrations = []MigrationNewMigration("add activity timeline", addActivityTimeline, false),NewMigration("add user role", addRoleFeatures, false),NewMigration("add theme and private mode", addThemeAndPrivateMode, true),+ NewMigration("add new answer notification", addNewAnswerNotification, true),+ NewMigration("add plugin", addPlugin, false),}// GetCurrentDBVersion returns the current db versiondiff --cc internal/service/user_common/user.goindex 8d84f288,da66f4ce..724d0b94--- a/internal/service/user_common/user.go+++ b/internal/service/user_common/user.go@@@ -2,7 -2,8 +2,6 @@@ package usercommoimport ("context"- "regexp"- "encoding/hex"- "math/rand""strings""github.com/Chain-Zhang/pinyin"diff --cc internal/service/user_service.goindex c50778df,e7bd4374..48c6355f--- a/internal/service/user_service.go+++ b/internal/service/user_service.go@@@ -20,7 -20,7 +20,8 @@@ import"github.com/answerdev/answer/internal/service/service_config""github.com/answerdev/answer/internal/service/siteinfo_common"usercommon "github.com/answerdev/answer/internal/service/user_common"+ "github.com/answerdev/answer/internal/service/user_external_login"+ "github.com/answerdev/answer/pkg/checker""github.com/google/uuid""github.com/segmentfault/pacman/errors""github.com/segmentfault/pacman/log"