aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve commit list/view on mobile (#19712)Gusted2022-05-163-15/+93
| | | | | - This is a continuation on [the work](https://github.com/go-gitea/gitea/pull/19546) I've done for improving mobile experience on Gitea. - The current behavior of going trough the commits list is horrible, each individual item gets it's own row and thereby isn't quite compact as it should be on mobile. The commit view's header is in a bit better state, it's quite only that content is overlapping each other. - This patch fixes those problems. Each row in the commit list table will actually take a row in the UI. The commit view's header has now a better organized way of placing the information.
* Fix issue overview for teams (#19652)Gusted2022-05-1612-36/+87
| | | | | | | - Don't use hacky solution to limit to the correct RepoID's, instead use current code to handle these limits. The existing code is more correct than the hacky solution. - Resolves #19636 - Add test-case
* Fix nodeinfo caching and prevent NPE if cache non-existent (#19721)zeripath2022-05-161-7/+11
| | | | | Extract from #19703 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update go-chi/cache to utilize Ping() (#19719)65432022-05-156-30/+15
| | | | | | | * update gitea.com/go-chi/cache -> v0.2.0 * ajust to new interface * refactor
* Disable blank issues (#19717)John Olheiser2022-05-151-1/+1
|
* clarify what session provider 'db' does (#19713)f0x522022-05-162-2/+3
| | | | | | | * clarify what session provider 'db' does * Also update session.PROVIDER in app.example.ini Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-153-9/+57
|
* Fix duplicate entry error when add team member (#19702)zuzuviewer2022-05-142-0/+12
|
* [Refactor] convert team(s) to apiTeam(s) (#13745)65432022-05-139-98/+110
| | | | | | | * Refactor: teams to api convert * make org load optional * more info in tests
* Use a better OlderThan for DeleteInactiveUsers (#19693)Gusted2022-05-131-1/+1
| | | | | | | | | | | | * Use a better OlderThan for DeleteInactiveUsers - Currently the OlderThan is zero, for instances that enable or run this task this could actually delete just new users that still need to confirm their email. This patch fixes that by setting the default to the `ActiveCodeLives` setting, which corresponds to the amount of time that a user can active their account, thus avoiding the issue of deleting unactivated email users. * Use correct duration
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-132-1/+20
|
* Introduce eslint-plugin-jquery (#19690)silverwind2022-05-123-0/+68
| | | | | | | | Introduce the plugin that allows us to gradually forbid jQuery code. I've enabled all rules that already pass. Next step will be to go through each rule and fix the issues by using native DOM equivalents, which I think can be done in separate PRs, but if prefered I could also start here.
* Use Vue to refactor pull merge UI (#19650)wxiaoguang2022-05-127-218/+206
| | | | | | | | | | | | | | | | | * Use Vue to refactor pull merge UI * add comments * fix comments * small fine tune * fix tests * adopt new pull default messages * clean up Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-121-14/+14
|
* Fix oauth setting list bug (#19682)Lunny Xiao2022-05-111-1/+1
|
* Delete user related oauth stuff on user deletion too (#19677)65432022-05-113-0/+34
| | | | | * delete user related oauth stuff on user deletion too * extend doctor check-db-consistency
* Move access and repo permission to models/perm/access (#19350)Lunny Xiao2022-05-1172-511/+608
| | | | | * Move access and repo permission to models/perm/access * Remove unnecessary code
* Tidy up `<head>` template (#19678)silverwind2022-05-101-24/+22
| | | | Neiter `<meta>` nor `<link>` require a closing slash at the end in HTML, remove it.
* Update go tool dependencies (#19676)silverwind2022-05-1012-18/+30
| | | | | | | | | | | * Update go tool dependencies Updated all tool dependencies to latest tags, hoping CI will like it. * fix new lint errors * handle more strings.Title cases * remove lint skip
* Update JS dependencies (#19675)silverwind2022-05-109-2178/+3020
| | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies minus vue and vue-loader - Adapt to jest 28 - Add new eslint rules - Tested Mermaid and Swagger-UI * switch to @happy-dom/jest-environment for faster tests * bump eslint env to es2022
* Use better message for consistency check (#19672)Gusted2022-05-101-15/+15
| | | | | - Don't log the reflect struct, but instead log the ID of the struct. This improves the error message, as you would actually know which row is the error.
* Fix new release from tags list UI (#19670)Lunny Xiao2022-05-101-1/+3
|
* Update go deps (#19665)65432022-05-103-120/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | * update gitea.com/go-chi/binding * update github.com/42wim/sshsig * update github.com/PuerkitoBio/goquery * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/duo-labs/webauthn * update github.com/editorconfig/editorconfig-core-go/v2 * update github.com/emirpasic/gods * update github.com/gliderlabs/ssh * update github.com/go-chi/cors * update github.com/go-enry/go-enry/v2 * update github.com/go-git/go-git/v5 * update github.com/go-ldap/ldap/v3 * update github.com/golang-jwt/jwt/v4 * update github.com/google/pprof * update github.com/klauspost/compress * update github.com/lib/pq * update github.com/markbates/goth * update github.com/minio/minio-go/v7 * update github.com/olivere/elastic/v7 * update github.com/unrolled/render * update github.com/urfave/cli * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark * adopt breaking changes of certmagic
* [doctor] Add check/fix for bogus action rows (#19656)singuliere2022-05-103-0/+74
| | | | Signed-off-by: Loïc Dachary <loic@dachary.org> Co-authored-by: Loïc Dachary <loic@dachary.org>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-101-33/+36
|
* Add tooltip to pending PR comments (#19662)Jack Hay2022-05-092-1/+2
|
* Add Webfinger endpoint (#19462)KN4CK3R2022-05-093-2/+189
| | | | | This adds the [Webfinger](https://webfinger.net/) endpoint for federation. Supported schemes are `acct` and `mailto`. The profile and avatar url are returned as metadata.
* Update documentation to disable duration settings with -1 instead of 0 (#19647)Jimmy Praet2022-05-093-14/+14
| | | To turn off the notification endpoint polling, the value should be set to -1, not 0.
* Set the LastModified header for raw files (#18356)zeripath2022-05-095-29/+133
| | | | | | | | | | | | | | Although the use of LastModified dates for caching of git objects should be discouraged (as it is not native to git - and there are a LOT of ways this could be incorrect) - LastModified dates can be a helpful somewhat more human way of caching for simple cases. This PR adds this header and handles the If-Modified-Since header to the /raw/ routes. Fix #18354 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Don't select join table's columns (#19660)Lunny Xiao2022-05-091-1/+3
| | | | | * Don't select join table * Add comment
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-0928-28/+21
|
* Calculate filename hash only once (#19654)KN4CK3R2022-05-098-29/+26
| | | | | | | * Calculate hash only once. * remove unused Sha1 template helper function, use ctx.Data["FileNameHash"] * fix unit tests
* Admin should not delete himself (#19423)Lunny Xiao2022-05-083-0/+16
| | | | | | Admin should not be able to delete themselves. Also partially fix #15449
* Restore reviewed-on message (#19657)Lunny Xiao2022-05-081-0/+3
| | | Regression from #18177
* Move some helper files out of models (#19355)Lunny Xiao2022-05-0823-107/+108
| | | | | | | * Move some helper files out of models * Some improvements Co-authored-by: delvh <dev.lh@web.de>
* Repository level enable package or disable (#19323)Lunny Xiao2022-05-0814-4/+65
|
* Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649)65432022-05-0817-95/+124
| | | | | | * delete pullautomerges on repo/user deletion * delete reviewstates on repo/user deletion * optimize automerhe code * add index to reviewstate
* Allow custom default merge message with ↵Lunny Xiao2022-05-0814-165/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .gitea/default_merge_message/<merge_style>_TEMPLATE.md (#18177) * Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md * Some improvements * Follow some advices * Fix bug * Fix bug * Fix lint * Fix close comment * Fix test * Fix and docs * Improve codes * Update docs and remove unnecessary variables * return error for GetDefaultMergeMessage * Fix test * improve code * ignore unknow unit type * return error for GetDefaultMergeMessage * Update services/pull/merge.go * Some improvements * Follow some advices * Fix bug * Fix lint * Improve codes * Update docs and remove unnecessary variables * return error for GetDefaultMergeMessage * improve code * Handle deleted HeadRepo in GetDefaultMergeMessage Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix test * Fix test Co-authored-by: zeripath <art27@cantab.net>
* Allow to mark files in a PR as viewed (#19007)delvh2022-05-0716-45/+493
| | | Users can now mark files in PRs as viewed, resulting in them not being shown again by default when they reopen the PR again.
* Auto merge pull requests when all checks succeeded via API (#9307)kolaente2022-05-0847-26/+869
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix indention Signed-off-by: kolaente <k@knt.li> * Add option to merge a pr right now without waiting for the checks to succeed Signed-off-by: kolaente <k@knt.li> * Fix lint Signed-off-by: kolaente <k@knt.li> * Add scheduled pr merge to tables used for testing Signed-off-by: kolaente <k@knt.li> * Add status param to make GetPullRequestByHeadBranch reusable Signed-off-by: kolaente <k@knt.li> * Move "Merge now" to a seperate button to make the ui clearer Signed-off-by: kolaente <k@knt.li> * Update models/scheduled_pull_request_merge.go Co-authored-by: 赵智超 <1012112796@qq.com> * Update web_src/js/index.js Co-authored-by: 赵智超 <1012112796@qq.com> * Update web_src/js/index.js Co-authored-by: 赵智超 <1012112796@qq.com> * Re-add migration after merge * Fix frontend lint * Fix version compare * Add vendored dependencies * Add basic tets * Make sure the api route is capable of scheduling PRs for merging * Fix comparing version * make vendor * adopt refactor * apply suggestion: User -> Doer * init var once * Fix Test * Update templates/repo/issue/view_content/comments.tmpl * adopt * nits * next * code format * lint * use same name schema; rm CreateUnScheduledPRToAutoMergeComment * API: can not create schedule twice * Add TestGetBranchNamesForSha * nits * new go routine for each pull to merge * Update models/pull.go Co-authored-by: a1012112796 <1012112796@qq.com> * Update models/scheduled_pull_request_merge.go Co-authored-by: a1012112796 <1012112796@qq.com> * fix & add renaming sugestions * Update services/automerge/pull_auto_merge.go Co-authored-by: a1012112796 <1012112796@qq.com> * fix conflict relicts * apply latest refactors * fix: migration after merge * Update models/error.go Co-authored-by: delvh <dev.lh@web.de> * Update options/locale/locale_en-US.ini Co-authored-by: delvh <dev.lh@web.de> * Update options/locale/locale_en-US.ini Co-authored-by: delvh <dev.lh@web.de> * adapt latest refactors * fix test * use more context * skip potential edgecases * document func usage * GetBranchNamesForSha() -> GetRefsBySha() * start refactoring * ajust to new changes * nit * docu nit * the great check move * move checks for branchprotection into own package * resolve todo now ... * move & rename * unexport if posible * fix * check if merge is allowed before merge on scheduled pull * debugg * wording * improve SetDefaults & nits * NotAllowedToMerge -> DisallowedToMerge * fix test * merge files * use package "errors" * merge files * add string names * other implementation for gogit * adapt refactor * more context for models/pull.go * GetUserRepoPermission use context * more ctx * use context for loading pull head/base-repo * more ctx * more ctx * models.LoadIssueCtx() * models.LoadIssueCtx() * Handle pull_service.Merge in one DB transaction * add TODOs * next * next * next * more ctx * more ctx * Start refactoring structure of old pull code ... * move code into new packages * shorter names ... and finish **restructure** * Update models/branches.go Co-authored-by: zeripath <art27@cantab.net> * finish UpdateProtectBranch * more and fix * update datum * template: use "svg" helper * rename prQueue 2 prPatchCheckerQueue * handle automerge in queue * lock pull on git&db actions ... * lock pull on git&db actions ... * add TODO notes * the regex * transaction in tests * GetRepositoryByIDCtx * shorter table name and lint fix * close transaction bevore notify * Update models/pull.go * next * CheckPullMergable check all branch protections! * Update routers/web/repo/pull.go * CheckPullMergable check all branch protections! * Revert "PullService lock via pullID (#19520)" (for now...) This reverts commit 6cde7c9159a5ea75a10356feb7b8c7ad4c434a9a. * Update services/pull/check.go * Use for a repo action one database transaction * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Update services/issue/status.go Co-authored-by: delvh <dev.lh@web.de> * Update services/issue/status.go Co-authored-by: delvh <dev.lh@web.de> * use db.WithTx() * gofmt * make pr.GetDefaultMergeMessage() context aware * make MergePullRequestForm.SetDefaults context aware * use db.WithTx() * pull.SetMerged only with context * fix deadlock in `test-sqlite\#TestAPIBranchProtection` * dont forget templates * db.WithTx allow to set the parentCtx * handle db transaction in service packages but not router * issue_service.ChangeStatus just had caused another deadlock :/ it has to do something with how notification package is handled * if we merge a pull in one database transaktion, we get a lock, because merge infoce internal api that cant handle open db sessions to the same repo * ajust to current master * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * dont open db transaction in router * make generate-swagger * one _success less * wording nit * rm * adapt * remove not needed test files * rm less diff & use attr in JS * ... * Update services/repository/files/commit.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * ajust db schema for PullAutoMerge * skip broken pull refs * more context in error messages * remove webUI part for another pull * remove more WebUI only parts * API: add CancleAutoMergePR * Apply suggestions from code review Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * fix lint * Apply suggestions from code review * cancle -> cancel Co-authored-by: delvh <dev.lh@web.de> * change queue identifyer * fix swagger * prevent nil issue * fix and dont drop error * as per @zeripath * Update integrations/git_test.go Co-authored-by: delvh <dev.lh@web.de> * Update integrations/git_test.go Co-authored-by: delvh <dev.lh@web.de> * more declarative integration tests (dedup code) * use assert.False/True helper Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Hide private repositories in packages (#19584)KN4CK3R2022-05-078-20/+115
|
* Only show accessible teams in dashboard dropdown list (#19642)Jimmy Praet2022-05-072-7/+1
| | | Fixes #19637
* prevent double click new issue/pull/comment button (#16157)a10121127962022-05-073-3/+15
| | | | | | | | | | * prevent double click new issue/pull/comment button when network is not good, these button maybe double clicked, then more than one same issues pulls or comments will be created. this pull request will fix this bug. Signed-off-by: a1012112796 <1012112796@qq.com>
* Improve reviewing PR UX (#19612)Gusted2022-05-077-3/+74
|
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-072-0/+2
|
* Add Changelog v1.16.7 (#19575) (#19644)65432022-05-072-1/+24
| | | | | | | | | | | | * Add Changelog v1.16.7 (#19575) Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Gusted <williamzijl7@hotmail.com> * jup Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Gusted <williamzijl7@hotmail.com>
* Set safe dir for git operations in .drone.yml CI (#19641)techknowlogick2022-05-061-0/+10
| | | | | Our drone by necessity runs on git repositories not owned by the drone process. Unfortunately this means that git operations and thence CI builds will fail without the `safe.directory` option being set. See: https://drone.gitea.io/go-gitea/gitea/54632/2/8
* Add missing `sorting` column in `project_issue` table (#19635)wxiaoguang2022-05-061-0/+3
|
* Simplify `IsVendor` (#19626)Gusted2022-05-061-58/+2
| | | | | The changes in this file were upstreamed directly into go-enry as https://github.com/go-enry/go-enry/pull/44 and therefore they are no longer needed.
* Prevent NPE when checking repo units if the user is nil (#19625)zeripath2022-05-061-1/+1
| | | | | | | | | CheckRepoUnitUser should tolerate nil users. Fix #19613 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>