Jason Song
60173297aa
chore: lint codes
2023-01-05 12:14:56 +08:00
Jason Song
24446cbebe
fix: add less for runners
2023-01-05 12:03:10 +08:00
Jason Song and delvh
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
Jason Song and delvh
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 and delvh
066097a0fb
Update services/forms/runner.go
...
Co-authored-by: delvh <dev.lh@web.de >
2023-01-04 20:38:24 +08:00
Jason Song and delvh
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 and delvh
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 and delvh
66785e2450
Update modules/actions/log.go
...
Co-authored-by: delvh <dev.lh@web.de >
2023-01-04 18:35:39 +08:00
Jason Song and delvh
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 and delvh
0f824b693c
Update models/user/user_system.go
...
Co-authored-by: delvh <dev.lh@web.de >
2023-01-04 18:28:31 +08:00
Jason Song and delvh
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 and delvh
2917057b00
Update models/actions/status.go
...
Co-authored-by: delvh <dev.lh@web.de >
2023-01-04 15:37:55 +08:00
Jason Song and delvh
9b0203bcc1
Update custom/conf/app.example.ini
...
Co-authored-by: delvh <dev.lh@web.de >
2023-01-04 14:50:02 +08:00
Jason Song
53afbcecad
Merge branch 'main' into feature/bots
2023-01-03 09:43:23 +08:00
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
Jason Song
e5deeda0aa
Support estimated count with multiple schemas ( #22276 )
...
The `EstimateCount` could be incorrect when the table lives in multiple
schemas. Related to #19775 .
2022-12-30 12:25:58 -06:00
d34f3a2213
Fix sitemap ( #22272 )
...
Fix #22270 .
Related to #18407 .
The old code treated both sitemap and sitemap index as the format like:
```xml
...
<url>
<loc>http://localhost:3000/explore/users/sitemap-1.xml </loc>
</url>
...
```
Actually, it's incorrect for sitemap index, it should be:
```xml
...
<sitemap>
<loc>http://localhost:3000/explore/users/sitemap-1.xml </loc>
</sitemap>
...
```
See https://www.sitemaps.org/protocol.html
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: delvh <dev.lh@web.de >
2022-12-30 23:31:00 +08:00
Jason Song
133437d4eb
Merge branch 'main' into feature/bots
2022-12-30 09:36:51 +08:00
Jason Song and delvh
47efba78ec
Support template for merge message description ( #22248 )
...
Fix #21435 .
Use the first line of the template as the git commit message title, and
the rest as the description.
## Snapshots
<img width="806" alt="image"
src="https://user-images.githubusercontent.com/9418365/209644083-5d85179c-cf58-404f-bc98-c662398a2411.png ">
<img width="860" alt="image"
src="https://user-images.githubusercontent.com/9418365/209644392-22573090-e2c1-458b-ba44-855b79735632.png ">
<img width="1154" alt="image"
src="https://user-images.githubusercontent.com/9418365/209644457-a1b2711a-6787-45b4-b52c-a88d7fc132d7.png ">
Co-authored-by: delvh <dev.lh@web.de >
2022-12-29 14:40:20 +02:00
Jason Song
3db95bfbad
fix: check oauth2 user id
2022-12-29 17:33:47 +08:00
Jason Song
a145ec2f2b
fix: do not init actions service when disabled
2022-12-29 16:19:25 +08:00
Jason Song
5ae2816ac4
chore: use webhook_model alias
2022-12-29 16:06:59 +08:00
Jason Song
ec020563ae
refactor: mv modules/notification/actions to services/actions
2022-12-29 16:05:00 +08:00
Jason Song
c84094011e
fix: import
2022-12-29 15:02:10 +08:00
Jason Song
f11a31e54e
Merge branch 'main' into feature/bots
2022-12-29 14:51:21 +08:00
Jason Song
8717c428ea
fix: CanRerun
2022-12-29 14:48:45 +08:00
Jason Song
6bbce09e7d
fix: remove old secrets tab
2022-12-29 14:32:45 +08:00
Jason Song
bc7b575ade
fix: update locale
2022-12-29 14:29:49 +08:00
Jason Song
d8f2343497
fix: auth return
2022-12-28 18:26:31 +08:00
Jason Song
c393a9ca93
Merge branch 'main' into feature/bots
2022-12-28 18:22:40 +08:00
Jason Song
1f48a9ad6f
fix: check if can_cancel and can_rerun
2022-12-28 18:18:11 +08:00
Jason Song
c355172878
fix: check reqRepoActionsWriter
2022-12-28 13:30:17 +08:00
Jason Song
d995fc6281
Merge branch 'main' into feature/bots
2022-12-28 13:29:46 +08:00
6cf09ccab4
Use complete SHA to create and query commit status ( #22244 )
...
Fix #13485 .
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-12-27 21:12:49 +08:00
Jason Song
9fd6b389a5
Merge branch 'main' into feature/bots
2022-12-27 14:23:35 +08:00
Jason Song
814b44aeaf
Fix typo of Asia/Shanghai ( #22242 )
...
As the title.
2022-12-26 16:50:58 +08:00
Jason Song
567996d06a
Merge branch 'main' into feature/bots
2022-12-26 10:30:37 +08:00
Jason Song
a67e14d0ed
chore: fmt code
2022-12-23 21:09:58 +08:00
Jason Song
3462760632
Merge branch 'main' into feature/bots
2022-12-23 20:56:52 +08:00
Jason Song and zeripath
71ca3067bc
Check primary keys for all tables and drop ForeignReference ( #21721 )
...
Some dbs require that all tables have primary keys, see
- #16802
- #21086
We can add a test to keep it from being broken again.
Edit:
~Added missing primary key for `ForeignReference`~ Dropped the
`ForeignReference` table to satisfy the check, so it closes #21086 .
More context can be found in comments.
Signed-off-by: Andrew Thornton <art27@cantab.net >
Co-authored-by: zeripath <art27@cantab.net >
2022-12-23 19:35:43 +08:00
Jason Song
3c68011903
fix: tidy tmpl
2022-12-23 17:07:11 +08:00
Jason Song
a6917db570
fix: do not init cron for actions when it's disabled
2022-12-23 17:07:11 +08:00
Jason Song
950a5ad29c
Merge branch 'main' into feature/bots
2022-12-23 16:25:49 +08:00
Jason Song
255d778737
fix: last eight token
2022-12-23 13:18:49 +08:00
Jason Song
4782792604
Merge branch 'main' into feature/bots
2022-12-23 10:34:48 +08:00
Jason Song
cce781a54c
chore: remove comments
2022-12-23 10:34:19 +08:00
Jason Song
9eafbada53
chore: reorganize locale of actions
2022-12-22 17:29:41 +08:00
Jason Song
c326ea5c20
chore: update copyright
2022-12-22 16:56:10 +08:00
Jason Song
abf96d1f4d
chore: remove secrets ini
2022-12-22 15:38:38 +08:00
Jason Song
fa701d0725
chore: remove Hijack
2022-12-22 15:33:22 +08:00
Jason Song
aee01d139c
chore: remove FindObjects
2022-12-22 15:16:10 +08:00
Jason Song
f8d8209edb
Merge remote-tracking branch 'origin/feature/bots' into feature/bots
2022-12-22 15:08:18 +08:00
Jason Song
34be6b5092
fix: remove old secret model
2022-12-22 15:07:04 +08:00
Jason Song
058675f7e5
fix: use new secrets
2022-12-22 14:44:22 +08:00
Jason Song
d183b32aa8
Merge branch 'main' into feature/bots
2022-12-22 12:00:41 +08:00
Jason Song
88e813d1ca
Revert "Add simple master key provider for secret encryption"
...
This reverts commit d4e84c0433 .
2022-12-22 11:45:06 +08:00
Jason Song
b54f148164
Revert "Add AES GCM encryption provider"
...
This reverts commit 4af45f7bc9 .
2022-12-22 11:37:11 +08:00
659055138b
Secrets storage with SecretKey encrypted ( #22142 )
...
Fork of #14483 , but [gave up
MasterKey](https://github.com/go-gitea/gitea/pull/14483#issuecomment-1350728557 ),
and fixed some problems.
Close #12065 .
Needed by #13539 .
Featrues:
- Secrets for repo and org, not user yet.
- Use SecretKey to encrypte/encrypt secrets.
- Trim spaces of secret value.
- Add a new locale ini block, to make it easy to support secrets for
user.
Snapshots:
Repo level secrets:

Rrg level secrets

Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2022-12-20 17:07:13 +08:00
Jason Song
ab4350b413
Merge branch 'main' into feature/bots
2022-12-20 16:53:28 +08:00
Jason Song
118a454f93
fix: trasfer log when stop zombie tasks
2022-12-19 19:00:39 +08:00
Jason Song
9c3395c556
chore: removed to shared
2022-12-19 18:44:14 +08:00
Jason Song
825b838b81
fix: margin
2022-12-19 18:38:13 +08:00
Jason Song
b03f6e5b65
fix: remove meanless code
2022-12-19 18:32:38 +08:00
Jason Song and a1012112796
215d80f6b2
Update models/actions/run.go
...
Co-authored-by: a1012112796 <1012112796@qq.com >
2022-12-19 18:30:16 +08:00
Jason Song
ab98c3ff43
Merge branch 'main' into feature/bots
2022-12-19 18:26:28 +08:00
Jason Song
6c622137f1
Merge branch 'main' into feature/bots
2022-12-13 09:50:18 +08:00
Jason Song
4f7597b74d
chore: mod tidy
2022-12-12 19:01:40 +08:00
Jason Song
ef20a02af0
fix: use web.Bind
2022-12-12 18:55:23 +08:00
Jason Song
d73db88e77
fix: use right class
2022-12-12 18:52:52 +08:00
Jason Song
e69e829102
fix: remove ActionTask.GetRepo
2022-12-12 18:52:52 +08:00
Jason Song
1c9288f3dd
fix: list runners
2022-12-12 18:52:52 +08:00
Jason Song
cc19ab5ced
Merge branch 'main' into feature/bots
2022-12-12 17:29:51 +08:00
Jason Song
d4c47acff4
fix: remove useless grpc routers
2022-12-12 17:29:34 +08:00
Jason Song
cca23dd4af
feat: rename bot user to gitea-actions
2022-12-12 17:29:34 +08:00
Jason Song
5cfc48c288
fix: template format
2022-12-12 17:29:34 +08:00
Jason Song
d41fb40fb5
docs: comment for V1AlphaRoute
2022-12-12 17:29:34 +08:00
Jason Song
59c3707da2
Merge branch 'main' into feature/bots
2022-12-12 13:33:24 +08:00
Jason Song
a6e39ca180
Merge branch 'main' into feature/bots
2022-12-12 13:12:58 +08:00
Jason Song
4da0a65511
chore: migrations v236
2022-12-12 13:12:00 +08:00
Jason Song
dbdfd2647c
chore: rename to workflows.go
2022-12-12 13:09:17 +08:00
Jason Song
86d6598a54
fix: use LONGBLOB
2022-12-12 13:08:49 +08:00
Jason Song
7a34d37aad
fix: use ctx
2022-12-12 11:05:22 +08:00