14689 Commits

Author SHA1 Message Date
Jason Song
24446cbebe
fix: add less for runners 2023-01-05 12:03:10 +08:00
Jason Song
b884772652
Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
2023-01-05 11:59:32 +08:00
Jason Song
2ae7f5434c
Merge branch 'main' into feature/bots 2023-01-05 10:55:47 +08:00
Jason Song
b4c692a2bb
chore: format code 2023-01-05 10:49:50 +08:00
AdamKorcz
906d8cc5dc
Rewrite fuzzers to native Go harnesses (#22313) 2023-01-05 10:33:00 +08:00
isla w
f41ad344cb
Update Emoji dataset to Unicode 14 (#22342)
Gitea emoji dataset was out of date because it gets manually built and
hasn't been rebuilt since it was added. This means Gitea doesn't
recognize some newer emoji or changes to existing ones.

After changing the max unicode version to 14 I just ran: `go run
build/generate-emoji.go`

This should address the initial issue seen in #22153 where Gitea doesn't
recognize a standard alias used elsewhere when importing content.

14 is the latest supported version from the upstream source as 15 is not
widely supported (in their opinion) yet
2023-01-04 11:52:48 -06:00
Jason Song
c3b37c4e44
Update services/actions/clear_tasks.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 20:39:18 +08:00
Jason Song
066097a0fb
Update services/forms/runner.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 20:38:24 +08:00
Jason Song
e35a046c7a
Update services/auth/basic.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 20:36:09 +08:00
Jason Song
0d2945fe4d
Merge branch 'main' into feature/bots 2023-01-04 18:57:57 +08:00
Jason Song
4b15a33257
chore: format code 2023-01-04 18:57:10 +08:00
Jason Song
0ecb0b46ad
Update modules/setting/actions.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:55:15 +08:00
Jason Song
925f7f18f5
chore: new way to trim entries 2023-01-04 18:52:22 +08:00
Jason Song
a222cb5c1e
docs: fix format 2023-01-04 18:52:22 +08:00
Jason Song
95167fd0a2
chore: rename to NumActionRuns 2023-01-04 18:52:22 +08:00
Jason Song
6148e4c940
fix: rename to GetPossibleUserByID 2023-01-04 18:52:22 +08:00
Jason Song
0887e98f2a
refactor: getPoster 2023-01-04 18:52:22 +08:00
Jason Song
911aea15a6
docs: add actions to cheat sheet 2023-01-04 18:52:22 +08:00
Jason Song
d5e6d959eb
refactor: rename Number to Index 2023-01-04 18:52:22 +08:00
Jason Song
2c686e8826
fix: add restraints for models 2023-01-04 18:52:22 +08:00
Jason Song
7f6a803d24
fix: omit total in FindTasks 2023-01-04 18:52:22 +08:00
Jason Song
5d938ebf4e
fix: use container.Set 2023-01-04 18:52:21 +08:00
Jason Song
5925722501
chore: move statusNames 2023-01-04 18:52:21 +08:00
Jason Song
5e58ede989
docs: comment for DEFAULT_ACTIONS_URL 2023-01-04 18:52:21 +08:00
Jason Song
d33e9fc11c
chore: sort svgs 2023-01-04 18:52:21 +08:00
Jason Song
cd2af5d4f2
fix: check if steps are empty 2023-01-04 18:52:21 +08:00
Jason Song
66785e2450
Update modules/actions/log.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:35:39 +08:00
Jason Song
1faa8856a4
Update models/user/user_system.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:30:02 +08:00
Jason Song
0f824b693c
Update models/user/user_system.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:28:31 +08:00
Lunny Xiao
fdbb0b4762
fix gravatar disable bug (#22336) 2023-01-04 16:19:56 +08:00
Jason Song
9b00ded1fb
Update models/actions/task_list.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 16:11:17 +08:00
Jason Song
2917057b00
Update models/actions/status.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 15:37:55 +08:00
Jason Song
9b0203bcc1
Update custom/conf/app.example.ini
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 14:50:02 +08:00
John Olheiser
32e863439c
fix: update settings table on install (#22326)
Related to #22325 

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-01-03 14:33:41 -06:00
Lunny Xiao
efa708501b
Use git command instead of exec.Cmd in blame (#22098)
extract from #18147

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-01-03 16:17:13 +08:00
Lunny Xiao
c59e1537a8
Display error log when a modified template has an error so that it could recovery when the error fixed (#22261)
A drawback is the previous generated template has been cached, so you
cannot get error in the UI but only from log

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: delvh <dev.lh@web.de>
2023-01-03 15:17:36 +08:00
Jason Song
53afbcecad
Merge branch 'main' into feature/bots 2023-01-03 09:43:23 +08:00
Kyle D
f0159c3e8a
Add deprecated warning for DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR (#22318) 2023-01-03 07:54:27 +08:00
Gusted
96797fed31
Unify hashing for avatar (#22289)
- Unify the hashing code for repository and user avatars into a
function.
- Use a sane hash function instead of MD5.
- Only require hashing once instead of twice(w.r.t. hashing for user
avatar).
- Improve the comment for the hashing code of why it works.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
2023-01-02 22:46:39 +01:00
John Olheiser
fcd6ceef2b
fix: code search title translation (#22285)
`code.title` isn't an existing translation.

`explore.code` is the translation used for the tab, which I think
matches closely enough for this instead of a brand new translation.

Open to feedback on whether a new translation would be preferred
instead.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-01-02 17:18:08 +08:00
James Liu
e61ce934bc
Update Gmail mailer configuration (#22291)
This PR updates the `[mailer]` configuration snippet for Gmail:

- The `HELO_HOSTNAME` isn't required.
- The `USER` must not include the @gmail domain.
- `HOST` needs to be supplied, and the SMTP port number needs to be
appended to the URL.

I also added a note about the requirement to use App passwords instead
of your Google account password directly.

Co-authored-by: delvh <dev.lh@web.de>
2023-01-02 10:52:36 +08:00
Yarden Shoham
b994b2ea9c
Fix due date rendering the wrong date in issue (#22302)
Previously, the last minute of the chosen date caused bad timezone
rendering.

For example, I chose January 4th, 2023.

### Before
```html
<time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time>
```

### After
```html
<time data-format="date" datetime="2023-01-04">January 4, 2023</time>
```

---

Closes #21999

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
2023-01-02 10:49:05 +08:00
Lunny Xiao
a1c30740bb
Fix get system setting bug when enabled redis cache (#22295)
Fix #22281

In #21621 , `Get[V]` and `Set[V]` has been introduced, so that cache
value will be `*Setting`. For memory cache it's OK. But for redis cache,
it can only store `string` for the current implementation. This PR
revert some of changes of that and just store or return a `string` for
system setting.
2023-01-02 00:06:52 +08:00
delvh
0f4e1b9ac6
Restructure webhook module (#22256)
Previously, there was an `import services/webhooks` inside
`modules/notification/webhook`.
This import was removed (after fighting against many import cycles).
Additionally, `modules/notification/webhook` was moved to
`modules/webhook`,
and a few structs/constants were extracted from `models/webhooks` to
`modules/webhook`.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-01-01 23:23:15 +08:00
Jason Song
f8e93ce423
Reminder for no more logs to console (#22282)
Even if the log mode is `file`, there are still few logs printed to the
console at the very beginning.

That's fine but confusing. Someone will think the console is the only
place to find logs, and get nothing helpful. See
https://github.com/go-gitea/gitea/issues/22274#issuecomment-1367917717.

There should be a reminder that there are no more logs to the console.

And to avoid log loss, we should add configured loggers first, then
remove console logger if there's no `console` in the mode.

Tests with `MODE = file`:

Before:
<img width="1792" alt="image"
src="https://user-images.githubusercontent.com/9418365/210079862-d591677f-347e-46ed-a548-bb2ddbb0885c.png">

After:
<img width="1792" alt="image"
src="https://user-images.githubusercontent.com/9418365/210080002-d66cc418-6888-4909-b370-d03f5986ef41.png">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2023-01-01 22:00:33 +08:00
Lunny Xiao
9c8fc7f677
Fix bug of DisableGravatar default value (#22296)
#18058 made a mistake. The disableGravatar's default value depends on
`OfflineMode`. If it's `true`, then `disableGravatar` is true, otherwise
it's `false`. But not opposite.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-01-01 20:19:23 +08:00
Lunny Xiao
2bbf9e7302
Upgrade go-chi to v5.0.8 (#22304) 2023-01-01 11:23:26 +01:00
KN4CK3R
b1a4eb40a1 [skip ci] Updated licenses and gitignores 2023-01-01 00:19:35 +00:00
KN4CK3R
3fef47b41c
Use ErrInvalidArgument in packages (#22268)
Related to
https://github.com/go-gitea/gitea/pull/22262#discussion_r1059010774

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-12-31 12:49:37 +01:00
6543
dce8887494
Changelog v1.18.0 (#22215) (#22269)
frontport #22215

& bump numbers in docs
2022-12-31 03:17:54 +01:00