Commit graph

13775 commits

Author SHA1 Message Date
Anthony Wang c94a891aad
Process Like activities for starring repos 2022-07-27 14:18:30 -05:00
Lunny Xiao 6554d5197f
Fix possible panic when repository is empty (#20509)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-07-28 00:46:34 +08:00
Anthony Wang 8e5621c9c3
Merge remote-tracking branch 'upstream/main' 2022-07-27 10:29:54 -05:00
Anthony Wang d909c97da9
Move models/forgefed to modules/forgefed 2022-07-27 10:25:40 -05:00
Anthony Wang f0cded88bf
Start cleaning up fork.go 2022-07-27 10:24:04 -05:00
Kevin Samuel 3f87525249
patch (doc): add heading to ssh flow explanation (#20506) 2022-07-27 10:06:02 -04:00
Norwin 2ae1675092
Show hint to link package to repo when viewing empty repo package list (#20504)
* show hint to link package to repo

on empty repo package listing

* reword
2022-07-27 19:58:21 +08:00
wxiaoguang 158f2746b8
Fix ROOT_URL detection for URLs without trailing slash (#20502) 2022-07-27 17:19:10 +08:00
Gusted b899b2df5a
Add Tar ZSTD support (#20493)
- Add `.tar.zst` as supported output type.
- Resolves #14290
2022-07-27 07:16:28 +01:00
KN4CK3R a3d55ac523
Hide internal package versions (#20492)
* Hide internal versions from most searches.

* Added test.
2022-07-27 09:59:10 +08:00
Vladimir Yakovlev 5ed082b624
Fix org members bug (#20489)
* Fix bug in public only org members list

bug was introduced in d6779c7ad3

* Expanded org unit test
2022-07-26 11:13:24 -05:00
techknowlogick a701fd35cf
Add labels to two buttons that were missing them (#20419) 2022-07-26 17:43:13 +02:00
Norwin 305372efe3
fix enabling repo packages when projects are off (#20486) 2022-07-26 16:34:14 +02:00
aceArt-GmbH ed6cd3cbb7
Display project in issue list (#20434)
Co-authored-by: lukas <lukas.walter@aceart.de>
2022-07-26 15:42:23 +02:00
Vladimir Yakovlev 4fc53a3f30
Make code review ceckboxes clickable (#20481) 2022-07-26 15:11:39 +02:00
Anthony Wang 38a687c60e
Replace GetID() with GetLink()
See https://lists.sr.ht/~mariusor/activitypub-go/%3CNXRUnlucUSX8FL9I57dimPx4dpMKz01JDjKXqeHC8V9Z7pSTnjoZyV8ukearYJOq4IDogmpDLoEK-ScPDKs_egPnFGcAAO4XqHbj2rTUm-E%3D%40proton.me%3E for more details
2022-07-25 15:45:15 -05:00
Anthony Wang 30b431da49
Set ap.ItemTyperFunc to correctly unmarshal JSON 2022-07-25 15:43:20 -05:00
zeripath a2cfcdb91a
Slightly simplify LastCommitCache (#20444)
The LastCommitCache code is a little complex and there is unnecessary
duplication between the gogit and nogogit variants.

This PR adds the LastCommitCache as a field to the git.Repository and
pre-creates it in the ReferencesGit helpers etc. There has been some
simplification and unification of the variant code.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-07-25 16:39:42 +01:00
KN4CK3R 690272d2e2
Fix Ruby package parsing by removed unused email field (#20470) 2022-07-25 02:52:14 +02:00
Tyrone Yeh 7205f6b6a3 [skip ci] Updated translations via Crowdin 2022-07-25 00:21:14 +00:00
Tyrone Yeh 16edee85bd
Add repository condition for issue count (#20454)
* Add repository condition for issue count

* Update routers/web/user/home.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-07-24 19:53:40 +03:00
Gusted 9cf0352f14
Prepend commit message to template content (#20429)
- When a repository has a pull request template, it will always override
the current content. With this PR it will prepend content to the
template content when appropriate. This is similar how GitHub(and GitLab
I presume) does it and it saves developers time to not go open their
commit and copy paste their will written commit message.
2022-07-24 04:45:33 +01:00
Anthony Wang bffb682117
Fix a bunch of lint errors (still 10 more to fix 🙁) 2022-07-23 22:12:09 -05:00
Anthony Wang ab540d07be
Create new federated users in reqsignature.go 2022-07-23 21:27:20 -05:00
Anthony Wang 5da6b4fd84
Disable authorize_endpoint if federation is disabled 2022-07-23 20:52:12 -05:00
Anthony Wang 763f98b517
Create user at /authorize_interaction?uri= endpoint 2022-07-23 16:34:06 -05:00
wxiaoguang 91f1c285a1
Improve pprof doc (#20463) 2022-07-24 01:33:55 +08:00
wxiaoguang 3310dd1d19
Improve code diff highlight, fix incorrect rendered diff result (#19958)
Use Unicode placeholders to replace HTML tags and HTML entities first, then do diff, then recover the HTML tags and HTML entities. Now the code diff with highlight has stable behavior, and won't emit broken tags.
2022-07-23 19:28:02 +08:00
silverwind 14178c56bb
Add Cache-Control header to html and api responses, add no-transform (#20432)
`no-transform` allegedly disables CloudFlare auto-minify and we did not
set caching headers on html or api requests, which seems good to have
regardless.

Transformation is still allowed for asset requests.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2022-07-23 14:38:03 +08:00
Gergely Nagy d9608c4e76 [skip ci] Updated translations via Crowdin 2022-07-23 00:20:56 +00:00
Gergely Nagy 4d22bda4db
Allow non-semver packages in the Conan package registry (#20412)
A lot of existing packages do not conform to SemVer, yet, they should be allowed
in the Conan package registry as-is. To achieve this, remove the SemVer check
from `NewRecipeReference`, and replace it with a simple empty string check.

A unit test with a non-semver version is also included.

Fixes #20405.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2022-07-22 22:54:02 +01:00
Lucas Azevedo 599ae09a94
Use body text color in repository files table links (#20386)
Use body text color in for links in the repository files table
Issue/PR links (`.ref-issue`) will not be affected, as seen in other git services.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-07-22 18:49:24 +08:00
Andrew Imeson 1a70fc9bc6
Correct code block in installation docs for Snap (#20440)
Without this, it was rendering on the site like: "sh snap install gitea", instead of: "snap install gitea"

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-07-22 18:12:27 +08:00
silverwind 339007bff0
Downgrade golangci-lint to 1.47.0 (#20445)
This should fix some recently seen linter performance issues. There is some log spam, but it's definitely faster.

Ref: https://github.com/golangci/golangci-lint/issues/2997

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-07-22 10:22:44 +08:00
silverwind bc17cba835
Add eslint-plugin-sonarjs (#20431)
We had this plugin before but it was removed as it became outdated, now
it was updated again, so it's compatible again.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-07-22 09:10:22 +08:00
Anthony Wang 85abd9cfe0
Fix typo in follow.go 2022-07-21 20:07:17 -05:00
Dhruv Manilawala 3df33799c1
Fix: Actor is required to get user repositories (#20443)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2022-07-21 23:31:22 +02:00
6543 0a97480934
Add "X-Gitea-Object-Type" header for GET /raw/ & /media/ API (#20438) 2022-07-21 21:18:41 +02:00
KN4CK3R 7690de56f7
Simplify visibility checks (#20406)
Was looking into the visibility checks because I need them for something different and noticed the checks are more complicated than they have to be.

The rule is just: user/org is visible if
- The doer is a member of the org, regardless of the org visibility
- The doer is not restricted and the user/org is public or limited
2022-07-21 11:41:50 +01:00
John Olheiser e5ef7c2a91
Add Cloudflare auto-minify to FAQ (#20430) 2022-07-21 12:54:42 +08:00
silverwind 755410162f [skip ci] Updated translations via Crowdin 2022-07-21 00:20:58 +00:00
Anthony Wang 5196dcd9a5
Check if httpsig keyID matches actor and attributedTo 2022-07-20 18:57:19 -05:00
Anthony Wang c8a8e1ec91
Check err in Follow() to avoid crash and don't check FederatedUserNew error 2022-07-20 18:16:49 -05:00
Anthony Wang 6e100301cf
Merge remote-tracking branch 'upstream/main' 2022-07-20 14:45:19 -05:00
Anthony Wang 0925235a96
Fix federated following/unfollowing regression 2022-07-20 14:42:39 -05:00
silverwind c7fa5cc017
Update JS dependencies (#20423)
- Update all JS dependencies minus vue ones
- Remove workaround for case-insensitive attribute selector
- Add new linter rules and fix issues
- Tested SVG display and swagger
2022-07-20 23:48:06 +08:00
silverwind b8733e8f89
Update all tool dependencies to their latest versions (#20409) 2022-07-20 15:53:58 +08:00
6543 0d05bdbea8 [skip ci] Updated translations via Crowdin 2022-07-20 00:20:52 +00:00
6543 c0f5111fea
Dismiss prior pull reviews if done via web in review dismiss (#20197) 2022-07-19 15:20:28 +02:00
Lucas Azevedo e519249266
Fix modified due date message (#20388) 2022-07-19 14:30:55 +02:00