Giteabot
6a559ad634
Fix `status_check_contexts` matching bug ( #28582 ) ( #28589 )
...
Backport #28582 by @Zettat123
Fix #28570
Follow #24633
---
Copied from
https://github.com/go-gitea/gitea/issues/28570#issuecomment-1867327999
The feature introduced in #24633 should be compatible with
`status_check_contexts`. However, if one or more of
`status_check_contexts` is not a legal glob expressions, `glob.Compile`
will fail and the contexts cannot match.
21229ed2c8/routers/web/repo/pull.go (L653-L663)
Co-authored-by: Zettat123 <zettat123@gmail.com>
1 year ago
Giteabot
1183002b32
Use information from previous blame parts ( #28572 ) ( #28577 )
...
Backport #28572 by @KN4CK3R
Fixes #28545
`git blame` output can contain blocks without commit information if it
was outputted before (the `0dafa97ea3f6d9662299579e5be1875cd28baaae 48
26 1` line):
```
fec25436488499df7231f63b857f66457c193d5c 24 25 1
author Bastien Montagne
author-mail <bastien@blender.org>
author-time 1660731031
author-tz +0200
committer Bastien Montagne
committer-mail <bastien@blender.org>
committer-time 1660731031
committer-tz +0200
summary LibOverride: Add Make/Reset/Clear entries to IDTemplate contextual menu.
previous 839ece6477203382b7a7483062961540180ff1cd source/blender/editors/interface/interface_ops.c
filename source/blender/editors/interface/interface_ops.c
#include "BLT_translation.h"
0dafa97ea3f6d9662299579e5be1875cd28baaae 48 26 1
3d57bc4397fca53bc9702a27bbf50102827829b0 27 27 1
author Hans Goudey
author-mail <hans@blender.org>
author-time 1700131315
author-tz +0100
committer Hans Goudey
committer-mail <hooglyboogly@noreply.localhost>
committer-time 1700131315
committer-tz +0100
summary Cleanup: Move several blenkernel headers to C++
previous 451c054d9b7d3148a646caa5a72fb127a5b5c408 source/blender/editors/interface/interface_ops.cc
filename source/blender/editors/interface/interface_ops.cc
#include "BKE_context.hh"
```
This PR reuses data from the previous blame part to fill these gaps.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
1 year ago
Giteabot
d9aeb1f09d
Only check online runner when detecting matching runners in workflows ( #28286 ) ( #28512 )
...
Backport #28286 by @yp05327
Mentioned:
[#28277 ](https://github.com/go-gitea/gitea/issues/28277#issuecomment-1831325276 )
We should only check online runner when detecting matching runners in
workflows,
as if runner is not online, the workflow will not run.

Co-authored-by: yp05327 <576951401@qq.com>
1 year ago
wxiaoguang
a3f403f438
Add option to disable ambiguous unicode characters detection ( #28454 ) ( #28499 )
...
Backport #28454 (the only conflict is caused by some comments)
* Close #24483
* Close #28123
* Close #23682
* Close #23149
1 year ago
Lunny Xiao
87db4a47c8
Also sync DB branches on push if necessary ( #28361 ) ( #28403 )
...
Fix #28056
Backport #28361
This PR will check whether the repo has zero branch when pushing a
branch. If that, it means this repository hasn't been synced.
The reason caused that is after user upgrade from v1.20 -> v1.21, he
just push branches without visit the repository user interface. Because
all repositories routers will check whether a branches sync is necessary
but push has not such check.
For every repository, it has two states, synced or not synced. If there
is zero branch for a repository, then it will be assumed as non-sync
state. Otherwise, it's synced state. So if we think it's synced, we just
need to update branch/insert new branch. Otherwise do a full sync. So
that, for every push, there will be almost no extra load added. It's
high performance than yours.
For the implementation, we in fact will try to update the branch first,
if updated success with affect records > 0, then all are done. Because
that means the branch has been in the database. If no record is
affected, that means the branch does not exist in database. So there are
two possibilities. One is this is a new branch, then we just need to
insert the record. Another is the branches haven't been synced, then we
need to sync all the branches into database.
1 year ago
Giteabot
cd2dd5a67d
Fix missing check ( #28406 ) ( #28411 )
...
Backport #28406 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
Giteabot
c5c44d0951
Fix object does not exist error when checking citation file ( #28314 ) ( #28369 )
...
Backport #28314 by @yp05327
Fix #28264
`DataAsync()` will be called twice.
Caused by https://github.com/go-gitea/gitea/pull/27958 .
I'm sorry, I didn't completely remove all unnecessary codes.
Co-authored-by: yp05327 <576951401@qq.com>
1 year ago
Giteabot
b7e3adc66c
Fix the runs will not be displayed bug when the main branch have no workflows but other branches have ( #28359 ) ( #28365 )
...
Backport #28359 by @lunny
The left menu will only display the default branch's workflows but the
right side will display the runs triggered by all branches' workflows.
So we cannot hide right side if default branch has no workflows.
Fix #28332
Replace #28333
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
Giteabot
e15fe85335
Read `previous` info from git blame ( #28306 ) ( #28310 )
...
Backport #28306 by @KN4CK3R
Fixes #28280
Reads the `previous` info from the `git blame` output instead of
calculating it afterwards.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
1 year ago
Giteabot
76e892317b
Fix issue will be detected as pull request when checking `First-time contributor` ( #28237 ) ( #28271 )
...
Backport #28237 by @yp05327
Fix #28224
Co-authored-by: yp05327 <576951401@qq.com>
1 year ago
Lunny Xiao
bc3d8bff73
Fix comment permissions ( #28213 ) ( #28216 )
...
backport #28213
This PR will fix some missed checks for private repositories' data on
web routes and API routes.
1 year ago
Giteabot
a2314ca9c5
Revert "Fix EOL handling in web editor" ( #28101 ) ( #28172 )
...
Backport #28101 by @lng2020
Reverts go-gitea/gitea#27141
close #28097
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
1 year ago
Giteabot
124a9957d0
Fix viewing wiki commit on empty repo ( #28040 ) ( #28044 )
...
Backport #28040 by @JakobDev
Fixes https://codeberg.org/forgejo/forgejo/issues/1758
For some weird reason we need to cast this nil.
Co-authored-by: JakobDev <jakobdev@gmx.de>
1 year ago
Giteabot
824d40edc6
Fix citation error when the file size is larger than 1024 bytes ( #27958 ) ( #27965 )
...
Backport #27958 by @yp05327
Mentioned in:
https://github.com/go-gitea/gitea/pull/27931#issuecomment-1798016960
Same to #25131 , so use the same method to fix this problem.
Co-authored-by: yp05327 <576951401@qq.com>
1 year ago
Giteabot
9ca1853495
Fix http protocol auth ( #27875 ) ( #27876 )
...
Backport #27875 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
Giteabot
5087de1a5c
Fix `link-action` redirect network error ( #27734 ) ( #27749 )
...
Backport #27734 by @lng2020
<img width="823" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/99da3d5a-c28a-4fd0-8ae0-88461a9142e2 ">
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
1 year ago
Giteabot
7ec7c733c7
Replace ajax with fetch, improve image diff ( #27267 ) ( #27583 )
...
Backport #27267 by @silverwind
1. Dropzone attachment removal, pretty simple replacement
2. Image diff: The previous code fetched every image twice, once via
`img[src]` and once via `$.ajax`. Now it's only fetched once and a
second time only when necessary. The image diff code was partially
rewritten.
Co-authored-by: silverwind <me@silverwind.io>
1 year ago
Giteabot
a9d547f55b
When comparing with an non-exist repository, return 404 but 500 ( #27437 ) ( #27442 )
...
Backport #27437 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
Giteabot
28d970e4a6
Hide archived labels when filtering by labels on the issue list ( #27115 ) ( #27381 )
...
Backport #27115 by @puni9869
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: puni9869 <80308335+puni9869@users.noreply.github.com>
Co-authored-by: delvh <dev.lh@web.de>
1 year ago
Giteabot
0c4f97c112
Fix repo count in org action settings ( #27245 ) ( #27353 )
...
Backport #27245 by @yp05327
Only in org action settings, repo count is missing
Before:



In other setting page:

After:



Co-authored-by: yp05327 <576951401@qq.com>
1 year ago
Giteabot
f13a294b47
More `db.DefaultContext` refactor ( #27265 ) ( #27347 )
...
Backport #27265 by @JakobDev
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.
Co-authored-by: JakobDev <jakobdev@gmx.de>
1 year ago
Giteabot
84ee02faa7
Improve tree not found page ( #26570 ) ( #27346 )
...
Backport #26570 by @yp05327
Before:

After:

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


Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
Giteabot
71d1bfea7f
Improve issue history dialog and make poster can delete their own history ( #27323 ) ( #27327 )
...
Backport #27323 by @wxiaoguang
Fix #27313 (see the comment)
And some UI improvements:
### Before


### After



Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 year ago
Giteabot
fc7d3f7315
Another round of `db.DefaultContext` refactor ( #27103 ) ( #27262 )
...
Backport #27103 by @JakobDev
Part of #27065
Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
1 year ago
Giteabot
a1029cb2ca
Fix EOL handling in web editor ( #27141 ) ( #27234 )
...
Backport #27141 by @silverwind
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
Co-authored-by: silverwind <me@silverwind.io>
1 year ago
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 ">
1 year ago
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>
1 year ago
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.
1 year ago
JakobDev
f91dbbba98
Next round of `db.DefaultContext` refactor ( #27089 )
...
Part of #27065
1 year ago
JakobDev
c548dde205
More refactoring of `db.DefaultContext` ( #27083 )
...
Next step of #27065
1 year ago
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>
1 year ago
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>
1 year ago
Nanguan Lin
cda97a7253
Update status and code index after changing the default branch ( #27018 )
...
Fix #26723
Add `ChangeDefaultBranch` to the `notifier` interface and implement it
in `indexerNotifier`. So when changing the default branch,
`indexerNotifier` sends a message to the `indexer queue` to update the
index.
---------
Co-authored-by: techknowlogick <matti@mdranta.net>
1 year ago
Lunny Xiao
e3ed67859a
Move some functions to service layer ( #26969 )
1 year ago
Lunny Xiao
4f32abaf94
move repository deletion to service layer ( #26948 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 year ago
Lunny Xiao
f20e317d6d
Improve hint when uploading a too large avatar ( #26935 )
...
Fix #26390
---------
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
1 year ago
CaiCandong
a78c2eae24
Replace `util.SliceXxx` with `slices.Xxx` ( #26958 )
1 year ago
Lunny Xiao
b9df9fa2e2
Move createrepository from module to service layer ( #26927 )
...
Repository creation depends on many models, so moving it to service
layer is better.
1 year ago
merlleu
a7d9a70552
allow "latest" to be used in release vTag when downloading file ( #26748 )
...
Hello,
In the discord I saw
[someone](https://discord.com/channels/322538954119184384/1069795723178160168/1145061200644800514 )
complaining that you can't use the "latest" keyword as release tag to
download a specific file:
In his example:
https://www.uberwald.me/gitea/public/fvtt-ecryme/releases/latest/system.json
However the latest keyword works for the release page, so I think it's a
good thing to implement this on the release attachment download url too.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 year ago
FuXiaoHei
460a2b0edf
Artifacts retention and auto clean up ( #26131 )
...
Currently, Artifact does not have an expiration and automatic cleanup
mechanism, and this feature needs to be added. It contains the following
key points:
- [x] add global artifact retention days option in config file. Default
value is 90 days.
- [x] add cron task to clean up expired artifacts. It should run once a
day.
- [x] support custom retention period from `retention-days: 5` in
`upload-artifact@v3`.
- [x] artifacts link in actions view should be non-clickable text when
expired.
1 year ago
yp05327
0850be6750
Fix the display of org level badges ( #26504 )
...
Follow #24654 #22705 #24232
In some pages we still have missing badges, for example:



1 year ago
Lunny Xiao
540bf9fa6d
Move notification interface to services layer ( #26915 )
...
Extract from #22266
1 year ago
wxiaoguang
e8aae43f56
Move web/api context related testing function into a separate package ( #26859 )
...
Just like `models/unittest`, the testing helper functions should be in a
separate package: `contexttest`
And complete the TODO:
> // TODO: move this function to other packages, because it depends on
"models" package
1 year ago
JakobDev
3cae50e841
Redirect from `{repo}/issues/new` to `{repo}/issues/new/choose` when blank issues are disabled ( #26813 )
...
You can currently visit `{repo}/issues/new` and create a blank issue,
even if it's disabled. This PR fixes this,
Fixes https://codeberg.org/forgejo/forgejo/issues/1356
Co-authored-by: Giteabot <teabot@gitea.io>
2 years ago
CaiCandong
c576b50441
Fix being unable to use a repo that prohibits accepting PRs as a PR source. ( #26785 )
...
## Description
Sometimes, we need to use an upstream mirror repository to update the
current development repository, but mirror repositories are prohibited
from PR. It should not appear in `merge to,` but it can appear in `pull
from.`
Fix #24585 #26193 #26781
Related #24183
Many thanks to @apnote for assisting me in reproducing this bug!
## ScreenShot
---
### Before
<img
src="https://github.com/go-gitea/gitea/assets/50507092/3d76c376-1f54-45b9-80c9-6ba8319d6a9a "
width="400px">
<img
src="https://github.com/go-gitea/gitea/assets/50507092/fbfd9f7f-421f-4a2e-9a3e-f2958bbf3312 "
width="400px">
### After
<img
src="https://github.com/go-gitea/gitea/assets/50507092/e6984524-4f61-4310-b795-4d8598bd8963 "
width="400px">
<img
src="https://github.com/go-gitea/gitea/assets/50507092/04065b44-78d7-4721-bf31-0f1674150727 "
width="400px">
2 years ago
Lunny Xiao
476b9d1589
Use docs.gitea.com instead of docs.gitea.io ( #26739 )
2 years ago
Chongyi Zheng
43652746f2
Move `modules/mirror` to `services` ( #26737 )
...
To solve the cyclic imports in a better way
Closes #20261
2 years ago
wxiaoguang
412e5c0946
Make web context initialize correctly for different cases ( #26726 )
...
The web context (modules/context.Context) is quite complex, it's
difficult for the callers to initialize correctly.
This PR introduces a `NewWebContext` function, to make sure the web
context have the same behavior for different cases.
2 years ago
yp05327
d2e4039def
Add `member`, `collaborator`, `contributor`, and `first-time contributor` roles and tooltips ( #26658 )
...
GitHub like role descriptor



---------
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
yp05327
7e30986667
Remove ref name in PR commits page ( #25876 )
...
The branch name display here is based on the repo's default branch which
is not correct.

For example, if I changed the default branch, the branch name here will
also be changed:


you can confirm this in :
https://try.gitea.io/yp05327/testrepo/pulls/1/commits
I think we do not need to display branch name here, as we already have
the branch info above.

2 years ago