summaryrefslogtreecommitdiffstats
path: root/routers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Prevent re-review and dismiss review actions on closed and merged PRs (#30065)Kemal Zebari2024-03-303-6/+19
| | | | | | | | | | | | | | | | | | | | | | Resolves #29965. --- Manually tested this by: - Following the [installation](https://docs.gitea.com/next/installation/install-with-docker#basics) guide (but built a local Docker image instead) - Creating 2 users, one who is the `Owner` of a newly-created repository and the other a `Collaborator` - Had the `Collaborator` create a PR that the `Owner` reviews - `Collaborator` resolves conversation and `Owner` merges PR And with this change we see that we can no longer see re-request review button for the `Owner`: <img width="1351" alt="Screenshot 2024-03-25 at 12 39 18 AM" src="https://github.com/go-gitea/gitea/assets/60799661/bcd9c579-3cf7-474f-a51e-b436fe1a39a4"> (cherry picked from commit 242b331260925e604150346e61329097d5731e77)
* Add default board to new projects, remove uncategorized pseudo-board (#29874)Denys Konovalov2024-03-303-132/+30
| | | | | | | | | | | | | | | | | | | | | | | | | On creation of an empty project (no template) a default board will be created instead of falling back to the uneditable pseudo-board. Every project now has to have exactly one default boards. As a consequence, you cannot unset a board as default, instead you have to set another board as default. Existing projects will be modified using a cron job, additionally this check will run every midnight by default. Deleting the default board is not allowed, you have to set another board as default to do it. Fixes #29873 Fixes #14679 along the way Fixes #29853 Co-authored-by: delvh <dev.lh@web.de> (cherry picked from commit e5160185ed65fd1c2bcb2fc7dc7e0b5514ddb299) Conflicts: options/locale/locale_en-US.ini trivial conflict because Forgejo strings do not have surrounding double quotes
* Relax generic package filename restrictions (#30135)wxiaoguang2024-03-302-5/+89
| | | | | | | | | | Now, the chars `=:;()[]{}~!@#$%^ &` are possible as well Fixes #30134 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me> (cherry picked from commit 1ad48f781eb0681561b083b49dfeff84ba51f2fe)
* Refactor render (#30136)wxiaoguang2024-03-301-8/+7
| | | | (cherry picked from commit f1707f4562158853552d57394b8b1fea6df645b0)
* Remove repetitive words (#30091)crazeteam2024-03-302-2/+2
| | | | | | | remove repetitive words Signed-off-by: crazeteam <lilujing@outlook.com> (cherry picked from commit ecbc9cee2b69cd9707acb1e23ccbca048484c460)
* Migrate margin and padding helpers to tailwind (#30043)silverwind2024-03-303-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will conclude the refactor of 1:1 class replacements to tailwind, except `gt-hidden`. Commands ran: ```bash perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/* ``` (cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de) Conflicts: routers/web/repo/view.go templates/base/head_navbar.tmpl templates/repo/code/recently_pushed_new_branches.tmpl templates/repo/diff/box.tmpl templates/repo/diff/compare.tmpl templates/repo/diff/conversation.tmpl templates/repo/header.tmpl templates/repo/issue/filter_list.tmpl templates/repo/issue/view_content/conversation.tmpl templates/repo/issue/view_content/sidebar.tmpl templates/repo/settings/options.tmpl templates/repo/view_file.tmpl templates/shared/user/blocked_users.tmpl templates/status/500.tmpl web_src/js/components/DashboardRepoList.vue resolved by prefering Forgejo version and applying the commands to all files
* [Port] gitea#30014: Various code view improvementssilverwind2024-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Restore missing styles for message close icon 2. Move `code-line-button` so that it does not go off-screen on small viewports 3. Make `code-line-button` look and behave like other buttons 4. Make `code-line-button` work in blame 5. Make the active selection span the whole line, not just the code part 6. Tweak colors, make dark theme code bg darker, make line numbers same color in diff and file view. 7. Move code background to parent, fixing border radius and other problems 8. Enable code wrap in blame 9. Improve blame responsiveness 10. Remove `--color-code-sidebar-bg` in blame, now it uses same background as code 11. Rename `--color-active-line` to `--color-highlight-bg` 12. Add `--color-highlight-bg` 13. Fix button group borders on hover and border-right on last button. <img width="1343" alt="Screenshot 2024-03-23 at 22 34 13" src="https://github.com/go-gitea/gitea/assets/115237/fcbb919f-5dc3-43f0-97f6-870d6f412554"> <img width="1334" alt="Screenshot 2024-03-23 at 22 34 26" src="https://github.com/go-gitea/gitea/assets/115237/ca44c3b7-4328-4645-ba49-b0dc6a5ac06d"> <img width="1338" alt="Screenshot 2024-03-23 at 22 34 57" src="https://github.com/go-gitea/gitea/assets/115237/00eb0b5a-1ec7-4669-a94a-4602b9d1c1ac"> <img width="1337" alt="Screenshot 2024-03-23 at 22 34 42" src="https://github.com/go-gitea/gitea/assets/115237/752edc4a-064f-413c-9dff-c086187fcd85"> Fixes: https://github.com/go-gitea/gitea/issues/18074 --- Conflict resolution: Trivial. Ref: https://codeberg.org/forgejo/forgejo/issues/2776 (cherry picked from commit db01bf6cc88a8a7b5132b9306b3af1649566b10f)
* Merge pull request '[PERFORMANCE] git check-attr on bare repo if supported' ↵Earl Warren2024-03-282-30/+26
|\ | | | | | | | | | | | | (#2763) from oliverpool/forgejo:check_attr_bare into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2763 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * [PERFORMANCE] git check-attr on bare repo if supportedoliverpool2024-03-282-30/+26
| |
* | Merge pull request '[PORT] Support repo code search without setting up an ↵Earl Warren2024-03-281-23/+35
|\ \ | | | | | | | | | | | | | | | | | | indexer (gitea#29998)' (#2813) from snematoda/port-git-grep into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2813 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * | Support repo code search without setting up an indexer (#29998)wxiaoguang2024-03-281-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using git's ability, end users (especially small instance users) do not need to enable the indexer, they could also benefit from the code searching feature. Fix #29996 ![image](https://github.com/go-gitea/gitea/assets/2114189/11b7e458-88a4-480d-b4d7-72ee59406dd1) ![image](https://github.com/go-gitea/gitea/assets/2114189/0fe777d5-c95c-4288-a818-0427680805b6) --------- Co-authored-by: silverwind <me@silverwind.io>
| * | Reverts commits releated to git-grepShiny Nematoda2024-03-281-45/+24
| |/ | | | | | | | | | | This reverts commit 51fb6f3983f15aa3c2db1feadcc13db1692315ec 71a72d8a22f2ba5d08415542371f3529a01571dd
* | [REFACTOR] webhook repo naming consistencyoliverpool2024-03-272-27/+27
| |
* | [REFACTOR] simplify checkHookTypeoliverpool2024-03-271-23/+8
| |
* | [REFACTOR] webhook move edit endpointsoliverpool2024-03-271-4/+4
| |
* | [TESTS] webhook forms keep submitted data when invalidoliverpool2024-03-271-13/+31
| |
* | [REFACTOR] merge once-called functionsoliverpool2024-03-272-84/+44
| |
* | [REFACTOR] webhook gogs endpointoliverpool2024-03-272-30/+0
| |
* | [REFACTOR] webhook packagist endpointoliverpool2024-03-272-28/+0
| |
* | [REFACTOR] webhook wechatwork endpointoliverpool2024-03-272-23/+0
| |
* | [REFACTOR] webhook feishu endpointoliverpool2024-03-272-23/+0
| |
* | [REFACTOR] webhook msteams endpointoliverpool2024-03-272-23/+0
| |
* | [REFACTOR] webhook telegram endpointoliverpool2024-03-272-28/+0
| |
* | [REFACTOR] webhook dingtalk endpointoliverpool2024-03-272-23/+0
| |
* | [REFACTOR] webhook discord endpointoliverpool2024-03-272-27/+0
| |
* | [REFACTOR] webhook slack endpointsoliverpool2024-03-272-29/+0
| |
* | [REFACTOR] webhook forgejo/gitea endpointsoliverpool2024-03-272-60/+0
| |
* | [REFACTOR] webhook matrix endpointsoliverpool2024-03-272-29/+51
| |
* | Merge pull request '[REFACTOR] webhook.Handler interface' (#2758) from ↵Earl Warren2024-03-271-11/+3
|\ \ | |/ |/| | | | | | | | | oliverpool/forgejo:webhook_2_interface into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2758 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * [REFACTOR] webhook.Handler interfaceoliverpool2024-03-241-11/+3
| |
* | Merge pull request '[ACTIONS] port scheduled actions from Gitea' (#2826) ↵Earl Warren2024-03-274-23/+12
|\ \ | | | | | | | | | | | | | | | | | | from earl-warren/forgejo:wip-gitea-schedule into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2826 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * | [ACTIONS] port scheduled actions from GiteaEarl Warren2024-03-261-4/+3
| | | | | | | | | | | | Refs: https://codeberg.org/forgejo/forgejo/issues/2798
| * | Fix an actions schedule bug (#28942)Zettat1232024-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #28691, schedule plans will be deleted when a repo's actions unit is disabled. But when the unit is enabled, the schedule plans won't be created again. This PR fixes the bug. The schedule plans will be created again when the actions unit is re-enabled (cherry picked from commit adc3598a755b43e3911266d7fa575c121e16613d)
| * | Fix schedule tasks bugs (#28691)Lunny Xiao2024-03-253-19/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #28157 This PR fix the possible bugs about actions schedule. - Move `UpdateRepositoryUnit` and `SetRepoDefaultBranch` from models to service layer - Remove schedules plan from database and cancel waiting & running schedules tasks in this repository when actions unit has been disabled or global disabled. - Remove schedules plan from database and cancel waiting & running schedules tasks in this repository when default branch changed. (cherry picked from commit 97292da96048b036cbe36b3ea66503ac568a73e7) Conflicts: modules/actions/github.go routers/web/repo/setting/default_branch.go routers/web/repo/setting/setting.go services/repository/branch.go services/repository/setting.go tests/integration/actions_trigger_test.go
* | Escape paths for find file correctly (#30026)wxiaoguang2024-03-261-2/+3
| | | | | | | | | | | | Fix #30020 (cherry picked from commit 1cdc6c3a4ea28396788b2697f9cf257df161ff9a)
* | Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995)Lunny Xiao2024-03-267-26/+14
| | | | | | | | | | | | | | | | (cherry picked from commit f8ab9dafb7a173a35e9308f8f784735b0f822439) Conflicts: routers/web/repo/fork.go trivial context conflict, the file does not exist in Forgejo
* | Fix some pending problems (#29985)wxiaoguang2024-03-262-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes are quite independent and trivial, so I don't want to open too many PRs. * https://github.com/go-gitea/gitea/pull/29882#discussion_r1529607091 * the `f.Close` should be called properly * the error message could be more meaningful (https://github.com/go-gitea/gitea/pull/29882#pullrequestreview-1942557935) * https://github.com/go-gitea/gitea/pull/29859#pullrequestreview-1942324716 * the new translation strings don't take arguments * https://github.com/go-gitea/gitea/pull/28710#discussion_r1443778807 * stale for long time * #28140 * a form was forgotten to be changed to work with backend code (cherry picked from commit 226231ea27d4f2b0f09fa4efb39501507613b284) Conflicts: templates/repo/issue/view_content/pull.tmpl discarded because unexplained templates/status/404.tmpl implemented differently in Forgejo
* | Fix bugs in rerunning jobs (#29955)Zettat1232024-03-262-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #28761 Fix #27884 Fix #28093 ## Changes ### Rerun all jobs When rerun all jobs, status of the jobs with `needs` will be set to `blocked` instead of `waiting`. Therefore, these jobs will not run until the required jobs are completed. ### Rerun a single job When a single job is rerun, its dependents should also be rerun, just like GitHub does (https://github.com/go-gitea/gitea/issues/28761#issuecomment-2008620820). In this case, only the specified job will be set to `waiting`, its dependents will be set to `blocked` to wait the job. ### Show warning if every job has `needs` If every job in a workflow has `needs`, all jobs will be blocked and no job can be run. So I add a warning message. <img src="https://github.com/go-gitea/gitea/assets/15528715/88f43511-2360-465d-be96-ee92b57ff67b" width="480px" /> (cherry picked from commit 2f060c5834d81f0317c795fc281f9a07e03e5962)
* | Refactor StringsToInt64s (#29967)wxiaoguang2024-03-264-11/+11
| | | | | | | | | | | | And close #27176 (cherry picked from commit cdb4d1a8db096d60dba04728924dab85def45b19)
* | Performance improvements for pull request list page (#29900)Lunny Xiao2024-03-263-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR will avoid load pullrequest.Issue twice in pull request list page. It will reduce x times database queries for those WIP pull requests. Partially fix #29585 --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit 62f8174aa2fae1481c7e17a6afcb731a5b178cd0) Conflicts: models/activities/notification_list.go moved to models/activities/notification.go
* | Restore deleted branches when syncing (#29898)Jason Song2024-03-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression of #29493. If a branch has been deleted, repushing it won't restore it. Lunny may have noticed that, but I didn't delve into the comment then overlooked it: https://github.com/go-gitea/gitea/pull/29493#discussion_r1509046867 The additional comments added are to explain the issue I found during testing, which are unrelated to the fixes. (cherry picked from commit f371f84fa3456c2a71470632b6458d81e4892a54)
* | Fix milestoneID filter bug in issue list (#29897)Zettat1232024-03-261-3/+3
| | | | | | | | | | | | Fix #29717 (cherry picked from commit 656d8e2267dbdbb595704d507a780533038bb7ed)
* | Fix missing error check of bufio.Scanner (#29882)coldWater2024-03-261-0/+4
| | | | | | | | | | | | maybe more (cherry picked from commit 0e183d81fc5283f9d2047472de580e4f04a046c1)
* | Only do counting when count_only=true for repo dashboard (#29884)wxiaoguang2024-03-261-10/+15
| | | | | | | | | | Ref: #29878 (cherry picked from commit b251e608c01392c947f84be387f956541bfea25c)
* | Editor error message misleading due to re-used key. (#29859)buckybytes2024-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message: `editor.file_changed_while_editing = The file contents have changed since you started editing. <a target="_blank" rel="noopener noreferrer" href="%s">Click here</a> to see them or <strong>Commit Changes again</strong> to overwrite them.` Is re-used in inappropriate contexts. The link in the key goes to a 404 when the key is used in a situation where the file contents have not changed. Added two new keys to differentiate commit id mismatch and push out of date conditions. (cherry picked from commit 16e360099d0a515d429538ec88cff1f3ede23fb4)
* | Fix missing code in the user profile (#29865)Nanguan Lin2024-03-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fix #29820 deleted by https://github.com/go-gitea/gitea/pull/29248/files#diff-2b0b591787f16325539485e648a09ab6d3177f47dc129cfe84a35ffe141dfd19L39-L62, which causing malfunction of follow/unfollow and missing description in the user profile page. (cherry picked from commit 5ca65d33906ebbca1e502536ffef18942b541c1d) Conflicts: routers/web/shared/user/header.go trivial context conflict because of user blocking code
* | [BUG] Detect protected branch on branch renameGusted2024-03-261-1/+7
|/ | | | | | | - 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
* Merge pull request '[TESTS] fail when log.Error is called' (#2657) from ↵Earl Warren2024-03-246-7/+10
|\ | | | | | | | | | | oliverpool/forgejo:fail_test_on_log_error into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2657
| * drop log.Error in ReadRepoNotificationsoliverpool2024-03-241-2/+0
| |
| * packages/maven: log.Warn on bad requestoliverpool2024-03-241-1/+4
| |