Danila Fominykh
94f45f402f
change interface{} to any, move apiError function to bottom
2023-10-02 23:47:32 -03:00
Danila Fominykh
33ae3bd5ce
Merge branch 'main' into pacman-packages
2023-10-02 23:31:48 -03:00
Danila Fominykh
8974d27ba3
refactoring in metadata module, better readability
...
shorter function calls in arch service
fix - request now ends if unable to decode package signature from hex
fix - now package search continues to previous versions in package file for required architecture not found for current version
2023-10-02 19:12:06 -03:00
Danila Fominykh
f515f6ee7c
removed unnecessary filename from composite key
2023-10-02 14:33:37 -03:00
delvh
e709bc199f
Differentiate between push
and pull
mirror sync in progress
( #27390 )
...
Previously, if you had both a push and a pull mirror, the message did
not clarify if you've accidentally synchronized the wrong one.
Additionally fixed two typos that were encountered while debugging.
## Screenshots


2023-10-02 14:52:18 +00:00
wxiaoguang
e4313feefd
Document the line-number counting behavior ( #27386 )
...
Ref #27377
2023-10-02 07:23:18 +00:00
puni9869
50070550a8
Hide archived labels when filtering by labels on the issue list ( #27115 )
...
Followup https://github.com/go-gitea/gitea/pull/26820
## Archived labels UI for issue filter and issue filter actions for
issues/pull request pages.
Changed:
* Enhanced the Issue filter and Issue filter actions UI page to
seamlessly incorporate a list of archived labels.
* Pagination functionality is same as before. If archived label checkbox
is checked then we are adding a query string`archived=true` in the url
to save the state of page.
* Issue filter actions menu is separated into different template.
* Adding the archived flag in issue url labels.
* Pull Request page is also work the same.
Outsourced:
* Defer the implementation of specialized handling for archived labels
to upcoming pull requests. This step will be undertaken subsequent to
the successful merge of this pull request.
Screenshots
### Issue page
<img width="1360" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/d7efb2ef-5b2b-449d-83f0-d430a32ec432 ">
### Issue page with label filter on archived label checkbox when not
checked --> No archived label is there in list
<img width="1249" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/ceea68ef-91f2-4693-910f-2e25e236bfc9 ">
### Issue page with label filter on archived label checkbox when checked
--> Show archived label in the list.
<img width="710" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/2414d26b-2079-4c3c-bd9e-f2f5411bcabf ">
### Issue page with label filter on issue action menu on archived label
checkbox when checked --> Show archived label in the list.
<img width="409" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/259cac87-3e21-4778-99a2-a6a0b8c81178 ">
### Applied the archived=true in Issue labels when archived checkbox is
checked.
<img width="984" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/657ce3db-c0ae-402e-b12d-3b580d3c2ed0 ">
---
Part of https://github.com/go-gitea/gitea/issues/25237
---------
Signed-off-by: puni9869 <punitinani1@hotmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-10-01 09:04:39 -04:00
Lunny Xiao
6e87a44034
Allow get release download files and lfs files with oauth2 token format ( #26430 )
...
Fix #26165
Fix #25257
2023-10-01 10:41:52 +00:00
yp05327
393193a3e0
Fix repo count in org action settings ( #27245 )
...
Only in org action settings, repo count is missing
Before:



In other setting page:

After:



2023-09-29 15:46:07 +00:00
Panagiotis "Ivory" Vasilopoulos
65e09a303e
Introduce fixes and more rigorous tests for 'Show on a map' feature ( #26803 )
...
This change introduces a fix for the PR #26214 to set the UserLocationMapURL correctly.
2023-09-29 14:57:06 +00:00
6543
2a2b0cb1d2
rename TotalTimes() to TotalTimesForEachUser() ( #27261 )
...
make function name more descriptive as it would otherwise imply it could
be used for e.g. #26672 too ...
---
*Sponsored by Kithara Software GmbH*
2023-09-29 13:04:14 +00:00
JakobDev
cf0df023be
More db.DefaultContext
refactor ( #27265 )
...
Part of #27065
This PR touches functions used in templates. As templates are not static
typed, errors are harder to find, but I hope I catch it all. I think
some tests from other persons do not hurt.
2023-09-29 12:12:54 +00:00
yp05327
3945c26722
Improve tree not found page ( #26570 )
...
Before:

After:

In Github:
https://github.com/yp05327/test/blob/main/test.drawio
Updated:
UI changed


---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-09-29 07:42:39 +00:00
Dmitry Sharshakov
5e02e3b7ee
Add support for forking single branch ( #25821 )
...
Fixes #25117
Add UI for choosing branch to fork
Change default branch on single-branch forks

---------
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-09-29 09:48:39 +08:00
Danila Fominykh
ba92fc54b7
pass context to package service methods
2023-09-28 17:25:22 -03:00
Danila Fominykh
a1ee2a0a96
Merge branch 'main' into pacman-packages
2023-09-28 17:14:23 -03:00
Danila Fominykh
c09da2a9e1
removed functionality related to automatic source code repository connection
2023-09-28 17:13:40 -03:00
Zettat123
3fcad582c9
Improvements of releases list and tags list ( #25859 )
...
Follow #23465 and #25624
This PR introduces the following improvements:
- We do not need to call `GetTags` to get tags because tags have been
loaded by `RepoAssignment`
ef90fdbd1d/modules/context/repo.go (L663-L668)
- Similarly, the number of tags and releases also have been loaded by
`RepoAssignment`, so the related code has been removed from the
handlers. The query condition of `GetReleaseCountByRepoID` in
`RepoAssignment` has been changed to include draft releases.
ef90fdbd1d/modules/context/repo.go (L538-L551)
- `releasesOrTags` function has been removed. The code for rendering
releases list and tags list moved to `Releases` and `TagList`
respectively.
2023-09-28 13:21:47 +00:00
wxiaoguang
72c68177ab
Improve issue history dialog and make poster can delete their own history ( #27323 )
...
Fix #27313 (see the comment)
And some UI improvements:
### Before


### After



2023-09-28 08:43:20 +00:00
Lunny Xiao
673cf6af76
make writing main test easier ( #27270 )
...
This PR removed `unittest.MainTest` the second parameter
`TestOptions.GiteaRoot`. Now it detects the root directory by current
working directory.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-09-28 01:38:53 +00:00
Lunny Xiao
3b2da7e4ae
Redefine the meaning of column is_active to make Actions Registration Token generation easier ( #27143 )
...
Partially Fix #25041
This PR redefined the meaning of column `is_active` in table
`action_runner_token`.
Before this PR, `is_active` means whether it has been used by any
runner. If it's true, other runner cannot use it to register again.
In this PR, `is_active` means whether it's validated to be used to
register runner. And if it's true, then it can be used to register
runners until it become false. When creating a new `is_active` register
token, any previous tokens will be set `is_active` to false.
2023-09-27 05:37:48 +00:00
Danila Fominykh
0dd3db2280
fixed user in package upload operation
2023-09-25 18:54:27 -03:00
Danila Fominykh
4656b3b958
replaced bytes.Buffer with packages.HashedBuffer to return working io.ReadSeeker implementation
2023-09-25 18:42:48 -03:00
JakobDev
7047df36d4
Another round of db.DefaultContext
refactor ( #27103 )
...
Part of #27065
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-09-25 13:17:37 +00:00
Danila Fominykh
946d8cc9ea
Merge branch 'main' into pacman-packages
2023-09-24 23:53:03 -03:00
silverwind
3a187eace5
Fix EOL handling in web editor ( #27141 )
...
Fixes https://github.com/go-gitea/gitea/issues/27136 .
This does the following for Monaco's EOL setting:
1. Use editorconfig setting if present
2. Use the file's dominant line ending as detected by monaco, which uses
LF for empty file
2023-09-24 19:51:02 +00:00
Danila Fominykh
54fd84d83f
function to get package file property by composite key, refactoring function creating pacman database
2023-09-24 13:32:53 -03:00
Danila Fominykh
60052811ad
fix request permission access position for push/remove handlers
2023-09-23 18:05:36 -03:00
Danila Fominykh
8faea4236c
Merge branch 'main' into pacman-packages
2023-09-23 17:11:38 -03:00
JakobDev
28f9b313ba
Updates to the API for archived repos ( #27149 )
2023-09-21 23:43:29 +00:00
Dionysios Kakouris
e46274b5b4
Fix organization field being null in POST /orgs/{orgid}/teams ( #27150 )
...
Similarly to the fix in https://github.com/go-gitea/gitea/pull/24694 ,
this addresses the team creation not returning the organization
information in the response.
This fix is connected to the
[issue](https://gitea.com/gitea/terraform-provider-gitea/issues/27 )
discovered in the terraform provider.
Moreover, the
[documentation](https://docs.gitea.com/api/1.20/#tag/organization/operation/orgCreateTeam )
suggests that the response body should include the `organization` field
(currently being `null`).
2023-09-21 08:09:59 +00:00
Danila Fominykh
17f02ce129
Merge branch 'main' into pacman-packages
2023-09-20 19:07:38 -03:00
hazy
74a5db03fd
Fix: treat tab "overview" as "repositories" in user profiles without readme ( #27124 )
...
Beginning since 2af30f715e
, Gitea has a
500 error when visiting a user profile with `?tab=overview` in the URL
when the user doesn't have a `.profile/README.md`, because the backend
code assumes that if the tab is overview a profile repository must
exist, and checks that the repository is nil aren't done.
In this PR I treat `?tab=overview` the same as if no tab is set in the
URL, which corrects this behaviour- Now, when visiting `?tab=overview`,
if `.profile/README.md` exists on that user's profile it'll show that as
it should, otherwise it'll show the repositories tab.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-09-20 01:48:44 +00:00
Danila Fominykh
1b4b03d0bd
Merge branch 'main' into pacman-packages
2023-09-19 20:49:33 -03:00
Earl Warren
fc09c30081
fix pagination for followers and following ( #27127 )
...
- Use the correct total amount for pagination. Thereby correctly show
the pagination bare when there's more than one page of
followers/followings.
Refs: https://codeberg.org/forgejo/forgejo/pulls/1477
(cherry picked from commit c1a136318be3bf72511bed108f2d67f2cf34e1b8)
Co-authored-by: Gusted <postmaster@gusted.xyz>
2023-09-19 15:24:54 +00:00
Danila Fominykh
a4d878c670
Merge branch 'go-gitea:main' into pacman-packages
2023-09-17 22:31:30 -03:00
CaiCandong
f93ee5937b
Fix token endpoints ignore specified account ( #27080 )
...
Fix #26234
close #26323
close #27040
---------
Co-authored-by: silverwind <me@silverwind.io>
2023-09-18 00:21:15 +00:00
wxiaoguang
8531ca0837
Make SSPI auth mockable ( #27036 )
...
Before, the SSPI auth is only complied for Windows, it's difficult to
test and it breaks a lot.
Now, make the SSPI auth mockable and testable.
2023-09-17 23:32:56 +00:00
Lunny Xiao
47b878858a
Search branches ( #27055 )
...
Resolve #25233
<img width="1315" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/3ba59b58-471a-4e1b-985c-87edac2268c0 ">
<img width="1297" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/b6caa12f-323b-4f70-9c44-ef91cb71a26c ">
2023-09-17 08:24:40 +00:00
KN4CK3R
ed64f1c2b8
Support .git-blame-ignore-revs
file ( #26395 )
...
Closes #26329
This PR adds the ability to ignore revisions specified in the
`.git-blame-ignore-revs` file in the root of the repository.

The banner is displayed in this case. I intentionally did not add a UI
way to bypass the ignore file (same behaviour as Github) but you can add
`?bypass-blame-ignore=true` to the url manually.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-09-16 17:42:34 +00:00
KN4CK3R
c766140dad
Add RemoteAddress
to mirrors ( #26952 )
...
This PR adds a new field `RemoteAddress` to both mirror types which
contains the sanitized remote address for easier (database) access to
that information. Will be used in the audit PR if merged.
2023-09-16 16:03:02 +00:00
JakobDev
f91dbbba98
Next round of db.DefaultContext
refactor ( #27089 )
...
Part of #27065
2023-09-16 14:39:12 +00:00
JakobDev
efecbbaca1
Fix NPE when editing OAuth2 applications ( #27078 )
...
Fixes #27072
It looks like there are some cases where `ContextUser` is not set here
---------
Co-authored-by: techknowlogick <matti@mdranta.net>
2023-09-16 09:13:26 +00:00
KN4CK3R
d513628db9
Allow empty Conan files ( #27092 )
...
Fixes #27090
Looks like the Conan upload process has changed since last year. The
empty uploads don't occur anymore.
2023-09-15 23:14:36 +00:00
JakobDev
c548dde205
More refactoring of db.DefaultContext
( #27083 )
...
Next step of #27065
2023-09-15 06:13:19 +00:00
JakobDev
76659b1114
Reduce usage of db.DefaultContext
( #27073 )
...
Part of #27065
This reduces the usage of `db.DefaultContext`. I think I've got enough
files for the first PR. When this is merged, I will continue working on
this.
Considering how many files this PR affect, I hope it won't take to long
to merge, so I don't end up in the merge conflict hell.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-09-14 17:09:32 +00:00
JakobDev
8d0343e028
Fix issue templates when blank isses are disabled ( #27061 )
...
Fixes #27060
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: delvh <dev.lh@web.de>
2023-09-14 14:20:16 +00:00
Lunny Xiao
198a9ca635
Display all user types and org types on admin management UI ( #27050 )
...
Follow #24026
<img width="1049" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/d3fc5159-b5e7-411a-b6f8-4a111a027e6b ">
---------
Co-authored-by: delvh <dev.lh@web.de>
2023-09-14 06:53:36 +00:00
puni9869
e0aacc7624
Show the repo count in code tab on both user profile and org page. ( #27048 )
...
as title
Screenshot before
User Profile page
<img width="1367" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/24e79689-ba2f-4c85-b591-fe5621746965 ">
after
<img width="1346" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/754a7ee8-c2f0-424d-9ba8-be38a48140aa ">
Org page
<img width="1354" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/c96178d8-664f-45c5-a162-f4df5690d9d0 ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-09-13 18:47:35 +08:00
Dmitry Sharshakov
63b53af933
Show OpenID Connect and OAuth on signup page ( #20242 )
...
Fix #19809
---------
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: jackHay22 <jack@allspice.io>
2023-09-13 05:14:21 +00:00