Commit Graph

2110 Commits (20a28b785a3752980348cda1c88d99afa4b7dac3)

Author SHA1 Message Date
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 aeec78543b Change general form binding to gogs form (#8334) (#8402) 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
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
guillep2k 3fc42add16 Allow registration when button is hidden (#8238) 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
guillep2k b228d22736 Add reviewrs as participants (#8124) 5 years ago
guillep2k 5d2676089e Add change title notification for issues (#8064) 6 years ago
Tamal Saha 9bea8d825b Run CORS handler first for /api routes (#7967) (#8053)
Signed-off-by: Tamal Saha <tamal@appscode.com>
6 years ago
Gary Kim 4d6c8d9b13 backport: Fix adding default Telegram webhook (#7992)
Signed-off-by: Gary Kim <gary@garykim.dev>
6 years ago
Lunny Xiao 7dd726faeb upload support text/plain; charset=utf8 (#7899) 6 years ago
Lanre Adelowo 68424eddf0 fix non existent milestone with 500 error (#7867) (#7873) 6 years ago
zeripath 94f0151789 Attempt to fix hook problem (#7856) 6 years ago
Mario Lubenka 24fa56830f Enable switching to a different source branch when PR already exists (#7823)
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
6 years ago
David Svantesson 0fa9ea516a Rewrite existing repo units if setting is not included in api body (#7811)
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
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
Lunny Xiao c6f1825fe9 add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752) 6 years ago
Lunny Xiao d15e49f7ff improve branches list performance and fix protected branch icon when no-login (#7695) (#7704) 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
zeripath 5a3d9861ba Handle ErrUserProhibitLogin in http git (#7586, #7591) (#7590)
* Handle ErrUserProhibitLogin in http git (#7586)

* Use 403
6 years ago
Richard Mahn 103a66ae83 Fixes #7564 - Malformed URLs in API git/commits response (#7565) (#7567) 6 years ago
Richard Mahn 91e24a3a10 Fixes #7474 - Handles all redirects for Web UI File CRUD (#7478) (#7507)
* Fixes #7474 - Handles all redirects for Web UI File CRUD

* Fixes lint errors

* Typo fix

* Adds unit tests for a few helper functions

* Fixes per review

* Fix for new branch creation and to unit test

* Fixes the template used for errors on delete
6 years ago
Richard Mahn a29e667eff Backport for #7475 - settings error (#7483) 6 years ago
Gary Kim 2477737fff Only show "New Pull Request" button if repo allows pulls (#7426) (#7432)
Signed-off-by: Gary Kim <gary@garykim.dev>
6 years ago
Cherrg 1e585d7991 backport of #7385 - add missing template variable on organisation settings (#7386)
affects #6755

Signed-off-by: Michael Gnehr <michael@gnehr.de>
6 years ago
AJ ONeal 62d6127f1b Make captcha and password optional for external accounts (#6606) 6 years ago
leonklingele ef57fe4ae3 routers: do not leak secrets via timing side channel (#7364)
* routers: do not leak secrets via timing side channel

* routers/repo: do not leak secrets via timing side channel
6 years ago
leonklingele 96b66e330b routers/user: ensure that decryption of cookie actually suceeds (#7363)
Previously, only the first return value of ctx.GetSuperSecureCookie
was used to check whether decryption of the auth cookie succeeded.
ctx.GetSuperSecureCookie also returns a second value, a boolean,
indicating success or not. That value should be checked first to
be on the safe side and not rely on internal logic of the encryption
and decryption blackbox.
6 years ago
Lunny Xiao b5aa7f7ceb fix api route (#7346) 6 years ago
zeripath 3563650bdb #6946 Run hooks on merge/edit and cope with protected branches (#6961)
* Fix #6946 by checking PullRequest ID on pushing

* Ensure we have the owner name, the pr attributes and the the issue

* Fix TestSearchRepo by waiting till indexing is done

* Update integrations/repo_search_test.go

* changes as per @mrsdizzie

* missing comma

* Spelling mistake

* Fix full pushing environment
6 years ago
Lunny Xiao ff85dd3e12 Add commit statuses reports on pull request view (#6845)
* Add commit statuses reports on pull view

* Add some translations

* improve the UI

* fix fmt

* fix tests

* add a new test git repo to fix tests

* fix bug when headRepo or headBranch missing

* fix tests

* fix tests

* fix consistency

* fix tests

* fix tests

* change the test repo

* fix tests

* fix tests

* fix migration

* keep db size consistency

* fix translation

* change commit hash status table unique index

* remove unused table

* use char instead varchar

* make hashCommitStatusContext private

* split merge section with status check on pull view ui

* fix tests; fix arc-green theme on pull ui
6 years ago
Richard Mahn cd96dee982 Fixes #7292 - API File Contents bug (#7301) 6 years ago
Richard Mahn 002b597c1f Fixes #7152 - Allow create/update/delete message to be empty, use default message (#7324)
* Fixes #7152 - Allow create/update/delete message to be empty, use default message

* Linting fix

* Fix to delete integration tests
6 years ago
Richard Mahn 567e117df8 Fixes #7238 - Annotated tag commit ID incorrect (#7321)
* Fixes #7238 - Annotated tag commit ID incorrect

* Fixes #7238 - Annotated tag commit ID incorrect
6 years ago
Mario Lubenka 7c0f2b9843 Show Pull Request button or status of latest PR in branch list (#6990)
* Show Pull Request button or status of latest PR in branch list

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show pull request button on deleted branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show commit divergence on deleted branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use XORMs Get instead of limit

* Links pull request ID and use smaller labels for displaying the pull request status

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Handle error when getting latest pull request

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Indent template

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check error when loading issue

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
6 years ago
Lunny Xiao edc94c7041 Monitor all git commands; move blame to git package and replace git as a variable (#6864)
* monitor all git commands; move blame to git package and replace git as a variable

* use git command but not other commands

* fix build

* move exec.Command to git.NewCommand

* fix fmt

* remove unrelated changes

* remove unrelated changes

* refactor IsEmpty and add tests

* fix tests

* fix tests

* fix tests

* fix tests

* remove gitLogger

* fix fmt

* fix isEmpty

* fix lint

* fix tests
6 years ago
Lunny Xiao 161e12e157
Shadow the password on cache and session config on admin panel (#7300)
* shadow the password on cache and session config on admin panel

* add shadow password of mysql/postgres/couchbase

* fix log import
6 years ago
Lunny Xiao aa7c34cf86 Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug

* upgrade packages

* fix fmt

* fix Consistency

* fix tests
6 years ago
zeripath baefea311f
Fix #732: Add LFS objects to base repository on merging (#7082)
On merge we walk the merge history and ensure that all lfs objects pointed to in
the history are added to the base repository. This switches from relying on having git-lfs installed on the server, (and in fact .gitattributes being correctly installed.)
6 years ago
Lunny Xiao 8ec659722d Only check and config git on web subcommand but not others (#7236)
* only check and config git on web subcommand but not others

* add Init in git tests
6 years ago
Lunny Xiao 1e8a616426 show lfs config on admin panel (#7220) 6 years ago
Lunny Xiao d8168b356d
Add missing description of label on API (#7159)
* add missing description of label on API

* fix comment head

* fix swagger
6 years ago
zeripath cf2221e3ac Add LastLogin to the User API (#7196) 6 years ago
Cherrg 2f39fc7bb6 fix drone build bug (#7192) 6 years ago
kolaente f9ec2f89f2 Add golangci (#6418) 6 years ago
Mario Lubenka 1608f63e39 Fixes diff on merged pull requests (#7171) 6 years ago
Lunny Xiao 7162fbf3d6
if milestone id is zero don't get it from database (#7169) 6 years ago
Lunny Xiao d93e6232e8
Move PushUpdate dependency from models to repofiles (#6763)
* remove push_update

* move models.PushUpdate to repofiles.PushUpdate
6 years ago