1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-13 23:05:48 +00:00
Commit Graph

1096 Commits

Author SHA1 Message Date
pvgoran
88008b681d
Remove unnecessary parentheses in wiki/view template (#11781)
It's a backport of #10583 to version 1.11.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-06 07:20:32 +01:00
pvgoran
1d57c309ef
Remove unnecessary parentheses in wiki/revision template (#11481)
This fixes the error on "Page Revision" page, similar to #10552.
2020-05-18 23:05:27 +01:00
zeripath
2cb3db2d20
Set correct content_type value for Gogs/Gitea webhooks (#9504) (#10456) (#11461)
The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.

Co-authored-by: Jeff Stein <jeff@jeffvstein.org>
2020-05-17 20:08:59 +01:00
guillep2k
ff7eaa1eb4
Show pull request selection even when unrelated branches (#11239) (#11283)
Fix #10525

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-05-04 12:38:26 +01:00
zeripath
4a6765fba2
Fix submodule paths when AppSubUrl is not root (#11098) (#11176)
Backport #11098

Fix #11002

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-04-22 13:37:52 +01:00
6543
cc2a6c1d30
Fix merge dialog on protected branch with missing required statuses (#11074) (#11084)
It is possible for misconfigured protected branches to have required status checks that are not in any of the current statuses: Pending, Success, Error, Failure, or Warning - presumably because the CI has not contacted us as yet.

Fix #10636 by adding case: missing StatusChecks when these are missing
2020-04-16 10:45:34 +03:00
6543
0c4be64345
[Backport] Fix release counter on API repository info (#10968) (#10996)
* Fix release counter on API repository info (#10968)

* correct Pull Count to v1.11 Fixtures
2020-04-06 18:13:12 -04:00
John Olheiser
21eaeb8418
Issue writers perms can modify issues (#10623) (#10626)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-03-06 04:42:20 +00:00
zeripath
3444fa2dd7
Fix appearance of unsigned sha box in view_list (#10543) (#10544)
Unfortunately the fix in #10511 was slightly incorrect and placed the
detail box at one level too far out.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-02-29 17:20:32 +02:00
zeripath
caa2aeaa52
Show Signer in commit lists and add basic trust (#10425) (#10524)
Backport #10425
Backport #10511

* Show Signer in commit lists and add basic trust (#10425)

Show the avatar of the signer in the commit list pages as we do not
enforce that the signer is an author or committer. This makes it
clearer who has signed the commit.

Also display commits signed by non-members differently from
members and in particular make it clear when a non-member signer
is different from the committer to help reduce the risk of
spoofing.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Fix the signing icon in the  view_list.tmpl page (#10511)

Co-Authored-By: silverwind <me@silverwind.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-02-28 14:18:02 -03:00
John Olheiser
4cb18601ff
Change action GETs to POST (#10462) (#10464)
* Change action GETs to POST

* submite = submit + smite

* No more # href

* Fix test

* Match other tests

* Explicit csrf

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-02-25 15:08:21 -06:00
zeripath
4f64688902
Truncate long commit message header (#10301) (#10319)
* Truncate long commit message header

* Fix overflow in view commit table

* Use @media less

* Further improvements

* Fix the commit message on small screens

* adjust width of minimal table
2020-02-18 08:51:39 +01:00
Lunny Xiao
987cd277f6
Fix reply on code review (#10227) (#10257)
Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
2020-02-13 11:32:30 +02:00
Lauris BH
80eb50655a Fix followers and following tabs in profile (#10202) (#10203) 2020-02-09 21:00:24 +00:00
guillep2k
b5b44364e3
Allow emoji on review head comments (#10159) (#10174)
Co-authored-by: techknowlogick <matti@mdranta.net>

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-07 21:39:24 +01:00
Lunny Xiao
049af0d3d0
Fix branch page pull request title and link error (#10092) (#10097)
* Fix branch page pull request title and link error (#10092)
2020-02-01 15:14:56 +00:00
6543
b3549bb5ec
[UI] Show pull icon on pull (#10061) (#10062) 2020-01-29 20:40:43 +00:00
Lunny Xiao
16dfd9ffbe Sanitize credentials in mirror form (#9975) (#9991) 2020-01-26 08:16:53 +00:00
6543
128cc34344 Fixed repo link in generated comment for cross repository dependency (#9863) (#9935)
* fixed link to issue in issue comments after adding/removing a dependency, before links assumed the issue was in the same repository. also changed the format of the displayed issue since the issue will not necessarily be in the same repo

* based on pr comments, changed to use HTMLURL instead of piecing together the issue url, and added an if statement around the issue link display as a nil protection

* only showing repo name in dependency comment if the issue is from another repo

Co-authored-by: Brad Albright <32200834+bhalbright@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-01-22 12:54:40 +02:00
Lunny Xiao
0dced15c1a Fix wrong hint when status checking is running on pull request view (#9886) (#9928)
* Fix wrong hint when status checking is running on pull request view

* fix lint

* fix test

* fix test

* fix wrong tmpl

* fix import

* rename function name
2020-01-22 08:06:11 +02:00
Lunny Xiao
f96c1a2c79 Fix wrong permissions check when issues/prs shared operations (#9885) (#9889)
* Fix wrong permissions check when issues/prs shared operations

* move redirect to the last of the function

* fix swagger

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-20 17:59:33 +02:00
Lunny Xiao
8add1dfacc Fix issues/pulls dependencies problems (#9842) (#9864)
* Fix issues/pulls dependencies problems

* fix swagger and api param name

* fix js
2020-01-19 12:56:57 -05:00
David Svantesson
c181070f9e Repository teams - disable remove button when have access to all (#9640)
Co-authored-by: zeripath <art27@cantab.net>
2020-01-08 08:36:39 +08:00
zeripath
e5d8e2d10c
Branches not at ref commit ID should not be listed as Merged (#9614)
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
2020-01-07 17:06:14 +00:00
zeripath
2a1cf5bae9
Add some padding to the shadowed comment box (#9612)
* Add some padding to the shadowed comment box
* prevent the padding affecting the other comments
2020-01-05 19:25:27 +00:00
David Svantesson
ea707f5a77 Add branch protection option to block merge on requested changes. (#9592)
* 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>
2020-01-03 19:47:09 +02:00
John Olheiser
b2b10858c6 Don't auto-init SimpleMDE for review textarea (#9574)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-02 04:02:11 +01:00
Flutterlice
8941f7fc01 Fix for a wrong URL in activity page of repository. (Using config url instead of an actual one) (#9571) 2020-01-01 08:54:21 +08:00
zeripath
0c07f1de5b Provide Default messages for merges (#9393)
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-30 18:34:11 -05:00
6543
261c3a56a2 [Fix] Release attachment should use DownloadURL() not Name (#9529)
* 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
2019-12-28 23:33:13 +00:00
Lunny Xiao
ed67bbe444 Fix repository issues pagination bug when there are more than one label filter (#9512) 2019-12-28 14:43:46 +00:00
6543
4ee97465e9 [Fix] AllowedReaction code (#9518)
* optimize

* CI.restart()

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: zeripath <art27@cantab.net>
2019-12-27 18:43:56 -05:00
6543
f2d03cda96 [API] Extend times API (#9200)
Extensively extend the times API.

close #8833; close #8513; close #8559
2019-12-27 20:30:58 +00:00
techknowlogick
590d56dbb3
switch to fomantic-ui (#9374) 2019-12-17 16:34:11 -05:00
zeripath
601b0cf4c1 Add description to labels on create issue (#9392) 2019-12-17 15:02:17 -05:00
Mario Lubenka
61db834904 Change target branch for pull request (#6488)
* 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>
2019-12-16 14:20:25 +08:00
zeripath
dc2fe9801f Make repository management section handle lfs locks (#8726)
* 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
2019-12-12 21:18:07 +08:00
Oscar Costa
1583c48e3a Show label list on label set (#9251)
* 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.
2019-12-06 21:13:19 -05:00
jaqra
8875586570 Change some label colors (#9051)
* Change label colors

* Override black basic label background for green theme on label list
2019-12-03 20:39:58 -05:00
David Svantesson
bac4b78e09 Branch protection: Possibility to not use whitelist but allow anyone with 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.
2019-12-03 20:08:56 -05:00
mrsdizzie
bdbdd6608f Don't link wiki revision to commit (#9244)
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:

 5e72eeb008

This just removes the link for now until that feature is implemented
2019-12-03 13:15:41 -05:00
John Olheiser
51432ebb9c Fix context menu overflow & review tag margin (#9231)
* Fix context menu overflow

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add review tag CSS

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-12-03 01:03:30 +02:00
6543
668eaf95d5 [Feature] Custom Reactions (#8886)
* 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
2019-12-01 17:57:24 -05:00
programkode
c9d50bcab5 Correct tooltip msg blocked by dependencies (#9211) 2019-11-29 14:05:49 -05:00
John Olheiser
62bcb2b7f1 Add avatar and issue labels to template repositories (#9149)
* 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>
2019-11-25 13:17:51 +08:00
Lauris BH
95c3dc856a
Fix max length check and limit in multiple repo forms (#9148)
* Fix input field max length for release, label and milestone forms

* Add max length for isseu and PR title
2019-11-25 01:06:23 +02:00
John Olheiser
e84326aaec Add git hooks and webhooks to template repositories; move to services (#8926)
* Add git hooks and webhooks to template options

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update models/repo.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Add tooltip if the user can't edit git hooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Close repositories after copying git hooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Wording

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Restructure for services

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Return errors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move GenerateRepository to using a DBContext

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Wrap with models.WithTx

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove debug print

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move if-error-delete-repo outside WithTx

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Return nil if no repo generated

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-24 12:57:52 -05:00
John Olheiser
eb0359cad4 Context menus for comments (#9043)
* Add quote replies

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-19 20:33:42 +02:00
guillep2k
b15f26b1cf Close/reopen issues by keywords in titles and comments (#8866)
* Add close/reopen from comment functionality

* Fix comment

* Rewrite closing/reopening template

* Check xref permissions, move action to services/pull

* Fix RefIsPull field

* Add xref tests

* Fix xref unique filter

* Only highlight keywords for actionable xrefs

* Fix xref neuter filter

* Fix check return status

* Restart CI
2019-11-18 15:13:07 +02:00
Cherrg
1c911aa825 wiki - add 'write' 'preview' buttons to wiki edit like in issues (#7241)
* Add add 'write' 'preview' buttons to wiki edit like in issues

affects #6975

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* update dark theme

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix css lint warnings - missing spaces

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* hide preview button on no fullscreen toolbar

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-11-17 14:42:44 -05:00