Lunny Xiao
f17020c49c
Merge branch 'main' into lunny/issue_dev
2024-10-22 00:06:03 -07:00
Zettat123
9206fbb55f
Add DISABLE_ORGANIZATIONS_PAGE
and DISABLE_CODE_PAGE
settings for explore pages and fix an issue related to user search ( #32288 )
...
These settings can allow users to only display the repositories explore page.
Thanks to yp05327 and wxiaoguang !
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-22 13:09:19 +08:00
wxiaoguang
5242e520c4
Make owner/repo/pulls
handlers use "PR reader" permission ( #32254 )
...
Fix #32253 (partially)
2024-10-15 06:47:07 +00:00
Zettat123
0fe5e2b08c
Allow maintainers to view and edit files of private repos when "Allow maintainers to edit" is enabled ( #32215 )
...
Fix #31539
2024-10-11 19:08:19 +00:00
Lunny Xiao
c2217670dd
Move admin routers from /admin to /-/admin ( #32189 )
...
Resolve #32181
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-10 04:56:49 +00:00
wxiaoguang
dd83cfcacc
Refactor CSRF token ( #32216 )
2024-10-10 03:48:21 +00:00
Lunny Xiao
66681c33ff
merge if conditions
2024-10-09 18:42:55 -07:00
Lunny Xiao
30d4010983
Some improvements
2024-10-09 18:34:08 -07:00
Lunny Xiao
f11fc417c6
Update routers/web/repo/issue_dev.go
...
Co-authored-by: yp05327 <576951401@qq.com>
2024-10-10 09:25:06 +08:00
Lunny Xiao
86e4f29d20
Update routers/web/repo/issue_dev.go
...
Co-authored-by: yp05327 <576951401@qq.com>
2024-10-10 09:25:00 +08:00
Zettat123
4eacc61f64
Fix incorrect "Target branch does not exist" in PR title ( #32222 )
2024-10-10 08:25:46 +08:00
Zisu Zhang
66923e02d2
Enhance USER_DISABLED_FEATURES to allow disabling change username or full name ( #31959 )
...
Fix #31958
Enhanced `USER_DISABLED_FEATURES`(also `EXTERNAL_USER_DISABLE_FEATURES`)
option in `[admin]` section.
Added following values:
- `change_username`: Disable change username
- `change_full_name`: Disable change full name
---
Progress:
- [x] Update code
- [x] Update translations
2024-10-05 20:41:38 +00:00
Lunny Xiao
a989404e23
Fix javascript error when an anonymous user visiting migration page ( #32144 )
...
This PR fixes javascript errors when an anonymous user visits the
migration page.
It also makes task view checking more restrictive.
The router moved from `/user/task/{id}/status` to
`/username/reponame/-/migrate/status` because it's a migrate status.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-02 04:37:16 +00:00
Lunny Xiao
cbeed1168f
Merge branch 'main' into lunny/issue_dev
2024-10-01 18:12:49 -07:00
Lunny Xiao
3a4a1bffbe
Make oauth2 code clear. Move oauth2 provider code to their own packages/files ( #32148 )
...
Fix #30266
Replace #31533
2024-10-02 08:03:19 +08:00
yp05327
70b7df0e5e
Support repo license ( #24872 )
...
Close #278
Close #24076
## Solutions:
- Use
[google/licenseclassifier](https://github.com/google/licenseclassifier/ )
Test result between
[google/licensecheck](https://github.com/google/licensecheck ) and
[go-license-detector](https://github.com/go-enry/go-license-detector ):
https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167
Test result between
[google/licensecheck](https://github.com/google/licensecheck ) and
[google/licenseclassifier](https://github.com/google/licenseclassifier/ ):
https://github.com/go-gitea/gitea/pull/24872#issuecomment-1576092178
- Generate License Convert Name List to avoid import license templates
with same contents
Gitea automatically get latest license data from[
spdx/license-list-data](https://github.com/spdx/license-list-data ).
But unfortunately, some license templates have same contents. #20915
[click here to see the
list](https://github.com/go-gitea/gitea/pull/24872#issuecomment-1584141684 )
So we will generate a list of these license templates with same contents
and create a new file to save the result when using `make
generate-license`. (Need to decide the save path)
- Save License info into a new table `repo_license`
Can easily support searching repo by license in the future.
## Screen shot
Single License:
![image](https://github.com/go-gitea/gitea/assets/18380374/41260bd7-0b4c-4038-8592-508706cffa9f )
Multiple Licenses:
![image](https://github.com/go-gitea/gitea/assets/18380374/34ce2f73-7e18-446b-9b96-ecc4fb61bd70 )
Triggers:
- [x] Push commit to default branch
- [x] Create repo
- [x] Mirror repo
- [x] When Default Branch is changed, licenses should be updated
Todo:
- [x] Save Licenses info in to DB when there's a change to license file
in the commit
- [x] DB Migration
- [x] A nominal test?
- [x] Select which library to
use(https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167 )
- [x] API Support
- [x] Add repo license table
- ~Select license in settings if there are several licenses(Not
recommended)~
- License board(later, not in this PR)
![image](https://github.com/go-gitea/gitea/assets/18380374/2c3c3bf8-bcc2-4c6d-8ce0-81d1a9733878 )
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2024-10-01 15:25:08 -04:00
Lunny Xiao
cb37b5925c
Merge branch 'main' into lunny/issue_dev
2024-09-29 20:00:45 -07:00
Lunny Xiao
abe592c6e2
Fix repository list permissions
2024-09-29 20:00:35 -07:00
charles
3269b04d61
Notify the user when the file path contains leading or trailing spaces and fix the error message for invalid file names. ( #31507 )
...
close #31478
2024-09-24 19:06:52 +00:00
Lunny Xiao
e2f365b55c
Display head branch more comfortable on pull request view ( #32000 )
...
This PR do some minor improvements for head branch display on pull
request view UI.
- [x] Remove the link if the head branch has been deleted with a
tooltip, so that users will not result in a 404 page
- [x] Display a label if this pull request is an agit based one.
![图片](https://github.com/user-attachments/assets/872f26b6-f1cf-4427-9e41-e3a5b176dfa4 )
2024-09-24 04:14:57 +00:00
Lunny Xiao
6eb5950835
Allow set branch protection in an empty repository ( #32095 )
2024-09-24 02:06:28 +00:00
cloudchamb3r
e1f0598c8f
Fix Bug in Issue/pulls list ( #32081 )
...
fix #32080
## After
### for opened issues
<img width="1199" alt="Screenshot 2024-09-19 at 6 29 31 PM"
src="https://github.com/user-attachments/assets/86cf48ad-5e4b-4dcb-8abe-4d7fd74e0aec ">
### for closed issues
<img width="1208" alt="Screenshot 2024-09-19 at 6 29 37 PM"
src="https://github.com/user-attachments/assets/a16bc545-bfcf-49a4-be52-3e7334910482 ">
### for all issues
<img width="1340" alt="Screenshot 2024-09-20 at 12 07 12 PM"
src="https://github.com/user-attachments/assets/b2309c8f-e59d-44e9-ae3b-bf54e1196169 ">
2024-09-24 01:09:57 +08:00
Lunny Xiao
9e0db1b646
Fix rename branch permission bug ( #32066 )
...
The previous implementation requires admin permission to rename branches
which should be write permission.
Fix #31993
2024-09-22 18:08:27 +00:00
Lunny Xiao
a802508f88
Fix wrong last modify time ( #32102 )
2024-09-21 21:56:25 +00:00
wxiaoguang
1fede04b83
Refactor CSRF protector ( #32057 )
...
Remove unused CSRF options, decouple "new csrf protector" and "prepare"
logic, do not redirect to home page if CSRF validation falis (it
shouldn't happen in daily usage, if it happens, redirecting to home
doesn't help either but just makes the problem more complex for "fetch")
2024-09-18 15:17:25 +08:00
Bruno Sofiato
7dde3e6489
Included tag search capabilities ( #32045 )
...
Resolves #31998
The first screenshot shows the tag page without any filter being
applied:
![image](https://github.com/user-attachments/assets/eac0e51c-9e48-42b2-bb1c-a25896ca40cb )
The second one, shows the page when the given filter returns no tag:
![image](https://github.com/user-attachments/assets/98df191e-1a7b-4947-b0ef-4987a0293c3e )
The last one shows a single tag being filtered:
![image](https://github.com/user-attachments/assets/79c7e05e-8c86-4f06-b17e-15818b7b9291 )
Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
2024-09-18 02:33:11 +08:00
Lunny Xiao
3febcaa53b
Use a common message template instead of a special one ( #31878 )
2024-09-14 17:17:49 +00:00
Lauris BH
4ab6fc62d2
Add option to filter board cards by labels and assignees ( #31999 )
...
Works in both organization and repository project boards
Fixes #21846
Replaces #21963
Replaces #27117
![image](https://github.com/user-attachments/assets/1837ace8-3de2-444f-a153-e166bd0da2c0 )
**Note** that implementation was made intentionally to work same as in
issue list so that URL can be bookmarked for quick access with
predefined filters in URL
2024-09-12 03:53:40 +00:00
Daniel
64298dcb9e
Failed authentications are logged to level Warning ( #32016 )
...
PR for issue #31968
Replaces PR #31983 to comply with gitea's error definition
Failed authentications are now logged to level `Warning` instead of
`Info`.
2024-09-11 17:58:45 +00:00
Zettat123
def1c9670b
Support migration from AWS CodeCommit ( #31981 )
...
This PR adds support for migrating repos from [AWS
CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html ).
The access key ID and secret access key are required to get repository
information and pull requests. And [HTTPS Git
credentials](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html )
are required to clone the repository.
<img
src="https://github.com/user-attachments/assets/82ecb2d0-8d43-42b0-b5af-f5347a13b9d0 "
width="680" />
The AWS CodeCommit icon is from [AWS Architecture
Icons](https://aws.amazon.com/architecture/icons/ ).
<img
src="https://github.com/user-attachments/assets/3c44d21f-d753-40f5-9eae-5d3589e0d50d "
width="320" />
2024-09-11 07:49:42 +08:00
techknowlogick
d9a7748cdc
bump to go 1.23 ( #31855 )
2024-09-10 02:23:07 +00:00
techknowlogick
f183783baa
Save initial signup information for users to aid in spam prevention ( #31852 )
...
This will allow instance admins to view signup pattern patterns for
public instances. It is modelled after discourse, mastodon, and
MediaWiki's approaches.
Note: This has privacy implications, but as the above-stated open-source
projects take this approach, especially MediaWiki, which I have no doubt
looked into this thoroughly, it is likely okay for us, too. However, I
would be appreciative of any feedback on how this could be improved.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-09-09 17:05:16 -04:00
Lunny Xiao
837526aaf0
Merge branch 'main' into lunny/issue_dev
2024-09-08 22:20:00 -07:00
william-allspice
e9c64f41a6
Distinguish official vs non-official reviews, add tool tips, and upgr… ( #31924 )
...
This Pull Request is a follow up to
https://github.com/go-gitea/gitea/pull/31886 :
1. Adds a UI indicator between official (green) and unofficial (grey)
approved pull requests on the Pull Request page (as suggested by
@kdumontnu )
2. Adds tooltips adding clarity to the type and status of a review on
the Pull Request page (as suggested by @kdumontnu)
3. Updates text adding more clarity to required approvals (as suggested
by @kdumontnu)
4. Updates text on the branch settings page explaining what branch
approval limitations (as suggested by @yp05327)
Official approval:
<img width="376" alt="Screenshot 2024-08-26 at 1 03 52 PM"
src="https://github.com/user-attachments/assets/500f083d-bfc0-45c5-82b7-b98e20495696 ">
Unofficial approval:
<img width="442" alt="Screenshot 2024-08-26 at 12 53 15 PM"
src="https://github.com/user-attachments/assets/e8c565ff-5886-4ce1-8b79-a0fa26c282f7 ">
Rejected approval:
<img width="452" alt="Screenshot 2024-08-26 at 12 53 06 PM"
src="https://github.com/user-attachments/assets/aebc0e2f-7052-4dea-8098-7caa0db86617 ">
Stale approval:
<img width="546" alt="Screenshot 2024-08-26 at 1 07 59 PM"
src="https://github.com/user-attachments/assets/da599ff3-e35c-4fa3-8141-ed80b738dd77 ">
Requested review tooltip:
<img width="434" alt="Screenshot 2024-08-26 at 12 53 22 PM"
src="https://github.com/user-attachments/assets/460d163e-8724-43b6-8760-34b285da8fe2 ">
Updated text for approvals:
<img width="991" alt="Screenshot 2024-08-26 at 12 54 00 PM"
src="https://github.com/user-attachments/assets/ab3ff012-9742-4c1b-933d-21addcb89f2c ">
Updated text for allowlisted/whitelisted approvals:
<img width="990" alt="Screenshot 2024-08-26 at 1 01 40 PM"
src="https://github.com/user-attachments/assets/1a5bae61-d9e0-4d96-b86f-92610b0940d1 ">
Protected branch settings text:
<img width="1022" alt="Screenshot 2024-08-26 at 1 01 14 PM"
src="https://github.com/user-attachments/assets/892ce208-e1c2-41f7-8fec-46d5a0e7e776 ">
Comments list:
<img width="1048" alt="Screenshot 2024-08-28 at 9 25 31 AM"
src="https://github.com/user-attachments/assets/9c5c00c5-06cf-43b3-b413-4f7f673609b2 ">
---------
Co-authored-by: Kyle D. <kdumontnu@gmail.com>
2024-09-06 06:40:02 +00:00
6543
19af534462
For consistency make repo search sort options case sensitive ( #31951 )
2024-09-05 18:53:30 +08:00
Lunny Xiao
5fb581a885
Merge branch 'main' into lunny/issue_dev
2024-09-02 23:49:05 -07:00
Lunny Xiao
6e0bc0d3be
Fix test
2024-09-02 23:48:53 -07:00
Denys Konovalov
83f37f6302
Remove urls from translations ( #31950 )
...
Part of #27700
Removes all URLs from translation strings to easy up changing them in
the future and to exclude people injecting malicious URLs through
translations. First measure as long as #24402 is out of scope.
2024-09-02 18:36:24 +00:00
6543
c0db47bf9b
nix wording nit in todo code comment
2024-09-01 20:25:02 +02:00
yp05327
661a1e10f7
Fix sort order for organization home and user profile page ( #31921 )
...
Fix #31916
In #30876 , `sortOrder` has been changed into a map, but it is only
implemented in explore.
~~But it seems that size sort order has no effect from long long ago,~~
not directly caused by the PR above.
I think it is still caused by #29231 .
In #29231 , it merged the sort orders from
`templates/explore/repo_search.tmpl` and
`templates/admin/repo/search.tmpl`.
In `templates/admin/repo/search.tmpl`, it contains size sort orders, but
not in `templates/explore/repo_search.tmpl`, which is used in non-admin
pages.
So `order by size` is added from #29231 , but the handler was not added.
---------
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-09-01 16:55:05 +00:00
Lunny Xiao
0208f5bc4c
Add ref issue when creating pull request from issue
2024-08-29 12:43:47 -07:00
Lunny Xiao
6feb5a1e17
Merge branch 'main' into lunny/issue_dev
2024-08-29 10:00:03 -07:00
Lunny Xiao
06c67c6d5a
Fix search team ( #31923 )
...
Fix #20658
2024-08-29 13:26:25 +00:00
a1012112796
39d2fdefaf
Split org Propfile README to a new tab overview
( #31373 )
...
like user profile, add a new overviw tab to show profile READEME when it
is exist.
replace #31349 (another solution option)
example view:
![屏幕截图 2024-06-14
094116](https://github.com/go-gitea/gitea/assets/25342410/3303a1f2-ae02-48e0-9519-7fa11e65657f )
![屏幕截图 2024-06-14
094101](https://github.com/go-gitea/gitea/assets/25342410/7a4a5a48-dc2b-4ad4-b2a2-9ea4ab5d5808 )
---------
Signed-off-by: a1012112796 <1012112796@qq.com>
2024-08-27 10:54:12 +08:00
Lunny Xiao
9ea33761a6
revert unnecessary change
2024-08-21 19:58:25 -07:00
Lunny Xiao
b4eac75dba
Some improvements
2024-08-21 19:40:32 -07:00
Lunny Xiao
2361ec5a44
Improvements for creating branch model
2024-08-21 19:08:18 -07:00
Lunny Xiao
62fda252bd
Add a new section named development in issue view sidebar to interact with branch/pr
2024-08-21 15:34:03 -07:00
Lunny Xiao
d158472a5a
Don't return 500 if mirror url contains special chars ( #31859 )
...
Fix #31640
2024-08-21 01:54:55 +00:00
Rowan Bohde
0d24c9f383
add CfTurnstileSitekey context data to all captcha templates ( #31874 )
...
In the OpenID flows, the "CfTurnstileSitekey" wasn't populated, which
caused those flows to fail if using Turnstile as the Captcha
implementation.
This adds the missing context variables, allowing Turnstile to be used
in the OpenID flows.
2024-08-19 17:58:53 +00:00