Commit Graph

63 Commits

Author SHA1 Message Date
Douwe Maan 79214be727 Add Discussion model to represent MR/diff discussion 2016-07-20 16:18:18 -06:00
Sean McGivern ff55398aaf DRY up diff_for_path actions
1. Move render method to a concern, not a helper.
2. Let DiffHelper#diff_options automatically add the path option.
3. Move more instance var definitions to before filters.
2016-07-08 13:53:51 +01:00
Sean McGivern b6b26692ea Collapse large diffs by default
When rendering a list of diff files, skip those where the diff is over
10 KB and provide an endpoint to render individually instead.
2016-07-08 10:56:55 +01:00
Douwe Maan a9fa45f09e Represent DiffRefs as proper class instead of tuple array 2016-07-06 18:50:58 -04:00
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