forgejo/models/migrations/v1_20
JakobDev aaa1094663
Add the ability to pin Issues ()
This adds the ability to pin important Issues and Pull Requests. You can
also move pinned Issues around to change their Position. Resolves .

## Screenshots

![grafik](https://user-images.githubusercontent.com/15185051/235123207-0aa39869-bb48-45c3-abe2-ba1e836046ec.png)

![grafik](https://user-images.githubusercontent.com/15185051/235123297-152a16ea-a857-451d-9a42-61f2cd54dd75.png)

![grafik](https://user-images.githubusercontent.com/15185051/235640782-cbfe25ec-6254-479a-a3de-133e585d7a2d.png)

The Design was mostly copied from the Projects Board.

## Implementation
This uses a new `pin_order` Column in the `issue` table. If the value is
set to 0, the Issue is not pinned. If it's set to a bigger value, the
value is the Position. 1 means it's the first pinned Issue, 2 means it's
the second one etc. This is dived into Issues and Pull requests for each
Repo.

## TODO
- [x] You can currently pin as many Issues as you want. Maybe we should
add a Limit, which is configurable. GitHub uses 3, but I prefer 6, as
this is better for bigger Projects, but I'm open for suggestions.
- [x] Pin and Unpin events need to be added to the Issue history.
- [x] Tests
- [x] Migration

**The feature itself is currently fully working, so tester who may find
weird edge cases are very welcome!**

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-25 15:17:19 +02:00
..
v244.go Require approval to run actions for fork pull request () 2023-02-24 15:58:49 +08:00
v245.go Add user webhooks () 2023-03-10 08:28:32 -06:00
v246.go Fix missed migration in () 2023-03-15 10:33:10 +01:00
v247.go Do not store user projects as organization projects () 2023-03-17 21:07:23 +08:00
v248.go Display the version of runner in the runner list () 2023-03-19 22:19:40 -04:00
v249.go Improve indices for action table () 2023-03-24 23:44:33 +08:00
v250.go Display image size for multiarch container images () 2023-04-02 17:53:37 +08:00
v251.go Fix owner team access mode value in team_unit table () 2023-04-03 10:36:35 -04:00
v252.go Fix admin team access mode value in team_unit table () 2023-04-13 21:06:10 +02:00
v253.go Add migration to fix external unit access mode of owner/admin team () 2023-04-15 09:52:44 -04:00
v254.go Support upload outputs and use needs context on Actions () 2023-04-22 16:12:41 -04:00
v255.go Display when a repo was archived () 2023-04-26 10:46:26 -04:00
v256.go Add Debian package registry () 2023-05-02 12:31:35 -04:00
v257.go Implement actions artifacts () 2023-05-19 21:37:57 +08:00
v258.go Add the ability to pin Issues () 2023-05-25 15:17:19 +02:00