Commit Graph

109 Commits

Author SHA1 Message Date
Douwe Maan c2223efe84 Fix rendering of commit notes 2016-06-27 18:00:18 +00:00
Kamil Trzcinski 907c0e6796 Added initial version of deployments 2016-06-10 23:36:54 +02:00
Kamil Trzcinski 1927a2d30b Rename all ci_commit[s] in application code to pipeline[s] 2016-06-03 16:27:50 +02:00
Kamil Trzcinski 9423547f61 Fix other places where we still use commit attribute of Build 2016-06-03 15:49:14 +02:00
Kamil Trzcinski 021d3810c3 Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipeline 2016-06-02 16:59:04 +02:00
Douwe Maan e5ce166806 Satisfy Rubocop 2016-05-13 17:31:58 -05:00
Douwe Maan 9a3ed265e9 Use `@diff_notes_disabled` instead of `@comments_allowed` 2016-05-13 17:31:58 -05:00
Douwe Maan 99d3e21f19 Extract LegacyDiffNote out of Note 2016-05-13 17:31:43 -05:00
Kamil Trzciński d240666800 Merge branch 'ci-commit-as-pipeline' into 'master'
Ci::Commit becomes a Pipeline object

1. Ci::Commit receives context: ref, :tag.
1. One Ci::Commit describes a one Pipeline
1. Pipeline is created from `.gitlab-ci.yml`
1. Pipeline is a ordered group of builds
1. We test MR against Pipeline
1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future)
1. We add a Pipeline Hook that will be triggered on Pipeline status change  (future)
1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future)

After merging that I'll prepare a separate MR that will unify naming, database columns, table names:
```
Ci::Commit -> Pipeline
Ci::Build -> Build
CommitStatus -> Job
GenericCommitStatus -> ExternalJob

ci_commits -> pipelines
ci_builds -> jobs
```

This MR implements first 5 points.

This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149.

See merge request !3653
2016-04-21 08:10:37 +00:00
P.S.V.R 3d6ba3b107 Add support to cherry-pick any commit
Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12785
Merge Request: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3514
2016-04-18 15:39:07 +08:00
Kamil Trzcinski af7214d0f0 Fix specs 2016-04-11 23:32:55 +02:00
Kamil Trzcinski 5d69f5b46d Use Ci::Commit as Pipeline 2016-04-11 23:32:54 +02:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Rubén Dávila 5ef3f80d41 More updates from the last code review. 2016-02-19 13:15:42 -05:00
Rubén Dávila a28eef1d1a Update copy and URLs used when reverting MRs. 2016-02-19 13:14:52 -05:00
Rubén Dávila 1469b72c46 Check that target_branch is present. 2016-02-19 13:14:51 -05:00
Rubén Dávila b36319a17c Make MRs with revert commit work. 2016-02-19 13:14:50 -05:00
Rubén Dávila 8061399368 Add RevertService class with basic logic to revert commit 2016-02-19 13:14:50 -05:00
Rubén Dávila 34e26b8212 Add button to revert commit on Commit detail page. 2016-02-19 13:14:50 -05:00
Robert Speicher f5ab126fd0 Ensure Commit#show responds 404 instead of 500 when given an invalid ID
Closes #13467
2016-02-15 15:48:16 -05: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