Commit Graph

2332 Commits (release/v1.9)

Author SHA1 Message Date
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
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
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
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
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 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
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 d330b2f52b
Ensure that LFS files are relative to the LFS content path (#8455) (#8458) 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 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
guillep2k 5bac1a692a Allow users with explicit read access to give approvals (#8398) 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
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
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
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
guillep2k b228d22736 Add reviewrs as participants (#8124) 5 years ago
David Svantesson b6b1560701 Abort syncrhonization from LDAP source if there is some error. (#7965)
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
(cherry picked from commit b2d23a1389)
6 years ago
Mura Li c491c22279 Fix pull creation with empty changes (#7920) (#7926)
* Logs the stderr of git-apply
* Add an integration test
* Skip testPatch when patch is empty
6 years ago
Lunny Xiao 5649f0d2b3 fix wrong sender when send slack webhook (#7918) (#7924) 6 years ago
Antoine GIRARD 6b84a1d72b lfs/lock: round locked_at timestamp to second (#7872) (#7875)
* lfs/lock: round locked_at timestamp to second

* test returned locked_at values

* tests: use time RFC3339
6 years ago
Antoine GIRARD 89915ca8a0 Fix duplicate call of webhook (#7821) (#7824) 6 years ago
Antoine GIRARD 38e799779f api: fix multiple bugs with statuses endpoints (#7785) (#7807)
* fix commit statuses api url

* search refs before passing sha

* adjust tests

* directly search tags and branches names + remove un-needed check in NewCommitStatus

* fix comment

* de-duplicate code

* test: use relative setting.AppURL

* Update routers/api/v1/repo/status.go

Co-Authored-By: Lauris BH <lauris@nix.lv>

* remove return

* Update routers/api/v1/repo/status.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
6 years ago
WGH 4f39e56795 Fix Slack webhook fork message (#7774) (#7783)
The order of forkee and fork was mixed up.
6 years ago
Lunny Xiao 7b92f91e88
Fix approvals counting (#7757) (#7777)
* fix approvals counting

* fix tests

* fmt
6 years ago
Lunny Xiao aea49d0b92
fix rename failed when rewrite public keys (#7761) (#7769) 6 years ago
zeripath 1b5908fb6a Fix dropTableColumns sqlite implementation (#7710) (#7765)
* Fix dropTableColumns sqlite implementation

* use droptables and its index dropping support in v78 and v85

* golang-ci fixes

* Add migration from gitea 1.3.3 for sqlite which reveals the droptables bug - thus showing this works
6 years ago
Lunny Xiao c6f1825fe9 add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752) 6 years ago
guillep2k 4f5dbc4d00 Backport: fix repo_index_status lingering when deleting a repository (#7738) 6 years ago
Lauris BH 4ee8982e91 Fix milestone completness calculation when migrating (#7725) (#7732) 6 years ago
guillep2k 0d10482168 Fixes indexed repos keeping outdated indexes when files grow too large (#7731)
* Fixes indexed repos keeping outdated indexes when files grow too large

Co-Authored-By: zeripath <art27@cantab.net>
6 years ago
guillep2k 6d441de2bd Backport: skip non-regular files (e.g. submodules) on repo indexing (#7717)
* Backport: skip non-regular files (e.g. submodules) on repo indexing

* Include "executable" files in the index, as they are not necessarily binary
6 years ago
Lunny Xiao ee43d20d3b fix duplicated webhook when creating issue with assignees (#7681) (#7684) 6 years ago
David Svantesson 93bac4e10d Backport of #7675. (#7682)
Move add to hook queue for created repo to outside xorm session.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Lunny Xiao d827b0bfb7 change length of some repository's columns (#7652) (#7655) 6 years ago
renothing d789170e31 fix wrong email when use gitea as OAuth2 provider (#7640) (#7647)
when you use gitea as OAuth2 provider, the /api/v1/user should return
user primary email as identifier, which is unique in OAuth2 clients.

this patch use convert.ToUser replace all u.APIFormat in api requests,
return primary email when caller is yourself or admin.
6 years ago
Andreas Shimokawa 9bbe3eb0b4 reserve .well-known username (#7638) 6 years ago
Lunny Xiao 4c69e158e5 Fix bug create/edit wiki pages when code master branch protected (#7580) (#7623)
* fix bug create/edit wiki pages when code master branch protected

* improve FullPushingEnvironment function
6 years ago
zeripath b7e41f7b8f
Fix panic on push at #7611 (#7615) (#7618)
* Fix panic in #7611

Use pr.IssueID instead of pr.Issue.ID as Issue may not be loaded and is unnecessary

* Only fetch the head branch from the remote
6 years ago
Lunny Xiao 5ebf4990a5 Fix repository's pull request count error (#7518) (#7524)
* fix pr count error

* fix tests
6 years ago
mrsdizzie b45f9260bf Fix regex for issues in commit messages (#7444) (#7466)
* Fix regex for issues in commit messages

Use same regex as markup for matching in commits.

Fixes #7438

* make fmt
6 years ago
quantonganh 82d4d725ae only return head: null if source branch was deleted (#6705) (#7376)
* only return head: null if source branch was deleted

* add URL into GetPullRequest

* TestPullRequest_APIFormat

* log error if it is not Err(Branch)NotExist

(cherry picked from commit ff85a6331e)
6 years ago
Drew 89aa08d372 Fix mirror sync not automatically sending webhook requests (#7366) 6 years ago
Lunny Xiao 337d6915ff Detect migrating batch size (#7353)
* Make migrating batch size as configurable

* detect different table batch insert size and remove config item

* remove unrelated changes
6 years ago
Lunny Xiao e728b55812 Fix bug conflict between SyncReleasesWithTags and InsertReleases (#7337)
* fix bug conflict between SyncReleasesWithTags and InsertReleases

* fix tests

* fix fmt
6 years ago
zeripath 9fdd199cca make dropTableColumns drop columns on sqlite and constraints on all (#6849) 6 years ago