Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.4.2 #1197

Merged
merged 46 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5af6935
perf: optimize tag has new tag check
sosyz Oct 26, 2024
2e6eafb
fix: add status filter when update tag rel
sosyz Oct 27, 2024
7c677f3
fix: wrong status when enable tag rel
sosyz Oct 27, 2024
84e08c5
fix: resolve 404 error on Tags static page
sy-records Oct 28, 2024
bf4de72
feat: update template files
shuashuai Oct 29, 2024
2bff049
fix: display timezone on Dashboard when set to UTC
sy-records Oct 28, 2024
795f56f
Merge branch 'main' into dev
shuashuai Nov 6, 2024
8283c01
fix: update useRenderHtmlPlugin to target specific HTML element
robinv8 Nov 13, 2024
5a2b2a5
fix: Tag summary display is not as expected on tag detail page
sy-records Nov 11, 2024
d40820f
refactor(gomock): update gomock dependence and docs
LinkinStars Nov 14, 2024
c8336de
feat(file): update the max image size
LinkinStars Nov 14, 2024
8005ec8
fix(review): reject the review when delete question
LinkinStars Nov 14, 2024
d23ac6e
fix: Markdown parsing without incrementing ordered list numbers
sy-records Nov 14, 2024
dfa22f9
feat: actions add toast tips
shuashuai Nov 14, 2024
f165d3d
perf: add note to email body
sosyz Nov 14, 2024
6049b5e
feat: Add key metrics to the dashboard
sy-records Nov 14, 2024
c6b45f7
Merge branch 'dev' into feat/1.4.2/tag
LinkinStars Nov 15, 2024
c39fd89
fix(search): fix the wrong offset when searching
LinkinStars Nov 18, 2024
5cbd190
feat(question): add linked count feature to question
LinkinStars Nov 19, 2024
5866197
feat(question): sort questions by update time for frequent tab
LinkinStars Nov 19, 2024
932a336
feat(upload): add support for file attachments and enhance image upload
LinkinStars Nov 21, 2024
ab36105
feat: The editor has added support for uploading attachments, and the…
shuashuai Nov 22, 2024
3a795b2
Merge branch 'feat/1.4.2/ui' into test
shuashuai Nov 22, 2024
ab30cdf
fix: Add file upload error handling
shuashuai Nov 22, 2024
85f792f
Merge branch 'feat/1.4.2/ui' into test
shuashuai Nov 22, 2024
8616862
feat(upload): add support for file attachments and enhance image upload
LinkinStars Nov 21, 2024
d99bfcc
Merge branch 'feat/1.4.2/file' into test
LinkinStars Nov 22, 2024
0569ea9
fix: length error
shuashuai Nov 22, 2024
7fefc67
Merge branch 'feat/1.4.2/ui' into test
shuashuai Nov 22, 2024
a26aae6
fix: Optimize the mobile style of QueryGroup component
shuashuai Nov 25, 2024
3fd3e6b
fix: Optimize the mobile style of QueryGroup component dropdown btns
shuashuai Nov 25, 2024
86a3da6
fix: The pre tag sets the maximum height #1168
shuashuai Nov 25, 2024
57b0d0e
test: fix TestGetAvatarURL
Bot-wxt1221 Nov 25, 2024
e97796e
feat(storage): add upload file condition to plugin upload
LinkinStars Nov 26, 2024
ce0ec4b
feat(user): add top questions and answers to user homepage
LinkinStars Nov 29, 2024
a63078e
Merge branch 'feat/1.4.2/seo' into test
LinkinStars Nov 29, 2024
e7672c1
fix: administrator add user failure
sy-records Nov 29, 2024
2770ffa
fix: Attachment accept type adjustment, editor plug-in insertion posi…
shuashuai Dec 3, 2024
7147b4a
refactor: remove unused heading options and clean up icon styles
robinv8 Dec 3, 2024
3e92945
refactor(i18n): update formatting instructions to mention post IDs
robinv8 Dec 3, 2024
c532114
feat(file): implement file download functionality
LinkinStars Dec 3, 2024
0d41ee9
refactor(uploader): improve file upload and download functionality su…
LinkinStars Dec 4, 2024
21655f6
feat(upload): add support for attachment uploads and improve image ha…
LinkinStars Dec 4, 2024
2cc7b33
feat: Add delete external user login info by user ID
sy-records Dec 6, 2024
1aed48a
Merge branch 'dev' into test
LinkinStars Dec 9, 2024
b523599
docs(Makefile): upgrade version to 1.4.2
LinkinStars Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build clean ui

VERSION=1.4.1
VERSION=1.4.2
BIN=answer
DIR_SRC=./cmd/answer
DOCKER_CMD=docker
Expand All @@ -21,15 +21,20 @@ universal: generate
@rm -f ${BIN}_amd64 ${BIN}_arm64

generate:
@$(GO) get github.com/google/wire/cmd/wire@v0.5.0
@$(GO) get github.com/golang/mock/mockgen@v1.6.0
@$(GO) get github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) get github.com/google/wire/cmd/wire@v0.5.0
@$(GO) get go.uber.org/mock/mockgen@latest
@$(GO) install github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) install github.com/google/wire/cmd/wire@v0.5.0
@$(GO) install github.com/golang/mock/mockgen@v1.6.0
@$(GO) install go.uber.org/mock/mockgen@latest
@$(GO) generate ./...
@$(GO) mod tidy

check:
@mockgen -version
@swag -v
@wire flags

test:
@$(GO) test ./internal/repo/repo_test

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To learn more about the project, visit [answer.apache.org](https://answer.apache
### Running with docker

```bash
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:1.4.1
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:1.4.2
```

For more information, see [Installation](https://answer.apache.org/docs/installation).
Expand All @@ -40,20 +40,20 @@ You can also check out the [plugins here](https://answer.apache.org/plugins).

### Prerequisites

- Golang >= 1.18
- Golang >= 1.22
- Node.js >= 16.17
- pnpm >= 8
- mockgen >= 1.6.0
- wire >= 0.5.0
- [mockgen](https://github.com/uber-go/mock?tab=readme-ov-file#installation) >= 1.6.0
- [wire](https://github.com/google/wire/) >= 0.5.0

### Build

```bash
# install wire and mockgen for building
# Install wire and mockgen for building. You can run `make check` to check if they are installed.
$ make generate
# install frontend dependencies and build
# Install frontend dependencies and build
$ make ui
# install backend dependencies and build
# Install backend dependencies and build
$ make build
```

Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
// Time is the build time of the project
Time = ""
// GoVersion is the go version of the project
GoVersion = "1.19"
GoVersion = "1.22"
// log level
logLevel = os.Getenv("LOG_LEVEL")
// log path
Expand Down
4 changes: 2 additions & 2 deletions cmd/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 48 additions & 3 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3145,6 +3145,7 @@ const docTemplate = `{
{
"enum": [
"post",
"post_attachment",
"avatar",
"branding"
],
Expand Down Expand Up @@ -4483,7 +4484,8 @@ const docTemplate = `{
"hot",
"score",
"unanswered",
"recommend"
"recommend",
"frequent"
],
"type": "string",
"name": "order",
Expand Down Expand Up @@ -7829,7 +7831,7 @@ const docTemplate = `{
"display_name": {
"type": "string",
"maxLength": 30,
"minLength": 4
"minLength": 2
},
"email": {
"type": "string",
Expand Down Expand Up @@ -9666,7 +9668,8 @@ const docTemplate = `{
"hot",
"score",
"unanswered",
"recommend"
"recommend",
"frequent"
]
},
"page": {
Expand Down Expand Up @@ -10641,6 +10644,27 @@ const docTemplate = `{
"schema.SiteWriteReq": {
"type": "object",
"properties": {
"authorized_attachment_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"authorized_image_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"max_attachment_size": {
"type": "integer"
},
"max_image_megapixel": {
"type": "integer"
},
"max_image_size": {
"type": "integer"
},
"recommend_tags": {
"type": "array",
"items": {
Expand All @@ -10664,6 +10688,27 @@ const docTemplate = `{
"schema.SiteWriteResp": {
"type": "object",
"properties": {
"authorized_attachment_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"authorized_image_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"max_attachment_size": {
"type": "integer"
},
"max_image_megapixel": {
"type": "integer"
},
"max_image_size": {
"type": "integer"
},
"recommend_tags": {
"type": "array",
"items": {
Expand Down
51 changes: 48 additions & 3 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3118,6 +3118,7 @@
{
"enum": [
"post",
"post_attachment",
"avatar",
"branding"
],
Expand Down Expand Up @@ -4456,7 +4457,8 @@
"hot",
"score",
"unanswered",
"recommend"
"recommend",
"frequent"
],
"type": "string",
"name": "order",
Expand Down Expand Up @@ -7802,7 +7804,7 @@
"display_name": {
"type": "string",
"maxLength": 30,
"minLength": 4
"minLength": 2
},
"email": {
"type": "string",
Expand Down Expand Up @@ -9639,7 +9641,8 @@
"hot",
"score",
"unanswered",
"recommend"
"recommend",
"frequent"
]
},
"page": {
Expand Down Expand Up @@ -10614,6 +10617,27 @@
"schema.SiteWriteReq": {
"type": "object",
"properties": {
"authorized_attachment_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"authorized_image_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"max_attachment_size": {
"type": "integer"
},
"max_image_megapixel": {
"type": "integer"
},
"max_image_size": {
"type": "integer"
},
"recommend_tags": {
"type": "array",
"items": {
Expand All @@ -10637,6 +10661,27 @@
"schema.SiteWriteResp": {
"type": "object",
"properties": {
"authorized_attachment_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"authorized_image_extensions": {
"type": "array",
"items": {
"type": "string"
}
},
"max_attachment_size": {
"type": "integer"
},
"max_image_megapixel": {
"type": "integer"
},
"max_image_size": {
"type": "integer"
},
"recommend_tags": {
"type": "array",
"items": {
Expand Down
33 changes: 32 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ definitions:
properties:
display_name:
maxLength: 30
minLength: 4
minLength: 2
type: string
email:
maxLength: 500
Expand Down Expand Up @@ -1556,6 +1556,7 @@ definitions:
- score
- unanswered
- recommend
- frequent
type: string
page:
minimum: 1
Expand Down Expand Up @@ -2221,6 +2222,20 @@ definitions:
type: object
schema.SiteWriteReq:
properties:
authorized_attachment_extensions:
items:
type: string
type: array
authorized_image_extensions:
items:
type: string
type: array
max_attachment_size:
type: integer
max_image_megapixel:
type: integer
max_image_size:
type: integer
recommend_tags:
items:
$ref: '#/definitions/schema.SiteWriteTag'
Expand All @@ -2236,6 +2251,20 @@ definitions:
type: object
schema.SiteWriteResp:
properties:
authorized_attachment_extensions:
items:
type: string
type: array
authorized_image_extensions:
items:
type: string
type: array
max_attachment_size:
type: integer
max_image_megapixel:
type: integer
max_image_size:
type: integer
recommend_tags:
items:
$ref: '#/definitions/schema.SiteWriteTag'
Expand Down Expand Up @@ -4767,6 +4796,7 @@ paths:
- description: identify the source of the file upload
enum:
- post
- post_attachment
- avatar
- branding
in: formData
Expand Down Expand Up @@ -5601,6 +5631,7 @@ paths:
- score
- unanswered
- recommend
- frequent
in: query
name: order
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ require (
github.com/go-playground/validator/v10 v10.22.1
github.com/go-sql-driver/mysql v1.8.1
github.com/goccy/go-json v0.10.3
github.com/golang/mock v1.6.0
github.com/google/uuid v1.6.0
github.com/google/wire v0.5.0
github.com/grokify/html-strip-tags-go v0.1.0
Expand All @@ -57,6 +56,7 @@ require (
github.com/swaggo/swag v1.16.3
github.com/tidwall/gjson v1.17.3
github.com/yuin/goldmark v1.7.4
go.uber.org/mock v0.5.0
golang.org/x/crypto v0.27.0
golang.org/x/image v0.20.0
golang.org/x/net v0.29.0
Expand Down
Loading
Loading