]> source.dussan.org Git - gitea.git/commit
api: fix multiple bugs with statuses endpoints (#7785) (#7807)
authorAntoine GIRARD <sapk@users.noreply.github.com>
Fri, 9 Aug 2019 13:18:46 +0000 (15:18 +0200)
committerLauris BH <lauris@nix.lv>
Fri, 9 Aug 2019 13:18:46 +0000 (16:18 +0300)
commit38e799779f1840ccb39912f1dd7f7ed1d53b4a5b
tree7dd4a21151c7b7c1ddf24a9da06c7d1862da7ee8
parent4f39e5679518816e2c03811411ed4a61b0de80b2
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>
integrations/repo_commits_test.go
models/commit_status.go
models/commit_status_test.go
routers/api/v1/repo/git_ref.go
routers/api/v1/repo/status.go