* Add 'checks' Make and CI tasks
Introduce new "checks" targets that perform tasks that we've been piling
onto the linting tasks. This will make the linter tasks faster and
hopefully encourage some users to use them locally.
* add checks to --help
Co-authored-by: techknowlogick <[email protected]>
* Fix bug preventing transfer to private organization
The code assessing whether a private organization was visible to a user before
allowing transfer was incorrect due to testing membership the wrong way round
This PR fixes this issue and renames the function performing the test to be
clearer.
Further looking at the API for transfer repository - no testing was
performed to ensure that the acting user could actually see the new
owning organization.
Signed-off-by: Andrew Thornton <[email protected]>
* change IsUserPartOfOrg everywhere
#12391 offered to change the default PID file from /var/run/gitea.pid however in discussion it was decided that this could break users of older systems. An alternative was offered that we could make the PID file compile/link time settable.
This PR does this, and changes the name of the setting from CustomPID to simply PIDFile. It also updates the from-source docs to show how to change the compiler settings to do this.
Closes#12391
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Florian Klink <[email protected]>
* go1.15
* update makefile xgo version
* fix vet issue
* update docs to version of go in use
* add TODO for asyncpreemptoff
Co-authored-by: Lauris BH <[email protected]>
Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util.
Fix#12339
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: silverwind <[email protected]>
* Handle MSSQL constraints
Signed-off-by: Andrew Thornton <[email protected]>
* Update models/migrations/v145.go
* Prevent hang with Sync2
* Agh it's uniques not indexes
* Let us try a different way of finding constraints on the language column
Signed-off-by: Andrew Thornton <[email protected]>
* minor simplification
Signed-off-by: Andrew Thornton <[email protected]>
* Try drop index instead?
Signed-off-by: Andrew Thornton <[email protected]>
This PR prevents 2 further ways of causing the redirect cookie to be set
to redirect back to /user/events
Signed-off-by: Andrew Thornton <[email protected]>
Make previous fix from #12238 more robust since I saw a case where a diff changes only a single character in a chroma class instead of the entire thing. Add another more complicated test to match.
Co-authored-by: Lauris BH <[email protected]>
* Do not show arrows on comment diffs on pull comment pages
Prior to this PR it was possible that an expansion arrow could be displayed
on comment diffs displayed on the comments pages of pulls
These arrows would not successfully work because they were not attached to
a commit id - nor can they necessarily be.
This PR prevents these from being shown.
Fix#10851
Signed-off-by: Andrew Thornton <[email protected]>
* as per @silverwind
Signed-off-by: Andrew Thornton <[email protected]>
* one more indentation fix
Signed-off-by: Andrew Thornton <[email protected]>
* one more indentation fix
Signed-off-by: Andrew Thornton <[email protected]>
The code for dropTableColumns has a slightly confusing portion whereby the session is committed for MSSQL but not for other variants.
The v102 migration doesn't actually start a transaction so this weirdness does not affect it. However it probably should attempt to run this in a transaction.
Signed-off-by: Andrew Thornton [email protected]
https://github.com/go-gitea/gitea/pull/12346 was using the wrong
selector which affected only the single image view. Use the correct
selector for image diffs. Removal of border-radius is still worth to
keep to override the global 3px on <img>.
Co-authored-by: Lauris BH <[email protected]>
Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation.
* This implementation provides a 16 limited color selection
* The uniqued color numbers are also provided
* And there is also a monochrome version
*In addition is a hover highlight that allows users to highlight commits on the same flow.
Closes#12209
Signed-off-by: Andrew Thornton [email protected]
Co-authored-by: silverwind <[email protected]>
This makes is slightly faster to navigate through the swagger docs by
initially collapsing the tags like 'admin' or 'miscellaneous'.
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: zeripath <[email protected]>
This PR switches off the success reports from the Update Mirrors cron job
as they are too frequent and not necessarily helpful.
Signed-off-by: Andrew Thornton <[email protected]>
* If Description contain more that one line render it
* simpler ...
* only render if description exists
* Fix NPE in tests
* Update routers/user/profile.go
Co-authored-by: zeripath <[email protected]>
* Prevent empty div when editing comment
The template for attachments needs to remove whitespace and return empty when there are no attachments.
Fix#10220