Commit Graph

6 Commits (9d855bd6a1da51a656bede3a855b2cecc6a22f28)

Author SHA1 Message Date
pricly-yellow 4afdb1eb78
API pull's head/base have correct permission ()
close 

* for all pull requests API return permissions of caller
* for all webhook return empty permissions

Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Lunny Xiao a4bfef265d
Move db related basic functions to models/db ()
* Move db related basic functions to models/db

* Fix lint

* Fix lint

* Fix test

* Fix lint

* Fix lint

* revert unnecessary change

* Fix test

* Fix wrong replace string

* Use *Context

* Correct committer spelling and fix wrong replaced words

Co-authored-by: zeripath <art27@cantab.net>
6543 7ac8a770e1
Move Repo APIFormat to convert package ()
* Move Repo APIFormat to convert package

* tweek
Lunny Xiao 5abe1c52de
Display pull request head branch even the branch deleted or repository deleted ()
* Display pull request head branch even the branch deleted or repository deleted

* Merge getHeadRepo/loadHeadRepo and getBaseRepo/loadBaseRepo on pull and fill repo when pr.Issue.Repo is available

* retrieve sha from pull head when pull request branch deleted and fix tests

* Fix test

* Ensure MustHeadRepoName returns empty string if no head repo

Co-authored-by: zeripath <art27@cantab.net>
6543 8d43563a32
[BugFix] [API] Pull.API.Convert: Only try to get HeadBranch if HeadRepo exist ()
* only try to get HeadBranch if HeadRepo exist

* impruve

* no nil error

* add TEST

* correct error msg
Lunny Xiao 384c2b342e
Move pull request api convert to convert package ()
* Move pull request api convert to convert package

* Rename ToPullRequest to ToAPIPullRequest