RedCocoon
b1af5cd6be
Rename variables in conversation.go
2024-11-01 02:46:55 +08:00
RedCocoon
60b750ece4
Remove duplicate functions
2024-11-01 02:11:43 +08:00
RedCocoon
ab083c8525
Remove unused struct, fix duplicate table name
2024-10-31 21:46:00 +08:00
RedCocoon
5ba8ae10fc
Remove unnecessary data from Conversation
2024-10-30 23:49:24 +08:00
RedCocoon
abc5d12590
Merge branch 'main' into main
2024-10-30 23:21:47 +08:00
RedCocoon
c039238f07
Merge branch 'main' of https://github.com/RedCocoon/gitea
2024-10-30 20:37:28 +08:00
RedCocoon
95c57a1677
Clean up code based on lint
2024-10-30 20:37:04 +08:00
6543
58eb16eda7
Respect UI.ExploreDefaultSort setting again ( #32357 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
fix regression of https://github.com/go-gitea/gitea/pull/29430
---
*Sponsored by Kithara Software GmbH*
2024-10-30 12:33:25 +00:00
RedCocoon
7b263cd638
Merge branch 'go-gitea:main' into main
2024-10-30 01:26:14 +08:00
RedCocoon
692f0aacaa
Reimplement edit comment for conversations
2024-10-29 21:34:24 +08:00
RedCocoon
17fb682c18
Reimplement quote reply and translation text
2024-10-29 20:03:40 +08:00
Anbraten
b7fb20e73e
Suggestions for issues ( #32327 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
closes #16872
2024-10-29 17:20:49 +08:00
RedCocoon
bb943791fb
Reimplement reactions and delete, fixed conversation styling css
2024-10-29 16:48:18 +08:00
RedCocoon
637788bc2f
Reimplement delete comment for conversations
2024-10-28 16:33:51 +08:00
RedCocoon
c55ca5df79
Allow creation of commit comments
2024-10-25 22:05:56 +08:00
RedCocoon
c511070fa8
Add backend functionalities to create and display conversations
2024-10-25 01:35:19 +08:00
Lunny Xiao
2abdbe88b5
Fix disable 2fa bug ( #32320 )
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2024-10-23 06:41:00 +00:00
Tim
de2ad2e1b1
Make admins adhere to branch protection rules ( #32248 )
...
This introduces a new flag `BlockAdminMergeOverride` on the branch
protection rules that prevents admins/repo owners from bypassing branch
protection rules and merging without approvals or failing status checks.
Fixes #17131
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-10-23 12:39:43 +08:00
Zettat123
9206fbb55f
Add DISABLE_ORGANIZATIONS_PAGE
and DISABLE_CODE_PAGE
settings for explore pages and fix an issue related to user search ( #32288 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
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
RedCocoon
6051ff8525
Decouple conversations from issues
2024-10-21 00:38:17 +08:00
wxiaoguang
5242e520c4
Make owner/repo/pulls
handlers use "PR reader" permission ( #32254 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
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 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
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
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 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
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
3a4a1bffbe
Make oauth2 code clear. Move oauth2 provider code to their own packages/files ( #32148 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
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:

Multiple Licenses:

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)

---------
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
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.

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:

The second one, shows the page when the given filter returns no tag:

The last one shows a single tag being filtered:

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

**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
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
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
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:


---------
Signed-off-by: a1012112796 <1012112796@qq.com>
2024-08-27 10:54:12 +08:00