summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Repository teams - disable remove button when have access to all (#9640)David Svantesson2020-01-081-3/+2
| | | | Co-authored-by: zeripath <art27@cantab.net>
* Branches not at ref commit ID should not be listed as Merged (#9614)zeripath2020-01-072-2/+8
| | | | | | | | | | | Once a branch has been merged if the commit ID no longer equals that of the pulls ref commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix #9201 When looking at the pull page we should also get the commits from the refs/pulls/x/head Fix #9158
* Graceful Queues: Issue Indexing and Tasks (#9363)zeripath2020-01-072-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Queue: Add generic graceful queues with settings * Queue & Setting: Add worker pool implementation * Queue: Add worker settings * Queue: Make resizing worker pools * Queue: Add name variable to queues * Queue: Add monitoring * Queue: Improve logging * Issues: Gracefulise the issues indexer Remove the old now unused specific queues * Task: Move to generic queue and gracefulise * Issues: Standardise the issues indexer queue settings * Fix test * Queue: Allow Redis to connect to unix * Prevent deadlock during early shutdown of issue indexer * Add MaxWorker settings to queues * Merge branch 'master' into graceful-queues * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_disk.go * Update modules/queue/queue_disk_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Rename queue.Description to queue.ManagedQueue as per @guillep2k * Cancel pool workers when removed * Remove dependency on queue from setting * Update modules/queue/queue_redis.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * As per @guillep2k add mutex locks on shutdown/terminate * move unlocking out of setInternal * Add warning if number of workers < 0 * Small changes as per @guillep2k * No redis host specified not found * Clean up documentation for queues * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md * Update modules/indexer/issues/indexer_test.go * Ensure that persistable channel queue is added to manager * Rename QUEUE_NAME REDIS_QUEUE_NAME * Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME" This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* fix swagger description of reaction API (#9617)65432020-01-061-6/+6
|
* Add some padding to the shadowed comment box (#9612)zeripath2020-01-051-12/+14
| | | | | * Add some padding to the shadowed comment box * prevent the padding affecting the other comments
* Add translatable Powered by Gitea text in footer (#9600)Lauris BH2020-01-041-1/+1
|
* Add footer extra links template (#9576)Bagas Sanjaya2020-01-032-0/+1
| | | | | | | | | | | | | | | * Add footer extra links template * [Docs] Update to mention extra links footer template * Commit suggestion from @davidsvantesson Co-Authored-By: David Svantesson <davidsvantesson@gmail.com> * Move template placement to right side of footer Co-authored-by: David Svantesson <davidsvantesson@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add branch protection option to block merge on requested changes. (#9592)David Svantesson2020-01-032-0/+13
| | | | | | | | | | | | | | | | | | | * Add branch protection option to block merge on requested changes. * Add migration step * Fix check to correct negation * Apply suggestions from code review Language improvement. Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Copyright year. Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Some more e-mail notification fixes (#9596)mrsdizzie2020-01-033-15/+31
| | | | | | | | | | | | | | | | | | | | | * Some more e-mail notification fixes A few more small e-mail notification fixes/changes * Style footer of notification email to be smaller * Include text for when pull request is merged * Don't include original body of issue or PR when merging/closing by setting issue.Content to "" in these cases * Set Re: prefix and meessage-ID headers based on actName instead of checking for a comment. This fixes a bug where certain actions that didn't have a comment were setting Message-ID instead of In-Reply-To which caused some mail programs not to show those messages as they would have had the same Message-ID as a previous message. Also fixes the case where a final comment and closing message would have been displayed out of order if you didn't have a copy of the original issue/pr cretion message. * Update other template footers for consistency
* Don't auto-init SimpleMDE for review textarea (#9574)John Olheiser2020-01-021-1/+1
| | | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* swagger UI: hide iretating search field (#9554)65432020-01-011-4/+2
|
* Fix for a wrong URL in activity page of repository. (Using config url ↵Flutterlice2020-01-011-7/+7
| | | | instead of an actual one) (#9571)
* Update default issue template (#9568)mrsdizzie2019-12-311-7/+15
| | | | | | | | | Some small changes: * Include text if approve/comment/request changes on PR * List filename for review comments * Bold username when mentioned This will stop empty body messages when approving PR on gitea.com
* [API] Fix 9544 | return 200 when reaction already exist (#9550)65432019-12-311-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add ErrReactionAlreadyExist * extend CreateReaction * reaction already exist = 200 * extend FindReactionsOptions * refactor swagger options/definitions * fix swagger-validate * Update models/error.go Co-Authored-By: zeripath <art27@cantab.net> * fix test PART1 * extend FindReactionsOptions with UserID option * catch error on test * fix test PART2 * format ... Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* update swagger info (#9558)65432019-12-311-6/+13
|
* Provide Default messages for merges (#9393)zeripath2019-12-301-3/+5
| | | | Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* [Fix] Release attachment should use DownloadURL() not Name (#9529)65432019-12-282-7/+7
| | | | | | | * Handle if two or more attachments have the same name * previously only the first could be downloaded - now each is downloadable * dos also take care of #6506 (fix was: #6512) * use func DownloadURL() at issue attatchments too
* Fix repository issues pagination bug when there are more than one label ↵Lunny Xiao2019-12-282-3/+3
| | | | filter (#9512)
* [Fix] AllowedReaction code (#9518)65432019-12-275-8/+8
| | | | | | | | | * optimize * CI.restart() Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net>
* [API] Extend times API (#9200)65432019-12-272-100/+238
| | | | | Extensively extend the times API. close #8833; close #8513; close #8559
* Upgrade lato fonts to v16. (#9498)Lunny Xiao2019-12-251-2/+2
| | | | | | | | * Upgrade lato fonts to v16 * Upgrade lato fonts to v16 * fix bug
* [API] Extend contents with dates (#9464)65432019-12-241-0/+26
| | | | | | | | | | | | | | | * extend CommitTree func * make sure Date NOT nil * spell corection Co-Authored-By: zeripath <art27@cantab.net> * add TEST Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add ActionCommentPull action (#9456)mrsdizzie2019-12-221-1/+4
| | | | | | | | | | | * Add ActionCommentPull action Adds ActionCommentPull action to distinguish between a comment on an issue and on a pull request * Update modules/notification/action/action.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Swagger info corrections (#9441)65432019-12-201-10/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use numbers and not http.Status___ enum * fix test * add many missing swagger responses * code format * Deletion Sould return 204 ... * error handling improvements * if special error type ... then add it to swagger too * one smal nit * invalidTopicsError is []string * valid swagger specification 2.0 - if you add responses swagger can tell you if you do it right :+1: * use ctx.InternalServerError * Revert "use numbers and not http.Status___ enum" This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef. * use http.Status* enum everywhere
* Fix NewCommitStatus (#9434)John Olheiser2019-12-191-2/+2
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix background reactions in the arc-green theme (#9421)Alexey 〒erentyev2019-12-182-4/+4
| | | | | | | | | | * Fixed arc-green theme reactions background Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Added MD5 AppVer Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* switch to fomantic-ui (#9374)techknowlogick2019-12-177-10/+10
|
* Add description to labels on create issue (#9392)zeripath2019-12-171-1/+2
|
* Change target branch for pull request (#6488)Mario Lubenka2019-12-162-6/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds functionality to change target branch of created pull requests Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use const instead of var in JavaScript additions Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Check if branches are equal and if PR already exists before changing target branch Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Make sure to check all commits Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Print error messages for user as error flash message Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Disallow changing target branch of closed or merged pull requests Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Resolve conflicts after merge of upstream/master Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Change order of branch select fields Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes duplicate check Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use ctx.Tr for translations Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Recompile JS Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use correct translation namespace Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Remove redundant if condition Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Moves most change branch logic into pull service Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Completes comment Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Add Ref to ChangesPayload for logging changed target branches instead of creating a new struct Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Revert changes to go.mod Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Directly use createComment method Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Return 404 if pull request is not found. Move written check up Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Remove variable declaration Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Return client errors on change pull request target errors Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Return error in commit.HasPreviousCommit Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds blank line Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Test patch before persisting new target branch Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Update patch before testing (not working) Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes patch calls when changeing pull request target Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes unneeded check for base name Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Moves ChangeTargetBranch completely to pull service. Update patch status. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Set webhook mode after errors were validated Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Update PR in one transaction Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Move logic for check if head is equal with branch to pull model Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds missing comment and simplify return Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adjust CreateComment method call Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Add /milestones endpoint (#8733)Brad Albright2019-12-153-2/+127
| | | | | Create a /milestones endpoint which basically serves as a dashboard view for milestones, very similar to the /issues or /pulls page. Closes #8232
* Make repository management section handle lfs locks (#8726)zeripath2019-12-122-2/+64
| | | | | | | | | | | | | | | | | | | | * Make repository maangement section handle lfs locks * Add check attribute handling and handle locking paths better * More cleanly check-attributes * handle error * Check if file exists in default branch before linking to it. * fixup * Properly cleanPath * Use cleanPath * Sigh
* [API] extend StopWatch (#9196)65432019-12-111-1/+106
| | | | | | | | | | | | | | * squash api-stopwatch * fix prepair logic! + add Tests * fix lint * more robust time compare * delete responce 202 -> 204 * change http responce in test too
* [API] Add Reactions (#9220)65432019-12-071-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * reject reactions wich ar not allowed * dont duble check CreateReaction now throw ErrForbiddenIssueReaction * add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint * add Find Functions * fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions... * explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID * load issue; load user ... * return error again * swagger def canged after LINT * check if user has ben loaded * add Tests * better way of comparing results * add suggestion * use different issue for test (dont interfear with integration test) * test dont compare Location on timeCompare * TEST: add forbidden dubble add * add comments in code to explain * add settings.UI.ReactionsMap so if !setting.UI.ReactionsMap[opts.Type] works
* Show label list on label set (#9251)Oscar Costa2019-12-062-4/+4
| | | | | | | | | | * Showing the list of labels of template files #7812 * Returning and logging errors when loading labels * Commenting public method * Change log level in case of error loading labels.
* Only show part of members on orgnization dashboard and add paging for ↵Lunny Xiao2019-12-061-0/+2
| | | | | | | | | | orgnization members page (#9092) * Only show part of members on orgnization dashboard and add paging for orgnization members page * fix test * fix typo
* Change some label colors (#9051)jaqra2019-12-036-6/+6
| | | | | | * Change label colors * Override black basic label background for green theme on label list
* Branch protection: Possibility to not use whitelist but allow anyone with ↵David Svantesson2019-12-032-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | write access (#9055) * Possibility to not use whitelist but allow anyone with write access * fix existing test * rename migration function * Try to give a better name for migration step * Clear settings if higher level setting is not set * Move official reviews to db instead of counting approvals each time * migration * fix * fix migration * fix migration * Remove NOT NULL from EnableWhitelist as migration isn't possible * Fix migration, reviews are connected to issues. * Fix SQL query issues in GetReviewersByPullID. * Simplify function GetReviewersByIssueID * Handle reviewers that has been deleted * Ensure reviews for test is in a well defined order * Only clear and set official reviews when it is an approve or reject.
* Don't link wiki revision to commit (#9244)mrsdizzie2019-12-031-0/+4
| | | | | | | | | In #7907 a change was made to use the same template for repo and wiki commit lists. However, there is no code or logic for showing the diff of a wiki commit so it just produces broken links like: http://localhost:3000/mrsdizzie/%!s(%3Cnil%3E)/commit/5e72eeb00896d3853ab22a01950a50119b249567 This just removes the link for now until that feature is implemented
* Remove empty lines (#9232)John Olheiser2019-12-031-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix context menu overflow & review tag margin (#9231)John Olheiser2019-12-032-3/+3
| | | | | | | | | | * Fix context menu overflow Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add review tag CSS Signed-off-by: jolheiser <john.olheiser@gmail.com>
* [UI] IssuePage multi repo select (#8741)65432019-12-011-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make repository list @ issues/PR page persist Will partially fix #6355 * Enable multiple selections in repo list @ issues/PR page Part of issue #6355 * Add RepoIDs to UserIssueStatsOptions to make "type" count correct when selecting one/multiple repos. * Replace variable "repo" with list "repos[]" and enable multiple selections of repositories from list by including/excluding RepoIDs in list. * * Remove redundant code * Add 'All' button Improves functionality of the page, so that backtracking is not necessary to reset the page * Remove redundant variable Completely replace 'RepoID' with 'RepoIDs' and remove redundant code * Add RepoIDs to label link * Revert part of code to previous version to troubleshoot build failure * Implement old and new pieces of code whilst adhering to multi select * Attempt to join the two versions Last commit passed tests but doesn't work in practice, this works in practice and hopefully passes the tests. * Update tests to desired state * Fix pagination implementation and tests * Pass repoIDs as `repos=[1,2,3...]` instead of several `repos[]=..` * Update tests file to reflect new functionality * Update template with new `repos` format * Implement new solution to show constant "total issues" count for "All" button * Correct behavior when passing zero to array * Comment out test url returning 404 This keeps returning 404 in the test despite working in practice, for the sake of running more tests I am commenting it out * Comment out another test url returning 404 Last attempt, if more tests crash I will uncomment the urls and request assistance. * Reenable tests and test fix * Re-enable tests * Make selecting "In your repositories" reset selection as passing IDs of repos belonging to other profiles causes breakage * Remove unnecessary (with multi-selection enable) code * Drop repo from repo map and total count if permission denied * Remove extra parenthesis * make template work again * find bug! * forgot the '#' at bugfixing * delete unused RepoID * compile regex only one time * make fmt * local variable = capital letter lower * check if repos query pattern is correct * pagination remove last , - make regex work again * use Replace instead of ReplaceAll; del delete * fix test * how did this test binary got in?!? dont forgot the "-p" at git add * ! * dont replace -> cut fisrt & last string Co-Authored-By: zeripath <art27@cantab.net> * jet another regex dont mind as long as it has the same result and is performatn ... Co-Authored-By: zeripath <art27@cantab.net> * dont use nonexisting repo for test * exclude /issues?type=created_by from test * add table to querys use same syntax in each query (table.colum) * add new issue for test * dont make a workaround or something else this need a refactor itself and is out of scope for this PR * fix misspell * CI.redo() * englisch txt update Co-Authored-By: zeripath <art27@cantab.net> * add sugestions * Tweak & Fix * CI.restart()
* [Feature] Custom Reactions (#8886)65432019-12-015-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add [ui] Reactions * move contend check from form to go functions * use else if * check if reaction is allowed only on react (so previous custom reaction can be still removed) * use $.AllowedReactions in templates * use ctx.Flash.Error * use it there too * add redirection * back to server error because a wrong reaction is a template issue ... * add emoji list link * add docs entry * small wording nit suggestions from @jolheiser - thx * same reactions as github * fix PR reactions * handle error so template JS could check * Add Integrations Test * add REACTIONS setting to cheat-sheet doc page
* Add release_counter to Repo API (#9214)65432019-11-301-0/+5
|
* Graceful: Cancel Process on monitor pages & HammerTime (#9213)zeripath2019-11-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Graceful: Create callbacks to with contexts * Graceful: Say when Gitea is completely finished * Graceful: Git and Process within HammerTime Force all git commands to terminate at HammerTime Force all process commands to terminate at HammerTime Move almost all git processes to run as git Commands * Graceful: Always Hammer after Shutdown * ProcessManager: Add cancel functionality * Fix tests * Make sure that process.Manager.Kill() cancels * Make threadsafe access to Processes and remove own unused Kill * Remove cmd from the process manager as it is no longer used * the default context is the correct context * get rid of double till
* Correct tooltip msg blocked by dependencies (#9211)programkode2019-11-291-2/+2
|
* expose PR counter on Repo API (#9202)65432019-11-291-0/+5
|
* Properly fix displaying virtual session provider in admin panel (#9137)zeripath2019-11-281-1/+1
| | | | | | | | | | | | | | | * Properly fix #7127 Although #7300 properly shadows the password from the virtual session provider, the template displaying the provider config still presumed that the config was JSON. This PR updates the template and properly hides the Virtual Session provider. Fixes #7127 * update per @silverwind's suggestion
* Add avatar and issue labels to template repositories (#9149)John Olheiser2019-11-251-0/+11
| | | | | | | | | | * Add avatar and issue labels Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix redundant if-err Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix max length check and limit in multiple repo forms (#9148)Lauris BH2019-11-255-11/+11
| | | | | | * Fix input field max length for release, label and milestone forms * Add max length for isseu and PR title
* update #9066 Always show Password field on link account sign in page (#9147)Benno2019-11-241-1/+1
|