* add black list and white list support for migrating repositories
* specify log message
* use blocklist/allowlist
* allways use lowercase to match url
* Apply allow/block
* Settings: use existing "migrations" section
* convert domains lower case
* dont store unused value
* Block private addresses for migration by default
* use proposed-upstream func to detect private IP addr
* add own error for blocked migration, add tests, imprufe api
* fix test
* fix-if-localhost-is-ipv4
* rename error & error message
* rename setting options
* Apply suggestions from code review
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Set RUN_MODE prod by default (#13765)
I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.
Co-authored-by: techknowlogick <[email protected]>
* flip default in checkRunMode
Co-authored-by: techknowlogick <[email protected]>
The .blob-excerpt elements don't have these data attributes in some
cases resulting in bogus http request when expanding a diff and clicking
into the expanded area. This prevents those.
Should backport to 1.13.
Fixes: https://github.com/go-gitea/gitea/issues/13759
* ui: show 'owner' tag for real owner
Signed-off-by: a1012112796 <[email protected]>
* Update custom/conf/app.example.ini
* simplify logic
fix logic
fix a small bug about original author
* remove system manager tag
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
* Push HEAD instead of master when initialising repositories
It is possible on modern gits to change the initial branch to something other than
master. This breaks initialising repositories because we assume that the initial
branch is going to be master unless specifically changed.
This PR simply bypasses this issue by pushing the HEAD rather than the master branch.
Signed-off-by: Andrew Thornton <[email protected]>
* Update modules/repository/init.go
Co-authored-by: mrsdizzie <[email protected]>
Co-authored-by: mrsdizzie <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: mrsdizzie <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* final fix 2.0?
* ignore Approvals for pulls if not found
* CI.restart()
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
* Add email validity check (#13475)
* Improve error feedback for duplicate deploy keys
Instead of a generic HTTP 500 error page, a flash message is rendered
with the deploy key page template so inform the user that a key with the
intended title already exists.
* API returns 422 error when key with name exists
* Add email validity checking
Add email validity checking for the following routes:
[Web interface]
1. User registration
2. User creation by admin
3. Adding an email through user settings
[API]
1. POST /admin/users
2. PATCH /admin/users/:username
3. POST /user/emails
* Add further tests
* Add signup email tests
* Add email validity check for linking existing account
* Address PR comments
* Remove unneeded DB session
* Move email check to updateUser
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* skip email validation on empty string (#13627)
- move validation into its own function
- use a session for UpdateUserSetting
* rm TODO for backport
Co-authored-by: Chris Shyi <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
The code for parsing diff hunks has a bug whereby a very long line in a very long diff would not be completely read leading to an unexpected character.
This PR ensures that the line is completely cleared
* Also allow git max line length <4096
* Add test case
Fix#13602
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Andrew Thornton <[email protected]>
* Fixes#13641 - Filtering in Pull Request kept all the time.
- The URL contains all the time the assignee in cases
where once a type has been selected.
Signed-off-by: Karl Heinz Marbaise <[email protected]>
* Followup Fixes#13641 - Filtering in Pull Request kept all the time.
- The URL contains all the time the assignee in cases
where once a type has been selected.
- The same behaviour was observed issues viewed via milestones.
Signed-off-by: Karl Heinz Marbaise <[email protected]>
* prevent git operations for inactive users
* Some fixes
* Deny push to the repositories which's owner is inactive
* deny operations also when user is ProhibitLogin
Co-authored-by: zeripath <[email protected]>
Co-authored-by: zeripath <[email protected]>
* Fix panic bug in handling multiple references in commit (#13486)
The issue lay in determining the position of matches on a second run round
a commit message in FindAllIssueReferences.
Fix#13483
Signed-off-by: Andrew Thornton <[email protected]>
* CI.restart()
Co-authored-by: Andrew Thornton <[email protected]>
* When replying to an outdated comment it should not appear on the files page
This happened because the comment took the latest commitID as its base instead of the
reviewID that it was replying to.
There was also no way of creating an already outdated comment - and a
reply to a review on an outdated line should be outdated.
Signed-off-by: Andrew Thornton <[email protected]>
* fix test
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Alternative fix for HTML diff entity split
This commit both reverts PR #13357 and uses the exiting implementation alredy used for spans to fix the same issue. That PR duplicates most of logic that is already present elsewhere and still was failing for some cases. This should be simpler as it uses the existing logic that already works for <span>s being split apart.
Added both test cases as well.
* Update gitdiff_test.go
* fmt
* entity can have uppercase letter, also add detailed comment per @zeripath
* Fix 'add code comment' button being invisible all the time
* Fix off-center icon
* Remove old JS hover hack
* Show on full-line hover
Co-authored-by: techknowlogick <[email protected]>
(cherry picked from commit 7f7e7f3ca4)
* Fix minio bug
* Add tests for storage configuration
* Change the Seek flag to keep compitable minio?
* Fix test when first-byte-pos of all ranges is greater than the resource length
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Fix scrolling to resolved comment anchors
As described on discord, when the window.location.hash refers to a
resolved comment then the scroll to functionality does not work.
This PR fixes this.
Signed-off-by: Andrew Thornton <[email protected]>
* Apply suggestions from code review
Co-authored-by: silverwind <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Fix links to repositories in /user/setting/repos
somehow the links gained a spurious $ in the links.
Signed-off-by: Andrew Thornton <[email protected]>
* And fix#13359
Signed-off-by: Andrew Thornton <[email protected]>
An extension to #13444 - where we now ensure that comment reaction failures do not cause migrations failure
Signed-off-by: Andrew Thornton <[email protected]>
* Remove obsolete change of email on profile page
The change email on the account profile page is out-of-date
and unnecessary.
Changing email should be done using the account page.
Fix#13336
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
* Migrating reactions is just not that important
A failure during migrating reactions should not cause failure of
migration.
Signed-off-by: Andrew Thornton <[email protected]>
* When checking issue reactions check the correct permission
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: zeripath <[email protected]>