Commit Graph
100 Commits
Author SHA1 Message Date
Jason Song 6f6bfc5d51 feat: more translations 2023-01-06 15:55:47 +08:00
Jason Song e61d655929 feat: show no runners available 2023-01-06 15:33:02 +08:00
Jason Song 7a4d4f0edf chore: use new dropdown icon 2023-01-06 15:15:30 +08:00
Jason Song 243b769754 feat: locale status for runner 2023-01-06 15:07:44 +08:00
Jason Song 91dfef0425 feat: LocaleString for status 2023-01-06 15:02:03 +08:00
Jason Song a6f8f10670 fix: add docs link for runner 2023-01-06 14:41:07 +08:00
Jason Song 4bc6d73b1d fix: split and trim labels 2023-01-06 14:28:16 +08:00
Jason Song 05c08ec246 chore: format runner id 2023-01-06 14:12:14 +08:00
Jason Song 326ae5d442 fix: keep original commit message 2023-01-06 13:51:40 +08:00
Jason Song ff75cbd81d chore: fix log 2023-01-06 13:47:45 +08:00
Jason Song 9bd3ea49f4 fix: map to DEFAULT_ACTIONS_URL 2023-01-06 10:50:01 +08:00
Jason Song d7aa501ba1 fix: NumClosedActionRuns 2023-01-06 09:57:36 +08:00
Jason Song a4df058d75 Merge branch 'main' into feature/bots 2023-01-06 09:37:44 +08:00
Jason Song 49e307b968 fix: show never when LastOnline is 0 2023-01-05 18:24:16 +08:00
Jason Song 2ac8410bab fix: translation keys 2023-01-05 18:24:16 +08:00
Jason SongandChristopherHX 63e82382fc Update models/actions/task_step.go
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2023-01-05 18:05:07 +08:00
Jason SongandChristopherHX 22496aa57e Update models/actions/task.go
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2023-01-05 18:04:23 +08:00
Jason Song 730af9be50 fix: add missing translations 2023-01-05 17:59:21 +08:00
Jason Song 92b117f930 test: fix import cycle in dbfs test 2023-01-05 17:23:13 +08:00
Jason Song b1013a4770 refactor: shard runner templates 2023-01-05 16:40:20 +08:00
Jason Song a4b2cf2426 feat: calculate duration 2023-01-05 16:19:08 +08:00
Jason Song c510fdbcf1 chore: simplify IsActions 2023-01-05 16:03:21 +08:00
Jason Song eee662442a fix: simplify deleting 2023-01-05 15:40:19 +08:00
Jason Song c3d7f15513 chore: remove CreateRunnerForm 2023-01-05 15:20:02 +08:00
Jason Song 08383bdcbc chore: simplify truncateContent 2023-01-05 15:16:14 +08:00
Jason Song 4bb8604180 chore: add comments 2023-01-05 14:58:49 +08:00
Jason Song e8dbe827cb fix: use %w 2023-01-05 14:45:40 +08:00
Jason Song bb3eb5efdc fix: use ctx 2023-01-05 14:44:09 +08:00
Jason Song ede9a5f2fa chore: add comments 2023-01-05 14:43:07 +08:00
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 Songanddelvh 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 Songanddelvh c3b37c4e44 Update services/actions/clear_tasks.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 20:39:18 +08:00
Jason Songanddelvh 066097a0fb Update services/forms/runner.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 20:38:24 +08:00
Jason Songanddelvh 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 Songanddelvh 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 Songanddelvh 66785e2450 Update modules/actions/log.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:35:39 +08:00
Jason Songanddelvh 1faa8856a4 Update models/user/user_system.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:30:02 +08:00
Jason Songanddelvh 0f824b693c Update models/user/user_system.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 18:28:31 +08:00
Jason Songanddelvh 9b00ded1fb Update models/actions/task_list.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 16:11:17 +08:00
Jason Songanddelvh 2917057b00 Update models/actions/status.go
Co-authored-by: delvh <dev.lh@web.de>
2023-01-04 15:37:55 +08:00
Jason Songanddelvh 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 Songanddelvh 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 Songandzeripath 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