forgejo/modules
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
..
actions show workflow config error on file view also () 2023-04-22 22:16:54 -04:00
activitypub Add Chef package registry () 2023-02-06 09:49:21 +08:00
analyze Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
assetfs Use a general approach to access custom/static/builtin assets () 2023-04-12 18:16:45 +08:00
auth Use a general approach to access custom/static/builtin assets () 2023-04-12 18:16:45 +08:00
avatar Improve avatar uploading / resizing / compressing, remove Fomantic card module () 2023-05-13 20:59:11 +02:00
base Use a general Eval function for expressions in templates. () 2023-04-07 21:25:49 +08:00
cache Update redis library to support redis v7 () 2023-04-13 18:41:04 -04:00
charset Update go tool dependencies, restructure lint targets () 2023-04-22 14:53:00 -04:00
container Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
context Fix install page context, make the install page tests really test () 2023-05-23 09:29:15 +08:00
csv Refactor locale number () 2023-04-17 11:37:23 +08:00
doctor Rewrite logger system () 2023-05-21 22:35:11 +00:00
emoji Fix unstable emoji sort () 2023-01-05 13:58:51 +02:00
eventsource Move convert package to services () 2022-12-29 10:57:15 +08:00
generate Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
git Merge different languages for language stats () 2023-05-24 19:37:36 +00:00
gitgraph Add context cache as a request level cache () 2023-02-15 21:37:34 +08:00
graceful Fix regression: access log template, gitea manager cli command () 2023-05-22 09:38:38 +08:00
hcaptcha Consume hcaptcha and pwn deps () 2023-01-29 09:49:51 -06:00
highlight test_env: hardcode major go version in use () 2023-03-14 16:09:01 -04:00
hostmatcher Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
html Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
httpcache Use standard HTTP library to serve files () 2023-05-13 16:04:57 +02:00
httplib Use standard HTTP library to serve files () 2023-05-13 16:04:57 +02:00
indexer Allow skipping forks and mirrors from being indexed () 2023-05-25 16:13:47 +08:00
issue/template Allow issue templates to not render title () 2023-01-26 22:45:49 -06:00
json Update gitea-vet to check FSFE REUSE () 2022-12-02 22:14:57 +08:00
label Make label templates have consistent behavior and priority () 2023-04-10 16:44:02 +08:00
lfs Rewrite logger system () 2023-05-21 22:35:11 +00:00
log Merge different languages for language stats () 2023-05-24 19:37:36 +00:00
markup Fix video width overflow in markdown, and other changes to match img () 2023-05-21 21:19:37 +00:00
mcaptcha Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
metrics include build info in Prometheus metrics () 2023-02-08 19:54:01 +02:00
migration Scoped labels () 2023-02-18 21:17:39 +02:00
mirror Rewrite queue () 2023-05-08 19:49:59 +08:00
nosql Update redis library to support redis v7 () 2023-04-13 18:41:04 -04:00
notification Rewrite queue () 2023-05-08 19:49:59 +08:00
options Use a general approach to access custom/static/builtin assets () 2023-04-12 18:16:45 +08:00
packages Add CRAN package registry () 2023-05-22 10:57:49 +08:00
paginator Use more specific test methods () 2023-04-22 17:56:27 -04:00
pprof Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
private Add gitea manager reload-templates command () 2023-05-22 23:51:40 +08:00
process Improve trace logging for pulls and processes () 2023-02-03 18:11:48 -05:00
proxy Use proxy for pull mirror () 2023-02-11 08:39:50 +08:00
proxyprotocol Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
public Use standard HTTP library to serve files () 2023-05-13 16:04:57 +02:00
queue Do not call nil handler for a dummy queue () 2023-05-23 13:40:55 +02:00
recaptcha Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
references Use correct captured group range when parsing cross-reference () 2023-01-31 10:08:05 +01:00
regexplru Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
repository Improve avatar uploading / resizing / compressing, remove Fomantic card module () 2023-05-13 20:59:11 +02:00
secret Improve decryption failure message () 2023-05-07 19:29:43 +08:00
session Update redis library to support redis v7 () 2023-04-13 18:41:04 -04:00
setting Add the ability to pin Issues () 2023-05-25 15:17:19 +02:00
sitemap Fix sitemap () 2022-12-30 23:31:00 +08:00
ssh Rewrite logger system () 2023-05-21 22:35:11 +00:00
storage Implement actions artifacts () 2023-05-19 21:37:57 +08:00
structs Add the ability to pin Issues () 2023-05-25 15:17:19 +02:00
svg Use a general approach to access custom/static/builtin assets () 2023-04-12 18:16:45 +08:00
sync Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
system Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
templates Improve RunMode / dev mode () 2023-05-25 03:47:30 +00:00
test Rewrite logger system () 2023-05-21 22:35:11 +00:00
testlogger Rewrite logger system () 2023-05-21 22:35:11 +00:00
timeutil Fix incorrect webhook time and use relative-time to display it () 2023-05-03 19:53:43 -04:00
translation Decouple the different contexts from each other () 2023-05-21 09:50:53 +08:00
turnstile Add new captcha: cloudflare turnstile () 2023-02-05 15:29:03 +08:00
typesniffer Do not recognize text files as audio () 2023-03-07 22:40:41 -05:00
updatechecker Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
upload Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
uri Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
user Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
util Rewrite logger system () 2023-05-21 22:35:11 +00:00
validation Map OIDC groups to Orgs/Teams () 2023-02-08 14:44:42 +08:00
web Fix install page context, make the install page tests really test () 2023-05-23 09:29:15 +08:00
webhook New webhook trigger for receiving Pull Request review requests () 2023-05-24 22:06:27 -04:00