Commit graph

969 commits

Author SHA1 Message Date
Gusted
0f79122053
[BUG] Detect protected branch on branch rename
- If a branch cannot be renamed due to a protected branch rule, show
this error in the UI instead of throwing an internal server error.
- Add integration test (also simplify the existing one).
- Resolves #2751
2024-03-26 15:58:52 +01:00
Earl Warren
9397bfd276 Merge pull request 'Offer to remove WIP: prefix in sidebar' (#2660) from 0ko/forgejo:convert-to-normal into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2660
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 10:30:11 +00:00
Gusted
efc79dd41e Fix typo in translation
Regression of 4c1af0d9a6
2024-03-24 21:30:08 +00:00
Earl Warren
5a18b74632 Merge pull request '[TESTS] fail when log.Error is called' (#2657) from oliverpool/forgejo:fail_test_on_log_error into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2657
2024-03-24 07:28:31 +00:00
oliverpool
a0d1cfdf7d fix missing admin.config.allow_dots_in_usernames translation 2024-03-24 07:12:30 +01:00
Earl Warren
0bfd4ca532 Merge pull request 'Allow users to hide all "Add more units..." hints' (#2533) from algernon/forgejo:less-is-more into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2533
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-24 05:42:37 +00:00
Earl Warren
33ede09135 Merge pull request '[PORT] Unify search boxes (gitea#29530)' (#2688) from snematoda/port-29530 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2688
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-24 05:33:13 +00:00
wxiaoguang
44221a3cd7
Customizable "Open with" applications for repository clone (#29320)
Users could customize the "clone" menu with their own application URLs on the admin panel.

Replace #22378
Close #21121
Close #22149
2024-03-23 11:58:54 +01:00
0ko
debeedfe42
Add plural support for PR subtitles 2024-03-22 07:11:24 +01:00
Gergely Nagy
36147f580c
Allow users to hide all "Add more units..." hints
Repositories displaying an "Add more..." tab on the header is a neat way
to let people discover they can enable more units. However, displaying
it all the time for repository owners, even when they deliberately do
not want to enable more units gets noisy very fast.

As such, this patch introduces a new setting which lets people disable
this hint under the appearance settings.

Fixes #2378.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-21 08:15:51 +01:00
Denys Konovalov
847f03b6a6 Unify search boxes (#29530)
Unify all but a few search boxes to use uniform style, uniform
translations and shared templates where possible.
Remove a few duplicated search templates, e. g. code search.

<details><summary>Example after screenshots:</summary>

![grafik](https://github.com/go-gitea/gitea/assets/47871822/e20e7d6b-c6be-4a47-b132-672766f41421)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/d5b11b9c-c12f-4a29-8fb0-24e5aa511d18)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/d86bb444-36c7-426d-9cf1-c634963dffb1)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/a76c0319-0518-484a-a840-563d02b61198)

</details>

Also includes #29700

Co-authored-by: 6543 <6543@obermui.de>

---------

Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
Conflicts:
	routers/web/repo/search.go
	templates/repo/home.tmpl
	templates/repo/search.tmpl
	templates/shared/repo_search.tmpl
2024-03-20 12:31:05 +00:00
Earl Warren
6d340bcfea Merge pull request 'Update look of repo/org tabs on homepage' (#2593) from 0ko/forgejo:hometab into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2593
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-20 11:45:17 +00:00
Earl Warren
84f33ead4e Merge pull request '[BUG] Reflect Cargo index state in settings' (#2698) from gusted/forgejo-cargo-index into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2698
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-20 11:38:26 +00:00
Gusted
461f925554
[BUG] Reflect Cargo index state in settings
- Currently in the Cargo section of the packages setting menu two
buttons are always shown, "Initalize index" and "Rebuild index", however
only of these should be shown depending on the state of the index, if
there's no index the "Initalize index" button should be shown and if
there's an index the "Rebuild index" button should be shown. This patch
does exactly that.
- Resolves #2628
2024-03-20 09:17:49 +01:00
Otto Richter
9e69ef9c51 Label stars/forks link in repo explore 2024-03-19 23:38:08 +01:00
Gusted
7cfdd51dd9 Merge pull request 'Use separate keys for tabs on login screen' (#2630) from 0ko/forgejo:signintabs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2630
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-19 14:56:03 +00:00
Earl Warren
2c80727e8f Merge pull request 'Plurals and translations for heatmap' (#2612) from 0ko/forgejo:oneisone into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2612
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-19 13:24:12 +00:00
0ko
708f4bc3b6 Fix heatmap localization
Fixes #2552
2024-03-19 14:37:03 +05:00
Earl Warren
c16866d4a5 Merge pull request 'English fixes and improvements' (#2631) from 0ko/forgejo:english20240311 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2631
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-19 08:09:27 +00:00
0ko
4c1af0d9a6 [I18N] Fix capitalization in English and reword a few strings
fixes #2551
2024-03-17 21:04:11 +05:00
0ko
008706a438 Offer to remove WIP: prefix in sidebar
Fixes https://codeberg.org/forgejo/forgejo/issues/2654
2024-03-14 20:59:57 +05:00
0ko
ec5c68da4f [I18N] Use separate keys for tabs on login screen 2024-03-13 21:03:09 +05:00
Lunny Xiao
76db6d9e74
Fix 500 when deleting account with incorrect password or unsupported login type (#29579)
Fix #26210

---------

Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit ce8a98f8789a7e4e9ee97ab0abac6064d78fb1f6)
2024-03-11 23:36:59 +07:00
Jason Song
963df82907
Detect broken git hooks (#29494)
Detect broken git hooks by checking if the commit id of branches in DB
is the same with the git repo.

It can help #29338 #28277 and maybe more issues.

Users could complain about actions, webhooks, and activities not
working, but they were not aware that it is caused by broken git hooks
unless they could see a warning.

<img width="1348" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/2b92a46d-7f1d-4115-bef4-9f970bd695da">

It should be merged after #29493. Otherwise, users could see a ephemeral
warning after committing and opening the repo home page immediately.

And it also waits for #29495, since the doc link (the anchor part) will
be updated.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit a4bcfb8ef1d5b2b522f78c9560d53ddbdbb02218)
2024-03-11 23:36:58 +07:00
Earl Warren
c63599d5c9 Merge pull request 'Improve English names & consistency' (#2610) from 0ko/forgejo:english20240308 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2610
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-11 14:06:46 +00:00
0ko
671a4ff402 [I18N] Improve English names & consistency 2024-03-10 19:10:29 +05:00
0ko
097eb0802a Fix repo unarchivation button 2024-03-09 13:29:23 +00:00
0ko
6739b4f590 Update look of repo/org tabs on homepage 2024-03-07 19:01:11 +05:00
0ko
23fae5ec08 [I18N] Improve English locale for admin settings 2024-03-06 22:21:19 +05:00
Tim-Niclas Oelschläger
83e04328df
Filter Repositories by type (#29231)
Filter Repositories by type (resolves #1170, #1318)

before:

![image](https://github.com/go-gitea/gitea/assets/72873130/74e6be62-9010-4ab4-8f9b-bd8afbebb8fb)

after:

![image](https://github.com/go-gitea/gitea/assets/72873130/e4d85ed6-7864-4150-8d72-5194dac1293f)

(cherry picked from commit e3524c63d6d42865ea8288af89b372544d35474b)
2024-03-06 12:10:46 +08:00
wxiaoguang
db19d4eb39
Fix incorrect redirection when creating a PR fails (#29537)
This is only a quick fix to make it easier to backport.

After this PR gets merged, I will propose a new PR to fix the FIXME.

<details>

![image](https://github.com/go-gitea/gitea/assets/2114189/98d1d5c4-2e79-4a75-80e9-76fd898986e0)

</details>

(cherry picked from commit e650f64d812f5ebeb4a11d2ec20f2376c6d963bc)
2024-03-06 12:10:45 +08:00
Gusted
83b6e59718 Merge pull request 'Accessibility: Focus styling and fix Watch/Unwatch buttons' (#2379) from fnetx/accessibility into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2379
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-02 19:16:47 +00:00
Gusted
c63b52c126
[FEAT] Show follow symlink button
- When a user goes opens a symlink file in Forgejo, the file would be
rendered with the path of the symlink as content.
- Add a button that is shown when the user opens a *valid* symlink file,
which means that the symlink must have an valid path to an existent
file and after 999 follows isn't a symlink anymore.
- Return the relative path from the `FollowLink` functions, because Git
really doesn't want to tell where an file is located based on the blob ID.
- Adds integration tests.
2024-03-02 17:58:09 +01:00
Otto Richter
30e0b2f851 Label and focus styling for mobile menu button 2024-03-02 14:31:10 +01:00
Panagiotis "Ivory" Vasilopoulos
f7c26a4491 [I18N] Improve registration / password reset emails
This change does not introduce any new strings, but improves upon some
existing ones.
2024-02-29 19:53:17 +01:00
Gusted
d0e5af7079 Merge pull request '[UI] Actions: Link to Workflow in View' (#1866) from n0toose/forgejo:forgejo-add-workflow-link into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1866
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-28 17:28:16 +00:00
Panagiotis "Ivory" Vasilopoulos
5bc7b8baf8 [UI] Agit: Add link to docs and tooltip to label
Continuation of #2444, which introduced the commit
bf7fb89178 but only added
the label and the tests.

The tooltip explaining what AGit is and its advantages is not
meant to advertise AGit - it is meant to inform the reader that
is presumably not familiar with the workflow that they will not
be able to find a fork or a branch associated with the Pull Request
as a direct consequence of this workflow.

Issue #2474 mentions that we should show instructions on how to
fetch an AGit-created Pull Request, and this is the plan. However,
this may take time, so I might as well make the label a bit more
"complete" and less out-of-place for now if we do not manage to
improve these instructions until the next release (Forgejo v1.22).

Refs: https://codeberg.org/forgejo/forgejo/issues/2474
2024-02-27 17:46:58 +00:00
0ko
2e76e4fb33 [I18N] Improve English strings & consistency 2024-02-27 17:42:59 +00:00
Şahin Akkaya
428008ac19
Implement recent commits graph (#29210)
This is the implementation of Recent Commits page. This feature was
mentioned on #18262.

It adds another tab to Activity page called Recent Commits. Recent
Commits tab shows number of commits since last year for the repository.

(cherry picked from commit d3982bcd814bac93e3cbce1c7eb749b17e413fbd)
2024-02-26 22:30:26 +01:00
Şahin Akkaya
f097799953
Implement code frequency graph (#29191)
### Overview
This is the implementation of Code Frequency page. This feature was
mentioned on these issues: #18262, #7392.

It adds another tab to Activity page called Code Frequency. Code
Frequency tab shows additions and deletions over time since the
repository existed.

Before:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/2603504f-aee7-4929-a8c4-fb3412a7a0f6">

After:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/58c03721-729f-4536-a663-9f337f240963">

---

#### Features
- See additions deletions over time since repository existed
- Click on "Additions" or "Deletions" legend to show only one type of
contribution
- Use the same cache from Contributors page so that the loading of data
will be fast once it is cached by visiting either one of the pages

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 875f5ea6d83c8371f309df99654ca3556623004c)
2024-02-26 22:30:26 +01:00
Carlos Felgueiras
fc384e494e
Fix validity of the FROM email address not being checked (#29347)
Fixes #27188.
Introduces a check on the installation that tries to parse the FROM
address. If it fails, shows a new error message to the user.

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit 6f6120dfa8d549d0b866eeb9317054fea831c844)

Conflicts:
	options/locale/locale_en-US.ini
	context
2024-02-26 22:30:26 +01:00
Gusted
3d3196eb3c Merge pull request '[TRANSLATION] Clarify description in deletion modal' (#2488) from gusted/forgejo-clarify-translation into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2488
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-26 15:51:14 +00:00
Gusted
8018c2c761
[TRANSLATION] Clarify description in deletion modal
- The value is now in the form `owner/repo` since #1473, so update the
label to reflect this.
- Ref: #2412
2024-02-26 16:09:06 +01:00
Earl Warren
775956cc68 Merge pull request '[BUG] Don't overwrite protected branch accidentally' (#2473) from gusted/forgejo-error-duplicate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2473
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-26 14:55:09 +00:00
Gusted
1bab4358ac
[BUG] Don't overwrite protected branch accidentally
- If a user tries to create another protected branching rule that
specifies a set of branches already used by another rule, do not allow
it.
- Update the translation accordingly.
- Adds integration test.
- Resolves #2455
2024-02-25 20:09:18 +01:00
Earl Warren
006b2dd381 Merge pull request 'Eliminate wrapping quotes in English locale' (#2467) from 0ko/forgejo:rnd-quotes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2467
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-25 15:03:29 +00:00
Earl Warren
ef1d579c41 Merge pull request '[UI] Agit: Add AGit label to AGit-created PRs' (#2444) from n0toose/agit-indicator into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2444
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-25 14:48:09 +00:00
0ko
e34ead7a46 [I18N] eliminate wrapping quotes 2024-02-25 17:03:09 +05:00
Panagiotis "Ivory" Vasilopoulos
bf7fb89178 [UI] Agit: Add AGit label to AGit-created PRs
Adds a label to Pull Requests that were created using AGit-Flow,
in order to prevent situations where a contributor uses AGit-Flow
to push new changes - only to realize that they did not use AGit-Flow
in the first place, and that they just opened a new PR accidentally
(that was me).

Also intended to raise general awareness about the feature. Some
additional work, such as adding a tooltip, still needs to be
done.

A small typo fix for a comment and (exclusively) formatting fixes
in the copyright header are also included.

Refs: https://codeberg.org/forgejo/forgejo/issues/2433
2024-02-23 21:09:08 +01:00
Earl Warren
6531d765a0 Merge pull request 'Fixes & Improvements for English locale' (#2437) from 0ko/forgejo:english240222 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2437
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-23 12:22:51 +00:00