Fix documents for development and bug report (#18249)
This commit is contained in:
parent
17b2079f3e
commit
eaf09a5368
4 changed files with 27 additions and 26 deletions
15
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
15
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
|
@ -11,7 +11,8 @@ body:
|
||||||
1. Please speak English, this is the language all maintainers can speak and write.
|
1. Please speak English, this is the language all maintainers can speak and write.
|
||||||
2. Please ask questions or configuration/deploy problems on our Discord
|
2. Please ask questions or configuration/deploy problems on our Discord
|
||||||
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
|
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
|
||||||
3. Please take a moment to check that your issue doesn't already exist.
|
3. Make sure you are using the latest release and
|
||||||
|
take a moment to check that your issue hasn't been reported before.
|
||||||
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
|
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
|
||||||
5. Please give all relevant information below for bug reports, because
|
5. Please give all relevant information below for bug reports, because
|
||||||
incomplete details will be handled as an invalid report.
|
incomplete details will be handled as an invalid report.
|
||||||
|
@ -19,7 +20,7 @@ body:
|
||||||
id: gitea-ver
|
id: gitea-ver
|
||||||
attributes:
|
attributes:
|
||||||
label: Gitea Version
|
label: Gitea Version
|
||||||
description: Gitea version (or commit reference) your instance is running
|
description: Gitea version (or commit reference) of your instance
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
|
@ -37,8 +38,8 @@ body:
|
||||||
attributes:
|
attributes:
|
||||||
label: How are you running Gitea?
|
label: How are you running Gitea?
|
||||||
description: |
|
description: |
|
||||||
Please include information on whether you built gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package
|
Please include information on whether you built Gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package
|
||||||
Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc.
|
Please also tell us how you are running Gitea, e.g. if it is being run from docker, a command-line, systemd etc.
|
||||||
If you are using a package or systemd tell us what distribution you are using
|
If you are using a package or systemd tell us what distribution you are using
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
@ -67,7 +68,7 @@ body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
It really is important to provide pertinent logs
|
It's really important to provide pertinent logs
|
||||||
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
|
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
|
||||||
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
|
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
|
||||||
- type: input
|
- type: input
|
||||||
|
@ -81,9 +82,9 @@ body:
|
||||||
label: Description
|
label: Description
|
||||||
description: |
|
description: |
|
||||||
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
|
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
|
||||||
If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services.
|
If you are using a proxy or a CDN (e.g. Cloudflare) in front of Gitea, please disable the proxy/CDN fully and access Gitea directly to confirm the issue still persists without those services.
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: screenshots
|
id: screenshots
|
||||||
attributes:
|
attributes:
|
||||||
label: Screenshots
|
label: Screenshots
|
||||||
description: If this issue involves the Web Interface, please provide a screenshot or multiple screenshots
|
description: If this issue involves the Web Interface, please provide one or more screenshots
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -231,7 +231,7 @@ clean:
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
@echo "Running go fmt..."
|
@echo "Running gitea-fmt(with gofmt)..."
|
||||||
@$(GO) run build/code-batch-process.go gitea-fmt -s -w '{file-list}'
|
@$(GO) run build/code-batch-process.go gitea-fmt -s -w '{file-list}'
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
|
@ -280,7 +280,7 @@ errcheck:
|
||||||
|
|
||||||
.PHONY: fmt-check
|
.PHONY: fmt-check
|
||||||
fmt-check:
|
fmt-check:
|
||||||
# get all go files and run go fmt on them
|
# get all go files and run gitea-fmt (with gofmt) on them
|
||||||
@diff=$$($(GO) run build/code-batch-process.go gitea-fmt -s -d '{file-list}'); \
|
@diff=$$($(GO) run build/code-batch-process.go gitea-fmt -s -d '{file-list}'); \
|
||||||
if [ -n "$$diff" ]; then \
|
if [ -n "$$diff" ]; then \
|
||||||
echo "Please run 'make fmt' and commit the result:"; \
|
echo "Please run 'make fmt' and commit the result:"; \
|
||||||
|
|
|
@ -21,9 +21,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Windows has a limitation for command line arguments, the size can not exceed 32KB.
|
// Windows has a limitation for command line arguments, the size can not exceed 32KB.
|
||||||
// So we have to feed the files to some tools (like gofmt/misspell`) batch by batch
|
// So we have to feed the files to some tools (like gofmt/misspell) batch by batch
|
||||||
|
|
||||||
// We also introduce a `gitea-fmt` command, it does better import formatting than gofmt/goimports
|
// We also introduce a `gitea-fmt` command, it does better import formatting than gofmt/goimports. `gitea-fmt` calls `gofmt` internally.
|
||||||
|
|
||||||
var optionLogVerbose bool
|
var optionLogVerbose bool
|
||||||
|
|
||||||
|
|
|
@ -29,17 +29,16 @@ required to build the JavaScript and CSS files. The minimum supported Node.js
|
||||||
version is {{< min-node-version >}} and the latest LTS version is recommended.
|
version is {{< min-node-version >}} and the latest LTS version is recommended.
|
||||||
|
|
||||||
**Note**: When executing make tasks that require external tools, like
|
**Note**: When executing make tasks that require external tools, like
|
||||||
`make misspell-check`, Gitea will automatically download and build these as
|
`make watch-backend`, Gitea will automatically download and build these as
|
||||||
necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
|
necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
|
||||||
on the executable path. If you don't add the go bin directory to the
|
on the executable path. If you don't add the go bin directory to the
|
||||||
executable path you will have to manage this yourself.
|
executable path you will have to manage this yourself.
|
||||||
|
|
||||||
**Note 2**: Go version {{< min-go-version >}} or higher is required; however, it is important
|
**Note 2**: Go version {{< min-go-version >}} or higher is required.
|
||||||
to note that our continuous integration will check that the formatting of the
|
Gitea uses `gofmt` to format source code. However, the results of
|
||||||
source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
|
`gofmt` can differ by the version of `go`. Therefore it is
|
||||||
the results of `gofmt` can differ by the version of `go`. It is therefore
|
|
||||||
recommended to install the version of Go that our continuous integration is
|
recommended to install the version of Go that our continuous integration is
|
||||||
running. As of last update, it should be Go version {{< go-version >}}.
|
running. As of last update, the Go version should be {{< go-version >}}.
|
||||||
|
|
||||||
## Installing Make
|
## Installing Make
|
||||||
|
|
||||||
|
@ -149,25 +148,26 @@ On macOS, watching all backend source files may hit the default open files limit
|
||||||
|
|
||||||
### Formatting, code analysis and spell check
|
### Formatting, code analysis and spell check
|
||||||
|
|
||||||
Our continuous integration will reject PRs that are not properly formatted, fail
|
Our continuous integration will reject PRs that fail the code linters (including format check, code analysis and spell check).
|
||||||
code analysis or spell check.
|
|
||||||
|
|
||||||
You should format your code with `go fmt` using:
|
You should format your code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make fmt
|
make fmt
|
||||||
```
|
```
|
||||||
|
|
||||||
and can test whether your changes would match the results with:
|
and lint the source code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make fmt-check # which runs make fmt internally
|
# lint both frontend and backend code
|
||||||
|
make lint
|
||||||
|
# lint only backend code
|
||||||
|
make lint-backend
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: The results of `gofmt` are dependent on the version of `go` present.
|
**Note**: The results of `gofmt` are dependent on the version of `go` present.
|
||||||
You should run the same version of go that is on the continuous integration
|
You should run the same version of go that is on the continuous integration
|
||||||
server as mentioned above. `make fmt-check` will only check if your `go` would
|
server as mentioned above.
|
||||||
format differently - this may be different from the CI server version.
|
|
||||||
|
|
||||||
### Working on JS and CSS
|
### Working on JS and CSS
|
||||||
|
|
||||||
|
|
Reference in a new issue