summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Related refactors to ctx.FormX functions (#16567)65432021-08-1122-52/+36
| | | | | | | * use FormTrim if posible * speedup goGet * only convert if nessesary
* Add an api endpoint to fetch git notes (#15373) (#16649)nitul19912021-08-1112-1/+228
| | | close #15373
* Rename ctx.Form() to ctx.FormString() and move code into own file (#16571)65432021-08-1164-449/+236
| | | | | | | Followup from #16562 prepare for #16567 * Rename ctx.Form() to ctx.FormString() * Reimplement FormX func to need less code and cpu cycles * Move code into own file
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-111-0/+1
|
* Upgrade github.com/google/go-github v32.1.0 -> v37.0.0 (#16661)65432021-08-10120-1532/+5422
| | | | | * Upgrade github.com/google/go-github vv32.1.0 -> v37.0.0 * refactor: use GetX() func to reduce code
* Replace `list.List` with slices (#16311)KN4CK3R2021-08-0929-304/+185
| | | | | | | | | | | | | | | | | | | * Replaced list with slice. * Fixed usage of pointer to temporary variable. * Replaced LIFO list with slice. * Lint * Removed type check. * Removed duplicated code. * Lint * Fixed merge. Co-authored-by: 6543 <6543@obermui.de>
* Change the implementation of the go-git version of GetNote to mirror the non ↵nitul19912021-08-092-0/+15
| | | | | | | go-git version when passed a non-existent commit (#16658) Fixes #16657
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-091-0/+6
|
* Add Version info to migrations.go (#16653)65432021-08-081-0/+3
| | | Gitea migrations of 1.15.0 ends at v189
* Restore compatibility with SQLServer 2008 R2 in migrations (#16627)zeripath2021-08-081-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Restore compatibility with SQLServer 2008 R2 in migrations `ALTER TABLE DROP ... IF EXISTS ...` is only supported in SQL Server >16. The `IF EXISTS` here is a belt-and-braces and does not need to be present. Therefore can be dropped. We need to figure out some way of restricting our SQL syntax against the minimum version of SQL Server we will support. My suspicion is that `ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = 100` may do that but there may be other side-effects so I am not whether to do that. Signed-off-by: Andrew Thornton <art27@cantab.net> * try just dropping the index only Signed-off-by: Andrew Thornton <art27@cantab.net> * use lowercase for system tables Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-081-0/+1
|
* Changelog for 1.15.0-rc3 (#16621) (#16645)zeripath2021-08-071-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Frontport #16621 ## [1.15.0-rc3](https://github.com/go-gitea/gitea/releases/tag/v1.15.0-rc3) - 2021-08-06 * BREAKING * Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606) * SECURITY * Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606) * Correctly create of git-daemon-export-ok files (#16508) (#16514) * Don't show private user's repo in explore view (#16550) (#16554) * Update node tar dependency to 6.1.6 (#16622) (#16623) * API * Swagger AccessToken fixes (#16574) (#16597) * Set AllowedHeaders on API CORS handler (#16524) (#16618) * BUGFIXES * Restore Accessibility for Dropdown (#16576) (#16617) * Pass down SignedUserName down to AccessLogger context (#16605) (#16616) * Fix table alignment in markdown (#16596) (#16602) * Fix 500 on first wiki page (#16586) (#16598) * Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) (#16570) * Upgrade levelqueue to v0.4.0 (#16560) (#16561) * Handle too long PR titles correctly (#16517) (#16549) * Fix data race in bleve indexer (#16474) (#16509) * Restore CORS on git smart http protocol (#16496) (#16506) * Fix race in log (#16490) (#16505) * Fix prepareWikiFileName to respect existing unescaped files (#16487) (#16498) * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480) * Update notification table with only latest data (#16445) (#16469) * Revert to use alpine 3.13 (#16451) (#16452) * Fix crash following ldap authentication update (#16447) (#16448) * Fix direct creation of external users on admin page (partial #16612) (#16613) * Prevent 500 on draft releases without tag (#16634) (#16636) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Separate open and closed issue in metrics (#16637)Romain2021-08-072-2/+44
| | | | | | | * Get the issue counts in one query Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Add note about build-time flags for PAM support (#16641)techknowlogick2021-08-071-0/+2
| | | Fix #16639
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-071-0/+4
|
* Allow setting X-FRAME-OPTIONS (#16643)zeripath2021-08-067-6/+12
| | | | | | | | | | | | | | | * Allow setting X-FRAME-OPTIONS This PR provides a mechanism to set the X-FRAME-OPTIONS header. Fix #7951 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Prevent 500 on draft releases without tag (#16634)zeripath2021-08-051-1/+3
| | | | | | | | | | | | | It is possible to create draft releases prior to creating a tag. This will cause a 500 on the releases page due to compare page failing. This PR only shows the compare button if there is a SHA1 present. Fix #16610 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add microsoft oauth2 providers (#16544)zeripath2021-08-0529-260/+2132
| | | | | | | | | | | | | | | | | * Clean up oauth2 providers Signed-off-by: Andrew Thornton <art27@cantab.net> * Add AzureAD, AzureADv2, MicrosoftOnline OAuth2 providers Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * remove unused Scopes Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-061-0/+1
|
* Frontport changelog for v1.14.6 (#16632)zeripath2021-08-052-1/+11
| | | | | | | | | | | * Frontport changelog for v1.14.6 Changelog frontported to below v1.15.0-rc1. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update config.yaml Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Restore Accessibility for Dropdown (#16576)zeripath2021-08-065-10/+4450
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Restore #10096/#8638 and re-fix #15172 This PR restores the vendored and patched dropdow from #8638. It however, abandons the calls to `click()` using instead the default dropdown click calls instead. This prevents the issue of the dropdown grabbing focus permanently however, this may have negative effects on the effect of focus on the dropdowns. Of note, the behaviour of the template selector dropdown on the repo creation page is slightly odd - I don't believe that this odd behaviour is caused by this PR but rather by the feed source for this. I suspect that the dropdown should be adding a delete button to its selection. Fix #15172 References: #7057 Signed-off-by: Andrew Thornton <art27@cantab.net> * leverage fomantic-build instead Signed-off-by: Andrew Thornton <art27@cantab.net> * as per jookia Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fixes #16557 - duplicate csv import (#16631)Richard Mahn2021-08-051-3/+2
| | | | | Remove the unnecessary duplicate package import for `encoding/csv` in `modules/csv/csv.go` Fix #16557
* Update node tar dependency to 6.1.6 (#16622)zeripath2021-08-051-6/+6
| | | | | | | | Forcibly update dev dependency on tar to 6.1.6 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
* Switch back to node 16 (#16624)zeripath2021-08-051-7/+7
| | | | | | | | | Now that node 16.6.1 is out we can (if desired) switch back to node 16. This PR proposes changing drone to run node:16 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Set AllowedHeaders on API CORS handler (#16524)zeripath2021-08-042-0/+2
| | | | | | | | Set AllowedHeaders on API CORS handler and add missing Access-Control-Expose-Headers to pull API. Fix #16100 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Pass down SignedUserName down to AccessLogger context (#16605)zeripath2021-08-043-4/+28
| | | | | | | | | | | | | | | | | | | | * Pass down SignedUserName down to AccessLogger context Unfortunately when the AccessLogger was moved back before the contexters the SignedUserName reporting was lost. This is due to Request.WithContext leading to a shallow copy of the Request and the modules/context/Context being within that request. This PR adds a new context variable of a string pointer which is set and handled in the contexters. Fix #16600 Signed-off-by: Andrew Thornton <art27@cantab.net> * handle nil ptr issue Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-0425-86/+8
|
* Upgrade to golang-jwt 3.2.2 (#16590)zeripath2021-08-0314-52/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade to golang-jwt 3.2.2 Upgrade to the latest version of golang-jwt Signed-off-by: Andrew Thornton <art27@cantab.net> * Forcibly replace the 3.2.1 version of golang-jwt/jwt and increase minimum Go version Using go.mod we can forcibly replace the 3.2.1 version used by goth to 3.2.2. Further given golang-jwt/jwts stated policy of only supporting supported go versions we should just raise our minimal version of go to 1.16 for 1.16 as by time of release 1.15 will be out of support. Signed-off-by: Andrew Thornton <art27@cantab.net> * update minimal go required Signed-off-by: Andrew Thornton <art27@cantab.net> * update config.yaml Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Clarify where server.LFS_CONTENT_PATH was moved to (#16601)Clar Fon2021-08-031-1/+1
| | | | | Signed-off-by: ltdk <usr@ltdk.xyz>
* Make PR merge options more intuitive (#5863) (#16582)Albert ARIBAUD2021-08-021-4/+4
| | | | Reword options making clear whether the PRed branch is rebased or not, and which type of commit will be created if any.
* Fix table alignment in markdown (#16596)zeripath2021-08-021-1/+3
| | | | | | | | Set the TableOptions in markdown to allow alignment of the tables to work correctly Fix #15959 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [CI] Use node v14 instead of node v16 untill it will pass again (#16595)65432021-08-021-7/+7
| | | | | * for CI release: use node 14 (lts) to build until 16 do fail * all in for node v14.x
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-021-0/+1
|
* Swagger AccessToken fixes (#16574)zeripath2021-08-014-31/+27
| | | | | | | | | | | There is a subtle problem with the Swagger definition for AccessTokens which causes autogeneration of APIs for these endpoints to fail. This PR corrects these errors. Ref: https://github.com/zeripath/java-gitea-api/issues/4 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix 500 on first wiki page (#16586)zeripath2021-08-012-0/+32
| | | | | | | | | | | | | * Fix 500 on first wiki page There is a mistake in #16319 and #16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix #16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix swagger doc by rename repoAddTopíc to repoAddTopic (#16580)Lars Hvam2021-08-012-2/+2
| | | | | * Swagger API: rename repoAddTopíc to repoAddTopic This changes the operationId to only contain 7 bit ascii, note "í" instead of "i"
* Use node:16.5 for frontend instead of node:16 (#16591)zeripath2021-08-011-5/+5
| | | | | | | | | | | | | | | | | | | | | * Disable frontend testing Jest does not appear to work on the latest node 16.6.0 and fails with an inscrutable message. I have been unable to work out what the problem is. This PR simply disables the test-frontend part in the makefile. Another alternative would be to drop node to node 14 - which is the LTS for node. Signed-off-by: Andrew Thornton <art27@cantab.net> * actually just tell on 16.5 instead Signed-off-by: Andrew Thornton <art27@cantab.net> * Use node 16.5 instead of 16 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-011-2/+3
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-311-0/+1
|
* Lock goth/gothic and Re-attempt OAuth2 registration on login if registration ↵zeripath2021-07-293-6/+26
| | | | | | | | | | | | | | | | | | failed at startup (#16564) This PR has two parts: * Add locking to goth and gothic calls with a RWMutex The goth and gothic calls are currently unlocked and thus are a cause of multiple potential races * Reattempt OAuth2 registration on login if registration failed If OAuth2 registration fails at startup we currently disable the login_source however an alternative approach could be to reattempt registration on login attempt. Fix #16096 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Pre-fill suggested New File 'name' and 'content' with Query Params (#16556)AJ ONeal2021-07-293-3/+35
| | | | | * feature: add (GitHub-style) querystrings for pre-filling new file content * docs: add query parameters for new files
* Show correct text when comparing commits on empty pull request (#16569)Marty2021-07-293-0/+8
| | | | | | | | | | | * fix * use own text * Update templates/repo/commits_table.tmpl Co-authored-by: marty <m.karkossa@ultraware.nl> Co-authored-by: zeripath <art27@cantab.net>
* Rename context.Query to context.Form (#16562)Lunny Xiao2021-07-2985-397/+394
|
* Add agit flow support in gitea (#14295)a10121127962021-07-2830-32/+1334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature: add agit flow support ref: https://git-repo.info/en/2020/03/agit-flow-and-git-repo/ example: ```Bash git checkout -b test echo "test" >> README.md git commit -m "test" git push origin HEAD:refs/for/master -o topic=test ``` Signed-off-by: a1012112796 <1012112796@qq.com> * fix lint * simplify code add fix some nits * update merge help message * Apply suggestions from code review. Thanks @jiangxin * add forced-update message * fix lint * splite writePktLine * add refs/for/<target-branch>/<topic-branch> support also * Add test code add fix api * fix lint * fix test * skip test if git version < 2.29 * try test with git 2.30.1 * fix permission check bug * fix some nit * logic implify and test code update * fix bug * apply suggestions from code review * prepare for merge Signed-off-by: Andrew Thornton <art27@cantab.net> * fix permission check bug - test code update - apply suggestions from code review @zeripath Signed-off-by: a1012112796 <1012112796@qq.com> * fix bug when target branch isn't exist * prevent some special push and fix some nits * fix lint * try splite * Apply suggestions from code review - fix permission check - handle user rename * fix version negotiation * remane * fix template * handle empty repo * ui: fix branch link under the title * fix nits Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Upgrade levelqueue to v0.4.0 (#16560)Lunny Xiao2021-07-276-2/+13
| | | Fix #16546
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-272-0/+43
|
* not show private user's repo in explore view (#16550)a10121127962021-07-271-5/+3
| | | | | | after #16069, visibility is also usefull for user, so this limit is not usefull. fix #16545
* Fix session bugs (#16552)65432021-07-262-16/+46
| | | | | | | | | * fix deadlog bug * Fix models/issue_stopwatch.go * Update models/issue_stopwatch.go Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-264-4/+25
|
* Fix add authentication page (#16543)zeripath2021-07-255-5/+23
| | | | | | | | | | | | | | | * Fix add authentication page There is a regression in #16199 whereby the add authentication page fails to react to the change in selected type. This is due to the String() method on the LoginSourceType which is ameliorated with an Int() function being added. Following on from this there are a few other related bugs. Fix #16541 Signed-off-by: Andrew Thornton <art27@cantab.net>