Skip to content

Commit 2c7e9bd

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-10327-commit-graph-options
2 parents 9b720f1 + 1989fe2 commit 2c7e9bd

File tree

95 files changed

+1463
-1019
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1463
-1019
lines changed

.eslintrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ rules:
9999
import/no-amd: [0]
100100
import/no-anonymous-default-export: [0]
101101
import/no-commonjs: [0]
102-
import/no-cycle: [0]
102+
import/no-cycle: [2, {ignoreExternal: true}]
103103
import/no-default-export: [0]
104104
import/no-deprecated: [0]
105105
import/no-dynamic-require: [0]
@@ -117,7 +117,7 @@ rules:
117117
import/no-self-import: [2]
118118
import/no-unassigned-import: [0]
119119
import/no-unresolved: [2, {commonjs: true}]
120-
import/no-unused-modules: [0]
120+
import/no-unused-modules: [2, {unusedExports: true}]
121121
import/no-useless-path-segments: [2, {commonjs: true}]
122122
import/no-webpack-loader-syntax: [2]
123123
import/order: [0]
@@ -211,7 +211,7 @@ rules:
211211
no-mixed-operators: [0]
212212
no-mixed-spaces-and-tabs: [2]
213213
no-multi-assign: [0]
214-
no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true, VariableDeclarator: true}}]
214+
no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true}}]
215215
no-multi-str: [2]
216216
no-negated-condition: [0]
217217
no-nested-ternary: [0]
@@ -336,6 +336,7 @@ rules:
336336
unicorn/explicit-length-check: [0]
337337
unicorn/filename-case: [0]
338338
unicorn/import-index: [0]
339+
unicorn/import-style: [0]
339340
unicorn/new-for-builtins: [2]
340341
unicorn/no-abusive-eslint-disable: [0]
341342
unicorn/no-array-instanceof: [0]
@@ -356,11 +357,13 @@ rules:
356357
unicorn/no-useless-undefined: [0]
357358
unicorn/no-zero-fractions: [2]
358359
unicorn/number-literal-case: [0]
360+
unicorn/numeric-separators-style: [0]
359361
unicorn/prefer-add-event-listener: [2]
360362
unicorn/prefer-array-find: [2]
361363
unicorn/prefer-dataset: [2]
362364
unicorn/prefer-event-key: [2]
363365
unicorn/prefer-includes: [2]
366+
unicorn/prefer-math-trunc: [2]
364367
unicorn/prefer-modern-dom-apis: [0]
365368
unicorn/prefer-negative-index: [2]
366369
unicorn/prefer-node-append: [0]
@@ -374,6 +377,7 @@ rules:
374377
unicorn/prefer-spread: [0]
375378
unicorn/prefer-starts-ends-with: [2]
376379
unicorn/prefer-string-slice: [0]
380+
unicorn/prefer-ternary: [0]
377381
unicorn/prefer-text-content: [2]
378382
unicorn/prefer-trim-start-end: [2]
379383
unicorn/prefer-type-error: [0]

.github/issue_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
- Gitea version (or commit ref):
1313
- Git version:
1414
- Operating system:
15+
<!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package -->
16+
<!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. --->
17+
<!-- If you are using a package or systemd tell us what distribution you are using -->
1518
- Database (use `[x]`):
1619
- [ ] PostgreSQL
1720
- [ ] MySQL
@@ -21,6 +24,9 @@
2124
- [ ] Yes (provide example URL)
2225
- [ ] No
2326
- Log gist:
27+
<!-- It really is important to provide pertinent logs -->
28+
<!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems -->
29+
<!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini -->
2430

2531
## Description
2632

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ RUN apk --no-cache add \
3737
openssh \
3838
s6 \
3939
sqlite \
40+
socat \
4041
su-exec \
4142
gnupg
4243

custom/conf/app.example.ini

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -915,12 +915,25 @@ PASSWD =
915915
RECEIVERS =
916916

917917
[cron]
918-
; Enable running cron tasks periodically.
919-
ENABLED = true
918+
; Enable running all cron tasks periodically with default settings.
919+
ENABLED = false
920920
; Run cron tasks when Gitea starts.
921921
RUN_AT_START = false
922922

923-
; Basic cron tasks
923+
; Basic cron tasks - enabled by default
924+
925+
; Clean up old repository archives
926+
[cron.archive_cleanup]
927+
; Whether to enable the job
928+
ENABLED = true
929+
; Whether to always run at least once at start up time (if ENABLED)
930+
RUN_AT_START = true
931+
; Notice if not success
932+
NO_SUCCESS_NOTICE = false
933+
; Time interval for job to run
934+
SCHEDULE = @every 24h
935+
; Archives created more than OLDER_THAN ago are subject to deletion
936+
OLDER_THAN = 24h
924937

925938
; Update mirrors
926939
[cron.update_mirrors]
@@ -956,18 +969,15 @@ RUN_AT_START = true
956969
NO_SUCCESS_NOTICE = false
957970
SCHEDULE = @every 24h
958971

959-
; Clean up old repository archives
960-
[cron.archive_cleanup]
961-
; Whether to enable the job
972+
[cron.update_migration_poster_id]
973+
; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts.
962974
ENABLED = true
963-
; Whether to always run at least once at start up time (if ENABLED)
975+
; Update migrated repositories' issues and comments' posterid when starting server (default true)
964976
RUN_AT_START = true
965977
; Notice if not success
966978
NO_SUCCESS_NOTICE = false
967-
; Time interval for job to run
979+
; Interval as a duration between each synchronization. (default every 24h)
968980
SCHEDULE = @every 24h
969-
; Archives created more than OLDER_THAN ago are subject to deletion
970-
OLDER_THAN = 24h
971981

972982
; Synchronize external user data (only LDAP user synchronization is supported)
973983
[cron.sync_external_users]
@@ -994,18 +1004,7 @@ SCHEDULE = @every 24h
9941004
; deleted branches than OLDER_THAN ago are subject to deletion
9951005
OLDER_THAN = 24h
9961006

997-
[cron.update_migration_poster_id]
998-
; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts.
999-
ENABLED = true
1000-
; Update migrated repositories' issues and comments' posterid when starting server (default true)
1001-
RUN_AT_START = true
1002-
; Notice if not success
1003-
NO_SUCCESS_NOTICE = false
1004-
; Interval as a duration between each synchronization. (default every 24h)
1005-
SCHEDULE = @every 24h
1006-
1007-
; Extened cron task
1008-
; they was not enabled as default
1007+
; Extended cron task - not enabled by default
10091008

10101009
; Delete all unactivated accounts
10111010
[cron.delete_inactive_accounts]

docs/content/doc/advanced/api-usage.en-us.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ the `token=` string in a GET request.
7070

7171
## API Guide:
7272

73-
API Reference guide is auto-generated by swagger and available on:
73+
API Reference guide is auto-generated by swagger and available on:
7474
`https://gitea.your.host/api/swagger`
75-
or on
75+
or on
7676
[gitea demo instance](https://try.gitea.io/api/swagger)
7777

7878

@@ -99,3 +99,8 @@ $ curl -H "X-Gitea-OTP: 123456" --request GET --url https://yourusername:yourpas
9999
## Sudo
100100

101101
The API allows admin users to sudo API requests as another user. Simply add either a `sudo=` parameter or `Sudo:` request header with the username of the user to sudo.
102+
103+
## SDKs
104+
105+
* [Official go-sdk](https://gitea.com/gitea/go-sdk)
106+
* [more](https://gitea.com/gitea/awesome-gitea#user-content-sdk)

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,42 +668,84 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false`
668668

669669
## Cron (`cron`)
670670

671-
- `ENABLED`: **true**: Run cron tasks periodically.
671+
- `ENABLED`: **false**: Enable to run all cron tasks periodically with default settings.
672672
- `RUN_AT_START`: **false**: Run cron tasks at application start-up.
673673
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
674674

675-
### Cron - Cleanup old repository archives (`cron.archive_cleanup`)
675+
### Basic cron tasks - enabled by default
676+
677+
#### Cron - Cleanup old repository archives (`cron.archive_cleanup`)
676678

677679
- `ENABLED`: **true**: Enable service.
678680
- `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED).
679681
- `SCHEDULE`: **@every 24h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
680682
- `OLDER_THAN`: **24h**: Archives created more than `OLDER_THAN` ago are subject to deletion, e.g. `12h`.
681683

682-
### Cron - Update Mirrors (`cron.update_mirrors`)
684+
#### Cron - Update Mirrors (`cron.update_mirrors`)
683685

684686
- `SCHEDULE`: **@every 10m**: Cron syntax for scheduling update mirrors, e.g. `@every 3h`.
685687
- `NO_SUCCESS_NOTICE`: **true**: The cron task for update mirrors success report is not very useful - as it just means that the mirrors have been queued. Therefore this is turned off by default.
686688

687-
### Cron - Repository Health Check (`cron.repo_health_check`)
689+
#### Cron - Repository Health Check (`cron.repo_health_check`)
688690

689691
- `SCHEDULE`: **@every 24h**: Cron syntax for scheduling repository health check.
690692
- `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout.
691693
- `ARGS`: **\<empty\>**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck
692694

693-
### Cron - Repository Statistics Check (`cron.check_repo_stats`)
695+
#### Cron - Repository Statistics Check (`cron.check_repo_stats`)
694696

695697
- `RUN_AT_START`: **true**: Run repository statistics check at start time.
696698
- `SCHEDULE`: **@every 24h**: Cron syntax for scheduling repository statistics check.
697699

698-
### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`)
700+
#### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`)
699701

700702
- `SCHEDULE`: **@every 24h** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts.
701703

702-
### Cron - Sync External Users (`cron.sync_external_users`)
704+
#### Cron - Sync External Users (`cron.sync_external_users`)
703705

704706
- `SCHEDULE`: **@every 24h** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts.
705707
- `UPDATE_EXISTING`: **true**: Create new users, update existing user data and disable users that are not in external source anymore (default) or only create new users if UPDATE_EXISTING is set to false.
706708

709+
### Extended cron tasks (not enabled by default)
710+
711+
#### Cron - Garbage collect all repositories ('cron.git_gc_repos')
712+
- `ENABLED`: **false**: Enable service.
713+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
714+
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
715+
- `TIMEOUT`: **60s**: Time duration syntax for garbage collection execution timeout.
716+
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
717+
- `ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS
718+
719+
#### Cron - Update the '.ssh/authorized_keys' file with Gitea SSH keys ('cron.resync_all_sshkeys')
720+
- `ENABLED`: **false**: Enable service.
721+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
722+
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
723+
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
724+
725+
#### Cron - Resynchronize pre-receive, update and post-receive hooks of all repositories ('cron.resync_all_hooks')
726+
- `ENABLED`: **false**: Enable service.
727+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
728+
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
729+
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
730+
731+
#### Cron - Reinitialize all missing Git repositories for which records exist ('cron.reinit_missing_repos')
732+
- `ENABLED`: **false**: Enable service.
733+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
734+
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
735+
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
736+
737+
#### Cron - Delete all repositories missing their Git files ('cron.delete_missing_repos')
738+
- `ENABLED`: **false**: Enable service.
739+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
740+
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
741+
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
742+
743+
#### Cron - Delete generated repository avatars ('cron.delete_generated_repository_avatars')
744+
- `ENABLED`: **false**: Enable service.
745+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
746+
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
747+
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
748+
707749
## Git (`git`)
708750

709751
- `PATH`: **""**: The path of git executable. If empty, Gitea searches through the PATH environment.

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ You can configure some of Gitea's settings via environment variables:
262262
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. If the install page is enabled, SSH Domain Server takes DOMAIN value in the form (which overwrite this setting on save).
263263
* `SSH_PORT`: **22**: SSH port displayed in clone URL.
264264
* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server.
265-
* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.
265+
* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. If you want to disable SSH feature, you should set SSH port to `0` when installing Gitea.
266266
* `HTTP_PORT`: **3000**: HTTP listen port.
267267
* `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker).
268268
* `LFS_START_SERVER`: **false**: Enables git-lfs support.

models/migrations/migrations.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ var migrations = []Migration{
246246
NewMigration("add timestamps to Star, Label, Follow, Watch and Collaboration", addTimeStamps),
247247
// v155 -> v156
248248
NewMigration("add changed_protected_files column for pull_request table", addChangedProtectedFilesPullRequestColumn),
249+
// v156 -> v157
250+
NewMigration("fix publisher ID for tag releases", fixPublisherIDforTagReleases),
249251
}
250252

251253
// GetCurrentDBVersion returns the current db version

0 commit comments

Comments
 (0)