Commit graph

927 commits

Author SHA1 Message Date
Martin Bornhold
ff59708ca8 nix: Pass the backwards compatible fetchgit to python and node packages. 2016-10-04 10:43:55 +02:00
Marcin Kuzminski
dc2d17cfb3 docs: add change user details docs 2016-10-03 20:23:24 +02:00
Marcin Kuzminski
0a39f5bf00 vcs: merge logic with dry run now uses better default arguments.
Helps to find out where the merge came from.
2016-10-03 11:20:25 +02:00
Marcin Kuzminski
721295056f vcs: add missing parameters to base class method. 2016-10-03 11:19:57 +02:00
Marcin Kuzminski
9a8665f0d8 shadow-repos: expose a nicer clone destination directory by default in
format of pull-request-NUM.
2016-10-03 11:19:24 +02:00
Marcin Kuzminski
3dd481e54c pull-requests: fix problem with empty instances on creating PR from origin repo 2016-10-03 11:09:36 +02:00
Martin Bornhold
cc4ab6dae7 tests: Use only one place to define pr and shadow URL segments. 2016-09-28 13:40:01 +02:00
Martin Bornhold
974c9b8766 tests: Add tests to check the shadow-repo regular expression. 2016-09-28 13:26:30 +02:00
Martin Bornhold
acc2367ab9 shadow: Simplyfy the regular expression for detecting shadow repository URLs 2016-09-28 13:25:57 +02:00
Martin Bornhold
0e6b983ce1 shadow: Remove URL quoting of shadow repository pull URL. 2016-09-28 12:04:36 +02:00
Martin Bornhold
ad14211248 tests: Adapt test to recent changes.
This argument was removed.
2016-09-27 09:48:59 +02:00
Martin Bornhold
0a34a8c1df tests: Fix tests which need the DB to run. 2016-09-27 09:48:42 +02:00
Martin Bornhold
7eeedebf7b tests: Add a `db` fixture that initializes the database.
This is quite useful if tests only need the database and not the whole app.
Then only this fixture is needed instead of the full blown pylonsapp/app fixtures.
2016-09-27 09:48:23 +02:00
Martin Bornhold
ae2b380d5b tests: Add tests to check the shadow repo exposure of the simplevcs class. 2016-09-26 14:55:30 +02:00
Martin Bornhold
16bac867f5 tests: Make return values of stub vcs controller editable. 2016-09-26 14:54:58 +02:00
Martin Bornhold
5eeb75edac shadow: Fix an error in the regex to detect shadow repository URLs. 2016-09-26 14:54:21 +02:00
Martin Bornhold
69f6006e28 tests: Add some tests to check that events/extensions are triggered on hook execution.
This also includes tests to check that events/extensions are NOT triggered
on requests to shadow repositories.
2016-09-23 16:23:08 +02:00
Martin Bornhold
3c6a97202a tests: Add new attribute is_shadow_repo to test dummy extra data. 2016-09-23 14:31:36 +02:00
Martin Bornhold
2653ff980f tests: Add shadow clone url to expected api return value. 2016-09-23 14:30:57 +02:00
Martin Bornhold
2a64079089 tests: Add missing key/value to vcs operation dummy dict. 2016-09-23 14:17:04 +02:00
Martin Bornhold
f0567693de lib: Fix missing space char in bad slug characters string. 2016-09-23 14:16:29 +02:00
Martin Bornhold
9efcbadac8 vcs: Explicit use one of the repo names (acl, url, vcs) 2016-09-23 13:23:32 +02:00
Martin Bornhold
2cd4d08392 vcs: Clean up the shadow-repo-expose code and make some nicer comments. 2016-09-23 12:52:24 +02:00
Martin Bornhold
9ad3d9992f vcs: Move logging from vcs to simplevcs 2016-09-22 16:12:37 +02:00
Martin Bornhold
930ac34f74 vcs: Move shadow repo regex up to class level. 2016-09-22 16:02:35 +02:00
Martin Bornhold
9dca5e1637 shadow: Use only a single regular expression to generate and match repo/group slugs. 2016-09-22 15:33:11 +02:00
Martin Bornhold
86b7b9e996 vcs: Do not trigger external hook in case of actions on shadow respositories. 2016-09-21 13:09:40 +02:00
Martin Bornhold
01b5812099 vcs: Add flag to indicate if repository is a shadow repository. 2016-09-21 13:07:20 +02:00
Martin Bornhold
8d288b7c5f vcs: Use correct repo name attribute and remove workaround. 2016-09-21 09:58:11 +02:00
Martin Bornhold
a385c08a46 pr: Unify clone url generation of shadow repository. 2016-09-21 09:34:47 +02:00
Martin Bornhold
3a69737da4 pr: Display link to shadow repository on pull request page. 2016-09-20 18:08:40 +02:00
Martin Bornhold
acaaa03219 models: Remove unused imports. 2016-09-20 15:15:12 +02:00
Martin Bornhold
bad396a7d6 vcs: Fix missing import. 2016-09-20 15:14:42 +02:00
Martin Bornhold
31721213be api: Add an entry for pr shadow repositories to api functions. 2016-09-20 15:14:00 +02:00
Martin Bornhold
d65ffadc6c vcs: Get shadow repository file system path by using already existing functions.
We want to have the code that generates the shadow repo file system path at a single place.
2016-09-20 14:28:25 +02:00
Martin Bornhold
b23afad92e vcs: Only allow 'pull' actions on shadow repositories.
We are exposing the shadow repositories of pull requests to allow easy CI integration
or users to access the pull request shadow repo for investigating on it. But we don't
want someone/something to push changes to a shadow repository.
2016-09-19 15:33:46 +02:00
Martin Bornhold
d21d0a537f vcs: Use key lookup to explode if key is not available.
The key has to be in the dictionary, otherwise something changed in the code
and expoding here is better than hiding the error.
2016-09-19 15:31:57 +02:00
Martin Bornhold
a5e4564b0b vcs: Move code for parsing the repository names (url, vcs, acl) from vcs to simplevcs. 2016-09-19 15:21:44 +02:00
Martin Bornhold
3dbe3e4b2e vcs: Use regular expression to recognize requests to shadow repositories. 2016-09-19 14:24:36 +02:00
Johannes Bornhold
08a2b45999 vcs: Minimal change to expose the shadow repository
Based on my original research, this was the "minimal" starting point. It shows
that three concepts are needed for the "repo_name":

* From the security standpoint we think of the shadow repository having the same
  ACL as the target repository of the pull request. This is because the pull
  request itself is considered to be a part of the target repository.

  Out of this thought, the variable "acl_repo_name" is used whenever we want to
  check permissions or when we need the database configuration of the
  repository. An alternative name would have been "db_repo_name", but the usage
  for ACL checking is the most important one.

* From the web interaction perspective, we need the URL which was originally
  used to get to the repository. This is because based on this base URL commands
  can be identified. Especially for Git this is important, so that the commands
  are correctly recognized.

  Since the URL is in the focus, this is called "url_repo_name".

* Finally we have to deal with the repository on the file system. This is what
  the VCS layer deal with normally, so this name is called "vcs_repo_name".


The original repository interaction is a special case where all three names are
the same.

When interacting with a pull request, these three names are typically all
different.

This change is minimal in a sense that it just makes the interaction with a
shadow repository barely work, without checking any special constraints yet.
This was the starting point for further work on this topic.
2016-09-18 20:01:19 +02:00
Marcin Kuzminski
c0e4fc7dcd ldap: fixed email extraction typo. An empty
ldap email will now not overwritt the stored one.
2016-09-30 16:19:12 +02:00
lisaq
c2b6bf9764 frontend: switching to md5_safe in base fix #4254 2016-09-30 12:12:37 +02:00
Marcin Lulek
265860ec2a grunt: run concat before vulcanize 2016-09-29 17:58:28 +02:00
Marcin Lulek
295710d6b5 frontend: wrap our legacy js code inside polymer element 2016-09-29 17:24:34 +02:00
Marcin Lulek
b788ab58cf favicon: added favicon notifications 2016-09-29 14:51:05 +02:00
lisaq
db3f788080 ux: better tooltip for inline comment toggle 2016-09-29 12:32:25 +02:00
Marcin Lulek
3773920ddb frontend: ensure polyfills are loaded as early as possible 2016-09-29 13:40:40 +02:00
lisaq
68fe006beb styling: setting size on mention gravatars 2016-09-28 14:12:36 +02:00
Marcin Lulek
871b5bb108 appenlight: add basic tags to every request 2016-09-28 15:01:58 +02:00
Marcin Lulek
ecb3eddf84 frontend: added favico.js to requirements 2016-09-28 14:40:43 +02:00