Commit Graph

7822 Commits (release/v1.9)
 

Author SHA1 Message Date
zeripath 3c3823dc7f
Ensure Written is set in GZIP ProxyResponseWriter (#9018) (#9026)
Fix #9001

The GZIP ProxyReponseWriter doesn't currently respond correctly
to requests about its Written status - leading to #9001.

This PR properly reimplements these methods.
5 years ago
John Olheiser 2f73fff053 Changelog for 1.9.6 (#8967)
* Changelog for 1.9.6

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
zeripath fb5af37b3e
Add Close() method to gogitRepository (#8901) (#8958)
Backport #8901 - Adjusted slightly for 1.9

In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.

This PR adds this Close function and adds the Close functions as necessary.

In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.

Fixes #7947
5 years ago
mrsdizzie 2ef37522b6 Update Github Migration Test (#8946)
Small fix for test on 1.9 since #8938 can't be easily back ported to
this branch.
5 years ago
zeripath 46ff639a13
Fix issue with user.fullname (#8904) 5 years ago
guillep2k 0b91aaf62a Update Github migration test (#8897)
Earlier today #716 was reopened which updated the modification time for
an old milestone (1.6.0) that we use in testing with the assumption that
it is old and won't change. This breaks all builds now, so remove this
test since we have others that test the same code and this milestone
will likely be updated again as that issue changes etc...
5 years ago
Lunny Xiao 4a08d574cf fix 500 when edit hook (#8782) (#8790) 5 years ago
zeripath f104898989 Allow to merge if file path contains " or \ (#8629) (#8772)
* if a filename in a repository contains " or \ the owner can't merge pull request with this files
because "git diff-tree" adds double quotes to that filepath
example: filepath is ab"cd but "git diff-tree" returns "ab\"cd"

now, when the owner click "Merge Pull Request" button the server returns 500
this commit fix it

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* add -z option to getDiffTree
escape spec symbols for sparse-checkout

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* go fmt

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* typo

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* escape '\'
escape all spaces and '!'

* use regexp.ReplaceAllString()

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* strings.ReplaceAll was added in go 1.12

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* add '\' to regexp.MustCompile

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
5 years ago
John Olheiser 83d04df365 Changelog 1.9.5 (#8753)
* 1.9.5

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
6543 9614bb1b9f [Backport] [Fix] milestone close timestamp (#8728) (#8731)
* [Fix] milestone close timestamp (#8728)

* BugFix: Update closed_date_unix colum on milestone table on close

* use go standart time lib

* make backport work!
5 years ago
David Svantesson b2c3a7d79f Fix deadline on update issue or PR via API (#8699) 5 years ago
jaqra 76bbcf1387 make call createMilestoneComment on newIssue func (#8678) (#8682)
* make call createMilestoneComment on newIssue func

* make OldMilestoneID 0 instead of -1
5 years ago
Lunny Xiao 1bcbc02045 Revert "API should follow RequireSignInView (#8654) (#8661)" (#8674)
This reverts commit ffff835b73.
5 years ago
Monty Taylor 66ceee08dc Fix 500 when getting user as unauthenticated user (#8662)
When doing GET /api/v1/users/{user} as an unauthenticated user,
gitea throws a 500 because it's trying to dereference elements
from the context user. It wants to do this to see whether to
show the primary email and will do that if the logged in user
is admin or the user in question. However, if ctx.User is nil,
go gets really unhappy.
5 years ago
Lunny Xiao ffff835b73
API should follow RequireSignInView (#8654) (#8661) 5 years ago
Lunny Xiao 63c54f7e1f Hide some user information via API if user have no enough permission (#8655) (#8658)
* Hide some user information via API if user have no enough permission

* fix test
5 years ago
zeripath f9845454cf Use AppSubUrl for more redirections (#8647) (#8652)
Partial backport without changes to locale files.

Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template
Fixes /explore and organisation redirection
5 years ago
John Olheiser 1e1211c194 Add SubURL to redirect path (#8632) (#8634) (#8640)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
zeripath 10e549df7d
Update heatmap fixtures to restore tests (#8615) (#8617)
* Update heatmap fixtures to restore tests
* Add hint to check the fixture age on fail
5 years ago
6543 519f69eb41 Fix #8582 by handling empty repos (#8587) (#8593)
* Fix #8582 by handling empty repos

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix tests

Signed-off-by: Jonas Franz <info@jonasfranz.software>
5 years ago
Lunny Xiao d4501ece55
fix bug pull request files will be broken if head repo was transfered to another user or orgnization (#8571) 5 years ago
zeripath c1152b15fe Add missed close in ServeBlobLFS (#8527) (#8543) 5 years ago
zeripath cb31f88383 Fixes #8369: Create .ssh dir as necessary (#8486) (#8489)
* Ensure .ssh dir exists before rewriting public keys

* Ensure .ssh dir exists before appending to authorized_keys

* Log the error because it would be useful to know where it is trying to MkdirAll

* Only try to create RootPath if it's not empty
5 years ago
zeripath 6cb9ce1367 IsBranchExist: return false if provided name is empty (#8485) (#8492)
* IsBranchExist: return false if provided name is empty

* Ensure that the reference returned is actually of a valid type
5 years ago
guillep2k d93d5d7906 Backport: Ignore mentions for users with no access (#8395) (#8484)
* Ignore mentions for users with no access

* Fix fmt
5 years ago
zeripath 5c3863c319 Restore functionality for early gits (#7775) (#8476)
* Change tests to make it possible to run TestGit with 1.7.2

* Make merge run on 1.7.2

* Fix tracking and staging branch name problem

* Ensure that git 1.7.2 works on tests

* ensure that there is no chance for conflicts

* Fix-up missing merge issues

* Final rm

* Ensure LFS filters run on the tests

* Do not sign commits from temp repo

* Apply suggestions from code review

* Update modules/repofiles/temp_repo.go
5 years ago
guillep2k 80b50afe1f Add check for empty set when dropping indexes during migration (#8475) 5 years ago
zeripath 20a28b785a
Ensure Request Body Readers are closed in LFS server (#8454) (#8459) 5 years ago
zeripath d330b2f52b
Ensure that LFS files are relative to the LFS content path (#8455) (#8458) 5 years ago
6543 6ab1d5a8a0 Changelog for v1.9.4 (#8422)
* changelog

* Update CHANGELOG.md

We ned to revert this then ...

Co-Authored-By: Lauris BH <lauris@nix.lv>
5 years ago
Lauris BH 05f6566786 Revert "[Backport] Fix issues/pr list broken when there are man… (#8425)
This reverts commit 0ea4b786cb.
5 years ago
6543 0ea4b786cb [Backport] Fix issues/pr list broken when there are many repositories (#8409) (#8418)
* Fix issues/pr list broken when there are many repositories (#8409)

* fix issues/pr list broken when there are many repositories

* remove unused codes

* fix counting error on issues/prs

* keep the old logic

* fix panic

* fix tests

* rm unused import
5 years ago
6543 30718ce4ac fix bug when migrating a private repository (#7917) (#8403) 5 years ago
6543 aeec78543b Change general form binding to gogs form (#8334) (#8402) 5 years ago
6543 c9b8c12bc9 feat: highlight issue references with : (#8101) (#8404)
* feat: highlight issue references with :

e.g. #1287: my commit msg
e.g. ABC-1234: my commit msg

* ref: update model regex to consistent with issueNumericPattern

* test: check highlight issue with : in commits messages
5 years ago
6543 b0dcf417ea Fix milestone num_issues (#8221) (#8400)
* fix milestone num_issues

* update missing completeness

* only update milestone closed number when closed issue is assigned a new milestone or clear milestone

* fix tests

* fix update milestone num

* fix completeness calculate

* make completeness calucation more clear
5 years ago
6543 797194d2d0 Fix editor commit to new branch if PR disabled (#8375) (#8401) 5 years ago
guillep2k 5bac1a692a Allow users with explicit read access to give approvals (#8398) 5 years ago
6543 b6fba5b459 fix version-validation (because of 1.12 -> 1.13 switch) (#8389)
* fix depenedency

* make vendor first
5 years ago
Elias Norberg e90d88d5d5 Backport of commit status fixes in PR #8316 and PR #8321 to v1.9 (#8339)
* Use correct index when fetching commit status

Signed-off-by: Elias Norberg <elias@aisle.se>

* Compare against base repo to avoid mismatch when merging from fork

Signed-off-by: Elias Norberg <elias@aisle.se>

* Fix pull request commit status in user dashboard list
5 years ago
David Svantesson 7156e2a71a Fix API for edit and delete release attachment (#8290)
* Add logging for when user requested attachment doesn't belong to the specified release.

* Fix API to use correct variable for release asset (attachment)
5 years ago
Daniel Fonseca de Lira e51d91a258 Fix assets on release webhook (#8283) 5 years ago
Daniel Fonseca de Lira 0ed5a647dd Fix release API URL generation (#8239) 5 years ago
guillep2k 3fc42add16 Allow registration when button is hidden (#8238) 5 years ago
Bjoern Petri 4b9786ba62 MS Teams webhook misses commit messages (#8225)
The current webhook just shows the amount of commits, but misses the actual commit description. While the code is actually there to include the description, it is just not included.

Signed-off-by: Bjoern Petri <bjoern.petri@sundevil.de>
5 years ago
Mura Li aaf975bff1 Fix data race (#8206)
* Fix data race

* Fix data race in modules/log

* Make the scope of lock finner-grained

* Use syc.Map

* Fix missing change in the test

* Do not export LoggerMap
5 years ago
Lunny Xiao 267fbbf201
Fix team user api (#8172) (#8188)
* fix team user api

* fix tests

* fix api

* fix team user api

* change user convert

* fix tests

* fix tests
5 years ago
Mura Li 9e8df4b838 Fix pull merge 500 error caused by git-fetch breaking behaviors (#8194) 5 years ago
Jakob Ackermann d78aa189ec [ssh] fix the config specification in the authorized_keys template (#8031) (#8193)
The gitea flags must appear in front of the gitea command. Otherwise
 they are ignored.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
(cherry picked from commit 89648746a5)
5 years ago
Filip Navara 6883c007d3 [backport/v1.9] Fix reading git notes from nested trees (#8189)
* Fix reading notes from nested trees

The GIT documentation for notes states "Permitted pathnames have the
form ab/cd/ef/.../abcdef...: a sequence of directory names of two
hexadecimal digits each followed by a filename with the rest of
the object ID."

* Add test case

* Fix new lines
5 years ago