Commit graph

19014 commits

Author SHA1 Message Date
silverwind
50e0587546
Action view mobile improvements and fixes (#30309)
Fix the action issue in https://github.com/go-gitea/gitea/issues/30303,
specifically:

- Use opaque step header hover background to avoid transparency issue
- Un-sticky the `action-view-left` on mobile, it would otherwise overlap
into right view
- Improve commit summary, let it wrap
- Fix and comment z-indexes
- Tweak width for run-list-item-right so it wastes less space on desktop
- Synced latest changes to console colors from dark to light theme

<img width="467" alt="Screenshot 2024-04-06 at 18 58 15"
src="https://github.com/go-gitea/gitea/assets/115237/8ad26b72-6cd9-4522-8ad1-6fd86b2d0d53">

(cherry picked from commit 0178eaec256a349371c75e582edd7fefca2085d0)
2024-04-15 20:01:35 +02:00
silverwind
0bd1e13676
Fix checkboxes on mobile view, remove some dead css (#30308)
Fix the checkbox issues in
https://github.com/go-gitea/gitea/issues/30303 which were existing
problems with these selectors, but made visible with
https://github.com/go-gitea/gitea/pull/30162.

There is a lot of dead/useless CSS in `form.css`, I only fixed the two
problems and remove CSS that was definitely not in use or needed.

<img width="369" alt="Screenshot 2024-04-06 at 18 00 08"
src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129">
<img width="405" alt="Screenshot 2024-04-06 at 18 00 28"
src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2">

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 644ade5ae6805a3db063b3f81a596febe49bacaf)
2024-04-15 20:01:35 +02:00
wxiaoguang
9b8de15797
Clean up log messages (#30313)
`log.Xxx("%v")` is not ideal, this PR adds necessary context messages.
Remove some unnecessary logs.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 83f83019ef3471b847a300f0821499b3896ec987)

Conflicts:
	- modules/util/util.go
          Conflict resolved by picking `util.Iif` from 654cfd1dfbd3f3f1d94addee50b6fe2b018a49c3
2024-04-15 20:01:35 +02:00
0ko
089e37026f Add integration test for EasyMDE button 2024-04-15 22:59:26 +05:00
silverwind
8110dc959a
[PORT] gitea#30342: Fix label-list rendering in timeline, decrease gap
Not sure exactly when this regressed, but has been a while I think.

Before:

<img width="895" alt="Screenshot 2024-04-08 at 22 46 50"
src="https://github.com/go-gitea/gitea/assets/115237/9b1788f8-017e-4fe1-8ab9-938e0d76fb41">

After:

<img width="689" alt="Screenshot 2024-04-08 at 23 00 58"
src="https://github.com/go-gitea/gitea/assets/115237/90193df9-5c24-4a1a-96fe-3d4e8392063c">

Co-authored-by: Giteabot <teabot@gitea.io>

---
Conflict resolution: none

(cherry picked from commit 8d14266269f1b4fd5e13d701830919c1a1613444)
2024-04-15 19:52:59 +02:00
0ko
ceba1abe06 Merge pull request 'Improve English locale' (#2941) from 0ko/forgejo:english20240401 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2941
Reviewed-by: Otto <otto@codeberg.org>
2024-04-15 17:34:52 +00:00
Earl Warren
3d2fa4930d Merge pull request 'Update ghcr.io/visualon/renovate Docker tag to v37.296.0' (#3221) from renovate/ghcr.io-visualon-renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3221
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-04-15 17:25:56 +00:00
Earl Warren
fc04d48f1f Merge pull request 'Update dependency happy-dom to v14.7.1' (#3224) from renovate/happy-dom-14.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3224
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-04-15 17:25:21 +00:00
Codeberg Translate
64f4f7a38e [I18N] Translations update from Weblate (#3138)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: EssGeeEich <EssGeeEich@users.noreply.translate.codeberg.org>
Co-authored-by: rguards <rguards@users.noreply.translate.codeberg.org>
Co-authored-by: kecrily <kecrily@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3138
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-04-15 17:23:31 +00:00
Earl Warren
0bf73bae39 Merge pull request '[CI] configure backport to comment on the PR on failure' (#3237) from earl-warren/forgejo:wip-backport into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3237
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-04-15 17:15:12 +00:00
Earl Warren
51c2daec6e Merge pull request 'fix(actions): call automerge service on successful commit state' (#3231) from viceice/forgejo:fix/actions/automerge-head into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3231
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-15 16:47:23 +00:00
Earl Warren
bd431f64f6
[CI] configure backport to comment on the PR on failure 2024-04-15 18:23:57 +02:00
0ko
703aee4cad Remove EasyMDE from various areas
Ref https://codeberg.org/forgejo/forgejo/issues/2831

Removed from:
- form for creating comment
- form for updating comment
- popup reviewing form
- line reviewing form
- I did not check the use of textarea.tmpl but I belive its used for issue templates, so also removed
- I did not check the use of box.tmpl, could not get any comments on compare

EasyMDE is left for these pages:
- release notes editor
- wiki editor
2024-04-15 21:23:33 +05:00
0ko
f5c7ccaeff Make display of EasyMDE in UI optional to template
This commit adds EasyMDE field to combomarkdowneditor, as well as to all its calls.
2024-04-15 21:23:33 +05:00
Renovate Bot
84b3136f26 Update ghcr.io/visualon/renovate Docker tag to v37.296.0 2024-04-15 16:07:18 +00:00
Earl Warren
d780a9a47d Merge pull request '[PORT] gitea#30430: Fix rename branch 500 when the target branch is deleted but exist in database' (#3233) from gusted/forgejo-bp-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3233
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-15 15:36:15 +00:00
Earl Warren
4985a44058 Merge pull request '[PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs' (#3234) from gusted/forgejo-bp-2 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3234
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-15 15:34:27 +00:00
Michael Kriese
36f4732e6a
fix(actions): call automerge service on successful commit state
- Backport of https://github.com/go-gitea/gitea/pull/30225
2024-04-15 16:17:45 +02:00
silverwind
f6c0c39f1a
[PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs
1. The previous color contrast calculation function was incorrect at
least for the `#84b6eb` where it output low-contrast white instead of
black. I've rewritten these functions now to accept hex colors and to
match GitHub's calculation and to output pure white/black for maximum
contrast. Before and after:
<img width="94" alt="Screenshot 2024-04-02 at 01 53 46"
src="https://github.com/go-gitea/gitea/assets/115237/00b39e15-a377-4458-95cf-ceec74b78228"><img
width="90" alt="Screenshot 2024-04-02 at 01 51 30"
src="https://github.com/go-gitea/gitea/assets/115237/1677067a-8d8f-47eb-82c0-76330deeb775">

2. Fix project-related issues:

- Expose the new `ContrastColor` function as template helper and use it
for project cards, replacing the previous JS solution which eliminates a
flash of wrong color on page load.
- Fix a bug where if editing a project title, the counter would get
lost.
- Move `rgbToHex` function to color utils.

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>

---
Conflict resolution: Trivial.
(cherry picked from commit 36887ed3921d03f1864360c95bd2ecf853bfbe72)
2024-04-15 16:11:34 +02:00
Gusted
db39b8f4a7
[PORT] gitea#30430: Fix rename branch 500 when the target branch is deleted but exist in database
Fix https://github.com/go-gitea/gitea/issues/30428

---

Conflict resolution: trivial and move test to own subtest run directly
after `Normal`.

(cherrypicked commit 9466fec879f4f2c88c7c1e7a5cffba319282ab66)
2024-04-15 16:03:09 +02:00
Gusted
6f4827b3e0 Merge pull request '[CHORE] Exclude git repository testdate from watching' (#3229) from gusted/forgejo-air into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3229
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-15 13:39:59 +00:00
oliverpool
16879b07d2 [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167)
Related to  #2773
Related to Refactor URL detection [gitea#29960](https://github.com/go-gitea/gitea/pull/29960)
Related to Refactor external URL detection [gitea#29973](https://github.com/go-gitea/gitea/pull/29973)

I added a bunch of tests to `httplib.TestIsRiskyRedirectURL` and some cases should be better handled (however it is not an easy task).

I also ported the removal of `utils.IsExternalURL`, since it prevents duplicated (subtle) code.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3167
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2024-04-15 13:03:08 +00:00
Gusted
0f47b04b49
[CHORE] Exclude git repository testdate from watching
- Add the _recently_ added Git repository for testdata to the exclusion
list of air.
2024-04-15 13:00:03 +02:00
Renovate Bot
8e40ba197a Update dependency happy-dom to v14.7.1 2024-04-15 02:03:36 +00:00
Earl Warren
20c0292b5c Merge pull request 'fix(actions): the trigger user of a schedule is the action user' (#3213) from earl-warren/forgejo:wip-actions-trigger-user into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3213
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-04-14 17:35:25 +00:00
Earl Warren
c3e2c25359
fix(actions): the trigger user of a schedule is the action user
The user that caused the notification to re-evaluates the
schedules is not the one that will trigger the workflows. They are
background tasks that are authored by the action user (id -2).

Such a mis-assignment is problematic when the user that caused the
notification is deleted.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3211
2024-04-14 12:53:20 +02:00
Earl Warren
b833e5e7db Merge pull request '[BUG] Fix code search in explore reporting as git grep even with indexer enabled' (#3173) from snematoda/fix-grep-tmpl into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3173
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-13 08:52:08 +00:00
0ko
ea7a3ea8bf Merge pull request 'Fix box rounding on dashboard' (#3194) from 0ko/forgejo:fix-dashboard-rounding into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3194
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-13 07:17:10 +00:00
Shiny Nematoda
a67ca43f75 add test 2024-04-13 06:04:00 +00:00
Earl Warren
9f785710e9 Merge pull request 'Update module golang.org/x/vuln/cmd/govulncheck to v1.0.4' (#3201) from renovate/golang.org-x-vuln-cmd-govulncheck-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3201
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-13 05:38:16 +00:00
Earl Warren
306e0706a1
GOVULNCHECK_PACKAGE: pin to v1 instead of patch version 2024-04-13 07:00:52 +02:00
Renovate Bot
463ead502d Update module golang.org/x/vuln/cmd/govulncheck to v1.0.4 2024-04-13 02:11:12 +00:00
Renovate Bot
2059abd9c0 Update ghcr.io/visualon/renovate Docker tag to v37.290.1 2024-04-13 00:04:43 +00:00
Mai-Lapyst
1d1c0131bb Fix inline permalinks across repo; closes #2965 (#3042)
This PR fixes the possible ambiguity of rendered inline permalinks across repos by adding it as a suffix to the title element if the permalink refers to a file not inside the current repository. Closes #2965

![grafik](/attachments/e70e37b8-24c7-4f7b-ab52-92f1e8dfb009)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3042
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Co-committed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-04-12 22:30:20 +00:00
Earl Warren
828ae39c22 Merge pull request '[BUG] Fix for PyPi Registry PEP 503 Compliance' (#3190) from Zottelchen/forgejo:bug/pep-503 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3190
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 22:19:51 +00:00
Zottelchen
14badb37fe Update tests/integration/api_packages_pypi_test.go 2024-04-12 21:02:42 +00:00
Earl Warren
0e42ba33fb Merge pull request '[BUG] Render correct label link' (#3187) from gusted/forgejo-labels into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3187
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-12 20:43:16 +00:00
Earl Warren
7bd3b18ebc Merge pull request 'Fix the settings tab highlighting' (#3191) from algernon/forgejo:highlight-of-another into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3191
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-12 20:42:31 +00:00
0ko
39cdcb4daf Fix box rounding on dashboard
Regression of d40127a3e8 (diff-1daf5eae3896bddcde764fc8a88dc3fd0c0ea21a) and 4711d3311b (diff-1daf5eae3896bddcde764fc8a88dc3fd0c0ea21a).
2024-04-12 23:16:17 +05:00
Gergely Nagy
65ed86e396
Fix the settings tab highlighting
When visiting a repos `/settings/units` page, highlight the active tab
properly: "Add more..." if the tab is displayed, or "Settings"
otherwise.

Fixes #3188.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-04-12 19:11:21 +02:00
Zottelchen
303b95a1c1 Update templates/api/packages/pypi/simple.tmpl 2024-04-12 16:43:30 +00:00
Gusted
7a97c05206
[BUG] Render correct label link
- Render the correct label for pull requests, it should link to the pull
requests list and not the issue list.
- Add unit test.
- Resolves https://codeberg.org/forgejo/forgejo/issues/3183
2024-04-12 17:23:20 +02:00
Gusted
0c42e3c755 Merge pull request '[CHORE] Remove println' (#3185) from gusted/forgejo-println into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3185
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 12:35:38 +00:00
Earl Warren
9ef05fec5d Merge pull request 'Update forgejo/forgejo-build-publish action to v5' (#3182) from renovate/forgejo-forgejo-build-publish-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3182
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 12:22:24 +00:00
Gusted
706846b628
[CHORE] Remove println
- It's not recommended to use it per the documentation: https://pkg.go.dev/builtin#println.
2024-04-12 13:36:31 +02:00
Earl Warren
ed7957d987 Merge pull request '[CI] backport upgrade to git-backporting@v4.8.0' (#3155) from earl-warren/forgejo:wip-ci-backport into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3155
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-04-12 10:31:06 +00:00
Renovate Bot
d7ae60ae91 Update forgejo/forgejo-build-publish action to v5 2024-04-12 10:19:15 +00:00
Earl Warren
c6a117fe4f Merge pull request 'Upgrade github.com/editorconfig-checker/editorconfig-checker to v2.8.0' (#3181) from viceice/forgejo:build/upgrade-editorconfig-checker into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3181
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 07:29:07 +00:00
Michael Kriese
222e69bfaa
Upgrade github.com/editorconfig-checker/editorconfig-checker to v2.8.0 2024-04-12 09:00:41 +02:00
Earl Warren
c85f0f59a8 Merge pull request 'Update module github.com/rhysd/actionlint/cmd/actionlint to v1.6.27' (#3179) from renovate/github.com-rhysd-actionlint-cmd-actionlint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3179
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 06:43:46 +00:00