Commit graph

57 commits

Author SHA1 Message Date
Marcin Kuzminski
4de255d013 core: no longer rely on webob exception inside get_or_404 function.
- relly on pyramid exc only
- helps reduce number of appenlight problems with 404 handling via webob
2017-07-25 15:26:38 +02:00
Marcin Lulek
ffb80aaa1a security: use 404 instead of 403 in case missing permissions for comment deletion.
- prevents resource discovery
2017-06-20 19:39:19 +02:00
Marcin Lulek
e919908333 security: make sure the admin of repo can only delete comments which are from the same repo.
- fixes IDOR issue
- protects against other people comment deletion by repo admins.
2017-06-19 21:15:37 +02:00
Marcin Lulek
ad54b9a57d security: use new safe escaped user attributes across the application.
- will fix all possible XSS attack vectors.
2017-06-19 15:14:02 +02:00
Marcin Kuzminski
aa3bffd198 pull-requests: prepare the migration of pull request to pyramid.
- this is half the code because of problems found during porting
- partially moved the urls, and flipped the logic into pyramid code
- needs more work in core for full switch.
2017-06-19 13:25:15 +02:00
Marcin Kuzminski
926a79e98e audit-logs: implemented pull request and comment events. 2017-06-17 15:22:50 +02:00
Daniel Dourvaris
2beb24a857 reviewers: added validation and default review rules via API calls.
- update/create pull request now validate and update the default reviewer rules.
2017-06-14 11:10:19 +02:00
Marcin Kuzminski
5915f38fcf pull-request-api: updated logic of closing a PR via API call.
- consistent logic via web and API
- updated events
- updated proper close checks.
2017-06-13 00:14:21 +02:00
Marcin Kuzminski
36f3dd22fb review-rules: extend code to support the forbid commit authors. 2017-06-08 13:39:54 +02:00
Marcin Kuzminski
53b4ac98f8 repo-summary: re-implemented summary view as pyramid.
- changed exception handler, to now work in pure pyramid mode
- changed missing requirements logic on repo based views that require vcs-connection
2017-06-07 13:23:21 +02:00
Marcin Kuzminski
bd1e865c9c pull-request: extended default reviewers functionality.
- added mandatory reviewers JS logic Fixes: #4219
- added option to forbid author to be a reviewer via JS/Frontend checks. Fixes #5190
- added option to forbid adding new reviewers except those defined. Fixes #5208
2017-05-29 20:10:17 +02:00
Marcin Kuzminski
be41f0b920 pull-requests: moved the listing of pull requests for repo into pyramid.
- moved as datagrid App
- changed loading of grid to lazy, as other new views.
2017-05-29 20:58:42 +02:00
Marcin Kuzminski
99fe6237eb pull-requests: comments don't order by versions since we anyway order by unique number. 2017-04-27 18:40:54 +02:00
Marcin Kuzminski
dabc592890 pull-request: fixed typo in wrong ref type error, and added which
refs are actually allowed.
2017-04-24 16:36:28 +02:00
Marcin Kuzminski
e5360e80e4 pull-reqests: workflow, change who can close a PR, it's only super-admin
owner or person who can merge.

- before it was every reviewer can close. Which really doesn't make sense.
2017-04-24 10:25:16 +02:00
Marcin Kuzminski
ee34944cba pull-requests: use consistent check who is allowed to delete a pull request. 2017-04-06 19:01:10 +02:00
Marcin Kuzminski
afe887cf7e pull-requests: change the update commits logic to handle target changes better.
- references #5266
- don't create comments if NO changes in PR were detected, but target changed
- Show the origin of changes target/source repos
- Allows updating the diffs without invalidating voting and creating new versions.
2017-04-05 16:39:32 +02:00
Marcin Kuzminski
32d888e8e2 pull-requests: show common ancestor inside pull-request view.
- common ancestors helps to determine what is a base of compare.
2017-04-04 15:52:08 +02:00
Marcin Kuzminski
53298a3590 pull-requests: forbid browsing versions on closed pull request. 2017-02-15 17:05:35 +01:00
Marcin Kuzminski
89dc191e0d pull-requests: add explicit CLOSE pr action instead of closed status from selector.
- This is much better UX
- we set status based on calculated review
- fixes #5215
2017-02-15 11:48:54 +01:00
Marcin Kuzminski
933651e934 pr: small refactor of code. 2017-01-30 20:06:35 +01:00
Marcin Kuzminski
29ded452fe pull-requests: remove template context registration as it's not
used anywhere.
2017-01-30 18:03:04 +01:00
Marcin Kuzminski
e7511ca6f6 pr-versioning: implemented versioning for pull requests.
- users can navigate via each version or generate diffs between versions
- diff between versions will show changed commits and partial diffs
- redone the UI for versioning a bit
- small UI fixes
2017-01-25 19:06:59 +01:00
Marcin Kuzminski
a044290ee2 comments: show links to unresolved todos
- show hidden comments when using navigation for comments
- small UI fixes
2017-01-19 13:59:02 +01:00
Marcin Kuzminski
30637758d6 pull-requests: unified merge checks.
- same logic is now used for API, pre-conditions on show, and checks on actual merge
- added checks into API because it was not validated
2017-01-18 14:56:20 +01:00
Marcin Kuzminski
e5f1efc7f7 pull-request: introduced new merge-checks.
- merge checks show nicer UI for status of merge approval inside PR
- merge checks now also forbid a merge if TODO notes are present
- use global refresh merge check when submitting comments. It
  no longer required page reload when submitting status change.
2017-01-16 22:58:44 +01:00
Marcin Kuzminski
e8447b4107 comments: use unified aggregation of comments counters.
- use 1 source of count and display objects
- scroll to for hidden comments will show them before scroll
- properly show how many comments we're displaying for each version
2017-01-16 18:12:38 +01:00
Marcin Kuzminski
6ccb2377c3 comments: enabled resolution for general comments, and finalized how general comment is build 2017-01-10 23:51:49 +01:00
Marcin Kuzminski
8f1db17117 comments: allow submitting id of comment which submitted comment resolved.
- use common template for inject forms
- cleanup of JS models, bind class of Form into the form itself
2017-01-11 15:05:33 +01:00
Marcin Kuzminski
24ef7171f8 comments: add comments type into comments. 2017-01-11 14:46:29 +01:00
Marcin Kuzminski
b52808ca95 comments: renamed ChangesetCommentsModel to CommentsModel to reflect what it actually does.
It's not limited to Changesets/Commits.
2017-01-09 17:52:00 +01:00
Marcin Kuzminski
f26ac86e28 comments: properly show version of pull request into added comments.
- index them by numeric index instead of DB id
- show inside main comments a version in which they were made.
2017-01-08 21:49:26 +01:00
Marcin Kuzminski
89e2586781 templating: use .mako as extensions for template files. 2017-01-04 22:13:57 +01:00
Marcin Kuzminski
fcc027c282 license: updated copyright year to 2017 2017-01-02 09:30:39 +01:00
Marcin Kuzminski
3761402390 pull-requests: updated versioning support.
- each pr version connects invalidated comments to it
- in version list we show number of comments made on each version
- show all outdated comments even for deleted files
- linkify outdated comments to first one
- added auto-collapse of commit range if they are more than 5
- styling changes, wide mode improvements
2016-12-30 12:11:15 +01:00
Marcin Kuzminski
9d8634a618 pull-requests: expose version browsing of pull requests.
- show nav for browsing each version of pr
- show detailed changes for each of version
- update comment template to indicate the changes were due to update of a pr
2016-12-19 17:38:22 +01:00
Marcin Kuzminski
bee9b1e921 diffs: fixed other file source when using pull requests. It must use
other repo for fetching proper commits.
2016-12-06 01:25:54 +01:00
Marcin Kuzminski
8b2182110a pull-requests: added version browsing for pull requests.
- invalidated comments now link to previous version to show code context
- removed all deprecated JS code left from new diffs
- improved invalidated comments display logic
- UI tweaks
2016-12-06 00:22:04 +01:00
Marcin Kuzminski
1d37334326 inline-comments: added helper to properly count inline comments. 2016-12-06 00:18:07 +01:00
Daniel Dourvaris
18092d4188 pullrequest: remove old diff code from pullrequest controller 2016-11-27 09:50:14 +02:00
Daniel Dourvaris
c5cdd9695a diffs: add new diffs to pull request page 2016-11-25 11:14:04 +02:00
Marcin Kuzminski
510f700051 pull-requests: moved the delete logic into the show view.
- delete from pr view is more intuitive
- there was several support queries about beeing confused how to delete a pr
2016-10-30 20:58:11 +01:00
Martin Bornhold
e0af9069d6 pr: Rename update response flag success -> executed
The name `success` may be misleading beacuse a skipped updated can be
interpreted as success or failure. The new name `executed` is clearer
because its only `True` if the update is really executed.
2016-10-27 14:28:26 +02:00
Martin Bornhold
053382901e pr: Refactor PR update error message handling. 2016-10-27 13:55:58 +02:00
Martin Bornhold
ef2d6c6086 pr: Use new update response object from pr model. #3950 2016-10-27 10:40:32 +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
3a69737da4 pr: Display link to shadow repository on pull request page. 2016-09-20 18:08:40 +02:00
Daniel Dourvaris
b3e97c1715 reviewers: store reviewer reasons to database, fixes #4238 2016-09-27 02:34:15 +03:00
Marcin Lulek
aeb0d4526d pull request: send live notification when PR update happens 2016-09-19 15:15:23 +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