Commit graph

7581 commits

Author SHA1 Message Date
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 119b725525.

* 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
Xaver Maierhofer
597ac064c3 Style orgs list in user profile (#6911) 2019-05-13 23:52:58 +03:00
Xaver Maierhofer
06ae9a3a96 Use single line per selector & don't strip license comments (#6919) 2019-05-13 20:25:21 +01:00
GiteaBot
5df5bfbd13 [skip ci] Updated translations via Crowdin 2019-05-13 15:41:18 +00:00
Tamal Saha
34d06f4c6b Handle CORS requests (#6289) 2019-05-13 11:38:53 -04:00
Xaver Maierhofer
6fb58a8cdc Clean less files (#6921) 2019-05-13 07:26:32 +01:00
Mura Li
0b785481d7 Use modules/git for git commands (#6775) 2019-05-13 01:06:47 -04:00
techknowlogick
5ffc9656c6
Change drone token name to let users know to use oauth2 (#6912) 2019-05-12 13:29:07 -04:00
GiteaBot
3d82367bdc [skip ci] Updated translations via Crowdin 2019-05-12 11:13:32 +00:00
Xaver Maierhofer
a92ab34493 Fix input size for dependency select (#6913) 2019-05-12 14:10:12 +03:00
iliyan ivanov
13583a650f fix syntax highlight in blame view #6895 (#6909) 2019-05-11 23:27:39 +03:00
zeripath
ce8de35334 Remove local clones & make hooks run on merge/edit/upload (#6672)
* Add options to git.Clone to make it more capable

* Begin the process of removing the local copy and tidy up

* Remove Wiki LocalCopy Checkouts

* Remove the last LocalRepo helpers

* Remove WithTemporaryFile

* Enable push-hooks for these routes

* Ensure tests cope with hooks

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

* Remove Repository.LocalCopyPath()

* Move temporary repo to use the standard temporary path

* Fix the tests

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

* Remove LocalWikiPath

* Fix missing remove

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

* Use AppURL for Oauth user link (#6894)

* Use AppURL for Oauth user link

Fix #6843

* Update oauth.go

* Update oauth.go

* internal/ssh: ignore env command totally (#6825)

* ssh: ignore env command totally

* Remove commented code 

Needed fix described in issue #6889

* Escape the commit message on issues update and title in telegram hook (#6901)

* update sdk to latest (#6903)

* improve description of branch protection (fix #6886) (#6906)

The branch protection description text were not quite accurate.

* Fix logging documentation (#6904)

* ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG

* Allow DISABLE_ROUTER_LOG to be set in the [log] section

* [skip ci] Updated translations via Crowdin

* Move sdk structs to modules/structs (#6905)

* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
2019-05-11 11:29:17 -04:00
Lunny Xiao
34eee25bd4
Move sdk structs to modules/structs (#6905)
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
2019-05-11 18:21:34 +08:00
GiteaBot
1658cd04e9 [skip ci] Updated translations via Crowdin 2019-05-11 09:16:08 +00:00
zeripath
e3166744fe
Fix logging documentation (#6904)
* ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG

* Allow DISABLE_ROUTER_LOG to be set in the [log] section
2019-05-11 10:13:57 +01:00
Jannik Beyerstedt
f378cb572a improve description of branch protection (fix #6886) (#6906)
The branch protection description text were not quite accurate.
2019-05-11 10:42:19 +03:00
techknowlogick
1dc401635b
update sdk to latest (#6903) 2019-05-10 16:49:29 -04:00
zeripath
d64a646c0a Escape the commit message on issues update and title in telegram hook (#6901) 2019-05-10 13:48:28 -04:00
Antoine GIRARD
10ff527fae internal/ssh: ignore env command totally (#6825)
* ssh: ignore env command totally

* Remove commented code 

Needed fix described in issue #6889
2019-05-09 18:41:43 -04:00
techknowlogick
2f21bc33a5 Use AppURL for Oauth user link (#6894)
* Use AppURL for Oauth user link

Fix #6843

* Update oauth.go

* Update oauth.go
2019-05-09 20:22:35 +03:00
Richard Mahn
6db3dc7c02 Fixes #6881 - API users search fix (#6882) 2019-05-08 22:17:32 +03:00
John Olheiser
d8b2ed6627 1.8.1 changelog (#6877) (#6878)
* New and improved

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

* Add backport/original PR numbers
Change wording for 500 error

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-05-08 12:21:24 -04:00
Wim
4508380cf7 Show full name if DefaultShowFullName setting activated (#6710)
Adds a new key DEFAULT_SHOW_FULL_NAME (default false) to the [ui] section.
If enabled the full name will be shown (unless it's empty, then
the default username will be used)
2019-05-08 11:41:35 +03:00