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
Jason Song
dbef504584
fix: truncated title
2022-12-12 10:54:28 +08:00
Jason Song and a1012112796
22203eeb38
Update modules/notification/actions/helper.go
...
Co-authored-by: a1012112796 <1012112796@qq.com >
2022-12-12 10:48:32 +08:00
Jason Song
dfa1b6168d
Merge branch 'main' into feature/bots
2022-12-12 10:46:13 +08:00
Jason Song
2779d47ad3
Optimize html templates ( #22080 )
...
Replace `active{{end}} item` with `active{{end}} item`.
2022-12-09 21:34:51 +08:00
Jason Song
d378a78c79
Merge branch 'main' into feature/bots
2022-12-09 16:20:28 +08:00
Jason Song
901914e34b
feat: move summary to header
2022-12-09 16:14:45 +08:00
Jason Song
9b6b848311
fix: layout
2022-12-09 15:47:58 +08:00
Jason Song
10ebbeca2f
chore: rename to action
2022-12-09 15:29:26 +08:00
Jason Song
8fb1e53ca2
Rename actions to operations on UI ( #22067 )
...
Use "operations" to indicate "some something can be done", to prevent
users from confusing it with CICD.
Releated to: #13539 .
Snapshots:
<img width="389" alt="image"
src="https://user-images.githubusercontent.com/9418365/206409797-a99bac25-2d38-4066-b9ab-27a4f6fe67e7.png ">
<img width="398" alt="image"
src="https://user-images.githubusercontent.com/9418365/206410099-bbd258a9-54d9-4664-8d95-31d29cb35209.png ">
<img width="442" alt="image"
src="https://user-images.githubusercontent.com/9418365/206410218-009a3103-a9b9-4d0c-86b6-540dda5bce89.png ">
I'm not a native English speaker, but I think "operations" may be good
enough, and Gitea already uses this word:
<img width="1440" alt="image"
src="https://user-images.githubusercontent.com/9418365/206410671-4a718b14-0603-40cb-bdcb-f6f84d1f5e24.png ">
2022-12-08 21:14:09 +08:00
Jason Song
266a122ba2
Merge branch 'main' into feature/bots
2022-12-08 18:11:18 +08:00
Jason Song
49143952fa
fix: remove timestamp
2022-12-08 18:08:17 +08:00
Jason Song
3dc7ffc925
fix: add settings.actions_desc
2022-12-08 17:41:25 +08:00
Jason Song
0a85537c79
Support disabling database auto migration ( #22053 )
...
Gitea will migrate the database model version automatically, but it
should be able to be disabled and keep Gitea shutdown if the version is
not matched.
2022-12-07 09:58:31 -06:00
Jason Song
202bbe27c0
docs: update comparison
2022-12-07 17:35:05 +08:00
Jason Song
8377fc00d6
Merge branch 'main' into feature/bots
2022-12-07 09:45:18 +08:00
Jason Song
26b87561b6
fix: deal with empty repo
2022-12-06 18:32:26 +08:00
Jason Song
eaf266a635
chore: fix lint
2022-12-06 16:58:49 +08:00
Jason Song
ab0a60e56a
Merge branch 'main' into feature/bots
2022-12-06 16:39:06 +08:00
Jason Song
55df4fd3e9
chore: rename BOTS
2022-12-06 16:24:27 +08:00
Jason Song
f6f29d4cbf
chore: upgrade act to v0.234.0
2022-12-06 16:23:18 +08:00
Jason Song
4142218088
chore: rename dbfs prefix
2022-12-06 16:13:29 +08:00
Jason Song
74874d065f
Fix issue/PR numbers ( #22037 )
...
When deleting a closed issue, we should update both `NumIssues`and
`NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`)
will be wrong. It's the same for pull requests.
Releated to #21557 .
Alse fixed two harmless problems:
- The SQL to check issue/PR total numbers is wrong, that means it will
update the numbers even if they are correct.
- Replace legacy `num_issues = num_issues + 1` operations with
`UpdateRepoIssueNumbers`.
2022-12-06 15:53:09 +08:00
Jason Song
da51e18cc0
chore: make go-licenses
2022-12-06 15:27:48 +08:00
Jason Song
223782ca4c
refactor: rename to actions
2022-12-06 15:16:25 +08:00
Jason Song
56368f3963
refactor: use ctx in models
2022-12-06 14:15:48 +08:00
Jason Song
c07d0c1768
refactor: rename model
2022-12-06 13:48:09 +08:00
Jason Song
f2c7bbb0bc
refactor: rename to actions-proto-go
2022-12-06 13:44:23 +08:00