Commit graph

7703 commits

Author SHA1 Message Date
Sandro Santilli
9ca7fcddbb "It's all in GitHub" isn't true anymore, update the home template (#7059)
NOTE: this commit only updates the english section
2019-05-27 18:43:37 +01:00
Hui Hui
cf3ffebfde fix issuer of OTP URI should be URI-encoded. (#6634)
* fix: Issuer of OTP URI should be URI-encoded.

follow this link https://github.com/google/google-authenticator/wiki/Key-Uri-Format .

* filter unsafe character ':' in issuer

* Use Replace rather than ReplaceAll
2019-05-27 18:00:32 +01:00
zeripath
2c412f517a Add FHS-compliant-script (#6923) 2019-05-26 17:49:54 -04:00
Lunny Xiao
d67fd69474 fix charset was not saved after installation finished (#7048) 2019-05-26 13:36:33 -04:00
Lunny Xiao
f3d87da3e2 Revert "Bugfix: Align comment label and actions to the right (#7024)" (#7055)
This reverts commit 0c432d26fe.
2019-05-26 12:55:53 -04:00
Lunny Xiao
c2f3938a58 fix possbile mysql invalid connnection error (#7051) 2019-05-26 16:28:33 +03:00
Lunny Xiao
063fa99159
when git version >= 2.18, git command could run with git wire protocol version 2 param if enabled (#7047) 2019-05-26 17:50:06 +08:00
Tekaoh
6c16febe4d Update config-cheat-sheet.en-us.md (#7046) 2019-05-26 06:23:30 +01:00
Mura Li
5a722ae812 Timeout test commands without complicated tricks (#7020) 2019-05-26 00:13:01 +01:00
Rob Watson
daaae2aad5 migrations: ensure rollback on error (#7039) (#7040) 2019-05-25 22:18:27 +01:00
Lunny Xiao
355ab0c62c Fix wrong init dependency on markup extensions (#7038)
* fix wrong init dependency on markup extensions
2019-05-25 18:15:39 +01:00
Mario Lubenka
0c432d26fe Bugfix: Align comment label and actions to the right (#7024)
* Bugfix: Align comment label and actions to the right

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Restores relative position

* CSS autofixer
2019-05-25 16:37:44 +03:00
Rob Watson
df2557835b Improve handling of non-square avatars (#7025)
* Crop avatar before resizing (#1268)

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>

* Fix spelling error

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
2019-05-25 14:46:14 +03:00
GiteaBot
5f05aa13e0 [skip ci] Updated translations via Crowdin 2019-05-25 08:41:06 +00:00
techknowlogick
a83c80a000 Disable arm7 builds (#7037)
* Disable arm7 builds

As arm6 works on arm7 platforms with no noticeable performance difference

* 386
2019-05-25 11:38:14 +03:00
Marat Radchenko
844f9a4bd8 Fix /verify LFS handler expecting wrong content-type (#7015)
Fixes #6960

According to [spec][1], /verify requests must have `Accept: application/vnd.git-lfs+json`

Previous code works because `git-lfs` also [violates spec and doesn't send any Accept header at all][2]
For other clients that DO set `Accept: application/vnd.git-lfs+json`, addition of `Accept: application/vnd.git-lfs`
either forces them to violate the spec or is ignored, depending on order in what they create header list.

[1]: https://github.com/git-lfs/git-lfs/blob/master/docs/api/basic-transfers.md#verification
[2]: https://github.com/git-lfs/git-lfs/issues/3662
2019-05-24 22:21:00 +01:00
GiteaBot
61f00bc238 [skip ci] Updated translations via Crowdin 2019-05-24 16:44:08 +00:00
jpicht
8cd4c2242c Fix default for allowing new organization creation for new users (#7017)
Fixed #6542

When creating users DefaultAllowCreateOrganization was ignored.

Signed-off-by: Julian Picht <julian.picht@gmail.com>

* fix TestCreateUser_Issue5882

Signed-off-by: Julian Picht <julian.picht@gmail.com>
2019-05-24 19:40:45 +03:00
GiteaBot
6ff9349a09 [skip ci] Updated translations via Crowdin 2019-05-24 09:12:13 +00:00
Vladimir Panteleev
a98e085031 Show git-notes (#6984)
* Show git-notes

* Make git-notes heading text localizable

* Refactor git-notes data fetching to a separate function

* Display the author and time of git notes

* Move note bubble inside the commit bubble

* Revert "Move note bubble inside the commit bubble"

This reverts commit c0951fe0e3b4dea38064515546b1825c1bcf19e1.

* Add test for git-notes

* testing ui

* Polish CSS

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-05-24 10:52:05 +03:00
Lunny Xiao
d5a98a2969 Add support of utf8mb4 for mysql (#6992) 2019-05-24 00:15:26 -04:00
suisseWalter
181b7c99ed Added Note about arm7 version to doc (#6983)
Appended the Troubleshooting section with a subsection about the problems with the arm7 version and the recommendation to switch to arm6.
2019-05-23 18:12:59 +01:00
zeripath
54bd63cd5c
Change UpdateRepoIndex api to include watchers (#7012)
* Change UpdateRepoIndex api to include watchers

* Add timeout
2019-05-23 17:00:07 +01:00
Monty Taylor
6eb53ac570 Fix documentation on Oauth2.Enable flag (#7011)
* Fix documentation on Oauth2.Enable flag

The docs list this as ENABLED, but in the source code it's
ENABLE, meaning following the docs leads to confusion.

* Update sample config for oauth2.ENABLE
2019-05-21 21:48:34 -04:00
zeripath
0d69dfb4ca
Do not attempt to return blob on submodule (#6996) 2019-05-21 22:32:52 +01:00
zeripath
84bfd00537
Fix TestSearchRepo by waiting till indexing is done (#7004)
* Fix TestSearchRepo by waiting till indexing is done

* Update integrations/repo_search_test.go

* changes as per @mrsdizzie
2019-05-21 20:11:09 +01:00
Lunny Xiao
1f84970de0
Make webhook http connections resuable (#6976)
* make http connections resuable

* add error handler

* fix lint
2019-05-21 15:20:17 +08:00
Lunny Xiao
02542a2c15 fix missing repo description when migrating (#7000) 2019-05-20 15:43:43 +03:00
David Schneiderbauer
8de76b6e64 fix u2f registrationlist ToRegistrations() method (#6980) 2019-05-18 14:40:05 +01:00
Lunny Xiao
c385dcc26b
Fix index produces problem when issues/pulls deleted (#6973)
* fix index produces problem when issues/pulls deleted

* fix tests

* fix tests

* fix tests
2019-05-18 10:37:49 +08:00
zeripath
96b412bb87 Stop running hooks on pr merge (#6963)
* Stop running hooks on pr merge

* Remove SSH_ORIGINAL_COMMAND from the pushing environment
2019-05-17 15:41:01 +03:00
silverwind
04f996f1f9 remove and disable package-lock (#6969)
* remove and disable package-lock

Using exact versions in package.json has the same effect as lockfiles
without all the troubles the lockfiles bring (different versions of
package manager generating different lockfiles primarily).

Ensured we only use exact versions in package.json and stopped
generation of new lockfiles via .npmrc which is support by both the npm
and yarn package managers.

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

* enable save-exact
2019-05-16 15:33:54 -04:00
mrsdizzie
68a83cc5a2 Allow collaborators to view repo owned private org (#6965)
Handle case where an orginization is private but a user who is not a
member of the orgninization has been added as a collaborator of a repo
within that org

Fixes #6962
2019-05-16 11:48:40 -04:00
silverwind
d9dcd09340 add make targets for js and css, add js linter (#6952)
* add make targets for js,css, add javascript linter

- add `make js`, deprecating `make javascripts`
- add `make css`, deprecating `make generate-stylesheets` and
  `make stylesheets-check`
- changed the unclean css check to only run on CI
- add JS linting via eslint with basic configuration and fixed
  discovered issues
- changed autoprefixer to use official `postcss-cli` avoiding the need
  to loop in the makefile
- moved browserslist to package.json so other future tools can use it
  too.
- update documentation for new make targets and added JS section

* fix indentation

* move functions used in html to 'exported' list

* Run lessc binary without having to install anything to node_modules

* use relative paths to node bin scripts, removing npx

* Revert "use relative paths to node bin scripts, removing npx"

This reverts commit 119b725525a8430b32ee7a6e6009b4ece544e39b.

* fix lessc and postcss plugins

* check for node_modules and use actual bin names
2019-05-16 08:57:47 +03:00
zeripath
775a5a5b0f
Stop colorizing files by default (#6949) 2019-05-15 22:37:06 +01:00
GiteaBot
7dd983797c [skip ci] Updated translations via Crowdin 2019-05-15 15:52:29 +00:00
zeripath
56ae539bed SearchRepositoryByName improvements and unification (#6897) 2019-05-15 11:24:39 -04:00
techknowlogick
5fb1ad7011 Webhook Logs show proper HTTP Method, and allow change HTTP method in form (#6953)
* Fix #6951 - logs show proper HTTP Method, and allow change HTTP method
in form

* enforce POST method for webhook

* set default if method is empty
2019-05-15 20:01:53 +08:00
Lunny Xiao
710245e81e
Refactor models.NewRepoContext to extract git related codes to modules/git (#6941)
* refactor models.NewRepoContext to extract git related codes to modules/git

* fix imports

* refactor
2019-05-15 09:57:00 +08:00
Xaver Maierhofer
95d3d42c5f Fix code overflow (#6914) 2019-05-14 12:02:59 -04:00
zeripath
e55c874dd2 Add work path CLI option (#6922)
Makes it possible to set the work path as a CLI option instead of
relying on environment variables which are somewhat opaque
2019-05-14 11:20:35 -04:00
James E. Blair
488d34691a Ignore non-standard refs in git push (#6758)
When replicating to gitea from a remote system which makes use of
git refs to store extra data (for example, gerrit), pushing a lot
of refs to gitea can cause problems due to the extra processing
that the pre and post receive hooks perform.  But it's still
useful for gitea to be able to serve those refs.  This change
skips unecessary processing of refs other than branches or tags.

We don't need to check any ref that isn't a branch for branch
protection (protection will never be enabled).  So in the
pre-receive hook, we wrap that check in a test for whether the
ref is a branch.

We also don't need to add information to the activity stream about
pushes to non-standard refs, so we skip that step in the
post-receive hook for refs which are not branches or tags.

For some concrete examples, gerrit maintains a ref for every
patchset of every change in the form refs/changes/XX/YYYY/Z.
Many systems use refs/notes to store additonal data about commits.
This change allows these and other schemes to be used without
affecting gitea.
2019-05-14 10:40:27 -04:00
Lunny Xiao
24a536d145 Remove macaron dependent on models (#6940) 2019-05-14 09:52:18 -04:00
Lunny Xiao
8b36f01f45 Move xorm logger bridge from log to models so that log module could be a standalone package (#6944)
* move xorm logger bridge from log to models so that log module could be a standalone package

* fix tests

* save logger on xorm log bridge
2019-05-14 10:04:07 +03:00
Xaver Maierhofer
0e057eb033 Fix plain text overflow line wrap (#6915) 2019-05-14 00:11:22 -04:00
Lunny Xiao
6123840745 Remove macaron dependent on modules/log (#6933) 2019-05-13 22:55:52 -04:00
Xaver Maierhofer
3957b40021 Add less linter via npx (#6936) 2019-05-14 08:54:23 +08:00
zeripath
c0fc6cd9a8 rotate unusual logs and stop stacktracing (#6935) 2019-05-14 03:08:34 +03:00
Lunny Xiao
e63274ee09 remove macaron dependent on models/mail.go (#6931) 2019-05-14 01:53:54 +03:00
Jakob Ackermann
36b68fdb01 [docker] support for custom GITEA_CUSTOM env var (#6608) 2019-05-13 18:19:37 -04:00