Commit graph

80 commits

Author SHA1 Message Date
Martin Bornhold
2fb07e76fe gists: Fix wrong default value in colander schema. #4243 2016-09-26 16:26:54 +02:00
Martin Bornhold
24f3145630 gists: Remove gist_type from update method in model. #4243
We do not allow to change the gist type from public to private or vice versa.
Therefore there is no need to provide a ability in the model to do it.
2016-09-26 16:26:33 +02:00
Martin Bornhold
28c5525ace pr: Use unicode object when generating the pull request title 2016-09-22 13:27:40 +02:00
Daniel Dourvaris
3469c46507 integrations: add recursive repo group scope to allow integrations
to cascade into all descendant repositories, fixes #4225
2016-09-14 05:38:21 +03:00
Johannes Bornhold
c6206d900b summary: Correctly return the Node instance
Noticed that I was returning the ReadmeMatch instance.
2016-09-08 17:31:37 +02:00
Johannes Bornhold
c5898bf7ee summary: Avoid to re-fetch Node object 2016-09-08 13:05:55 +02:00
Johannes Bornhold
55b3018fc2 renderer: Clean up obsolete code
Removing now unused code from markup_renderer.
2016-09-08 11:13:33 +02:00
Johannes Bornhold
2ca27901e3 repo: Implement ReadmeFinder
It currently resembles the logic from the old markup renderer. The
implementation is based on get_nodes though, so that we should usually only have
one call or at most three calls if the directories "doc" and/or "docs" exist.

A difference is that we now ignore the case, this already simplifies the rule
definition.
2016-09-07 19:23:09 +02:00
Johannes Bornhold
b28e45e565 summary: Move logic to find a readme out
Created ReadmeFinder inside of model.repo. The ReadmeFinder will be evolved, so
that it uses a smarter algorithm to actually find the readme file.
2016-09-07 10:31:20 +02:00
Marcin Kuzminski
d92e030879 vcs: moved svn proxy settings into vcs related settings
- vcs middleware now returns dummyHandler if not configured
- propagate the per-repo vcs related configs into VCSMiddleware
- moved the forms arround and group things into more logical blocks
2016-09-06 12:29:54 +02:00
lisaq
ca1ec404c2 svn: moving svn http support out of labs settings. 2016-08-23 17:07:22 +02:00
Daniel Dourvaris
58036fece1 schemas: add user/usergroup schema type 2016-09-05 04:36:43 +03:00
Marcin Lulek
2ab245bc4b notifications: store notification status in channelstream 2016-09-01 12:03:44 +02:00
Daniel Dourvaris
83b8750461 integrations: refactor/cleanup + features, fixes #4181
* added scopes on integrations, scopes are:
    - repo only
    - repogroup children only
    - root repos only
    - global (any repo)
* integrations schemas now have separate section for the
  settings (eg. slack) and options (eg. scope/enabled)
* added descriptions to integration types
* added icons to integration types
* added 'create new' integration page
* added scope of integration to integrations list
* added breadcrumbs for each repo/repogroup/global integrations pages
* added sorting to integrations list
* added pagination to integrations list
* added icons to integrations list
* added type filter to integrations list
* added message to integrations list if none we found
* added extra permissions check on integrations views
* db migration from 56 => 57 - adds child_repos_only field
* added tests for integrations triggered on events
* added tests for integrations schemas
* added tests for integrations views for repo/repogroup/admin
2016-08-26 11:19:55 +03:00
Daniel Dourvaris
2e3256ff49 integrations: add repo group integrations, fixes #4175 2016-08-15 13:24:16 +03:00
Daniel Dourvaris
b51406ec1d account: convert change password form to colander schema and fix bug
where user could use same password as before when changing
password, fixes #2264
2016-08-05 06:55:35 +03:00
Martin Bornhold
2f34f8271c vcs: Use a thread scoped cache invalidation context to cache repository objects.
Without this change the cache is on a process scope. If running with multiple
threads this leads to sharing the cached object between threads. This will cause
exceptions if multiple threads are trying to access the same curl object.
Even worse it allows multiple threads to operate on the same repository object
concurrently.
2016-07-14 09:07:19 +02:00
Martin Bornhold
e61c84a72e config: Use hooks protocol and direc calls seting from vcs settings module. 2016-08-08 08:29:35 +02:00
Martin Bornhold
668275b816 events: Trigger repository group events (create/update/delete) 2016-07-28 11:28:42 +02:00
Marcin Kuzminski
309ee712b2 live-comments: use show comment instead of refresh the page so
it better reflects the action we're doing.
2016-08-04 12:43:22 +02:00
Marcin Kuzminski
1b62606fc2 emails: added new tags to status sent
- make this distinct colored tags for quick status catch
- pass in the status type together with label to the notifiactions and templates
- fixed some UI issues on emails
2016-08-03 15:21:38 +02:00
Marcin Lulek
96dc4c06fb channelstream: don't try to communicate with ws server if not explictly enabled 2016-08-03 13:55:40 +02:00
Marcin Lulek
4baa8118b9 channelstream: do not send comment notifications to the commenting user 2016-08-03 12:28:46 +02:00
Marcin Kuzminski
9d875ad256 emails: fixed password reset confirmation that was broken because of undefied variable. 2016-08-01 23:11:16 +02:00
Marcin Lulek
e9d5eb09c5 notifications: support real-time notifications with websockets via channelstream 2016-08-02 16:18:44 +02:00
Marcin Kuzminski
198c6fda61 gists: use colander schema to validate input data.
- brings consistent validation acros API and web
- use nicer and stricter schemas to validate data
- fixes #4118
2016-07-31 20:11:12 +02:00
Daniel Dourvaris
61553db529 deform: use pypi deform library and add helpers to deform scope directly
to avoid passing it each time form is rendered
2016-07-29 17:27:38 +03:00
Daniel Dourvaris
9dd0674b39 forms: add deform for integration settings forms 2016-07-27 11:39:23 +03:00
lisaq
5fa18a8f7d notifications: adjusting how instance name is passed and fixing tests 2016-07-28 17:35:30 +02:00
Daniel Dourvaris
391379c4ab user: hash email key for User.get_by_email() fixes #4132 2016-07-28 09:19:07 +03:00
Marcin Kuzminski
708038952c db: always use Session() for compatibility, Using Session is actually the
scoped_session which is not the same as the one which we "call".

More here: http://docs.sqlalchemy.org/en/latest/orm/contextual.html#contextual-thread-local-sessions
2016-07-27 00:42:19 +02:00
Daniel Dourvaris
74d0f0c336 api: add a max_file_bytes parameter to get_nodes so that large
files can be skipped
2016-07-26 20:52:11 +03:00
Daniel Dourvaris
1a842e15d2 scm: change ._get_content() to .raw_bytes attribute to file nodes to
allow getting raw bytes instead of text content of a file and added
.md5 and .is_binary attributes to file nodes
2016-07-26 20:47:23 +03:00
Marcin Kuzminski
4482553490 docs: fixed docstring 2016-07-26 16:00:11 +02:00
Martin Bornhold
0c7d0871b5 models: Use the new get_vcs_instance method to retrieve vcs instances. 2016-07-21 09:04:14 +02:00
Marcin Kuzminski
169a7c5cf1 integrations-db: don't use default contructor to be consisten with other modules
usage.
2016-07-14 11:23:46 +02:00
Daniel Dourvaris
efc1db0e2e integrations: use mutable json settings using json alchemy MutableObject. 2016-07-14 11:23:28 +02:00
Daniel Dourvaris
88e83cf796 events: add an event for pull request comments with review status 2016-07-13 10:39:54 +02:00
Marcin Kuzminski
990143eae0 tokens: auth-token is not only for git/hg but also for svn.
Changed some docstrings to indicate this.
2016-07-13 12:34:17 +02:00
Daniel Dourvaris
d7cd766a07 integrations: fix bug where deleting a repo did not delete integrations 2016-07-12 11:14:40 +02:00
Daniel Dourvaris
f81ae45597 slack: fix links in commit/pr events 2016-07-11 17:57:34 +02:00
Daniel Dourvaris
7ff09cda95 integrations: add integration support
* added db migration for integration table, version 55
* added integrations views/templates/models
* added slack integration
* added h.url.current() support for pyramid only contexts
* added issues extractor for commit messages
* renamed repo-deleted/repo-created to repo-delete/repo-create
* removed marshmallow
* added serialization for events to static dicts of data
* added lazy_ugettext for translation of start time string
2016-07-10 06:43:20 +03:00
Daniel Dourvaris
c1b109c7a0 events: fix bug, 'url' was not in dict 2016-07-07 05:35:54 +03:00
Daniel Dourvaris
597b9b24d7 events: fix bugs with serialization of repo/pr events and add tests for those cases 2016-07-07 04:31:17 +03:00
Daniel Dourvaris
23d7a947f5 events: add serialization .to_dict() to events based on marshmallow 2016-07-06 12:21:03 +03:00
Daniel Dourvaris
9727a3880f events: add event system for RepoEvents 2016-07-06 06:00:18 +03:00
Martin Bornhold
77c3287d4a settings: Delete obsolete code related to the rebase-merge lab settings. 2016-06-27 16:53:36 +02:00
Martin Bornhold
b545575d28 settings: Read 'rebase-merge' config option and pass it to the VCS insntacen on merge. 2016-06-27 13:17:41 +02:00
Martin Bornhold
b3a1dec11e settings: Add the 'rebase-merge' setting to VCS base form and VCS settings model. 2016-06-27 11:00:22 +02:00
Daniel Dourvaris
a9d0598239 scm: change update_commit_cache to check revision as well 2016-07-04 16:13:53 +03:00