oliverpool
8030614386
fix: release page for empty or non-existing target ( #24470 )
...
Fixes #24145
To solve the bug, I added a "computed" `TargetBehind` field to the
`Release` model, which indicates the target branch of a release.
This is particularly useful if the target branch was deleted in the
meantime (or is empty).
I also did a micro-optimization in `calReleaseNumCommitsBehind`. Instead
of checking that a branch exists and then call `GetBranchCommit`, I
immediately call `GetBranchCommit` and handle the `git.ErrNotExist`
error.
This optimization is covered by the added unit test.
2023-05-10 11:43:55 +08:00
..
2023-05-04 23:37:43 -04:00
2023-04-27 20:08:47 -04:00
2022-11-27 18:20:29 +00:00
2023-05-09 15:34:36 +08:00
2023-04-14 15:29:05 -04:00
2023-04-25 22:53:44 -04:00
2022-12-10 10:46:31 +08:00
2023-05-08 07:10:53 +00:00
2023-04-19 11:16:46 -04:00
2023-05-09 15:34:36 +08:00
2022-11-27 18:20:29 +00:00
2023-04-19 21:40:42 +08:00
2022-11-27 18:20:29 +00:00
2023-04-07 08:11:02 +08:00
2023-04-07 08:11:02 +08:00
2022-11-27 18:20:29 +00:00
2023-04-26 19:24:03 -05:00
2023-02-13 17:59:59 +00:00
2023-03-28 13:23:25 -04:00
2023-04-10 16:44:02 +08:00
2023-04-10 16:44:02 +08:00
2023-02-11 14:34:11 +08:00
2023-02-27 13:46:00 -05:00
2022-11-27 18:20:29 +00:00
2023-02-11 14:34:11 +08:00
2023-02-11 14:34:11 +08:00
2023-05-09 01:30:14 +02:00
2023-03-21 16:02:49 -04:00
2022-11-27 18:20:29 +00:00
2023-04-06 16:01:20 -04:00
2022-11-27 18:20:29 +00:00
2023-05-09 01:30:14 +02:00
2022-12-29 00:31:54 +01:00
2023-02-24 16:56:41 +00:00
2022-11-27 18:20:29 +00:00
2023-04-19 10:28:28 -04:00
2023-03-04 02:13:37 -05:00
2023-04-07 08:11:02 +08:00
2023-05-10 11:43:55 +08:00
2023-05-10 11:43:55 +08:00
2022-11-27 18:20:29 +00:00
2023-05-08 17:36:54 +08:00
2023-02-11 14:34:11 +08:00
2023-04-30 23:08:51 +08:00
2023-05-06 17:39:06 +08:00
2022-11-27 18:20:29 +00:00
2023-02-01 22:56:10 +00:00
2022-11-27 18:20:29 +00:00
2022-11-27 18:20:29 +00:00
2022-11-27 18:20:29 +00:00
2023-05-09 01:30:14 +02:00
2023-04-27 20:08:47 -04:00
2023-04-19 13:50:10 -04:00
2023-05-08 07:10:53 +00:00