Fixes: https://github.com/go-gitea/gitea/issues/26202
Actually later I found out the code did not use `clippie`, so I fixed
it. The bug was never in the clippie module like I initially suspected.
Also, I added a tooltip for feedback.
<img width="139" alt="image"
src="da501670-9c15-4412-969a-b559773c7ab9">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
as title
Fixes : #25825
Before
<img width="1334" alt="image"
src="c54a41b0-39bd-4094-a956-081a8f4128f2">
After change
<img width="1340" alt="image"
src="c112d235-6bbe-4bcb-9529-78da3ab0fa14">
Co-authored-by: Giteabot <teabot@gitea.io>
Fix#25934
Add `ignoreGlobal` parameter to `reqUnitAccess` and only check global
disabled units when `ignoreGlobal` is true. So the org-level projects
and user-level projects won't be affected by global disabled
`repo.projects` unit.
Fixed two incorrect headers for setting the page navigation bar:
* User settings page, should not use the title "`org.settings`"
* Repo settings page, should not use the title "`org.settings`"
This PR adds a new dropdown to select a commit or a commit range
(shift-click like github) of a Pull Request.
After selection of a commit only the changes of this commit will be shown.
When selecting a range of commits the diff of this range is shown.
This allows to review a PR commit by commit or by viewing only commit ranges.
The "Show changes since your last review" mechanism github uses is implemented, too.
When reviewing a single commit or a commit range the "Viewed" functionality is disabled.
## Screenshots
### The commit dropdown

### Selecting a commit range

### Show changes of a single commit only

### Show changes of a commit range

Fixes https://github.com/go-gitea/gitea/issues/20989
Fixes https://github.com/go-gitea/gitea/issues/19263
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Attemp fix: #25744
Fixing the log level when we delete any repo then we get error hook not
found by id. That should be warn level to reduce the noise in the logs.
---------
Co-authored-by: delvh <dev.lh@web.de>
Fixes#25918
The migration fails on MSSQL because xorm tries to update the primary
key column. xorm prevents this if the column is marked as auto
increment:
c622cdaf89/internal/statements/update.go (L38-L40)
I think it would be better if xorm would check for primary key columns
here because updating such columns is bad practice. It looks like if
that auto increment check should do the same.
fyi @lunny
- Configure `setting.CacheService.TTL` which will force the code to go
trough the caching mechanism.
- Remove the TODO and uncomment the test code.
(cherry picked from commit a201f2f1896c1a086f3e37f86b1306d44c07f2e4)
Refs: https://codeberg.org/forgejo/forgejo/pulls/974
---------
Co-authored-by: Gusted <postmaster@gusted.xyz>
Fix: https://github.com/go-gitea/gitea/issues/26152
Thease changes are related to UX and accessibility changes in desktop
mode.
<img width="50" alt="image"
src="30a75b50-4f8d-4108-9219-2c69b2a8fa6f">
Also this is incomplete header
<img width="264" alt="image"
src="87837076-dfc7-4a68-863a-795edf61eb02">
Lets add a tooltip if it is applicable or add `title` attribute so that
it will be clearly visible.
After


Now, you can see for a commit which existing branches and tags contain it.
You first have to click on the `load branches and tags` button, they are not preloaded by default.
All branches and tags are ordered descending by creation date.
You can even see without much hassle if the given commit is already part of the default branch.
Closes#25152
## Screenshots
### Initial

### Loaded

---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This PR addresses an issue where logged-in users get redirected to the
homepage when trying to access a URL with the redirect_to parameter. The
issue was traced back to a middleware function in
services/auth/middleware.go that redirects logged-in users to the
homepage. This function didn't account the redirect_to parameter.
The fix modifies the middleware function to check for this case and
redirect the user to the specified URL instead of the homepage.
Closes: #26005
---------
Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Fixed typos considering CONTRIBUTING.md.
This line:
GitHub API compatability #github-api-compatability
changed to:
GitHub API compatibility #github-api-compatibility
and this line:
GitHub API compatability
changed to:
GitHub API compatibility
If there's no logs, you can also click the download button, then you
will get `job is not started` page

https://gitea.com/yp05327/testrepo/actions/runs/38
After:
If there's no steps displayed, the download button will be disabled.

https://github.com/go-gitea/gitea/pull/26051 I accidentally rebased
locally without my re-addition for these files, so they were missed in
the merge, but only for `main`.
Signed-off-by: jolheiser <john.olheiser@gmail.com>
The setting `MAILER_TYPE` is deprecated.
According to the config cheat sheet, it should be `PROTOCOL`.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
It was caused by updating `asciinema-player`, the upstream changed the
CSS class prefix:
`40505e479e`
<details>
<summary>Before:</summary>
<img width="1320" alt="image"
src="b91a2cf5-c1da-43d6-bac2-bc278728b11e">
</details>
<details>
<summary>After:</summary>
<img width="1311" alt="image"
src="c9872d25-e0bb-43d4-8b1e-d87c6b03c0a2">
</details>
- The `NoBetterThan` function can only handle comparisons between
"pending," "success," "error," and "failure." For any other comparison,
we directly return false. This prevents logic errors like the one in
#26121.
- The callers of the `NoBetterThan` function should also avoid making
incomparable calls.
---------
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
This PR
- Fix#26093. Replace `time.Time` with `timeutil.TimeStamp`
- Fix#26135. Add missing `xorm:"extends"` to `CountLFSMetaObject` for
LFS meta object query
- Add a unit test for LFS meta object garbage collection
The JSONRedirect/JSONOK/JSONError functions were put into "Base" context
incorrectly, it would cause abuse.
Actually, they are for "web context" only, so, move them to the correct
place.
And by the way, use them to simplify old code: +75 -196
This PR cleans up the docs in a way to make them simpler to ingest by
our [docs repo](https://gitea.com/gitea/gitea-docusaurus).
1. It includes all of the sed invocations our ingestion did, removing
the need to do it at build time.
2. It replaces the shortcode variable replacement method with
`@variable@` style, simply for easier sed invocations when required.
3. It removes unused files and moves the docs up a level as cleanup.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This PR includes #26007 's changes but have a UI to prompt administrator
about the deprecated settings as well as the log or console warning.
Then users will have enough time to notice the problem and don't have
surprise like before.
<img width="1293" alt="图片"
src="c33355f0-1ea7-4fb3-ad43-cd23cd15391d">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Close#26104 . Only a quick fix, the UI is not perfect.
Before:
<details>


</details>
After:
<details>


</details>
We are now:
- Making sure there is no existing access token with the same name
- Making sure the given scopes are valid (we already did this before but
now we have a message)
The logic is mostly taken from
a12a5f3652/routers/api/v1/user/app.go (L101-L123)Closes#26044
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Extract from https://github.com/go-gitea/gitea/pull/26043, just the
padding increase.
Before and After (hard to notice, but it's there):
<img width="427" alt="Screenshot 2023-07-25 at 19 37 12"
src="9543dcda-eccb-4739-b7dd-06b076108ab4">
<img width="420" alt="Screenshot 2023-07-25 at 19 37 26"
src="0a9c3724-81a1-4c67-a13b-4b728a51fc3a">
Co-authored-by: Giteabot <teabot@gitea.io>
Agenda:
This PR contains UI fixes for release tag page / wiki page /
subscription page.
Here is the list of changes made in this PR.
1. Release tag page
a. In the New Release page the whole ui got change. Now it is covering
in full page page with mobile view port. Description about the release
the editor preview now has a min-height. and the check boxes for
`Prerelease` and option are left aligned. Couple of divider are added.
2. Subscription page:
a. In the subscription page the ui was distorted in mobile view. Now its
fix. Couple of unused styles were removed.
3. Create Wiki page:-
a. In the page the preview of markdown is now contains a fix min-height
so this it will not distorted in desktop view and a divider is added
before action buttons. Couple of unused styles were removed.
# Before
## Release page
<img width="1391" alt="image"
src="319dec2e-08cf-40c5-920a-d651930ee28e">
<img width="494" alt="image"
src="03249f40-2d36-4552-bb93-43832aac2f8b">
<img width="1390" alt="image"
src="bf8b2d31-4857-480b-abd9-66a3ae6e24d8">
<img width="484" alt="image"
src="c3a58210-a337-4c8e-89a6-edb3975986bb">
Editor
<img width="958" alt="image"
src="3bdd299d-d12b-4774-ace9-7184b1a57b18">
Editor preview
<img width="1293" alt="image"
src="2b61c528-c018-4800-ab86-07aae56adecd">
<img width="484" alt="image"
src="ff7bc5ee-9dc0-4f78-a0b1-94277ab27700">
#### After
<img width="1439" alt="image"
src="94f7e073-5977-40bd-98ef-0711ed0815cc">
<img width="1384" alt="image"
src="83e3105f-c1ee-4329-b90f-8bb724dac50f">
<img width="1440" alt="image"
src="05f024a5-52eb-4072-8599-d6ca12f6fad1">
<img width="1387" alt="image"
src="c73f069b-572a-4a13-aaa9-fc5b4dd3420d">
<img width="1440" alt="image"
src="2f98f012-8e64-4a12-9595-5acdef18f85c">
Markdown preview change
<img width="1368" alt="image"
src="31e583ec-48f6-4f1a-8b56-0164fcb127a5">
Wiki page
Before
<img width="1393" alt="image"
src="9c9cfdf6-3c2a-4f47-883b-76624d96f9a0">
<img width="499" alt="image"
src="522ad573-1ad2-4fa2-8bf7-48a3dded14e7">
Preview of mark down.
<img width="488" alt="image"
src="998f3c25-9fca-43c8-b1ff-648aab291727">
Footer
<img width="490" alt="image"
src="89c6cf4e-4599-4403-bac8-285efdd9361a">
After
<img width="1389" alt="image"
src="1ee0fc72-f864-44c0-b2e4-e0e8a8470204">
<img width="498" alt="image"
src="b35b9a5d-8e26-4869-a6ed-6cef1f4a87a6">
<img width="499" alt="image"
src="b40bcbaa-fca6-42ab-9556-f950811b565d">
Preview tab block has min-height
<img width="1392" alt="image"
src="4a53d6c2-596c-423a-91b1-533cef734f93">
Mobile view
<img width="496" alt="image"
src="c5ffc4c9-3c21-4cad-bc32-2ea3f0644a08">
<img width="497" alt="image"
src="08dd560f-4333-41ec-95b9-8154910d2254">
<img width="496" alt="image"
src="9fba8f55-727b-4756-a4a6-2070c719b15b">
## Subscription page
### Before
<img width="1393" alt="image"
src="0a7d561b-f56c-4ebe-93bd-952abecd437f">
<img width="492" alt="image"
src="4dc44d0c-ea81-4130-8afb-8f271c029e8a">
After
<img width="1394" alt="image"
src="a3567e30-2b5b-49d6-9ecb-2ab481ea4d36">
<img width="494" alt="image"
src="024da9e2-dfc4-4672-95cc-a6ac034d9712">
<img width="508" alt="image"
src="b748ecea-427c-4f8b-a1bf-08f82f9a42e6">
Replace #21790
And close#25965 by the way (it needs a separate fix for 1.20)
Major changes:
1. Move "gitea convert" to "gitea doctor conver". The old "gitea doctor"
still works as a hidden sub-command (to avoid breaking)
2. Do not write "doctor.log" by default, it's not useful in most cases
and causes bugs like 25965
3. Improve documents
4. Fix the "help" commands. Before, the "./gitea doctor" can't show the
sub-command help correctly (regression of the last cli/v2 refactoring)
After this PR:
```
./gitea help # show all sub-commands for the app
./gitea doctor # show the sub-commands for the "doctor"
./gitea doctor help # show the sub-commands for the "doctor", as above
```
Before:

After:

There's a bug in the recent logic, `CalcCommitStatus` will always return
the first item of `statuses` or error status, because `state` is defined
with default value which should be `CommitStatusSuccess`
Then
``` golang
if status.State.NoBetterThan(state) {
```
this `if` will always return false unless `status.State =
CommitStatusError` which makes no sense.
So `lastStatus` will always be `nil` or error status.
Then we will always return the first item of `statuses` here or only
return error status, and this is why in the first picture the commit
status is `Success` but not `Failure`.
af1ffbcd63/models/git/commit_status.go (L204-L211)
Co-authored-by: Giteabot <teabot@gitea.io>
This problem occurs because in #25839, the warning status has been
removed, but there is something in the tmpl that hasn't been changed.
related #25839close#26118