Commit Graph
3303 Commits
Author SHA1 Message Date
zeripathandGitHub 80db44267c Add Approval Counts to pulls list (#10238)
* Add Approval Counts to pulls list

Add simple approvals counts to pulls lists

* Remove non-official counts

* Add PR features to milestone_issues.tmpl
2020-03-06 03:44:06 +00:00
John OlheiserandGitHub f422a115f4 Issue writers perms can modify issues (#10623)
Signed-off-by: jolheiser <[email protected]>
2020-03-06 09:57:18 +08:00
Lauris BHandGitHub 37c3db7be6 Add restricted user filter to LDAP authentication (#10600)
* Add restricted user filter to LDAP authentification

* Fix unit test cases
2020-03-05 08:30:33 +02:00
3d5d21133c OAuth2: add Yandex provider (#8335) (#10564)
* OAuth2: add Yandex provider (#8335)

* remove changes from locale ru-RU

* fmt modules/auth/oauth2/oauth2.go

Co-Authored-By: 6543 <[email protected]>

* fix fmt

* Update templates/admin/auth/new.tmpl

* fix fmt

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: guillep2k <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2020-03-05 00:08:52 +02:00
John OlheiserandGitHub afa1e1af16 Fix templates (#10596)
Signed-off-by: jolheiser <[email protected]>
2020-03-04 08:56:53 +02:00
009990b0c0 Remove unnecessary parentheses in template (#10583)
Fix #10552

Co-authored-by: Lauris BH <[email protected]>
2020-03-03 16:00:36 +08:00
John OlheiserandGitHub 0e2217bd2d Logout POST action (#10582)
* Change logout to POST

* Update for redirect

Signed-off-by: jolheiser <[email protected]>
2020-03-02 22:50:31 -06:00
techknowlogickandGitHub bea497ff96 nextcloud oauth (#10562)
Fix #7078
2020-03-02 22:11:45 -05:00
5e1438ba92 Admin page for managing user e-mail activation (#10557)
* Implement mail activation admin panel

* Add export comments

* Fix another export comment

* again...

* And again!

* Apply suggestions by @lunny

* Add UI for user activated emails

* Make new activation UI work

* Fix lint

* Prevent admin from self-deactivate; add modal

Co-authored-by: zeripath <[email protected]>
2020-03-02 15:25:36 -03:00
zeripathandGitHub 421e7b7875 Fix appearance of unsigned sha box in view_list (#10543)
Unfortunately the fix in #10511 was slightly incorrect and placed the
detail box at one level too far out.

Signed-off-by: Andrew Thornton <[email protected]>
2020-02-29 13:27:19 +00:00
82be59e633 issue search on my related repositories (#9758)
* adding search capability to user's issues dashboard

* global issue search

* placement of search bar on issues dashboard

* fixed some bugs in the issue dashboard search

* added unit test because IssueIDs option was added to UserIssueStatsOptions

* some renaming of fields in the issue dashboard code to be more clear; also trying to fix issue of searching the right repos based on the filter

* added unit test fro GetRepoIDsForIssuesOptions; fixed search lost on pagination; using shown issue status for open/close count; removed some debugging

* fix issue with all count showing incorrectly

* removed todo comment left in by mistake

* typo pulling wrong count

* fxied all count being off when selecting repositories

* setting the opts.IsClosed after pulling repos to search, this is done so that the list of repo ids to serach for the keyword is not limited, we need to get all the issue ids for the shown issue stats

* added "accessibleRepositoryCondition" check on the query to pull the repo ids to search for issues, this is an added protection to ensure we don't search repos the user does not have access to

* added code so that in the issues search, we won't use an in clause of issues ids that goes over 1000

* fixed unit test

* using 950 as the limit for issue search, removed unneeded group by in GetRepoIDsForIssuesOptions, showing search on pulls dashboard page too (not just issues)

Co-authored-by: guillep2k <[email protected]>
2020-02-29 03:52:05 -03:00
af61b2249a adds API endpoints to manage OAuth2 Application (list/create/delete) (#10437)
* add API endpoint to create OAuth2 Application.

* move endpoint to /user. Add swagger documentations and proper response type.

* change json tags to snake_case. add CreateOAuth2ApplicationOptions to swagger docs.

* change response status to Created (201)

* add methods to list OAuth2 apps and delete an existing OAuth2 app by ID.

* add APIFormat convert method and file header

* fixed header

* hide secret on oauth2 application list

* add Created time to API response

* add API integration tests for create/list/delete OAuth2 applications.

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: guillep2k <[email protected]>
2020-02-29 03:19:32 -03:00
Jeff SteinandGitHub e661cd0321 Set correct content_type value for Gogs/Gitea webhooks (#9504) (#10456)
The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.
2020-02-28 14:33:52 +00:00
FreeCipherandGitHub 74433c91bf head.tmpl og:image picture location (#10531)
og:image picture location
2020-02-28 19:30:23 +08:00
efec0d393b Fix the signing icon in the view_list.tmpl page (#10511)
* Fix the view_list.tmpl page

* fix-centerlock

* Update web_src/less/_base.less

as per @silverwind

Co-Authored-By: silverwind <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: guillep2k <[email protected]>
2020-02-27 23:03:17 -03:00
John OlheiserandGitHub 15fbf509d3 Org action fixes and form cleanup (#10512)
* More org fixes

* Move form action query to inputs

Signed-off-by: jolheiser <[email protected]>
2020-02-27 16:00:13 -06:00
zeripathandGitHub 90919bb37e Show Signer in commit lists and add basic trust (#10425)
* Show Signer in commit lists and add basic trust

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 <[email protected]>

* ensure orange text and background is available

Signed-off-by: Andrew Thornton <[email protected]>

* Update gpg_key.go

* Update models/gpg_key.go

* Apply suggestions from code review

* Require team collaborators to have access to UnitTypeCode

* as per @6543

* fix position of sha as per @silverwind

* as per @guillep2k
2020-02-27 16:20:55 -03:00
9a476113f0 Add fluid-icon (#10491)
This provides Firefox (and possible other browsers) with a
high-resolution rich icon, in place of the previously removed
apple-touch-icon without having to use that one as it lacks an
alpha channel. This is the same method GH uses.

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/UI_considerations#Rich_icons

Co-authored-by: John Olheiser <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-02-27 11:40:14 +08:00
silverwindandGitHub ef798d4b84 Tweak language stats bar (#10487)
- Ensure bar does not overflow parent
- Remove unneccessary borders/background
- Fix shaky animation caused by JS animation miscalculation by setting
  fixed height on the summary box. Box itself is still shaky during
  animation, but better it then the whole page.

Fixes: https://github.com/go-gitea/gitea/issues/10474
2020-02-26 22:44:14 +02:00
John OlheiserandGitHub bcd16cec63 Fix admin notices (#10480)
Signed-off-by: jolheiser <[email protected]>
2020-02-26 10:25:54 -06:00
John OlheiserandGitHub e5944a9521 Change admin dashboard to POST (#10465)
* Add form and convert to POST

* Redirect for flash

Signed-off-by: jolheiser <[email protected]>
2020-02-25 16:54:13 -06:00
c161bb013e Change action GETs to POST (#10462)
* Change action GETs to POST

* submite = submit + smite

* No more # href

* Fix test

* Match other tests

* Explicit csrf

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: guillep2k <[email protected]>
2020-02-25 14:28:47 -06:00
4427a936b4 [API] enable paggination for ListRepoTags (#10454)
* enable paggination for repoTags

* precalculate first, cut slice second

* Apply suggestions from code review

Co-Authored-By: guillep2k <[email protected]>

Co-authored-by: guillep2k <[email protected]>
2020-02-25 14:07:07 -05:00
Philipp A. BeckmannandGitHub bab6e1ed87 Fixed wrong AppSubUrl in multiple templates (#10447)
* Fixed wrong AppSubUrl in OAuth2 app edit page

* Replaced all other occurrences of $.AppSubURL for support of sub-paths
2020-02-25 09:58:37 -06:00
silverwindandGitHub 062f35109d move vue and vue-calendar-heatmap to webpack (#10188)
- unvendor vue and vue-calendar-heatmap
- remove unused moment.js leftover from previous heatmap version
- ensure webpack loads the full version of vue
- fix vue devmode warning related to 'searchLimit' type

I wanted to name the chunk heatmap.js but adblockers don't like that
filename [1].

[1] https://github.com/easylist/easylist/blob/3899d5dff33216c0bc64f09ff15d376f346d3e33/easyprivacy/easyprivacy_general.txt#L2095
2020-02-23 21:34:28 +00:00
silverwindandGitHub 71d5a090df Prevent Firefox from using apple-touch-icon (#10402)
* Prevent Firefox from using apple-touch-icon

The opaque background does not work well in Firefox which uses the icon
as a "rich icon". Prevent this by not specifying it in HTML. Real Apple
devices will still request the icon on the static path.

Fixes: https://github.com/go-gitea/gitea/issues/10394

Also adjust gitignore so app.ini.sample becomes searchable and fixed a
variable name in app.ini.sample.

* fix gitignore
2020-02-23 08:34:53 -06:00
zeripathandGitHub c8d1c38129 Render READMEs in docs/ .gitea or .github from root (#10361)
* Render READMEs in docs/ .gitea or .github from root
2020-02-21 17:04:20 -06:00
ac18c3f6f2 Fixes (#10386)
Signed-off-by: jolheiser <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
2020-02-20 17:44:13 -06:00
Lauris BHandGitHub 3c45cf8494 Add detected file language to code search (#10256)
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00
John OlheiserandGitHub d3f618362a Fix JS and Vue (#10328)
Signed-off-by: jolheiser <[email protected]>
2020-02-18 08:07:57 +02:00
e76a64dda1 Inject SVG sprite via ajax (#10320)
* AJAX SVG
* Fix PWA
* Remove unused PWA assets

Signed-off-by: jolheiser <[email protected]>

Co-Authored-by: silverwind <[email protected]>
2020-02-17 23:11:59 +00:00
zeripathandGitHub 314740e215 Truncate long commit message header (#10301)
* 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-17 19:45:55 +02:00
17656021f1 Fix reply on code review (#10227)
Co-authored-by: zeripath <[email protected]>
2020-02-13 13:22:15 +08:00
9ff4e1d2d9 Add API branch protection endpoint (#9311)
* add API branch protection endpoint

* lint

* Change to use team names instead of ids.

* Status codes.

* fix

* Fix

* Add new branch protection options (BlockOnRejectedReviews, DismissStaleApprovals, RequireSignedCommits)

* Do xorm query directly

* fix xorm GetUserNamesByIDs

* Add some tests

* Improved GetTeamNamesByID

* http status created for CreateBranchProtection

* Correct status code in integration test

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-02-12 23:19:35 +00:00
Lunny XiaoandGitHub 83a8944fcf Add feishu webhook support (#10229)
Add feishu webhook support
2020-02-12 08:48:28 +00:00
d67e9b9629 SVG Octicon fixes (#10237)
* SVG fixes

Signed-off-by: jolheiser <[email protected]>

* Colorize span->svg only

Signed-off-by: jolheiser <[email protected]>

* @silverwind suggestions

Signed-off-by: jolheiser <[email protected]>

* Alphabetical

Signed-off-by: jolheiser <[email protected]>

* Convert suburl and staticPrefix to window.config

Signed-off-by: jolheiser <[email protected]>

* De-structure

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: Antoine GIRARD <[email protected]>
2020-02-11 20:53:18 -05:00
2399bad1f1 fix label menu text on miletone issues (#10242)
Co-authored-by: Antoine GIRARD <[email protected]>
2020-02-12 01:07:07 +01:00
James LakinandGitHub 54af3c90c7 Fix issue sidebar menus having an infinite height (#10239)
* Revert "Limit label list height on edit issue page"

* Fix issue sidebar menus having an infinite height
2020-02-11 22:40:47 +02:00
86fdba177a Add Octicon SVG spritemap (#10107)
* Add octicon SVG sprite

Signed-off-by: jolheiser <[email protected]>

* Static prefix

Signed-off-by: jolheiser <[email protected]>

* SVG for all repo icons

Signed-off-by: jolheiser <[email protected]>

* make vendor

Signed-off-by: jolheiser <[email protected]>

* Swap out octicons

Signed-off-by: jolheiser <[email protected]>

* Move octicons to top of less imports

Signed-off-by: jolheiser <[email protected]>

* Fix JS

Signed-off-by: jolheiser <[email protected]>

* Definitely not a search/replace

Signed-off-by: jolheiser <[email protected]>

* Missed regex

Signed-off-by: jolheiser <[email protected]>

* Move to more generic calls and webpack

Signed-off-by: jolheiser <[email protected]>

* make svg -> make webpack

Signed-off-by: jolheiser <[email protected]>

* Remove svg-sprite

Signed-off-by: jolheiser <[email protected]>

* Update tests

Signed-off-by: jolheiser <[email protected]>

* Missed a test

Signed-off-by: jolheiser <[email protected]>

* Remove svg from makefile

Signed-off-by: jolheiser <[email protected]>

* Suggestions

Signed-off-by: jolheiser <[email protected]>

* Attempt to fix test

Signed-off-by: jolheiser <[email protected]>

* Update tests

Signed-off-by: jolheiser <[email protected]>

* Revert timetracking test

Signed-off-by: jolheiser <[email protected]>

* Swap .octicon for .svg in less

Signed-off-by: jolheiser <[email protected]>

* Add aria-hidden

Signed-off-by: jolheiser <[email protected]>

* Replace mega-octicon

Signed-off-by: jolheiser <[email protected]>

* Fix webpack globbing on Windows

Signed-off-by: jolheiser <[email protected]>

* Revert

Co-Authored-By: silverwind <[email protected]>

* Fix octions from upstream

Signed-off-by: jolheiser <[email protected]>

* Fix Vue and missed JS function

Signed-off-by: jolheiser <[email protected]>

* Add JS helper and PWA

Signed-off-by: jolheiser <[email protected]>

* Preload SVG

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-02-11 12:02:41 -05:00
jaqraandGitHub 602b29e965 Limit label list height on edit issue page (#10216) 2020-02-11 16:41:48 +01:00
Lauris BHandGitHub ad2642a8aa Language statistics bar for repositories (#8037)
* Implementation for calculating language statistics

Impement saving code language statistics to database

Implement rendering langauge stats

Add primary laguage to show in repository list

Implement repository stats indexer queue

Add indexer test

Refactor to use queue module

* Do not timeout for queues
2020-02-11 11:34:17 +02:00
guillep2kandGitHub 069a96ebe2 Improve 404 error message (#10214) 2020-02-10 21:23:35 +02:00
9789e0ad53 Only show conflicted files if not merged (#10197)
* Only show conflicted files if not merged

* try again

Co-authored-by: Antoine GIRARD <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-02-09 21:53:41 -05:00
Lauris BHandGitHub fe00886bef Fix followers and following tabs in profile (#10202) 2020-02-09 22:18:01 +02:00
6543andGitHub e273817154 [API] Fix inconsistent label color format (#10129)
* update and use labelColorPattern

* add TestCases

* fix lint

* # optional for templates

* fix typo

* some more

* fix lint of **master**
2020-02-09 14:33:03 +00:00
4721d45c2a move clipboard.js to npm/webpack (#10183)
- created lazy-loaded webpack chunk for clipboard.js
- upgraded clipboard.js from 1.5.9 to 2.0.4
- parallelize initialization of all lazy-loaded features

Co-authored-by: Antoine GIRARD <[email protected]>
2020-02-08 00:03:42 +01:00
6e6da2c276 Tweak locale to respect singular conflicting file message in P… (#10177)
Co-authored-by: Antoine GIRARD <[email protected]>
2020-02-07 17:38:18 +01:00
08c9160e71 Allow emoji on review head comments (#10159)
Co-authored-by: techknowlogick <[email protected]>
2020-02-06 20:35:53 +02:00
guillep2kandGitHub 727fc42db7 Fix issue/pull link (#10158) 2020-02-06 13:12:15 -05:00
6543andGitHub b3c72a7c4a [API] expose RepoOwner on Issue responce (#10126)
* add RepoOwner on issue api responce

* CI.restart()
2020-02-04 00:05:17 -05:00