]> source.dussan.org Git - gitea.git/log
gitea.git
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 6 Mar 2020 06:50:20 +0000 (06:50 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix makefile syntax error (#10622)
silverwind [Fri, 6 Mar 2020 06:47:40 +0000 (07:47 +0100)]
Fix makefile syntax error (#10622)

Fix error found via checkmake. It was the only worthwhile issue it reported.

4 years agoGranular webhook events (#9626)
John Olheiser [Fri, 6 Mar 2020 05:10:48 +0000 (23:10 -0600)]
Granular webhook events (#9626)

* Initial work

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add PR reviews and API coverage

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Split up events

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add migration and locale

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

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

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

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix PR reviews

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

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

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Backwards compatible API

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move session commit

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd Approval Counts to pulls list (#10238)
zeripath [Fri, 6 Mar 2020 03:44:06 +0000 (03:44 +0000)]
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

4 years agoIssue writers perms can modify issues (#10623)
John Olheiser [Fri, 6 Mar 2020 01:57:18 +0000 (19:57 -0600)]
Issue writers perms can modify issues (#10623)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoAdd node version variable to docs (#10620)
John Olheiser [Thu, 5 Mar 2020 22:36:22 +0000 (16:36 -0600)]
Add node version variable to docs (#10620)

Also adjusted other version mentions so go version is always mentioned
as major.minor and node only as major.

Co-authored-by: silverwind <me@silverwind.io>
4 years agoHandle deleted base branch in PR (#10618)
zeripath [Thu, 5 Mar 2020 18:51:21 +0000 (18:51 +0000)]
Handle deleted base branch in PR (#10618)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoMigration for deleting orphaned dependencies (#10617)
Antoine GIRARD [Thu, 5 Mar 2020 15:54:50 +0000 (16:54 +0100)]
Migration for deleting orphaned dependencies (#10617)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoAdd FAQ for markdown (#10611)
John Olheiser [Thu, 5 Mar 2020 15:05:18 +0000 (09:05 -0600)]
Add FAQ for markdown (#10611)

* Add FAQ for markdown

* Expand explanation @guillep2k

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoAdd notice for awesome-gitea (#10612)
Lauris BH [Thu, 5 Mar 2020 09:55:28 +0000 (11:55 +0200)]
Add notice for awesome-gitea (#10612)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoDelete dependencies when deleting a repository (#10608)
Lauris BH [Thu, 5 Mar 2020 07:58:02 +0000 (09:58 +0200)]
Delete dependencies when deleting a repository (#10608)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoAdd migration to fix the old broken merge-bases (#10604)
Lauris BH [Thu, 5 Mar 2020 07:18:07 +0000 (09:18 +0200)]
Add migration to fix the old broken merge-bases (#10604)

* Add migration

* Fix migration

* Update models/migrations/v128.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd restricted user filter to LDAP authentication (#10600)
Lauris BH [Thu, 5 Mar 2020 06:30:33 +0000 (08:30 +0200)]
Add restricted user filter to LDAP authentication (#10600)

* Add restricted user filter to LDAP authentification

* Fix unit test cases

4 years agoVersions (#10597)
guillep2k [Thu, 5 Mar 2020 00:37:19 +0000 (21:37 -0300)]
Versions (#10597)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoEnsure executable bit is kept on the web editor (#10607)
Antoine GIRARD [Wed, 4 Mar 2020 23:46:12 +0000 (00:46 +0100)]
Ensure executable bit is kept on the web editor (#10607)

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoOAuth2: add Yandex provider (#8335) (#10564)
Lauris BH [Wed, 4 Mar 2020 22:08:52 +0000 (00:08 +0200)]
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 <6543@obermui.de>
* fix fmt

* Update templates/admin/auth/new.tmpl

* fix fmt

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix templates (#10596)
John Olheiser [Wed, 4 Mar 2020 06:56:53 +0000 (00:56 -0600)]
Fix templates (#10596)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoUpdate mergebase in pr checker (#10586)
zeripath [Wed, 4 Mar 2020 03:53:57 +0000 (03:53 +0000)]
Update mergebase in pr checker (#10586)

4 years agoFix LFS max file size enforcement (#10593)
zeripath [Tue, 3 Mar 2020 20:57:27 +0000 (20:57 +0000)]
Fix LFS max file size enforcement (#10593)

Unfortunately the batch handler also needs to enforce max file size.
Enforce max file size in batch handler

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 3 Mar 2020 19:53:16 +0000 (19:53 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFrontend build improvements, fix Fomantic build (#10576)
silverwind [Tue, 3 Mar 2020 19:51:11 +0000 (20:51 +0100)]
Frontend build improvements, fix Fomantic build (#10576)

- add package-lock.json to webpack/fomantic prereqs making them always rebuild when dependencies change.
- remove FOMANTIC_EVIDENCE. It seemed better to just track a few output files instead.
- delete fomantic output files before build to prevent possible bugs in fomantic's build.
- resolve WEBPACK_SOURCES only once for performance
- reorder variables for clarity
- use clean-all in Dockerfile
- detect busybox for find syntax

Fixes: https://github.com/go-gitea/gitea/issues/10569
Fixes: https://github.com/go-gitea/gitea/issues/10565
Fixes: https://github.com/go-gitea/gitea/issues/10570
Fixes: https://github.com/go-gitea/gitea/issues/10568
4 years agoRename repo size sorting options (#10587)
Felix W. Dekker [Tue, 3 Mar 2020 17:27:38 +0000 (18:27 +0100)]
Rename repo size sorting options (#10587)

4 years agoRemove unnecessary parentheses in template (#10583)
zeripath [Tue, 3 Mar 2020 08:00:36 +0000 (08:00 +0000)]
Remove unnecessary parentheses in template (#10583)

Fix #10552

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoLogout POST action (#10582)
John Olheiser [Tue, 3 Mar 2020 04:50:31 +0000 (22:50 -0600)]
Logout POST action (#10582)

* Change logout to POST

* Update for redirect

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agonextcloud oauth (#10562)
techknowlogick [Tue, 3 Mar 2020 03:11:45 +0000 (22:11 -0500)]
nextcloud oauth (#10562)

Fix #7078

4 years agoChange default value of DefaultCommandExecutionTimeout to match cheatsheet (#10581)
zeripath [Tue, 3 Mar 2020 01:13:01 +0000 (01:13 +0000)]
Change default value of DefaultCommandExecutionTimeout to match cheatsheet (#10581)

4 years agoDisplay pull request head branch even the branch deleted or repository deleted (...
Lunny Xiao [Mon, 2 Mar 2020 22:31:55 +0000 (06:31 +0800)]
Display pull request head branch even the branch deleted or repository deleted (#10413)

* Display pull request head branch even the branch deleted or repository deleted

* Merge getHeadRepo/loadHeadRepo and getBaseRepo/loadBaseRepo on pull and fill repo when pr.Issue.Repo is available

* retrieve sha from pull head when pull request branch deleted and fix tests

* Fix test

* Ensure MustHeadRepoName returns empty string if no head repo

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 2 Mar 2020 20:56:37 +0000 (20:56 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix make find command (#10580)
silverwind [Mon, 2 Mar 2020 20:55:12 +0000 (21:55 +0100)]
Fix make find command (#10580)

Continuation of https://github.com/go-gitea/gitea/pull/10577

This version also includes an additional fix for Darwin and FreeBSD
which do not accept the `-regextype` option, but only `-E` and the
argument order is specifically required like this for `-E` to work.

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdmin page for managing user e-mail activation (#10557)
guillep2k [Mon, 2 Mar 2020 18:25:36 +0000 (15:25 -0300)]
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 <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 2 Mar 2020 15:54:56 +0000 (15:54 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix migration bug on v96.go (#10572)
Lunny Xiao [Mon, 2 Mar 2020 15:53:39 +0000 (23:53 +0800)]
Fix migration bug on v96.go (#10572)

4 years agoSpeed up make (#10560)
silverwind [Sun, 1 Mar 2020 22:45:08 +0000 (23:45 +0100)]
Speed up make (#10560)

* Speed up make

- stop `find` from venturing into node_modules and other directories
  that do not contain *.go files
- only run `find` once for *.go files
- move image tempdir generation to that task
- rename GOFILES to GO_SOURCES_OWN for consistency and to indicate that
  vendor files are not included
- pre-resolve FOMANTIC_SOURCES

* exclude more

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoRemove Unused Functions (#10516)
6543 [Sun, 1 Mar 2020 22:05:44 +0000 (23:05 +0100)]
Remove Unused Functions (#10516)

* remove ReplaceLeft

* remove GetRepositoryByOwnerAndName chainload to models.GetRepositoryByOwnerAndName

* remove CheckUnitUser chainload to models.CheckUnitUser

* remove MakeAssigneeList

* remove DownloadDiff & DownloadPatch -> DownloadDiffOrPatch

* remove GetRandomBytesAsBase64

* remove PushUpdateDeleteTags

* remove GetUserByKeyID
(you still can resolve user by "k, err := GetPublicKeyByID; userID := k.OwnerID")

* remove BasicAuthEncode from struct package -> same function in modules/base/tools !

* remove UserID from api.utils

* remove unused func from structs package

4 years agoFix redirection path if Slack webhook channel is invalid (#10548)
James Lakin [Sun, 1 Mar 2020 16:51:55 +0000 (16:51 +0000)]
Fix redirection path if Slack webhook channel is invalid (#10548)

The path to the hook config is already defined by orgRepoCtx

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agovendor: update github.com/yuin/goldmark to v1.1.24 (#10551)
Antoine GIRARD [Sun, 1 Mar 2020 13:01:44 +0000 (14:01 +0100)]
vendor: update github.com/yuin/goldmark to v1.1.24 (#10551)

4 years agoFix 404 after activating secondary email (#10547)
Andreas Shimokawa [Sat, 29 Feb 2020 23:46:20 +0000 (00:46 +0100)]
Fix 404 after activating secondary email (#10547)

4 years agoFix appearance of unsigned sha box in view_list (#10543)
zeripath [Sat, 29 Feb 2020 13:27:19 +0000 (13:27 +0000)]
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 <art27@cantab.net>
4 years agoissue search on my related repositories (#9758)
Brad Albright [Sat, 29 Feb 2020 06:52:05 +0000 (00:52 -0600)]
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 <18600385+guillep2k@users.noreply.github.com>
4 years agoadds API endpoints to manage OAuth2 Application (list/create/delete) (#10437)
Gustavo Marin [Sat, 29 Feb 2020 06:19:32 +0000 (07:19 +0100)]
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 <matti@mdranta.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[Refactor] move APIFormat() of Issue and Label to convert package (#10423)
6543 [Sat, 29 Feb 2020 02:49:50 +0000 (03:49 +0100)]
[Refactor] move APIFormat() of Issue and Label to convert package (#10423)

* Label: delete .APIFormat() and use convert.ToLabel()

* move issue APIFormat too

* add missing one

* move TEST too

* handle error -> return empty APIIssue

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoHandle panic in indexer initialisation better (#10534)
zeripath [Fri, 28 Feb 2020 22:00:09 +0000 (22:00 +0000)]
Handle panic in indexer initialisation better (#10534)

* Handle panic in indexer initialisation better
* as per @guillep2k

4 years agoRelax sanitization as per https://github.com/jch/html-pipeline (#10527)
zeripath [Fri, 28 Feb 2020 20:05:12 +0000 (20:05 +0000)]
Relax sanitization as per https://github.com/jch/html-pipeline (#10527)

Looking at github/markup#245 it is clear that GH uses https://github.com/jch/html-pipeline to sanitize. This PR relaxes our sanitization to more closely match this.

Fixes #10471
and likely others...

4 years agoPrevent accidential selection of language stats bar (#10537)
silverwind [Fri, 28 Feb 2020 16:59:29 +0000 (17:59 +0100)]
Prevent accidential selection of language stats bar (#10537)

4 years agoSet correct content_type value for Gogs/Gitea webhooks (#9504) (#10456)
Jeff Stein [Fri, 28 Feb 2020 14:33:52 +0000 (06:33 -0800)]
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.

4 years agovendor: unknown/cae move to taged version (#10521)
6543 [Fri, 28 Feb 2020 13:46:28 +0000 (14:46 +0100)]
vendor: unknown/cae move to taged version (#10521)

4 years agogoldmark v1.1.19 -> v1.1.23 (#10519)
6543 [Fri, 28 Feb 2020 13:06:11 +0000 (14:06 +0100)]
goldmark v1.1.19 -> v1.1.23 (#10519)

vendor update

4 years agohead.tmpl og:image picture location (#10531)
FreeCipher [Fri, 28 Feb 2020 11:30:23 +0000 (19:30 +0800)]
head.tmpl og:image picture location (#10531)

og:image picture location

4 years agoupdate: macaron cores,gzip,session (#10522)
6543 [Fri, 28 Feb 2020 09:51:18 +0000 (10:51 +0100)]
update: macaron cores,gzip,session (#10522)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoinform participants on UI too (#10473)
6543 [Fri, 28 Feb 2020 08:16:41 +0000 (09:16 +0100)]
inform participants on UI too (#10473)

* inform participants on UI too

* ajust test

* refactor getParticipantIDsByIssue

4 years agoAdd max-file-size to LFS (#10463)
zeripath [Fri, 28 Feb 2020 04:46:57 +0000 (04:46 +0000)]
Add max-file-size to LFS (#10463)

* Add max-file-size to LFS

* Update modules/lfs/server.go

* As per @silverwind

Co-Authored-By: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoUse media links for img in post-process (#10515)
zeripath [Fri, 28 Feb 2020 04:16:05 +0000 (04:16 +0000)]
Use media links for img in post-process (#10515)

* use media links for img in post-process

* do not visit text of anchors

4 years agoFix the signing icon in the view_list.tmpl page (#10511)
zeripath [Fri, 28 Feb 2020 02:03:17 +0000 (02:03 +0000)]
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 <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix potential bugs (#10513)
6543 [Thu, 27 Feb 2020 23:10:27 +0000 (00:10 +0100)]
Fix potential bugs (#10513)

* use e if it is an option
* potential nil so check err first
* check err first
* m == nil already checked

4 years agoOrg action fixes and form cleanup (#10512)
John Olheiser [Thu, 27 Feb 2020 22:00:13 +0000 (16:00 -0600)]
Org action fixes and form cleanup (#10512)

* More org fixes

* Move form action query to inputs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoShow Signer in commit lists and add basic trust (#10425)
zeripath [Thu, 27 Feb 2020 19:20:55 +0000 (19:20 +0000)]
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 <art27@cantab.net>
* ensure orange text and background is available

Signed-off-by: Andrew Thornton <art27@cantab.net>
* 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

4 years agoUse [:space:] instead of \s (#10508)
zeripath [Thu, 27 Feb 2020 18:03:21 +0000 (18:03 +0000)]
Use [:space:] instead of \s (#10508)

4 years ago[BugFix] Avoid mailing explicit unwatched (#10475)
6543 [Thu, 27 Feb 2020 10:07:05 +0000 (11:07 +0100)]
[BugFix] Avoid mailing explicit unwatched (#10475)

* Avoid mailing explicit unwatched

* CI.restart()

* back to normal

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd fluid-icon (#10491)
silverwind [Thu, 27 Feb 2020 03:40:14 +0000 (04:40 +0100)]
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 <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoFix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368)
guillep2k [Wed, 26 Feb 2020 23:51:37 +0000 (20:51 -0300)]
Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368)

* Test locking immediate for SQLite3

* fix url field separator

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoShow the username as a fallback on feeds if full name is blank (#10438)
James Lakin [Wed, 26 Feb 2020 22:08:24 +0000 (22:08 +0000)]
Show the username as a fallback on feeds if full name is blank (#10438)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoTweak language stats bar (#10487)
silverwind [Wed, 26 Feb 2020 20:44:14 +0000 (21:44 +0100)]
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
4 years agoFixed formatting (#10485)
Karsten Lehmann [Wed, 26 Feb 2020 18:28:39 +0000 (19:28 +0100)]
Fixed formatting (#10485)

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years agoFix double PR notification from API (#10482)
John Olheiser [Wed, 26 Feb 2020 18:12:34 +0000 (12:12 -0600)]
Fix double PR notification from API (#10482)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix admin notices (#10480)
John Olheiser [Wed, 26 Feb 2020 16:25:54 +0000 (10:25 -0600)]
Fix admin notices (#10480)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoCode Refactor of IssueWatch related things (#10401)
6543 [Wed, 26 Feb 2020 06:32:22 +0000 (07:32 +0100)]
Code Refactor of IssueWatch related things (#10401)

* refactor

* optimize

* remove Iretating function
LoadWatchUsers do not load Users into IW object and it is used only in api ... so move this logic

* remove unessesary

* Apply suggestions from code review

Thx

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* make Tests more robust

* fix rebase

* restart CI

* CI no dont hit sqlites deadlock

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoChange admin dashboard to POST (#10465)
John Olheiser [Tue, 25 Feb 2020 22:54:13 +0000 (16:54 -0600)]
Change admin dashboard to POST (#10465)

* Add form and convert to POST

* Redirect for flash

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoChange action GETs to POST (#10462)
John Olheiser [Tue, 25 Feb 2020 20:28:47 +0000 (14:28 -0600)]
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 <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[API] enable paggination for ListRepoTags (#10454)
6543 [Tue, 25 Feb 2020 19:07:07 +0000 (20:07 +0100)]
[API] enable paggination for ListRepoTags (#10454)

* enable paggination for repoTags

* precalculate first, cut slice second

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoUse documentation IPs for example IPs (#10434)
Ask Bjørn Hansen [Tue, 25 Feb 2020 18:25:17 +0000 (10:25 -0800)]
Use documentation IPs for example IPs (#10434)

See https://tools.ietf.org/html/rfc5737

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoupdate discord link (#10455)
6543 [Tue, 25 Feb 2020 17:36:45 +0000 (18:36 +0100)]
update discord link (#10455)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 25 Feb 2020 16:01:35 +0000 (16:01 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFixed wrong AppSubUrl in multiple templates (#10447)
Philipp A. Beckmann [Tue, 25 Feb 2020 15:58:37 +0000 (16:58 +0100)]
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

4 years agoUpdate JS dependencies (#10450)
silverwind [Tue, 25 Feb 2020 04:56:59 +0000 (05:56 +0100)]
Update JS dependencies (#10450)

Fomantic's update process did fail to update via 'npm install' because
of our config initially but it did work after manually bumping the
version in semantic.json.

Fomantic changes:

https://github.com/fomantic/Fomantic-UI/blob/master/CHANGELOG.md#284

4 years agoUse local timezone to compare (#10446)
6543 [Tue, 25 Feb 2020 03:05:00 +0000 (04:05 +0100)]
Use local timezone to compare (#10446)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 24 Feb 2020 22:53:36 +0000 (22:53 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFIX Pagination of ListAccessTokens and GetIssueWatchers (#10449)
6543 [Mon, 24 Feb 2020 22:50:32 +0000 (23:50 +0100)]
FIX Pagination of ListAccessTokens and GetIssueWatchers (#10449)

* fix a pagination bug

* fix pagination of ListAccessTokens

4 years agoUpdate markbates/goth (#10444)
oscar.lofwenhamn [Mon, 24 Feb 2020 17:08:43 +0000 (18:08 +0100)]
Update markbates/goth (#10444)

- Fixes a JWT decoding issue in the OpenID provider
- Updates the GitHub provider to use the authorization header for authentication
- Updates the Twitch provider for Twitch's v5 API changes
- Adds the email and is_private_email fields to the Apple provider's GetUser implementation
- Modifies gothic to export a non-collidable context key for setting the Provider in a context.Context
- Adds new scopes to the Spotify provider
- Adds the IDToken from OpenID providers on the user struct
- Make Apple provider's SecretParams public
- Adds support for sign in with Apple, and drops support for Go versions 1.7 and 1.8
- Fixes the Slack provider's FetchURL logic to use the appropriate scope for the info it needs
Signed-off-by: Oscar LÃfwenhamn <oscar.lofwenhamn@cgi.com>
4 years agodocs: Fix MySQL create database syntax (#10436)
Ask Bjørn Hansen [Mon, 24 Feb 2020 12:15:16 +0000 (04:15 -0800)]
docs: Fix MySQL create database syntax (#10436)

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
4 years agoTrigger webhooks on issue label-change via API too (#10421)
6543 [Sun, 23 Feb 2020 22:53:08 +0000 (23:53 +0100)]
Trigger webhooks on issue label-change via API too (#10421)

* trigger webhooks with api too

* fix comment

* notify report old too

* CI restart

* restart CI again

* remove duplicated code

4 years agomove vue and vue-calendar-heatmap to webpack (#10188)
silverwind [Sun, 23 Feb 2020 21:34:28 +0000 (22:34 +0100)]
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

4 years agoVarious fixes in login sources (#10428)
guillep2k [Sun, 23 Feb 2020 19:52:05 +0000 (16:52 -0300)]
Various fixes in login sources (#10428)

4 years agoFix webhook bug (#10427)
Lunny Xiao [Sun, 23 Feb 2020 18:49:40 +0000 (02:49 +0800)]
Fix webhook bug (#10427)

Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoDisallow leading zeroes in Less (#10407)
silverwind [Sun, 23 Feb 2020 16:48:27 +0000 (17:48 +0100)]
Disallow leading zeroes in Less (#10407)

4 years agoPrevent Firefox from using apple-touch-icon (#10402)
silverwind [Sun, 23 Feb 2020 14:34:53 +0000 (15:34 +0100)]
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

4 years agoSupport NODE_ENV in webpack (#10245)
silverwind [Sun, 23 Feb 2020 08:47:42 +0000 (09:47 +0100)]
Support NODE_ENV in webpack (#10245)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoVarious dark theme fixes (#10416)
silverwind [Sun, 23 Feb 2020 04:32:15 +0000 (05:32 +0100)]
Various dark theme fixes (#10416)

- beatify simplemde, remove header hover effect (does not play well with
  border colors), remove double border separators
- fix colored outline buttons
- fix disabled style
- fix positive messages
- fix markdown header border and quote block
- adjust footer color
- adjust file icons and release list timeline

4 years agoupdate integration README (#10400)
6543 [Sat, 22 Feb 2020 22:45:20 +0000 (23:45 +0100)]
update integration README (#10400)

4 years agoFix profile page CSS (#10406)
John Olheiser [Sat, 22 Feb 2020 14:06:07 +0000 (08:06 -0600)]
Fix profile page CSS (#10406)

* Fix profile page

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove redundant CSS

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix .username and change em to rem

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoHandle push rejection message in Merge & Web Editor (#10373)
zeripath [Sat, 22 Feb 2020 13:08:48 +0000 (13:08 +0000)]
Handle push rejection message in Merge & Web Editor (#10373)

* Handle push rejection message in Merge

* placate golangci-lint

* Fix sanitize, adjust message handling

* oops

* Oops

* Handle push-rejection in webeditor CRUD too

* Apply suggestions from code review

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoAdd frontend/backend make targets, fix source release (#10325)
silverwind [Sat, 22 Feb 2020 09:15:11 +0000 (10:15 +0100)]
Add frontend/backend make targets, fix source release (#10325)

* Add frontend/backend make targets, fix source release

- Add 'make backend' and 'make frontend' make targets which are used to
  build go and js/css/svg files respectively.

- The 'backend' target can be invoked without requiring Node.js to be
  present on the system if pre-built frontend assets are present like
  in the release source tarballs.

- Fix source releases missing 'dist' folders inside 'node_modules' which
  were erronously excluded from tar.

- Store VERSION in file VERSION for the release tarballs and prefer that
  file over git-derived version.

* fix release task

* fix typo

* fix another typo

4 years agoRender READMEs in docs/ .gitea or .github from root (#10361)
zeripath [Fri, 21 Feb 2020 23:04:20 +0000 (23:04 +0000)]
Render READMEs in docs/ .gitea or .github from root (#10361)

* Render READMEs in docs/ .gitea or .github from root

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 21 Feb 2020 18:19:29 +0000 (18:19 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoPrevent panic on merge to PR (#10403)
zeripath [Fri, 21 Feb 2020 18:18:13 +0000 (18:18 +0000)]
Prevent panic on merge to PR (#10403)

If you attempt to merge to a branch which on a PR there will be a nil pointer error in the pull request checker.

This panic is uncaught and will bring down the gitea server.

This PR adds protection to prevent this.

4 years agoEnsure only own addresses are updated (#10397)
guillep2k [Fri, 21 Feb 2020 13:08:04 +0000 (10:08 -0300)]
Ensure only own addresses are updated (#10397)

4 years agoFixes (#10386)
John Olheiser [Thu, 20 Feb 2020 23:44:13 +0000 (17:44 -0600)]
Fixes (#10386)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agofix input[type=file] on dark theme (#10382)
silverwind [Thu, 20 Feb 2020 22:36:47 +0000 (23:36 +0100)]
fix input[type=file] on dark theme (#10382)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 20 Feb 2020 21:04:58 +0000 (21:04 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoupdate crypto vendors (#10385)
techknowlogick [Thu, 20 Feb 2020 21:03:34 +0000 (16:03 -0500)]
update crypto vendors (#10385)

4 years agoAdd detected file language to code search (#10256)
Lauris BH [Thu, 20 Feb 2020 19:53:55 +0000 (21:53 +0200)]
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