Commit Graph

43 Commits

Author SHA1 Message Date
Grzegorz Bizon 52352dccc3 Move badge implementation to builds controller 2016-02-11 10:29:14 +01:00
Grzegorz Bizon 442a49db2b Skip authentication when requesting commit status badge 2016-02-11 10:29:14 +01:00
Grzegorz Bizon 28c4c949a5 Improve CI status badge implementation 2016-02-11 10:29:14 +01:00
Grzegorz Bizon 14f928b730 Add CI status badge implementation to commit controller 2016-02-11 10:29:14 +01:00
Robert Speicher 7ea60fbfc8 Merge remote-tracking branch 'dev/master' into 'master' 2016-02-09 12:13:58 -05:00
kkm cf1349adb7 Remember user's inline/tabular diff view preference in a cookie 2016-02-05 15:40:44 +01:00
Kamil Trzcinski 055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +01:00
Douwe Maan c23ca0b0b5 Merge branch 'master' into issue_3945 2016-01-20 14:53:41 +01:00
Andrew Johnson f66f9e95bf Give reporters the ability to download artifacts.
Also fix a few places where page_404 should be render_404.
2016-01-15 12:01:19 +01:00
Rubén Dávila 6b9c730e91 More refactoring from last code review. #3945
* Use commit objects instead of IDs when generating diffs
* Use proper references when generating MR's source and target
* Update broken specs
2016-01-14 16:47:55 -05:00
Rubén Dávila 1161cf2ec6 Use current commit id if it doesn't have a parent. #3945 2016-01-13 18:01:40 -05:00
Rubén Dávila 21b602c60a Change strategy to highlight diffs. #3945
Now we apply syntax highlighting to the whole old and new files.
This basically help us to highlight adequately multiline content.
2016-01-07 22:37:01 -05:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Douwe Maan a17ba43bfd Move commit builds to partial 2015-12-08 13:10:33 +01:00
Minsik Yoon 8c4a3c77d8 Add ignore whitespace change option to commit view 2015-12-01 09:51:10 +09:00
Kamil Trzcinski ba68facf8d CI details cleanup
- Add page titles to CI settings.
- Fix CI admin navigation.
- Remove duplicated scope.
- Use monospace font for commit sha.
- Add page title and header title to build page.
- Proper authorization for cancel/retry builds.
- Use gitlab pagination theme for builds and group members.
- Don't paginate builds widget on build page.
- Add badges to commit page Changes/Builds tabs.
- Add "Builds" to commit Builds tab page title.
- Add and use Ci::Build#retryable? method.
- Add CI::Build#retried? method.
- Allow all failed commit builds to be retried.
- Proper authorization for cancel/retry all builds.
- Remove unused param.
- Use time_ago_with_tooltip where appropriate.
- Tweak builds index text
- Remove duplication between builds/build and commit_statuses/commit_status.
- Use POST rather than GET for canceling and retrying builds.
- Remove redundant URL helpers.
- Add build ID to build page.
- Link branch name on build page.
- Move commit/:sha/ci to commit/:sha/builds.
2015-11-05 15:24:27 +01:00
Kamil Trzcinski 3adfee1c87 Allow developer to manage builds 2015-10-23 11:45:45 +02:00
Dmitriy Zaporozhets 7f63a8787c
Fix tests and few CI features
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-07 17:54:49 +02:00
Dmitriy Zaporozhets 1e06cabf4a
Remove Ci::Commit and Ci::Build controllers
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-07 15:24:32 +02:00
Dmitriy Zaporozhets 697b34d786 Render CI statuses on commit page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-06 16:10:17 +02:00
Dmitriy Zaporozhets 9c4307e287
Show CI status on commit page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-24 11:21:39 +02:00
Douwe Maan 27af24c1c9 No longer needed to pass project argument to commit methods. 2015-04-24 12:29:36 +02:00
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Jeroen van Baarsen 5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Douwe Maan 959ebbcade Clean up code around commit mentions. 2015-04-15 17:57:31 +02:00
Douwe Maan 00408f37e3 Move 'require_non_empty_project' filter to front so 'assign_ref_vars' doesn't 404. 2015-02-20 17:20:03 +01:00
Valery Sizov b9d9ac82a9 Commit page: async load branches info
Conflicts:
	config/routes.rb
2015-02-03 09:10:56 -08:00
Hannes Rosenögger 8243eb3f0e Show tags in commit view 2015-01-17 19:22:35 +01:00
Valery Sizov 6f34d40436 remove auth duplication 2014-11-05 11:04:08 +02:00
Dmitriy Zaporozhets 8ad9a75f88 Merge pull request #8030 from cirosantilli/factor-authorize
Factor authorize_push! and authorize_code_access!
2014-10-21 11:43:12 +03:00
Ciro Santilli 9e1b97ad99 Use @project on controllers, don't call method
Also memoize the method to ensure that other methods in
ApplicationController that rely on it can call it efficiently.
2014-10-19 23:36:23 +02:00
Ciro Santilli 4d0d5e79ba Factor authorize_push! and authorize_code_access!
with existing method_missing. Pattern already used extensively,
so let's be consistent and use it everywhere.
2014-10-13 21:31:49 +02:00
Dmitriy Zaporozhets 88b1e0ffcd
Faster branch contains detection for commit
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-29 16:40:13 +03:00
Dmitriy Zaporozhets 619c81b488
Fix Commit stats and diff encoding issues
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 15:26:35 +03:00
Dmitriy Zaporozhets be5b6db883
Refactor diff suppress logic and diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-15 18:28:21 +03:00
Dmitriy Zaporozhets e740a00ed6
Prevent commit page error if cant collect branches where commit exists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-11 22:08:39 +03:00
Dmitriy Zaporozhets 7bcd112a29
Fix commit page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-15 15:31:49 +02:00
Dmitriy Zaporozhets f19cdee8cc
Remove commit_load_context.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-15 15:06:12 +02:00
Dmitriy Zaporozhets f554aa38d5
Update commentable controllers with new note vars
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-25 22:32:48 +02:00
Dmitriy Zaporozhets f7e7dc7ebb
Make note anchors actually work
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-25 13:32:43 +02:00
Andrey Kumanyaev 6173d0a92f Show branches list (which branches contains commit) on commit page 2013-10-21 22:54:37 +04:00
Boyan Tabakov 01ff084a4d Improved large commit handling.
Previously, only number of changed files mattered. Now, number of lines to render in the diff are also taken into account.

A hard limit is set, above which diffs are not rendered and users are not allowed to override that. This prevents high server
resource usage with huge commits.

Related to #1745, #2259

In addition, handle large commits for MergeRequests and Compare controllers.

Also fixes a bug where diffs are loaded twice, if user goes directly to merge_requests/:id/diffs URL.
2013-09-07 14:44:03 +03:00
Dmitriy Zaporozhets 2ed7cbfba4 Move projects controllers/views in Projects module 2013-06-23 19:47:22 +03:00