Commit e251a75e authored by Valery Sizov's avatar Valery Sizov

Merge branch 'ce_upstream' into 'master'

CE upstream



See merge request !697
parents 4a0e9bc7 c503dad1
### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
(How one can reproduce the issue - this is very important)
### Expected behavior
(What you should see instead)
### Actual behaviour
(What actually happens)
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
### Output of checks
#### Results of GitLab application Check
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:check SANITIZE=true`)
(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`)
(we will only investigate if the tests are passing)
#### Results of GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)
(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
### Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
### Description
(Include problem, use cases, benefits, and/or goals)
### Proposal
### Links / references
...@@ -6,22 +6,63 @@ v 8.11.1 ...@@ -6,22 +6,63 @@ v 8.11.1
- Fix file links on project page when default view is Files !5933 - Fix file links on project page when default view is Files !5933
- Fixed enter key in search input not working !5888 - Fixed enter key in search input not working !5888
v 8.12.0 (unreleased) v 8.12.0 (unreleased)
- Make push events have equal vertical spacing.
- Add two-factor recovery endpoint to internal API !5510 - Add two-factor recovery endpoint to internal API !5510
- Add font color contrast to external label in admin area (ClemMakesApps)
- Change logo animation to CSS (ClemMakesApps)
- Change merge_error column from string to text type - Change merge_error column from string to text type
- Reduce contributions calendar data payload (ClemMakesApps)
- Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel) - Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel)
- Set path for all JavaScript cookies to honor GitLab's subdirectory setting !5627 (Mike Greiling)
- Add hover color to emoji icon (ClemMakesApps)
- Fix branches page dropdown sort alignment (ClemMakesApps)
- Optimistic locking for Issues and Merge Requests (title and description overriding prevention) - Optimistic locking for Issues and Merge Requests (title and description overriding prevention)
- Add `wiki_page_events` to project hook APIs (Ben Boeckel) - Add `wiki_page_events` to project hook APIs (Ben Boeckel)
- Remove Gitorious import
- Add Sentry logging to API calls - Add Sentry logging to API calls
- Automatically expand hidden discussions when accessed by a permalink !5585 (Mike Greiling)
- Remove unused mixins (ClemMakesApps)
- Fix groups sort dropdown alignment (ClemMakesApps)
- Add horizontal scrolling to all sub-navs on mobile viewports (ClemMakesApps)
- Fix markdown help references (ClemMakesApps)
- Added tests for diff notes - Added tests for diff notes
- Add delimiter to project stars and forks count (ClemMakesApps)
- Fix badge count alignment (ClemMakesApps)
- Fix branch title trailing space on hover (ClemMakesApps)
- Award emoji tooltips containing more than 10 usernames are now truncated !4780 (jlogandavison)
- Fix duplicate "me" in award emoji tooltip !5218 (jlogandavison)
- Fix spacing and vertical alignment on build status icon on commits page (ClemMakesApps)
- Update merge_requests.md with a simpler way to check out a merge request. !5944
- Fix button missing type (ClemMakesApps)
- Move to project dropdown with infinite scroll for better performance
- Fix leaking of submit buttons outside the width of a main container !18731 (originally by @pavelloz)
- Load branches asynchronously in Cherry Pick and Revert dialogs.
- Add merge request versions !5467
- Change using size to use count and caching it for number of group members. !5935
- Added 'only_allow_merge_if_build_succeeds' project setting in the API. !5930 (Duck) - Added 'only_allow_merge_if_build_succeeds' project setting in the API. !5930 (Duck)
- Reduce number of database queries on builds tab
v 8.11.2 (unreleased) - Capitalize mentioned issue timeline notes (ClemMakesApps)
- Show "Create Merge Request" widget for push events to fork projects on the source project - Use the default branch for displaying the project icon instead of master !5792 (Hannes Rosenögger)
- Adds response mime type to transaction metric action when it's not HTML
v 8.11.1 (unreleased) - Fix hover leading space bug in pipeline graph !5980
- Does not halt the GitHub import process when an error occurs
v 8.11.3 (unreleased)
- Allow system info page to handle case where info is unavailable
- Label list shows all issues (opened or closed) with that label
- Don't show resolve conflicts link before MR status is updated
- Fix IE11 fork button bug !598
- Don't prevent viewing the MR when git refs for conflicts can't be found on disk
- Fix external issue tracker "Issues" link leading to 404s
v 8.11.2
- Show "Create Merge Request" widget for push events to fork projects on the source project. !5978
- Use gitlab-workhorse 0.7.11 !5983
- Does not halt the GitHub import process when an error occurs. !5763
- Fix file links on project page when default view is Files !5933 - Fix file links on project page when default view is Files !5933
- Change using size to use count and caching it for number of group members - Fixed enter key in search input not working !5888
v 8.11.1
- Pulled due to packaging error.
v 8.11.0 v 8.11.0
- Use test coverage value from the latest successful pipeline in badge. !5862 - Use test coverage value from the latest successful pipeline in badge. !5862
...@@ -30,7 +71,6 @@ v 8.11.0 ...@@ -30,7 +71,6 @@ v 8.11.0
- Add Koding (online IDE) integration - Add Koding (online IDE) integration
- Ability to specify branches for Pivotal Tracker integration (Egor Lynko) - Ability to specify branches for Pivotal Tracker integration (Egor Lynko)
- Fix don't pass a local variable called `i` to a partial. !20510 (herminiotorres) - Fix don't pass a local variable called `i` to a partial. !20510 (herminiotorres)
- Add delimiter to project stars and forks count (ClemMakesApps)
- Fix rename `add_users_into_project` and `projects_ids`. !20512 (herminiotorres) - Fix rename `add_users_into_project` and `projects_ids`. !20512 (herminiotorres)
- Fix adding line comments on the initial commit to a repo !5900 - Fix adding line comments on the initial commit to a repo !5900
- Fix the title of the toggle dropdown button. !5515 (herminiotorres) - Fix the title of the toggle dropdown button. !5515 (herminiotorres)
...@@ -46,7 +86,6 @@ v 8.11.0 ...@@ -46,7 +86,6 @@ v 8.11.0
- Use long options for curl examples in documentation !5703 (winniehell) - Use long options for curl examples in documentation !5703 (winniehell)
- Added tooltip listing label names to the labels value in the collapsed issuable sidebar - Added tooltip listing label names to the labels value in the collapsed issuable sidebar
- Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell) - Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell)
- Fix badge count alignment (ClemMakesApps)
- GitLab Performance Monitoring can now track custom events such as the number of tags pushed to a repository - GitLab Performance Monitoring can now track custom events such as the number of tags pushed to a repository
- Add support for relative links starting with ./ or / to RelativeLinkFilter (winniehell) - Add support for relative links starting with ./ or / to RelativeLinkFilter (winniehell)
- Allow naming U2F devices !5833 - Allow naming U2F devices !5833
...@@ -87,7 +126,6 @@ v 8.11.0 ...@@ -87,7 +126,6 @@ v 8.11.0
- Enforce 2FA restrictions on API authentication endpoints !5820 - Enforce 2FA restrictions on API authentication endpoints !5820
- Limit git rev-list output count to one in forced push check - Limit git rev-list output count to one in forced push check
- Show deployment status on merge requests with external URLs - Show deployment status on merge requests with external URLs
- Fix branch title trailing space on hover (ClemMakesApps)
- Clean up unused routes (Josef Strzibny) - Clean up unused routes (Josef Strzibny)
- Fix issue on empty project to allow developers to only push to protected branches if given permission - Fix issue on empty project to allow developers to only push to protected branches if given permission
- API: Add enpoints for pipelines - API: Add enpoints for pipelines
...@@ -104,7 +142,6 @@ v 8.11.0 ...@@ -104,7 +142,6 @@ v 8.11.0
- Fix devise deprecation warnings. - Fix devise deprecation warnings.
- Check for 2FA when using Git over HTTP and only allow PersonalAccessTokens as password in that case !5764 - Check for 2FA when using Git over HTTP and only allow PersonalAccessTokens as password in that case !5764
- Update version_sorter and use new interface for faster tag sorting - Update version_sorter and use new interface for faster tag sorting
- Load branches asynchronously in Cherry Pick and Revert dialogs.
- Optimize checking if a user has read access to a list of issues !5370 - Optimize checking if a user has read access to a list of issues !5370
- Store all DB secrets in secrets.yml, under descriptive names !5274 - Store all DB secrets in secrets.yml, under descriptive names !5274
- Fix syntax highlighting in file editor - Fix syntax highlighting in file editor
...@@ -125,8 +162,6 @@ v 8.11.0 ...@@ -125,8 +162,6 @@ v 8.11.0
- Remove `search_id` of labels dropdown filter to fix 'Missleading URI for labels in Merge Requests and Issues view'. !5368 (Scott Le) - Remove `search_id` of labels dropdown filter to fix 'Missleading URI for labels in Merge Requests and Issues view'. !5368 (Scott Le)
- Load project invited groups and members eagerly in `ProjectTeam#fetch_members` - Load project invited groups and members eagerly in `ProjectTeam#fetch_members`
- Add pipeline events hook - Add pipeline events hook
- Award emoji tooltips containing more than 10 usernames are now truncated !4780 (jlogandavison)
- Fix duplicate "me" in award emoji tooltip !5218 (jlogandavison)
- Bump gitlab_git to speedup DiffCollection iterations - Bump gitlab_git to speedup DiffCollection iterations
- Rewrite description of a blocked user in admin settings. (Elias Werberich) - Rewrite description of a blocked user in admin settings. (Elias Werberich)
- Make branches sortable without push permission !5462 (winniehell) - Make branches sortable without push permission !5462 (winniehell)
...@@ -138,14 +173,12 @@ v 8.11.0 ...@@ -138,14 +173,12 @@ v 8.11.0
- Fix search for notes which belongs to deleted objects - Fix search for notes which belongs to deleted objects
- Allow Akismet to be trained by submitting issues as spam or ham !5538 - Allow Akismet to be trained by submitting issues as spam or ham !5538
- Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska)
- Fix spacing and vertical alignment on build status icon on commits page (ClemMakesApps)
- Allow branch names ending with .json for graph and network page !5579 (winniehell) - Allow branch names ending with .json for graph and network page !5579 (winniehell)
- Add the `sprockets-es6` gem - Add the `sprockets-es6` gem
- Improve OAuth2 client documentation (muteor) - Improve OAuth2 client documentation (muteor)
- Fix diff comments inverted toggle bug (ClemMakesApps) - Fix diff comments inverted toggle bug (ClemMakesApps)
- Multiple trigger variables show in separate lines (Katarzyna Kobierska Ula Budziszewska) - Multiple trigger variables show in separate lines (Katarzyna Kobierska Ula Budziszewska)
- Profile requests when a header is passed - Profile requests when a header is passed
- Fix button missing type (ClemMakesApps)
- Avoid calculation of line_code and position for _line partial when showing diff notes on discussion tab. - Avoid calculation of line_code and position for _line partial when showing diff notes on discussion tab.
- Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible - Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible
- Add commit stats in commit api. !5517 (dixpac) - Add commit stats in commit api. !5517 (dixpac)
...@@ -154,7 +187,6 @@ v 8.11.0 ...@@ -154,7 +187,6 @@ v 8.11.0
- edit_blob_link will use blob passed onto the options parameter - edit_blob_link will use blob passed onto the options parameter
- Make error pages responsive (Takuya Noguchi) - Make error pages responsive (Takuya Noguchi)
- The performance of the project dropdown used for moving issues has been improved - The performance of the project dropdown used for moving issues has been improved
- Move to project dropdown with infinite scroll for better performance
- Fix skip_repo parameter being ignored when destroying a namespace - Fix skip_repo parameter being ignored when destroying a namespace
- Add all builds into stage/job dropdowns on builds page - Add all builds into stage/job dropdowns on builds page
- Change requests_profiles resource constraint to catch virtually any file - Change requests_profiles resource constraint to catch virtually any file
...@@ -186,7 +218,6 @@ v 8.11.0 ...@@ -186,7 +218,6 @@ v 8.11.0
- Eliminate unneeded calls to Repository#blob_at when listing commits with no path - Eliminate unneeded calls to Repository#blob_at when listing commits with no path
- Update gitlab_git gem to 10.4.7 - Update gitlab_git gem to 10.4.7
- Simplify SQL queries of marking a todo as done - Simplify SQL queries of marking a todo as done
- Update merge_requests.md with a simpler way to check out a merge request. !5944
v 8.10.7 v 8.10.7
- Upgrade Hamlit to 2.6.1. !5873 - Upgrade Hamlit to 2.6.1. !5873
......
...@@ -129,7 +129,7 @@ request that potentially fixes it. ...@@ -129,7 +129,7 @@ request that potentially fixes it.
### Feature proposals ### Feature proposals
To create a feature proposal for CE and CI, open an issue on the To create a feature proposal for CE, open an issue on the
[issue tracker of CE][ce-tracker]. [issue tracker of CE][ce-tracker].
For feature proposals for EE, open an issue on the For feature proposals for EE, open an issue on the
...@@ -144,16 +144,7 @@ code snippet right after your description in a new line: `~"feature proposal"`. ...@@ -144,16 +144,7 @@ code snippet right after your description in a new line: `~"feature proposal"`.
Please keep feature proposals as small and simple as possible, complex ones Please keep feature proposals as small and simple as possible, complex ones
might be edited to make them small and simple. might be edited to make them small and simple.
You are encouraged to use the template below for feature proposals. Please submit Feature Proposals using the ['Feature Proposal' issue template](.gitlab/issue_templates/Feature Proposal.md) provided on the issue tracker.
```
## Description
Include problem, use cases, benefits, and/or goals
## Proposal
## Links / references
```
For changes in the interface, it can be helpful to create a mockup first. For changes in the interface, it can be helpful to create a mockup first.
If you want to create something yourself, consider opening an issue first to If you want to create something yourself, consider opening an issue first to
...@@ -166,55 +157,11 @@ submitting your own, there's a good chance somebody else had the same issue or ...@@ -166,55 +157,11 @@ submitting your own, there's a good chance somebody else had the same issue or
feature proposal. Show your support with an award emoji and/or join the feature proposal. Show your support with an award emoji and/or join the
discussion. discussion.
Please submit bugs using the following template in the issue description area. Please submit bugs using the ['Bug' issue template](.gitlab/issue_templates/Bug.md) provided on the issue tracker.
The text in the parenthesis is there to help you with what to include. Omit it The text in the parenthesis is there to help you with what to include. Omit it
when submitting the actual issue. You can copy-paste it and then edit as you when submitting the actual issue. You can copy-paste it and then edit as you
see fit. see fit.
```
## Summary
(Summarize your issue in one sentence - what goes wrong, what did you expect to happen)
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## Expected behavior
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Output of checks
### Results of GitLab Application Check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)
(we will only investigate if the tests are passing)
### Results of GitLab Environment Info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
```
### Issue weight ### Issue weight
Issue weight allows us to get an idea of the amount of work required to solve Issue weight allows us to get an idea of the amount of work required to solve
......
...@@ -360,5 +360,5 @@ gem 'paranoia', '~> 2.0' ...@@ -360,5 +360,5 @@ gem 'paranoia', '~> 2.0'
gem 'health_check', '~> 2.1.0' gem 'health_check', '~> 2.1.0'
# System information # System information
gem 'vmstat', '~> 2.1.1' gem 'vmstat', '~> 2.2'
gem 'sys-filesystem', '~> 1.1.6' gem 'sys-filesystem', '~> 1.1.6'
...@@ -799,7 +799,7 @@ GEM ...@@ -799,7 +799,7 @@ GEM
coercible (~> 1.0) coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3) descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9) equalizer (~> 0.0, >= 0.0.9)
vmstat (2.1.1) vmstat (2.2.0)
warden (1.2.6) warden (1.2.6)
rack (>= 1.0) rack (>= 1.0)
web-console (2.3.0) web-console (2.3.0)
...@@ -1014,7 +1014,7 @@ DEPENDENCIES ...@@ -1014,7 +1014,7 @@ DEPENDENCIES
validates_hostname (~> 1.0.0) validates_hostname (~> 1.0.0)
version_sorter (~> 2.1.0) version_sorter (~> 2.1.0)
virtus (~> 1.0.1) virtus (~> 1.0.1)
vmstat (~> 2.1.1) vmstat (~> 2.2)
web-console (~> 2.0) web-console (~> 2.0)
webmock (~> 1.21.0) webmock (~> 1.21.0)
wikicloth (= 0.8.1) wikicloth (= 0.8.1)
......
window.gl = window.gl || {};
((global) => { ((global) => {
const MAX_MESSAGE_LENGTH = 500; const MAX_MESSAGE_LENGTH = 500;
const MESSAGE_CELL_SELECTOR = '.abuse-reports .message'; const MESSAGE_CELL_SELECTOR = '.abuse-reports .message';
...@@ -36,4 +35,4 @@ window.gl = window.gl || {}; ...@@ -36,4 +35,4 @@ window.gl = window.gl || {};
} }
global.AbuseReports = AbuseReports; global.AbuseReports = AbuseReports;
})(window.gl); })(window.gl || (window.gl = {}));
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
event_filters = $.cookie("event_filter"); event_filters = $.cookie("event_filter");
filter = sender.attr("id").split("_")[0]; filter = sender.attr("id").split("_")[0];
$.cookie("event_filter", (event_filters !== filter ? filter : ""), { $.cookie("event_filter", (event_filters !== filter ? filter : ""), {
path: '/' path: gon.relative_url_root || '/'
}); });
if (event_filters !== filter) { if (event_filters !== filter) {
return sender.closest('li').toggleClass("active"); return sender.closest('li').toggleClass("active");
......
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
new Aside(); new Aside();
if ($window.width() < 1024 && $.cookie('pin_nav') === 'true') { if ($window.width() < 1024 && $.cookie('pin_nav') === 'true') {
$.cookie('pin_nav', 'false', { $.cookie('pin_nav', 'false', {
path: '/', path: gon.relative_url_root || '/',
expires: 365 * 10 expires: 365 * 10
}); });
$('.page-with-sidebar').toggleClass('page-sidebar-collapsed page-sidebar-expanded').removeClass('page-sidebar-pinned'); $('.page-with-sidebar').toggleClass('page-sidebar-collapsed page-sidebar-expanded').removeClass('page-sidebar-pinned');
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
$topNav.removeClass('header-pinned-nav').toggleClass('header-collapsed header-expanded'); $topNav.removeClass('header-pinned-nav').toggleClass('header-collapsed header-expanded');
} }
$.cookie('pin_nav', doPinNav, { $.cookie('pin_nav', doPinNav, {
path: '/', path: gon.relative_url_root || '/',
expires: 365 * 10 expires: 365 * 10
}); });
if ($.cookie('pin_nav') === 'true' || doPinNav) { if ($.cookie('pin_nav') === 'true' || doPinNav) {
......
...@@ -320,6 +320,7 @@ ...@@ -320,6 +320,7 @@
frequentlyUsedEmojis = this.getFrequentlyUsedEmojis(); frequentlyUsedEmojis = this.getFrequentlyUsedEmojis();
frequentlyUsedEmojis.push(emoji); frequentlyUsedEmojis.push(emoji);
return $.cookie('frequently_used_emojis', frequentlyUsedEmojis.join(','), { return $.cookie('frequently_used_emojis', frequentlyUsedEmojis.join(','), {
path: gon.relative_url_root || '/',
expires: 365 expires: 365
}); });
}; };
......
(function() { (function(w) {
$(function() { $(function() {
return $("body").on("click", ".js-toggle-button", function(e) { $('.js-toggle-button').on('click', function(e) {
$(this).find('i').toggleClass('fa fa-chevron-down').toggleClass('fa fa-chevron-up'); e.preventDefault();
$(this).closest(".js-toggle-container").find(".js-toggle-content").toggle(); $(this)
return e.preventDefault(); .find('.fa')
.toggleClass('fa-chevron-down fa-chevron-up')
.end()
.closest('.js-toggle-container')
.find('.js-toggle-content')
.toggle()
;
}); });
});
}).call(this); // If we're accessing a permalink, ensure it is not inside a
// closed js-toggle-container!
var hash = w.gl.utils.getLocationHash();
var anchor = hash && document.getElementById(hash);
var container = anchor && $(anchor).closest('.js-toggle-container');
if (container && container.find('.js-toggle-content').is(':hidden')) {
container.find('.js-toggle-button').trigger('click');
anchor.scrollIntoView();
}
});
})(window);
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
} }
}); });
} else { } else {
return elements.show(); return elements.show().removeClass('option-hidden');
} }
} }
}; };
...@@ -190,9 +190,9 @@ ...@@ -190,9 +190,9 @@
currentIndex = -1; currentIndex = -1;
NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link, .option-hidden'; NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link';
SELECTABLE_CLASSES = ".dropdown-content li:not(" + NON_SELECTABLE_CLASSES + ")"; SELECTABLE_CLASSES = ".dropdown-content li:not(" + NON_SELECTABLE_CLASSES + ", .option-hidden)";
CURSOR_SELECT_SCROLL_PADDING = 5 CURSOR_SELECT_SCROLL_PADDING = 5
...@@ -565,10 +565,6 @@ ...@@ -565,10 +565,6 @@
} else { } else {
field.remove(); field.remove();
} }
if (this.options.toggleLabel) {
this.updateLabel(selectedObject, el, this);
}
return selectedObject;
} else if (el.hasClass(INDETERMINATE_CLASS)) { } else if (el.hasClass(INDETERMINATE_CLASS)) {
el.addClass(ACTIVE_CLASS); el.addClass(ACTIVE_CLASS);
el.removeClass(INDETERMINATE_CLASS); el.removeClass(INDETERMINATE_CLASS);
...@@ -578,7 +574,6 @@ ...@@ -578,7 +574,6 @@
if (!field.length && fieldName) { if (!field.length && fieldName) {
this.addInput(fieldName, value, selectedObject); this.addInput(fieldName, value, selectedObject);
} }
return selectedObject;
} else { } else {
if (!this.options.multiSelect || el.hasClass('dropdown-clear-active')) { if (!this.options.multiSelect || el.hasClass('dropdown-clear-active')) {
this.dropdown.find("." + ACTIVE_CLASS).removeClass(ACTIVE_CLASS); this.dropdown.find("." + ACTIVE_CLASS).removeClass(ACTIVE_CLASS);
...@@ -590,9 +585,6 @@ ...@@ -590,9 +585,6 @@
field.remove(); field.remove();
} }
el.addClass(ACTIVE_CLASS); el.addClass(ACTIVE_CLASS);
if (this.options.toggleLabel) {
this.updateLabel(selectedObject, el, this);
}
if (value != null) { if (value != null) {
if (!field.length && fieldName) { if (!field.length && fieldName) {
this.addInput(fieldName, value, selectedObject); this.addInput(fieldName, value, selectedObject);
...@@ -600,8 +592,14 @@ ...@@ -600,8 +592,14 @@
field.val(value).trigger('change'); field.val(value).trigger('change');
} }
} }
return selectedObject;
} }
// Update label right after input has been added
if (this.options.toggleLabel) {
this.updateLabel(selectedObject, el, this);
}
return selectedObject;
}; };
GitLabDropdown.prototype.addInput = function(fieldName, value, selectedObject) { GitLabDropdown.prototype.addInput = function(fieldName, value, selectedObject) {
......
...@@ -67,6 +67,14 @@ ...@@ -67,6 +67,14 @@
$.timeago.settings.strings = tmpLocale; $.timeago.settings.strings = tmpLocale;
}; };
w.gl.utils.getDayDifference = function(a, b) {
var millisecondsPerDay = 1000 * 60 * 60 * 24;
var date1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
var date2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());
return Math.floor((date2 - date1) / millisecondsPerDay);
}
})(window); })(window);
}).call(this); }).call(this);
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
} }
return newUrl; return newUrl;
}; };
return w.gl.utils.removeParamQueryString = function(url, param) { w.gl.utils.removeParamQueryString = function(url, param) {
var urlVariables, variables; var urlVariables, variables;
url = decodeURIComponent(url); url = decodeURIComponent(url);
urlVariables = url.split('&'); urlVariables = url.split('&');
...@@ -59,6 +59,16 @@ ...@@ -59,6 +59,16 @@
return results; return results;
})()).join('&'); })()).join('&');
}; };
w.gl.utils.getLocationHash = function(url) {
var hashIndex;
if (typeof url === 'undefined') {
// Note: We can't use window.location.hash here because it's
// not consistent across browsers - Firefox will pre-decode it
url = window.location.href;
}
hashIndex = url.indexOf('#');
return hashIndex === -1 ? null : url.substring(hashIndex + 1);
};
})(window); })(window);
}).call(this); }).call(this);
(function() { (function() {
var clearHighlights, currentTimer, defaultClass, delay, firstPiece, pieceIndex, pieces, start, stop, work;
Turbolinks.enableProgressBar(); Turbolinks.enableProgressBar();
defaultClass = 'tanuki-shape';
pieces = ['path#tanuki-right-cheek', 'path#tanuki-right-eye, path#tanuki-right-ear', 'path#tanuki-nose', 'path#tanuki-left-eye, path#tanuki-left-ear', 'path#tanuki-left-cheek'];
pieceIndex = 0;
firstPiece = pieces[0];
currentTimer = null;
delay = 150;
clearHighlights = function() {
return $("." + defaultClass + ".highlight").attr('class', defaultClass);
};
start = function() { start = function() {
clearHighlights(); $('.tanuki-logo').addClass('animate');
pieceIndex = 0;
if (pieces[0] !== firstPiece) {
pieces.reverse();
}
if (currentTimer) {
clearInterval(currentTimer);
}
return currentTimer = setInterval(work, delay);
}; };
stop = function() { stop = function() {
clearInterval(currentTimer); $('.tanuki-logo').removeClass('animate');
return clearHighlights();
};
work = function() {
clearHighlights();
$(pieces[pieceIndex]).attr('class', defaultClass + " highlight");
if (pieceIndex === pieces.length - 1) {
pieceIndex = 0;
return pieces.reverse();
} else {
return pieceIndex++;
}
}; };
$(document).on('page:fetch', start); $(document).on('page:fetch', start);
......
...@@ -75,10 +75,8 @@ class MergeConflictResolver { ...@@ -75,10 +75,8 @@ class MergeConflictResolver {
window.location.href = data.redirect_to; window.location.href = data.redirect_to;
}) })
.error(() => { .error(() => {
new Flash('Something went wrong!');
})
.always(() => {
this.vue.isSubmitting = false; this.vue.isSubmitting = false;
new Flash('Something went wrong!');
}); });
} }
......
...@@ -17,19 +17,15 @@ ...@@ -17,19 +17,15 @@
return $(this).parents('form').submit(); return $(this).parents('form').submit();
}); });
$('.hide-no-ssh-message').on('click', function(e) { $('.hide-no-ssh-message').on('click', function(e) {
var path;
path = '/';
$.cookie('hide_no_ssh_message', 'false', { $.cookie('hide_no_ssh_message', 'false', {
path: path path: gon.relative_url_root || '/'
}); });
$(this).parents('.no-ssh-key-message').remove(); $(this).parents('.no-ssh-key-message').remove();
return e.preventDefault(); return e.preventDefault();
}); });
$('.hide-no-password-message').on('click', function(e) { $('.hide-no-password-message').on('click', function(e) {
var path;
path = '/';
$.cookie('hide_no_password_message', 'false', { $.cookie('hide_no_password_message', 'false', {
path: path path: gon.relative_url_root || '/'
}); });
$(this).parents('.no-password-message').remove(); $(this).parents('.no-password-message').remove();
return e.preventDefault(); return e.preventDefault();
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
} }
if (!triggered) { if (!triggered) {
return $.cookie("collapsed_gutter", $('.right-sidebar').hasClass('right-sidebar-collapsed'), { return $.cookie("collapsed_gutter", $('.right-sidebar').hasClass('right-sidebar-collapsed'), {
path: '/' path: gon.relative_url_root || '/'
}); });
} }
}); });
......
...@@ -7,10 +7,8 @@ ...@@ -7,10 +7,8 @@
}); });
this.initTabs(); this.initTabs();
$('.hide-project-limit-message').on('click', function(e) { $('.hide-project-limit-message').on('click', function(e) {
var path;
path = '/';
$.cookie('hide_project_limit_message', 'false', { $.cookie('hide_project_limit_message', 'false', {
path: path path: gon.relative_url_root || '/'
}); });
$(this).parents('.project-limit-message').remove(); $(this).parents('.project-limit-message').remove();
return e.preventDefault(); return e.preventDefault();
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
this.Calendar = (function() { this.Calendar = (function() {
function Calendar(timestamps, calendar_activities_path) { function Calendar(timestamps, calendar_activities_path) {
var group, i;
this.calendar_activities_path = calendar_activities_path; this.calendar_activities_path = calendar_activities_path;
this.clickDay = bind(this.clickDay, this); this.clickDay = bind(this.clickDay, this);
this.currentSelectedDate = ''; this.currentSelectedDate = '';
...@@ -13,26 +12,36 @@ ...@@ -13,26 +12,36 @@
this.monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; this.monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
this.months = []; this.months = [];
this.timestampsTmp = []; this.timestampsTmp = [];
i = 0; var group = 0;
group = 0;
_.each(timestamps, (function(_this) { var today = new Date()
return function(count, date) { today.setHours(0, 0, 0, 0, 0);
var day, innerArray, newDate;
newDate = new Date(parseInt(date) * 1000); var oneYearAgo = new Date(today);
day = newDate.getDay(); oneYearAgo.setFullYear(today.getFullYear() - 1);
if ((day === 0 && i !== 0) || i === 0) {
_this.timestampsTmp.push([]); var days = gl.utils.getDayDifference(oneYearAgo, today);
group++;
} for(var i = 0; i <= days; i++) {
innerArray = _this.timestampsTmp[group - 1]; var date = new Date(oneYearAgo);
innerArray.push({ date.setDate(date.getDate() + i);
count: count,
date: newDate, var day = date.getDay();
day: day var count = timestamps[date.getTime() * 0.001];
});
return i++; if ((day === 0 && i !== 0) || i === 0) {
}; this.timestampsTmp.push([]);
})(this)); group++;
}
var innerArray = this.timestampsTmp[group - 1];
innerArray.push({
count: count || 0,
date: date,
day: day
});
}
this.colorKey = this.initColorKey(); this.colorKey = this.initColorKey();
this.color = this.initColor(); this.color = this.initColor();
this.renderSvg(group); this.renderSvg(group);
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
@import "framework/issue_box.scss"; @import "framework/issue_box.scss";
@import "framework/jquery.scss"; @import "framework/jquery.scss";
@import "framework/lists.scss"; @import "framework/lists.scss";
@import "framework/logo.scss";
@import "framework/markdown_area.scss"; @import "framework/markdown_area.scss";
@import "framework/mobile.scss"; @import "framework/mobile.scss";
@import "framework/modal.scss"; @import "framework/modal.scss";
......
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
svg { svg {
height: 15px; height: 15px;
width: auto; width: 15px;
position: relative; position: relative;
top: 2px; top: 2px;
} }
......
...@@ -248,7 +248,7 @@ li.note { ...@@ -248,7 +248,7 @@ li.note {
img.emoji { img.emoji {
height: 20px; height: 20px;
vertical-align: middle; vertical-align: top;
width: 20px; width: 20px;
} }
......
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
.dropdown { .dropdown {
position: relative; position: relative;
.btn-link {
&:hover {
cursor: pointer;
}
}
} }
.open { .open {
......
...@@ -19,7 +19,6 @@ input[type='text'].danger { ...@@ -19,7 +19,6 @@ input[type='text'].danger {
} }
.form-actions { .form-actions {
margin: -$gl-padding;
margin-top: 0; margin-top: 0;
margin-bottom: -$gl-padding; margin-bottom: -$gl-padding;
padding: $gl-padding; padding: $gl-padding;
......
...@@ -2,16 +2,6 @@ ...@@ -2,16 +2,6 @@
* Application Header * Application Header
* *
*/ */
@mixin tanuki-logo-colors($path-color) {
fill: $path-color;
transition: all 0.8s;
&:hover,
&.highlight {
fill: lighten($path-color, 25%);
transition: all 0.1s;
}
}
header { header {
transition: padding $sidebar-transition-duration; transition: padding $sidebar-transition-duration;
...@@ -25,7 +15,7 @@ header { ...@@ -25,7 +15,7 @@ header {
margin: 8px 0; margin: 8px 0;
text-align: center; text-align: center;
#tanuki-logo, img { .tanuki-logo, img {
height: 36px; height: 36px;
} }
} }
...@@ -205,26 +195,6 @@ header { ...@@ -205,26 +195,6 @@ header {
} }
} }
#tanuki-logo {
#tanuki-left-ear,
#tanuki-right-ear,
#tanuki-nose {
@include tanuki-logo-colors($tanuki-red);
}
#tanuki-left-eye,
#tanuki-right-eye {
@include tanuki-logo-colors($tanuki-orange);
}
#tanuki-left-cheek,
#tanuki-right-cheek {
@include tanuki-logo-colors($tanuki-yellow);
}
}
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
header .container-fluid { header .container-fluid {
font-size: 18px; font-size: 18px;
......
@mixin unique-keyframes {
$animation-name: unique-id();
@include webkit-prefix(animation-name, $animation-name);
@-webkit-keyframes #{$animation-name} {
@content;
}
@keyframes #{$animation-name} {
@content;
}
}
@mixin tanuki-logo-colors($path-color) {
fill: $path-color;
transition: all 0.8s;
&:hover {
fill: lighten($path-color, 25%);
transition: all 0.1s;
}
}
@mixin tanuki-second-highlight-animations($tanuki-color) {
@include unique-keyframes {
10%, 80% {
fill: #{$tanuki-color}
}
20%, 90% {
fill: lighten($tanuki-color, 25%);
}
}
}
@mixin tanuki-forth-highlight-animations($tanuki-color) {
@include unique-keyframes {
30%, 60% {
fill: #{$tanuki-color};
}
40%, 70% {
fill: lighten($tanuki-color, 25%);
}
}
}
.tanuki-logo {
.tanuki-left-ear,
.tanuki-right-ear,
.tanuki-nose {
@include tanuki-logo-colors($tanuki-red);
}
.tanuki-left-eye,
.tanuki-right-eye {
@include tanuki-logo-colors($tanuki-orange);
}
.tanuki-left-cheek,
.tanuki-right-cheek {
@include tanuki-logo-colors($tanuki-yellow);
}
&.animate {
.tanuki-shape {
@include webkit-prefix(animation-duration, 1.5s);
@include webkit-prefix(animation-iteration-count, infinite);
}
.tanuki-left-cheek {
@include unique-keyframes {
0%, 10%, 100% {
fill: lighten($tanuki-yellow, 25%);
}
90% {
fill: $tanuki-yellow;
}
}
}
.tanuki-left-eye {
@include tanuki-second-highlight-animations($tanuki-orange);
}
.tanuki-left-ear {
@include tanuki-second-highlight-animations($tanuki-red);
}
.tanuki-nose {
@include unique-keyframes {
20%, 70% {
fill: $tanuki-red;
}
30%, 80% {
fill: lighten($tanuki-red, 25%);
}
}
}
.tanuki-right-eye {
@include tanuki-forth-highlight-animations($tanuki-orange);
}
.tanuki-right-ear {
@include tanuki-forth-highlight-animations($tanuki-red);
}
.tanuki-right-cheek {
@include unique-keyframes {
40% {
fill: $tanuki-yellow;
}
60% {
fill: lighten($tanuki-yellow, 25%);
}
}
}
}
}
\ No newline at end of file
...@@ -9,22 +9,6 @@ ...@@ -9,22 +9,6 @@
border-radius: $radius; border-radius: $radius;
} }
@mixin border-radius-left($radius) {
@include border-radius($radius 0 0 $radius)
}
@mixin border-radius-right($radius) {
@include border-radius(0 0 $radius $radius)
}
@mixin linear-gradient($from, $to) {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to));
background-image: -webkit-linear-gradient($from, $to);
background-image: -moz-linear-gradient($from, $to);
background-image: -ms-linear-gradient($from, $to);
background-image: -o-linear-gradient($from, $to);
}
@mixin transition($transition) { @mixin transition($transition) {
-webkit-transition: $transition; -webkit-transition: $transition;
-moz-transition: $transition; -moz-transition: $transition;
...@@ -38,14 +22,6 @@ ...@@ -38,14 +22,6 @@
* Mixins with fixed values * Mixins with fixed values
*/ */
@mixin shade {
@include box-shadow(0 0 3px #ddd);
}
@mixin solid-shade {
@include box-shadow(0 0 0 3px #f1f1f1);
}
@mixin str-truncated($max_width: 82%) { @mixin str-truncated($max_width: 82%) {
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
...@@ -94,23 +70,6 @@ ...@@ -94,23 +70,6 @@
} }
} }
@mixin input-big {
height: 36px;
padding: 5px 10px;
font-size: 16px;
line-height: 24px;
color: #7f8fa4;
background-color: #fff;
border-color: #e7e9ed;
}
@mixin btn-big {
height: 36px;
padding: 5px 10px;
font-size: 16px;
line-height: 24px;
}
@mixin bulleted-list { @mixin bulleted-list {
> ul { > ul {
list-style-type: disc; list-style-type: disc;
...@@ -129,3 +88,8 @@ ...@@ -129,3 +88,8 @@
color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.3);
background: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.1);
} }
@mixin webkit-prefix($property, $value) {
#{'-webkit-' + $property}: $value;
#{$property}: $value;
}
@mixin fade($gradient-direction, $rgba, $gradient-color) { @mixin fade($gradient-direction, $gradient-color) {
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
z-index: 2; z-index: 2;
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
height: 30px; height: 30px;
transition-duration: .3s; transition-duration: .3s;
-webkit-transform: translateZ(0); -webkit-transform: translateZ(0);
background: -webkit-linear-gradient($gradient-direction, $rgba, $gradient-color 45%); background: -webkit-linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
background: -o-linear-gradient($gradient-direction, $rgba, $gradient-color 45%); background: -o-linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
background: -moz-linear-gradient($gradient-direction, $rgba, $gradient-color 45%); background: -moz-linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
background: linear-gradient($gradient-direction, $rgba, $gradient-color 45%); background: linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
&.scrolling { &.scrolling {
visibility: visible; visibility: visible;
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
.badge { .badge {
font-weight: normal; font-weight: normal;
background-color: #eee; background-color: #eee;
color: #78a; color: $btn-transparent-color;
vertical-align: baseline; vertical-align: baseline;
} }
} }
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
> .dropdown { > .dropdown {
margin-right: $gl-padding-top; margin-right: $gl-padding-top;
display: inline-block; display: inline-block;
vertical-align: top;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
...@@ -335,10 +336,6 @@ ...@@ -335,10 +336,6 @@
} }
} }
.badge {
color: $gl-icon-color;
}
&:hover { &:hover {
a, i { a, i {
color: $black; color: $black;
...@@ -356,7 +353,7 @@ ...@@ -356,7 +353,7 @@
} }
.fade-right { .fade-right {
@include fade(left, rgba(255, 255, 255, 0.4), $background-color); @include fade(left, $background-color);
right: -5px; right: -5px;
.fa { .fa {
...@@ -365,7 +362,7 @@ ...@@ -365,7 +362,7 @@
} }
.fade-left { .fade-left {
@include fade(right, rgba(255, 255, 255, 0.4), $background-color); @include fade(right, $background-color);
left: -5px; left: -5px;
.fa { .fa {
...@@ -376,6 +373,7 @@ ...@@ -376,6 +373,7 @@
&.sub-nav-scroll { &.sub-nav-scroll {
.fade-right { .fade-right {
@include fade(left, $dark-background-color);
right: 0; right: 0;
.fa { .fa {
...@@ -384,6 +382,7 @@ ...@@ -384,6 +382,7 @@
} }
.fade-left { .fade-left {
@include fade(right, $dark-background-color);
left: 0; left: 0;
.fa { .fa {
...@@ -400,7 +399,7 @@ ...@@ -400,7 +399,7 @@
@include scrolling-links(); @include scrolling-links();
.fade-right { .fade-right {
@include fade(left, rgba(255, 255, 255, 0.4), $white-light); @include fade(left, $white-light);
right: -5px; right: -5px;
.fa { .fa {
...@@ -409,7 +408,7 @@ ...@@ -409,7 +408,7 @@
} }
.fade-left { .fade-left {
@include fade(right, rgba(255, 255, 255, 0.4), $white-light); @include fade(right, $white-light);
left: -5px; left: -5px;
.fa { .fa {
......
...@@ -100,6 +100,10 @@ ...@@ -100,6 +100,10 @@
line-height: inherit; line-height: inherit;
} }
} }
.label-default {
color: $btn-transparent-color;
}
} }
.abuse-reports { .abuse-reports {
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
border-top: 1px solid $border-color; border-top: 1px solid $border-color;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
max-height: 300px; max-height: 300px;
overflow: scroll; overflow: auto;
svg { svg {
position: relative; position: relative;
......
...@@ -115,11 +115,8 @@ ...@@ -115,11 +115,8 @@
} }
&.commits-stat { &.commits-stat {
margin-top: 3px;
display: block; display: block;
padding: 3px; padding: 0 3px 0 0;
padding-left: 0;
&:hover { &:hover {
background: none; background: none;
} }
......
i.icon-gitorious {
display: inline-block;
background-position: 0 0;
background-size: contain;
background-repeat: no-repeat;
}
i.icon-gitorious-small {
background-image: image-url('gitorious-logo-blue.png');
width: 13px;
height: 13px;
}
i.icon-gitorious-big {
background-image: image-url('gitorious-logo-black.png');
width: 18px;
height: 18px;
}
.import-jobs-from-col, .import-jobs-from-col,
.import-jobs-to-col { .import-jobs-to-col {
width: 40%; width: 40%;
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
.builds { .builds {
.table-holder { .table-holder {
overflow-x: scroll; overflow-x: auto;
} }
} }
...@@ -375,6 +375,16 @@ ...@@ -375,6 +375,16 @@
} }
} }
.mr-version-switch {
background: $background-color;
padding: $gl-btn-padding;
color: $gl-placeholder-color;
a.btn-link {
color: $gl-dark-link-color;
}
}
.merge-request-details { .merge-request-details {
.title { .title {
......
...@@ -281,19 +281,13 @@ ul.notes { ...@@ -281,19 +281,13 @@ ul.notes {
font-size: 17px; font-size: 17px;
} }
&.js-note-delete { &:hover {
i { .danger-highlight {
&:hover { color: $gl-text-red;
color: $gl-text-red;
}
} }
}
&.js-note-edit { .link-highlight {
i { color: $gl-link-color;
&:hover {
color: $gl-link-color;
}
} }
} }
} }
......
...@@ -254,7 +254,6 @@ ...@@ -254,7 +254,6 @@
width: 100%; width: 100%;
overflow: auto; overflow: auto;
white-space: nowrap; white-space: nowrap;
max-height: 500px;
transition: max-height 0.3s, padding 0.3s; transition: max-height 0.3s, padding 0.3s;
&.graph-collapsed { &.graph-collapsed {
...@@ -265,7 +264,6 @@ ...@@ -265,7 +264,6 @@
.pipeline-visualization { .pipeline-visualization {
position: relative; position: relative;
min-width: 1220px;
ul { ul {
padding: 0; padding: 0;
...@@ -275,7 +273,7 @@ ...@@ -275,7 +273,7 @@
.stage-column { .stage-column {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin-right: 50px; margin-right: 65px;
li { li {
list-style: none; list-style: none;
...@@ -321,6 +319,14 @@ ...@@ -321,6 +319,14 @@
a { a {
color: $layout-link-gray; color: $layout-link-gray;
text-decoration: none;
&:hover {
.ci-status-text {
text-decoration: underline;
}
}
} }
} }
...@@ -336,9 +342,9 @@ ...@@ -336,9 +342,9 @@
content: ''; content: '';
position: absolute; position: absolute;
top: 50%; top: 50%;
right: -54px; right: -69px;
border-top: 2px solid $border-color; border-top: 2px solid $border-color;
width: 54px; width: 69px;
height: 1px; height: 1px;
} }
} }
...@@ -358,22 +364,25 @@ ...@@ -358,22 +364,25 @@
&::after { &::after {
right: -20px; right: -20px;
border-right: 2px solid $border-color; border-right: 2px solid $border-color;
border-radius: 0 0 50px; border-radius: 0 0 15px;
} }
// Left connecting curves // Left connecting curves
&::before { &::before {
left: -20px; left: -20px;
border-left: 2px solid $border-color; border-left: 2px solid $border-color;
border-radius: 0 0 0 50px; border-radius: 0 0 0 15px;
} }
} }
// Connect second build to first build with smaller curved line // Connect second build to first build with smaller curved line
&:nth-child(2) { &:nth-child(2) {
&::after, &::before { &::after, &::before {
height: 45px; height: 29px;
top: -26px; top: -10px;
}
.curve {
display: block;
} }
} }
} }
...@@ -392,6 +401,12 @@ ...@@ -392,6 +401,12 @@
border: none; border: none;
} }
} }
// Remove opposite curve
.curve {
&::before {
display: none;
}
}
} }
} }
...@@ -403,6 +418,39 @@ ...@@ -403,6 +418,39 @@
border: none; border: none;
} }
} }
// Remove opposite curve
.curve {
&::after {
display: none;
}
}
}
}
// Curve first child connecting lines in opposite direction
.curve {
display: none;
&::before,
&::after {
content: '';
width: 21px;
height: 25px;
position: absolute;
top: -28.5px;
border-top: 2px solid $border-color;
}
&::after {
left: -39px;
border-right: 2px solid $border-color;
border-radius: 0 15px;
}
&::before {
right: -39px;
border-left: 2px solid $border-color;
border-radius: 15px 0 0;
} }
} }
} }
......
...@@ -29,7 +29,8 @@ class Admin::SystemInfoController < Admin::ApplicationController ...@@ -29,7 +29,8 @@ class Admin::SystemInfoController < Admin::ApplicationController
] ]
def show def show
system_info = Vmstat.snapshot @cpus = Vmstat.cpu rescue nil
@memory = Vmstat.memory rescue nil
mounts = Sys::Filesystem.mounts mounts = Sys::Filesystem.mounts
@disks = [] @disks = []
...@@ -50,10 +51,5 @@ class Admin::SystemInfoController < Admin::ApplicationController ...@@ -50,10 +51,5 @@ class Admin::SystemInfoController < Admin::ApplicationController
rescue Sys::Filesystem::Error rescue Sys::Filesystem::Error
end end
end end
@cpus = system_info.cpus.length
@mem_used = system_info.memory.active_bytes
@mem_total = system_info.memory.total_bytes
end end
end end
...@@ -25,7 +25,7 @@ class ApplicationController < ActionController::Base ...@@ -25,7 +25,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception protect_from_forgery with: :exception
helper_method :abilities, :can?, :current_application_settings helper_method :abilities, :can?, :current_application_settings
helper_method :import_sources_enabled?, :github_import_enabled?, :github_import_configured?, :gitlab_import_enabled?, :gitlab_import_configured?, :bitbucket_import_enabled?, :bitbucket_import_configured?, :gitorious_import_enabled?, :google_code_import_enabled?, :fogbugz_import_enabled?, :git_import_enabled?, :gitlab_project_import_enabled? helper_method :import_sources_enabled?, :github_import_enabled?, :github_import_configured?, :gitlab_import_enabled?, :gitlab_import_configured?, :bitbucket_import_enabled?, :bitbucket_import_configured?, :google_code_import_enabled?, :fogbugz_import_enabled?, :git_import_enabled?, :gitlab_project_import_enabled?
rescue_from Encoding::CompatibilityError do |exception| rescue_from Encoding::CompatibilityError do |exception|
log_exception(exception) log_exception(exception)
...@@ -296,10 +296,6 @@ class ApplicationController < ActionController::Base ...@@ -296,10 +296,6 @@ class ApplicationController < ActionController::Base
Gitlab::OAuth::Provider.enabled?(:bitbucket) && Gitlab::BitbucketImport.public_key.present? Gitlab::OAuth::Provider.enabled?(:bitbucket) && Gitlab::BitbucketImport.public_key.present?
end end
def gitorious_import_enabled?
current_application_settings.import_sources.include?('gitorious')
end
def google_code_import_enabled? def google_code_import_enabled?
current_application_settings.import_sources.include?('google_code') current_application_settings.import_sources.include?('google_code')
end end
......
class Import::GitoriousController < Import::BaseController
before_action :verify_gitorious_import_enabled
def new
redirect_to client.authorize_url(callback_import_gitorious_url)
end
def callback
session[:gitorious_repos] = params[:repos]
redirect_to status_import_gitorious_path
end
def status
@repos = client.repos
@already_added_projects = current_user.created_projects.where(import_type: "gitorious")
already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.reject! { |repo| already_added_projects_names.include? repo.full_name }
end
def jobs
jobs = current_user.created_projects.where(import_type: "gitorious").to_json(only: [:id, :import_status])
render json: jobs
end
def create
@repo_id = params[:repo_id]
repo = client.repo(@repo_id)
@target_namespace = params[:new_namespace].presence || repo.namespace
@project_name = repo.name
namespace = get_or_create_namespace || (render and return)
@project = Gitlab::GitoriousImport::ProjectCreator.new(repo, namespace, current_user).execute
end
private
def client
@client ||= Gitlab::GitoriousImport::Client.new(session[:gitorious_repos])
end
def verify_gitorious_import_enabled
render_404 unless gitorious_import_enabled?
end
end
...@@ -4,7 +4,7 @@ class Projects::AvatarsController < Projects::ApplicationController ...@@ -4,7 +4,7 @@ class Projects::AvatarsController < Projects::ApplicationController
before_action :authorize_admin_project!, only: [:destroy] before_action :authorize_admin_project!, only: [:destroy]
def show def show
@blob = @repository.blob_at_branch('master', @project.avatar_in_git) @blob = @repository.blob_at_branch(@repository.root_ref, @project.avatar_in_git)
if @blob if @blob
headers['X-Content-Type-Options'] = 'nosniff' headers['X-Content-Type-Options'] = 'nosniff'
......
...@@ -218,7 +218,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -218,7 +218,7 @@ class Projects::IssuesController < Projects::ApplicationController
if action_name == 'new' if action_name == 'new'
redirect_to external.new_issue_path redirect_to external.new_issue_path
else else
redirect_to external.issues_url redirect_to external.project_path
end end
end end
......
...@@ -84,12 +84,22 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -84,12 +84,22 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def diffs def diffs
apply_diff_view_cookie! apply_diff_view_cookie!
@merge_request_diff = @merge_request.merge_request_diff @merge_request_diff =
if params[:diff_id]
@merge_request.merge_request_diffs.find(params[:diff_id])
else
@merge_request.merge_request_diff
end
respond_to do |format| respond_to do |format|
format.html { define_discussion_vars } format.html { define_discussion_vars }
format.json do format.json do
@diffs = @merge_request.diffs(diff_options) unless @merge_request_diff.latest?
# Disable comments if browsing older version of the diff
@diff_notes_disabled = true
end
@diffs = @merge_request_diff.diffs(diff_options)
render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") } render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") }
end end
......
...@@ -66,10 +66,10 @@ module CiStatusHelper ...@@ -66,10 +66,10 @@ module CiStatusHelper
Ci::Runner.shared.blank? Ci::Runner.shared.blank?
end end
def render_status_with_link(type, status, path = nil, tooltip_placement: 'auto left', cssclass: '') def render_status_with_link(type, status, path = nil, tooltip_placement: 'auto left', cssclass: '', container: 'body')
klass = "ci-status-link ci-status-icon-#{status.dasherize} #{cssclass}" klass = "ci-status-link ci-status-icon-#{status.dasherize} #{cssclass}"
title = "#{type.titleize}: #{ci_label_for_status(status)}" title = "#{type.titleize}: #{ci_label_for_status(status)}"
data = { toggle: 'tooltip', placement: tooltip_placement } data = { toggle: 'tooltip', placement: tooltip_placement, container: container }
if path if path
link_to ci_icon_for_status(status), path, link_to ci_icon_for_status(status), path,
......
...@@ -44,7 +44,7 @@ module SearchHelper ...@@ -44,7 +44,7 @@ module SearchHelper
def help_autocomplete def help_autocomplete
[ [
{ category: "Help", label: "API Help", url: help_page_path("api/README") }, { category: "Help", label: "API Help", url: help_page_path("api/README") },
{ category: "Help", label: "Markdown Help", url: help_page_path("markdown/markdown") }, { category: "Help", label: "Markdown Help", url: help_page_path("user/markdown") },
{ category: "Help", label: "Permissions Help", url: help_page_path("user/permissions") }, { category: "Help", label: "Permissions Help", url: help_page_path("user/permissions") },
{ category: "Help", label: "Public Access Help", url: help_page_path("public_access/public_access") }, { category: "Help", label: "Public Access Help", url: help_page_path("public_access/public_access") },
{ category: "Help", label: "Rake Tasks Help", url: help_page_path("raketasks/README") }, { category: "Help", label: "Rake Tasks Help", url: help_page_path("raketasks/README") },
......
...@@ -154,7 +154,7 @@ class ApplicationSetting < ActiveRecord::Base ...@@ -154,7 +154,7 @@ class ApplicationSetting < ActiveRecord::Base
default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'], default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'],
default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'], default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'],
domain_whitelist: Settings.gitlab['domain_whitelist'], domain_whitelist: Settings.gitlab['domain_whitelist'],
import_sources: %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project], import_sources: %w[github bitbucket gitlab google_code fogbugz git gitlab_project],
shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'], shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'],
max_artifacts_size: Settings.artifacts['max_size'], max_artifacts_size: Settings.artifacts['max_size'],
require_two_factor_authentication: false, require_two_factor_authentication: false,
......
module Ci module Ci
class Pipeline < ActiveRecord::Base class Pipeline < ActiveRecord::Base
extend Ci::Model extend Ci::Model
include Statuseable include HasStatus
self.table_name = 'ci_commits' self.table_name = 'ci_commits'
...@@ -83,7 +83,7 @@ module Ci ...@@ -83,7 +83,7 @@ module Ci
end end
def stages_with_latest_statuses def stages_with_latest_statuses
statuses.latest.order(:stage_idx).group_by(&:stage) statuses.latest.includes(project: :namespace).order(:stage_idx).group_by(&:stage)
end end
def project_id def project_id
......
class CommitStatus < ActiveRecord::Base class CommitStatus < ActiveRecord::Base
include Statuseable include HasStatus
include Importable include Importable
self.table_name = 'ci_builds' self.table_name = 'ci_builds'
...@@ -25,6 +25,8 @@ class CommitStatus < ActiveRecord::Base ...@@ -25,6 +25,8 @@ class CommitStatus < ActiveRecord::Base
scope :retried, -> { where.not(id: latest) } scope :retried, -> { where.not(id: latest) }
scope :ordered, -> { order(:name) } scope :ordered, -> { order(:name) }
scope :ignored, -> { where(allow_failure: true, status: [:failed, :canceled]) } scope :ignored, -> { where(allow_failure: true, status: [:failed, :canceled]) }
scope :latest_ci_stages, -> { latest.ordered.includes(project: :namespace) }
scope :retried_ci_stages, -> { retried.ordered.includes(project: :namespace) }
state_machine :status do state_machine :status do
event :enqueue do event :enqueue do
......
module Statuseable module HasStatus
extend ActiveSupport::Concern extend ActiveSupport::Concern
AVAILABLE_STATUSES = %w[created pending running success failed canceled skipped] AVAILABLE_STATUSES = %w[created pending running success failed canceled skipped]
......
...@@ -11,16 +11,18 @@ class MergeRequest < ActiveRecord::Base ...@@ -11,16 +11,18 @@ class MergeRequest < ActiveRecord::Base
belongs_to :source_project, foreign_key: :source_project_id, class_name: "Project" belongs_to :source_project, foreign_key: :source_project_id, class_name: "Project"
belongs_to :merge_user, class_name: "User" belongs_to :merge_user, class_name: "User"
has_one :merge_request_diff, dependent: :destroy
has_many :approvals, dependent: :destroy has_many :approvals, dependent: :destroy
has_many :approvers, as: :target, dependent: :destroy has_many :approvers, as: :target, dependent: :destroy
has_many :merge_request_diffs, dependent: :destroy
has_one :merge_request_diff,
-> { order('merge_request_diffs.id DESC') }
has_many :events, as: :target, dependent: :destroy has_many :events, as: :target, dependent: :destroy
serialize :merge_params, Hash serialize :merge_params, Hash
after_create :create_merge_request_diff, unless: :importing? after_create :ensure_merge_request_diff, unless: :importing?
after_update :update_merge_request_diff after_update :reload_diff_if_branch_changed
delegate :commits, :real_size, to: :merge_request_diff, prefix: nil delegate :commits, :real_size, to: :merge_request_diff, prefix: nil
...@@ -175,10 +177,10 @@ class MergeRequest < ActiveRecord::Base ...@@ -175,10 +177,10 @@ class MergeRequest < ActiveRecord::Base
end end
def diffs(diff_options = nil) def diffs(diff_options = nil)
if self.compare if compare
self.compare.diffs(diff_options) compare.diffs(diff_options)
else else
Gitlab::Diff::FileCollection::MergeRequest.new(self, diff_options: diff_options) merge_request_diff.diffs(diff_options)
end end
end end
...@@ -189,8 +191,8 @@ class MergeRequest < ActiveRecord::Base ...@@ -189,8 +191,8 @@ class MergeRequest < ActiveRecord::Base
def diff_base_commit def diff_base_commit
if persisted? if persisted?
merge_request_diff.base_commit merge_request_diff.base_commit
elsif diff_start_commit && diff_head_commit else
self.target_project.merge_base_commit(diff_start_sha, diff_head_sha) branch_merge_base_commit
end end
end end
...@@ -251,6 +253,15 @@ class MergeRequest < ActiveRecord::Base ...@@ -251,6 +253,15 @@ class MergeRequest < ActiveRecord::Base
target_project.repository.commit(target_branch) if target_branch_ref target_project.repository.commit(target_branch) if target_branch_ref
end end
def branch_merge_base_commit
start_sha = target_branch_sha
head_sha = source_branch_sha
if start_sha && head_sha
target_project.merge_base_commit(start_sha, head_sha)
end
end
def target_branch_sha def target_branch_sha
@target_branch_sha || target_branch_head.try(:sha) @target_branch_sha || target_branch_head.try(:sha)
end end
...@@ -272,16 +283,16 @@ class MergeRequest < ActiveRecord::Base ...@@ -272,16 +283,16 @@ class MergeRequest < ActiveRecord::Base
# Return diff_refs instance trying to not touch the git repository # Return diff_refs instance trying to not touch the git repository
def diff_sha_refs def diff_sha_refs
if merge_request_diff && merge_request_diff.diff_refs_by_sha? if merge_request_diff && merge_request_diff.diff_refs_by_sha?
return Gitlab::Diff::DiffRefs.new( merge_request_diff.diff_refs
base_sha: merge_request_diff.base_commit_sha,
start_sha: merge_request_diff.start_commit_sha,
head_sha: merge_request_diff.head_commit_sha
)
else else
diff_refs diff_refs
end end
end end
def branch_merge_base_sha
branch_merge_base_commit.try(:sha)
end
def validate_branches def validate_branches
if target_project == source_project && target_branch == source_branch if target_project == source_project && target_branch == source_branch
errors.add :branch_conflict, "You can not use same project/branch for source and target" errors.add :branch_conflict, "You can not use same project/branch for source and target"
...@@ -330,21 +341,31 @@ class MergeRequest < ActiveRecord::Base ...@@ -330,21 +341,31 @@ class MergeRequest < ActiveRecord::Base
end end
end end
def update_merge_request_diff def ensure_merge_request_diff
merge_request_diff || create_merge_request_diff
end
def create_merge_request_diff
merge_request_diffs.create
reload_merge_request_diff
end
def reload_merge_request_diff
merge_request_diff(true)
end
def reload_diff_if_branch_changed
if source_branch_changed? || target_branch_changed? if source_branch_changed? || target_branch_changed?
reload_diff reload_diff
end end
end end
def reload_diff def reload_diff
return unless merge_request_diff && open? return unless open?
old_diff_refs = self.diff_refs old_diff_refs = self.diff_refs
create_merge_request_diff
merge_request_diff.reload_content
MergeRequests::MergeRequestDiffCacheService.new.execute(self) MergeRequests::MergeRequestDiffCacheService.new.execute(self)
new_diff_refs = self.diff_refs new_diff_refs = self.diff_refs
update_diff_notes_positions( update_diff_notes_positions(
...@@ -904,8 +925,12 @@ class MergeRequest < ActiveRecord::Base ...@@ -904,8 +925,12 @@ class MergeRequest < ActiveRecord::Base
return @conflicts_can_be_resolved_in_ui = false unless has_complete_diff_refs? return @conflicts_can_be_resolved_in_ui = false unless has_complete_diff_refs?
begin begin
@conflicts_can_be_resolved_in_ui = conflicts.files.each(&:lines) # Try to parse each conflict. If the MR's mergeable status hasn't been updated,
rescue Gitlab::Conflict::Parser::ParserError, Gitlab::Conflict::FileCollection::ConflictSideMissing # ensure that we don't say there are conflicts to resolve when there are no conflict
# files.
conflicts.files.each(&:lines)
@conflicts_can_be_resolved_in_ui = conflicts.files.length > 0
rescue Rugged::OdbError, Gitlab::Conflict::Parser::ParserError, Gitlab::Conflict::FileCollection::ConflictSideMissing
@conflicts_can_be_resolved_in_ui = false @conflicts_can_be_resolved_in_ui = false
end end
end end
......
...@@ -8,8 +8,6 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -8,8 +8,6 @@ class MergeRequestDiff < ActiveRecord::Base
belongs_to :merge_request belongs_to :merge_request
delegate :source_branch_sha, :target_branch_sha, :target_branch, :source_branch, to: :merge_request, prefix: nil
state_machine :state, initial: :empty do state_machine :state, initial: :empty do
state :collected state :collected
state :overflow state :overflow
...@@ -24,12 +22,47 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -24,12 +22,47 @@ class MergeRequestDiff < ActiveRecord::Base
serialize :st_commits serialize :st_commits
serialize :st_diffs serialize :st_diffs
after_create :reload_content, unless: :importing? # All diff information is collected from repository after object is created.
after_save :keep_around_commits, unless: :importing? # It allows you to override variables like head_commit_sha before getting diff.
after_create :save_git_content, unless: :importing?
def self.select_without_diff
select(column_names - ['st_diffs'])
end
def reload_content # Collect information about commits and diff from repository
# and save it to the database as serialized data
def save_git_content
ensure_commits_sha
save_commits
reload_commits reload_commits
reload_diffs save_diffs
keep_around_commits
end
def ensure_commits_sha
merge_request.fetch_ref
self.start_commit_sha ||= merge_request.target_branch_sha
self.head_commit_sha ||= merge_request.source_branch_sha
self.base_commit_sha ||= find_base_sha
save
end
# Override head_commit_sha to keep compatibility with merge request diff
# created before version 8.4 that does not store head_commit_sha in separate db field.
def head_commit_sha
if persisted? && super.nil?
last_commit.try(:sha)
else
super
end
end
# This method will rely on repository branch sha
# in case start_commit_sha is nil. Its necesarry for old merge request diff
# created before version 8.4 to work
def safe_start_commit_sha
start_commit_sha || merge_request.target_branch_sha
end end
def size def size
...@@ -38,14 +71,11 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -38,14 +71,11 @@ class MergeRequestDiff < ActiveRecord::Base
def raw_diffs(options = {}) def raw_diffs(options = {})
if options[:ignore_whitespace_change] if options[:ignore_whitespace_change]
@raw_diffs_no_whitespace ||= begin @diffs_no_whitespace ||=
compare = Gitlab::Git::Compare.new( Gitlab::Git::Compare.new(
repository.raw_repository, repository.raw_repository,
self.start_commit_sha || self.target_branch_sha, safe_start_commit_sha,
self.head_commit_sha || self.source_branch_sha, head_commit_sha).diffs(options)
)
compare.diffs(options)
end
else else
@raw_diffs ||= {} @raw_diffs ||= {}
@raw_diffs[options] ||= load_diffs(st_diffs, options) @raw_diffs[options] ||= load_diffs(st_diffs, options)
...@@ -56,6 +86,11 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -56,6 +86,11 @@ class MergeRequestDiff < ActiveRecord::Base
@commits ||= load_commits(st_commits || []) @commits ||= load_commits(st_commits || [])
end end
def reload_commits
@commits = nil
commits
end
def last_commit def last_commit
commits.first commits.first
end end
...@@ -65,55 +100,60 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -65,55 +100,60 @@ class MergeRequestDiff < ActiveRecord::Base
end end
def base_commit def base_commit
return unless self.base_commit_sha return unless base_commit_sha
project.commit(self.base_commit_sha) project.commit(base_commit_sha)
end end
def start_commit def start_commit
return unless self.start_commit_sha return unless start_commit_sha
project.commit(self.start_commit_sha) project.commit(start_commit_sha)
end end
def head_commit def head_commit
return last_commit unless self.head_commit_sha return unless head_commit_sha
project.commit(head_commit_sha)
end
def diff_refs
return unless start_commit_sha || base_commit_sha
project.commit(self.head_commit_sha) Gitlab::Diff::DiffRefs.new(
base_sha: base_commit_sha,
start_sha: start_commit_sha,
head_sha: head_commit_sha
)
end end
def diff_refs_by_sha? def diff_refs_by_sha?
base_commit_sha? && head_commit_sha? && start_commit_sha? base_commit_sha? && head_commit_sha? && start_commit_sha?
end end
def diffs(diff_options = nil)
Gitlab::Diff::FileCollection::MergeRequestDiff.new(self, diff_options: diff_options)
end
def project
merge_request.target_project
end
def compare def compare
@compare ||= @compare ||=
begin Gitlab::Git::Compare.new(
# Update ref for merge request repository.raw_repository,
merge_request.fetch_ref safe_start_commit_sha,
head_commit_sha
)
end
Gitlab::Git::Compare.new( def latest?
repository.raw_repository, self == merge_request.merge_request_diff
self.target_branch_sha,
self.source_branch_sha
)
end
end end
private private
# Collect array of Git::Commit objects
# between target and source branches
def unmerged_commits
commits = compare.commits
if commits.present?
commits = Commit.decorate(commits, merge_request.source_project).reverse
end
commits
end
def dump_commits(commits) def dump_commits(commits)
commits.map(&:to_hash) commits.map(&:to_hash)
end end
...@@ -122,26 +162,21 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -122,26 +162,21 @@ class MergeRequestDiff < ActiveRecord::Base
array.map { |hash| Commit.new(Gitlab::Git::Commit.new(hash), merge_request.source_project) } array.map { |hash| Commit.new(Gitlab::Git::Commit.new(hash), merge_request.source_project) }
end end
# Reload all commits related to current merge request from repo # Load all commits related to current merge request diff from repo
# and save it as array of hashes in st_commits db field # and save it as array of hashes in st_commits db field
def reload_commits def save_commits
new_attributes = {} new_attributes = {}
commit_objects = unmerged_commits commits = compare.commits
if commit_objects.present? if commits.present?
new_attributes[:st_commits] = dump_commits(commit_objects) commits = Commit.decorate(commits, merge_request.source_project).reverse
new_attributes[:st_commits] = dump_commits(commits)
end end
update_columns_serialized(new_attributes) update_columns_serialized(new_attributes)
end end
# Collect array of Git::Diff objects
# between target and source branches
def unmerged_diffs
compare.diffs(Commit.max_diff_options)
end
def dump_diffs(diffs) def dump_diffs(diffs)
if diffs.respond_to?(:map) if diffs.respond_to?(:map)
diffs.map(&:to_hash) diffs.map(&:to_hash)
...@@ -162,16 +197,16 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -162,16 +197,16 @@ class MergeRequestDiff < ActiveRecord::Base
end end
end end
# Reload diffs between branches related to current merge request from repo # Load diffs between branches related to current merge request diff from repo
# and save it as array of hashes in st_diffs db field # and save it as array of hashes in st_diffs db field
def reload_diffs def save_diffs
new_attributes = {} new_attributes = {}
new_diffs = [] new_diffs = []
if commits.size.zero? if commits.size.zero?
new_attributes[:state] = :empty new_attributes[:state] = :empty
else else
diff_collection = unmerged_diffs diff_collection = compare.diffs(Commit.max_diff_options)
if diff_collection.overflow? if diff_collection.overflow?
# Set our state to 'overflow' to make the #empty? and #collected? # Set our state to 'overflow' to make the #empty? and #collected?
...@@ -188,32 +223,17 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -188,32 +223,17 @@ class MergeRequestDiff < ActiveRecord::Base
end end
new_attributes[:st_diffs] = new_diffs new_attributes[:st_diffs] = new_diffs
new_attributes[:start_commit_sha] = self.target_branch_sha
new_attributes[:head_commit_sha] = self.source_branch_sha
new_attributes[:base_commit_sha] = branch_base_sha
update_columns_serialized(new_attributes) update_columns_serialized(new_attributes)
keep_around_commits
end
def project
merge_request.target_project
end end
def repository def repository
project.repository project.repository
end end
def branch_base_commit def find_base_sha
return unless self.source_branch_sha && self.target_branch_sha return unless head_commit_sha && start_commit_sha
project.merge_base_commit(self.source_branch_sha, self.target_branch_sha)
end
def branch_base_sha project.merge_base_commit(head_commit_sha, start_commit_sha).try(:sha)
branch_base_commit.try(:sha)
end end
def utf8_st_diffs def utf8_st_diffs
...@@ -248,8 +268,8 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -248,8 +268,8 @@ class MergeRequestDiff < ActiveRecord::Base
end end
def keep_around_commits def keep_around_commits
repository.keep_around(target_branch_sha) repository.keep_around(start_commit_sha)
repository.keep_around(source_branch_sha) repository.keep_around(head_commit_sha)
repository.keep_around(branch_base_sha) repository.keep_around(base_commit_sha)
end end
end end
...@@ -1142,6 +1142,7 @@ class Project < ActiveRecord::Base ...@@ -1142,6 +1142,7 @@ class Project < ActiveRecord::Base
"refs/heads/#{branch}", "refs/heads/#{branch}",
force: true) force: true)
repository.copy_gitattributes(branch) repository.copy_gitattributes(branch)
repository.expire_avatar_cache(branch)
reload_default_branch reload_default_branch
end end
......
...@@ -1278,7 +1278,7 @@ class Repository ...@@ -1278,7 +1278,7 @@ class Repository
@avatar ||= cache.fetch(:avatar) do @avatar ||= cache.fetch(:avatar) do
AVATAR_FILES.find do |file| AVATAR_FILES.find do |file|
blob_at_branch('master', file) blob_at_branch(root_ref, file)
end end
end end
end end
......
...@@ -36,7 +36,12 @@ module Boards ...@@ -36,7 +36,12 @@ module Boards
end end
def set_state def set_state
params[:state] = list.done? ? 'closed' : 'opened' params[:state] =
case list.list_type.to_sym
when :backlog then 'opened'
when :done then 'closed'
else 'all'
end
end end
def board_label_ids def board_label_ids
......
...@@ -34,7 +34,7 @@ module Ci ...@@ -34,7 +34,7 @@ module Ci
end end
def process_build(build, current_status) def process_build(build, current_status)
return false unless Statuseable::COMPLETED_STATUSES.include?(current_status) return false unless HasStatus::COMPLETED_STATUSES.include?(current_status)
if valid_statuses_for_when(build.when).include?(current_status) if valid_statuses_for_when(build.when).include?(current_status)
build.enqueue build.enqueue
......
...@@ -269,11 +269,11 @@ module SystemNoteService ...@@ -269,11 +269,11 @@ module SystemNoteService
# #
# Example Note text: # Example Note text:
# #
# "mentioned in #1" # "Mentioned in #1"
# #
# "mentioned in !2" # "Mentioned in !2"
# #
# "mentioned in 54f7727c" # "Mentioned in 54f7727c"
# #
# See cross_reference_note_content. # See cross_reference_note_content.
# #
...@@ -308,7 +308,7 @@ module SystemNoteService ...@@ -308,7 +308,7 @@ module SystemNoteService
# Check if a cross-reference is disallowed # Check if a cross-reference is disallowed
# #
# This method prevents adding a "mentioned in !1" note on every single commit # This method prevents adding a "Mentioned in !1" note on every single commit
# in a merge request. Additionally, it prevents the creation of references to # in a merge request. Additionally, it prevents the creation of references to
# external issues (which would fail). # external issues (which would fail).
# #
...@@ -433,7 +433,7 @@ module SystemNoteService ...@@ -433,7 +433,7 @@ module SystemNoteService
end end
def cross_reference_note_prefix def cross_reference_note_prefix
'mentioned in ' 'Mentioned in '
end end
def cross_reference_note_content(gfm_reference) def cross_reference_note_content(gfm_reference)
......
...@@ -156,7 +156,8 @@ class TodoService ...@@ -156,7 +156,8 @@ class TodoService
def mark_todos_as_done_by_ids(ids, current_user) def mark_todos_as_done_by_ids(ids, current_user)
todos = current_user.todos.where(id: ids) todos = current_user.todos.where(id: ids)
marked_todos = todos.update_all(state: :done) # Only return those that are not really on that state
marked_todos = todos.where.not(state: :done).update_all(state: :done)
current_user.update_todos_count_cache current_user.update_todos_count_cache
marked_todos marked_todos
end end
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.col-sm-10 .col-sm-10
= f.text_area :description, class: "form-control", rows: 10 = f.text_area :description, class: "form-control", rows: 10
.hint .hint
Description parsed with #{link_to "GitLab Flavored Markdown", help_page_path('markdown/markdown'), target: '_blank'}. Description parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
.form-group .form-group
= f.label :logo, class: 'control-label' = f.label :logo, class: 'control-label'
.col-sm-10 .col-sm-10
......
.nav-links.sub-nav .scrolling-tabs-container.sub-nav-scroll
%ul{ class: (container_class) } = render 'shared/nav_scroll'
= nav_link(controller: :system_info) do .nav-links.sub-nav.scrolling-tabs
= link_to admin_system_info_path, title: 'System Info' do %ul{ class: (container_class) }
%span = nav_link(controller: :system_info) do
System Info = link_to admin_system_info_path, title: 'System Info' do
= nav_link(controller: :background_jobs) do %span
= link_to admin_background_jobs_path, title: 'Background Jobs' do System Info
%span = nav_link(controller: :background_jobs) do
Background Jobs = link_to admin_background_jobs_path, title: 'Background Jobs' do
= nav_link(controller: :logs) do %span
= link_to admin_logs_path, title: 'Logs' do Background Jobs
%span = nav_link(controller: :logs) do
Logs = link_to admin_logs_path, title: 'Logs' do
= nav_link(controller: :health_check) do %span
= link_to admin_health_check_path, title: 'Health Check' do Logs
%span = nav_link(controller: :health_check) do
Health Check = link_to admin_health_check_path, title: 'Health Check' do
= nav_link(controller: :requests_profiles) do %span
= link_to admin_requests_profiles_path, title: 'Requests Profiles' do Health Check
%span = nav_link(controller: :requests_profiles) do
Requests Profiles = link_to admin_requests_profiles_path, title: 'Requests Profiles' do
%span
Requests Profiles
.nav-links.sub-nav .scrolling-tabs-container.sub-nav-scroll
%ul{ class: (container_class) } = render 'shared/nav_scroll'
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do .nav-links.sub-nav.scrolling-tabs
= link_to admin_root_path, title: 'Overview' do %ul{ class: (container_class) }
%span = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
Overview = link_to admin_root_path, title: 'Overview' do
= nav_link(controller: [:admin, :projects]) do %span
= link_to admin_namespaces_projects_path, title: 'Projects' do Overview
%span = nav_link(controller: [:admin, :projects]) do
Projects = link_to admin_namespaces_projects_path, title: 'Projects' do
= nav_link(controller: :users) do %span
= link_to admin_users_path, title: 'Users' do Projects
%span = nav_link(controller: :users) do
Users = link_to admin_users_path, title: 'Users' do
= nav_link(controller: :groups) do %span
= link_to admin_groups_path, title: 'Groups' do Users
%span = nav_link(controller: :groups) do
Groups = link_to admin_groups_path, title: 'Groups' do
= nav_link path: 'builds#index' do %span
= link_to admin_builds_path, title: 'Builds' do Groups
%span = nav_link path: 'builds#index' do
Builds = link_to admin_builds_path, title: 'Builds' do
= nav_link path: ['runners#index', 'runners#show'] do %span
= link_to admin_runners_path, title: 'Runners' do Builds
%span = nav_link path: ['runners#index', 'runners#show'] do
Runners = link_to admin_runners_path, title: 'Runners' do
%span
Runners
...@@ -9,12 +9,20 @@ ...@@ -9,12 +9,20 @@
.light-well .light-well
%h4 CPU %h4 CPU
.data .data
%h1= "#{@cpus} cores" - if @cpus
%h1= "#{@cpus.length} cores"
- else
= icon('warning', class: 'text-warning')
Unable to collect CPU info
.col-sm-4 .col-sm-4
.light-well .light-well
%h4 Memory %h4 Memory
.data .data
%h1= "#{number_to_human_size(@mem_used)} / #{number_to_human_size(@mem_total)}" - if @memory
%h1= "#{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)}"
- else
= icon('warning', class: 'text-warning')
Unable to collect memory info
.col-sm-4 .col-sm-4
.light-well .light-well
%h4 Disks %h4 Disks
......
- page_title "CI Lint"
- page_description "Validate your GitLab CI configuration file"
%h2 Check your .gitlab-ci.yml %h2 Check your .gitlab-ci.yml
%hr %hr
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
- else - else
= sort_title_recently_created = sort_title_recently_created
%b.caret %b.caret
%ul.dropdown-menu %ul.dropdown-menu.dropdown-menu-align-right
%li %li
= link_to explore_groups_path(sort: sort_value_recently_created) do = link_to explore_groups_path(sort: sort_value_recently_created) do
= sort_title_recently_created = sort_title_recently_created
......
...@@ -549,4 +549,4 @@ ...@@ -549,4 +549,4 @@
%li wiki page %li wiki page
%li help page %li help page
You can check how markdown rendered at #{link_to 'Markdown help page', help_page_path("markdown/markdown")}. You can check how markdown rendered at #{link_to 'Markdown help page', help_page_path("user/markdown")}.
- page_title "Gitorious import"
- header_title "Projects", root_path
%h3.page-title
%i.icon-gitorious.icon-gitorious-big
Import projects from Gitorious.org
%p.light
Select projects you want to import.
%hr
%p
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all projects
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
%colgroup.import-jobs-from-col
%colgroup.import-jobs-to-col
%colgroup.import-jobs-status-col
%thead
%tr
%th From Gitorious.org
%th To GitLab
%th Status
%tbody
- @already_added_projects.each do |project|
%tr{id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}"}
%td
= link_to project.import_source, "https://gitorious.org/#{project.import_source}", target: "_blank"
%td
= link_to project.path_with_namespace, [project.namespace.becomes(Namespace), project]
%td.job-status
- if project.import_status == 'finished'
%span
%i.fa.fa-check
done
- elsif project.import_status == 'started'
%i.fa.fa-spinner.fa-spin
started
- else
= project.human_import_status_name
- @repos.each do |repo|
%tr{id: "repo_#{repo.id}"}
%td
= link_to repo.full_name, "https://gitorious.org/#{repo.full_name}", target: "_blank"
%td.import-target
= repo.full_name
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import
= icon("spinner spin", class: "loading-icon")
.js-importer-status{ data: { jobs_import_path: "#{jobs_import_gitorious_path}", import_path: "#{import_gitorious_path}" } }
- is_playable = subject.playable? && can?(current_user, :update_build, @project) - is_playable = subject.playable? && can?(current_user, :update_build, @project)
%li.build{class: ("playable" if is_playable)} %li.build{class: ("playable" if is_playable)}
.curve
.build-content .build-content
- if is_playable - if is_playable
= link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, title: 'Play' do = link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, title: 'Play' do
= render_status_with_link('build', 'play') = render_status_with_link('build', 'play')
= subject.name %span.ci-status-text= subject.name
- elsif can?(current_user, :read_build, @project) - elsif can?(current_user, :read_build, @project)
= link_to namespace_project_build_path(subject.project.namespace, subject.project, subject) do = link_to namespace_project_build_path(subject.project.namespace, subject.project, subject) do
= render_status_with_link('build', subject.status) = render_status_with_link('build', subject.status)
= subject.name %span.ci-status-text= subject.name
- else - else
= render_status_with_link('build', subject.status) = render_status_with_link('build', subject.status)
= ci_icon_for_status(subject.status) = ci_icon_for_status(subject.status)
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
- if stage - if stage
&nbsp; &nbsp;
= stage.titleize = stage.titleize
= render statuses.latest.ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, allow_retry: true = render statuses.latest_ci_stages, coverage: @project.build_coverage_enabled?, stage: false, ref: false, allow_retry: true
= render statuses.retried.ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, retried: true = render statuses.retried_ci_stages, coverage: @project.build_coverage_enabled?, stage: false, ref: false, retried: true
%tr %tr
%td{colspan: 10} %td{colspan: 10}
&nbsp; &nbsp;
.scrolling-tabs-container.sub-nav-scroll .scrolling-tabs-container.sub-nav-scroll
.fade-left = render 'shared/nav_scroll'
= icon('angle-left')
.fade-right
= icon('angle-right')
.nav-links.sub-nav.scrolling-tabs .nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) } %ul{ class: (container_class) }
= nav_link(controller: %w(tree blob blame edit_tree new_tree find_file)) do = nav_link(controller: %w(tree blob blame edit_tree new_tree find_file)) do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- if subject.target_url - if subject.target_url
- link_to subject.target_url do - link_to subject.target_url do
= render_status_with_link('commit status', subject.status) = render_status_with_link('commit status', subject.status)
= subject.name %span.ci-status-text= subject.name
- else - else
= render_status_with_link('commit status', subject.status) = render_status_with_link('commit status', subject.status)
= subject.name %span.ci-status-text= subject.name
.nav-links.sub-nav .scrolling-tabs-container.sub-nav-scroll
%ul{ class: (container_class) } = render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/chart.js') = page_specific_javascript_tag('lib/chart.js')
= page_specific_javascript_tag('graphs/graphs_bundle.js') = page_specific_javascript_tag('graphs/graphs_bundle.js')
= nav_link(action: :show) do = nav_link(action: :show) do
= link_to 'Contributors', namespace_project_graph_path = link_to 'Contributors', namespace_project_graph_path
= nav_link(action: :commits) do = nav_link(action: :commits) do
= link_to 'Commits', commits_namespace_project_graph_path = link_to 'Commits', commits_namespace_project_graph_path
= nav_link(action: :languages) do = nav_link(action: :languages) do
= link_to 'Languages', languages_namespace_project_graph_path = link_to 'Languages', languages_namespace_project_graph_path
- if @project.builds_enabled? - if @project.builds_enabled?
= nav_link(action: :ci) do = nav_link(action: :ci) do
= link_to ci_namespace_project_graph_path do = link_to ci_namespace_project_graph_path do
Continuous Integration Continuous Integration
.nav-links.sub-nav .scrolling-tabs-container.sub-nav-scroll
%ul{ class: (container_class) } = render 'shared/nav_scroll'
- if project_nav_tab?(:issues) && !current_controller?(:merge_requests) .nav-links.sub-nav.scrolling-tabs
= nav_link(controller: :issues) do %ul{ class: (container_class) }
= link_to namespace_project_issues_path(@project.namespace, @project), title: 'Issues' do - if project_nav_tab?(:issues) && !current_controller?(:merge_requests)
%span = nav_link(controller: :issues) do
Issues = link_to namespace_project_issues_path(@project.namespace, @project), title: 'Issues' do
%span
Issues
= nav_link(controller: :boards) do = nav_link(controller: :boards) do
= link_to namespace_project_board_path(@project.namespace, @project), title: 'Board' do = link_to namespace_project_board_path(@project.namespace, @project), title: 'Board' do
%span %span
Board Board
- if project_nav_tab?(:merge_requests) && current_controller?(:merge_requests) - if project_nav_tab?(:merge_requests) && current_controller?(:merge_requests)
= nav_link(controller: :merge_requests) do = nav_link(controller: :merge_requests) do
= link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests' do = link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests' do
%span %span
Merge Requests Merge Requests
- if project_nav_tab? :labels - if project_nav_tab? :labels
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
= link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
%span %span
Labels Labels
- if project_nav_tab? :milestones - if project_nav_tab? :milestones
= nav_link(controller: :milestones) do = nav_link(controller: :milestones) do
= link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
%span %span
Milestones Milestones
\ No newline at end of file
- if @merge_request_diff.collected? - if @merge_request_diff.collected?
= render 'projects/merge_requests/show/versions'
= render "projects/diffs/diffs", diffs: @diffs = render "projects/diffs/diffs", diffs: @diffs
- elsif @merge_request_diff.empty? - elsif @merge_request_diff.empty?
.nothing-here-block Nothing to merge from #{@merge_request.source_branch} into #{@merge_request.target_branch} .nothing-here-block Nothing to merge from #{@merge_request.source_branch} into #{@merge_request.target_branch}
......
- merge_request_diffs = @merge_request.merge_request_diffs.select_without_diff
- if merge_request_diffs.size > 1
.mr-version-switch
Version:
%span.dropdown.inline
%a.btn-link.dropdown-toggle{ data: {toggle: :dropdown} }
%strong.monospace<
- if @merge_request_diff.latest?
#{"latest"}
- else
#{@merge_request_diff.head_commit.short_id}
%span.caret
%ul.dropdown-menu.dropdown-menu-selectable
- merge_request_diffs.each do |merge_request_diff|
%li
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request, diff_id: merge_request_diff.id), class: ('is-active' if merge_request_diff == @merge_request_diff) do
%strong.monospace
#{merge_request_diff.head_commit.short_id}
%br
%small
#{number_with_delimiter(merge_request_diff.commits.count)} #{'commit'.pluralize(merge_request_diff.commits.count)},
= time_ago_with_tooltip(merge_request_diff.created_at)
- unless @merge_request_diff.latest?
%span.prepend-left-default
= icon('info-circle')
This version is not the latest one. Comments are disabled
.pull-right
%span.monospace
#{@merge_request_diff.base_commit.short_id}..#{@merge_request_diff.head_commit.short_id}
...@@ -59,11 +59,6 @@ ...@@ -59,11 +59,6 @@
= icon('gitlab', text: 'GitLab.com') = icon('gitlab', text: 'GitLab.com')
- unless gitlab_import_configured? - unless gitlab_import_configured?
= render 'gitlab_import_modal' = render 'gitlab_import_modal'
%div
- if gitorious_import_enabled?
= link_to new_import_gitorious_path, class: 'btn import_gitorious' do
%i.icon-gitorious.icon-gitorious-small
Gitorious.org
%div %div
- if google_code_import_enabled? - if google_code_import_enabled?
= link_to new_import_google_code_path, class: 'btn import_google_code' do = link_to new_import_google_code_path, class: 'btn import_google_code' do
......
...@@ -52,11 +52,11 @@ ...@@ -52,11 +52,11 @@
- if note.emoji_awardable? - if note.emoji_awardable?
= link_to '#', title: 'Award Emoji', class: 'note-action-button note-emoji-button js-add-award js-note-emoji', data: { position: 'right' } do = link_to '#', title: 'Award Emoji', class: 'note-action-button note-emoji-button js-add-award js-note-emoji', data: { position: 'right' } do
= icon('spinner spin') = icon('spinner spin')
= icon('smile-o') = icon('smile-o', class: 'link-highlight')
- if note_editable - if note_editable
= link_to '#', title: 'Edit comment', class: 'note-action-button js-note-edit' do = link_to '#', title: 'Edit comment', class: 'note-action-button js-note-edit' do
= icon('pencil') = icon('pencil', class: 'link-highlight')
= link_to namespace_project_note_path(note.project.namespace, note.project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'note-action-button hidden-xs js-note-delete danger' do = link_to namespace_project_note_path(note.project.namespace, note.project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'note-action-button hidden-xs js-note-delete danger' do
= icon('trash-o') = icon('trash-o')
.note-body{class: note_editable ? 'js-task-list-container' : ''} .note-body{class: note_editable ? 'js-task-list-container' : ''}
......
.nav-links.sub-nav .scrolling-tabs-container.sub-nav-scroll
%ul{ class: (container_class) } = render 'shared/nav_scroll'
- if project_nav_tab? :pipelines .nav-links.sub-nav.scrolling-tabs
= nav_link(controller: :pipelines) do %ul{ class: (container_class) }
= link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do - if project_nav_tab? :pipelines
%span = nav_link(controller: :pipelines) do
Pipelines = link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do
%span
Pipelines
- if project_nav_tab? :builds - if project_nav_tab? :builds
= nav_link(controller: %w(builds)) do = nav_link(controller: %w(builds)) do
= link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do = link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do
%span %span
Builds Builds
- if project_nav_tab? :environments - if project_nav_tab? :environments
= nav_link(controller: %w(environments)) do = nav_link(controller: %w(environments)) do
= link_to project_environments_path(@project), title: 'Environments', class: 'shortcuts-environments' do = link_to project_environments_path(@project), title: 'Environments', class: 'shortcuts-environments' do
%span %span
Environments Environments
.nav-links.sub-nav .scrolling-tabs-container.sub-nav-scroll
%ul{ class: (container_class) } = render 'shared/nav_scroll'
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do .nav-links.sub-nav.scrolling-tabs
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) %ul{ class: (container_class) }
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home)
= nav_link(path: 'wikis#pages') do = nav_link(path: 'wikis#pages') do
= link_to 'Pages', namespace_project_wiki_pages_path(@project.namespace, @project) = link_to 'Pages', namespace_project_wiki_pages_path(@project.namespace, @project)
= nav_link(path: 'wikis#git_access') do = nav_link(path: 'wikis#git_access') do
= link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do = link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do
Git Access Git Access
= render 'projects/wikis/new' = render 'projects/wikis/new'
<svg width="36" height="36" id="tanuki-logo"> <svg width="36" height="36" class="tanuki-logo">
<path id="tanuki-right-ear" class="tanuki-shape" fill="#e24329" d="M2 14l9.38 9v-9l-4-12.28c-.205-.632-1.176-.632-1.38 0z"/> <path class="tanuki-shape tanuki-left-ear" fill="#e24329" d="M2 14l9.38 9v-9l-4-12.28c-.205-.632-1.176-.632-1.38 0z"/>
<path id="tanuki-left-ear" class="tanuki-shape" fill="#e24329" d="M34 14l-9.38 9v-9l4-12.28c.205-.632 1.176-.632 1.38 0z"/> <path class="tanuki-shape tanuki-right-ear" fill="#e24329" d="M34 14l-9.38 9v-9l4-12.28c.205-.632 1.176-.632 1.38 0z"/>
<path id="tanuki-nose" class="tanuki-shape" fill="#e24329" d="M18,34.38 3,14 33,14 Z"/> <path class="tanuki-shape tanuki-nose" fill="#e24329" d="M18,34.38 3,14 33,14 Z"/>
<path id="tanuki-right-eye" class="tanuki-shape" fill="#fc6d26" d="M18,34.38 11.38,14 2,14 6,25Z"/> <path class="tanuki-shape tanuki-left-eye" fill="#fc6d26" d="M18,34.38 11.38,14 2,14 6,25Z"/>
<path id="tanuki-left-eye" class="tanuki-shape" fill="#fc6d26" d="M18,34.38 24.62,14 34,14 30,25Z"/> <path class="tanuki-shape tanuki-right-eye" fill="#fc6d26" d="M18,34.38 24.62,14 34,14 30,25Z"/>
<path id="tanuki-right-cheek" class="tanuki-shape" fill="#fca326" d="M2 14L.1 20.16c-.18.565 0 1.2.5 1.56l17.42 12.66z"/> <path class="tanuki-shape tanuki-left-cheek" fill="#fca326" d="M2 14L.1 20.16c-.18.565 0 1.2.5 1.56l17.42 12.66z"/>
<path id="tanuki-left-cheek" class="tanuki-shape" fill="#fca326" d="M34 14l1.9 6.16c.18.565 0 1.2-.5 1.56L18 34.38z"/> <path class="tanuki-shape tanuki-right-cheek" fill="#fca326" d="M34 14l1.9 6.16c.18.565 0 1.2-.5 1.56L18 34.38z"/>
</svg> </svg>
.fade-left
= icon('angle-left')
.fade-right
= icon('angle-right')
\ No newline at end of file
...@@ -260,7 +260,7 @@ Settings.gitlab.default_projects_features['builds'] = true if Settin ...@@ -260,7 +260,7 @@ Settings.gitlab.default_projects_features['builds'] = true if Settin
Settings.gitlab.default_projects_features['container_registry'] = true if Settings.gitlab.default_projects_features['container_registry'].nil? Settings.gitlab.default_projects_features['container_registry'] = true if Settings.gitlab.default_projects_features['container_registry'].nil?
Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE)
Settings.gitlab['domain_whitelist'] ||= [] Settings.gitlab['domain_whitelist'] ||= []
Settings.gitlab['import_sources'] ||= %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project] Settings.gitlab['import_sources'] ||= %w[github bitbucket gitlab google_code fogbugz git gitlab_project]
Settings.gitlab['trusted_proxies'] ||= [] Settings.gitlab['trusted_proxies'] ||= []
# #
......
...@@ -165,12 +165,6 @@ Rails.application.routes.draw do ...@@ -165,12 +165,6 @@ Rails.application.routes.draw do
get :jobs get :jobs
end end
resource :gitorious, only: [:create, :new], controller: :gitorious do
get :status
get :callback
get :jobs
end
resource :google_code, only: [:create, :new], controller: :google_code do resource :google_code, only: [:create, :new], controller: :google_code do
get :status get :status
post :callback post :callback
......
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class MergeRequestDiffRemoveUniq < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
DOWNTIME = false
def up
if index_exists?(:merge_request_diffs, :merge_request_id)
remove_index :merge_request_diffs, :merge_request_id
end
end
def down
unless index_exists?(:merge_request_diffs, :merge_request_id)
add_concurrent_index :merge_request_diffs, :merge_request_id, unique: true
end
end
end
class MergeRequestDiffAddIndex < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def up
add_concurrent_index :merge_request_diffs, :merge_request_id
end
def down
if index_exists?(:merge_request_diffs, :merge_request_id)
remove_index :merge_request_diffs, :merge_request_id
end
end
end
...@@ -668,7 +668,7 @@ ActiveRecord::Schema.define(version: 20160823081327) do ...@@ -668,7 +668,7 @@ ActiveRecord::Schema.define(version: 20160823081327) do
t.string "start_commit_sha" t.string "start_commit_sha"
end end
add_index "merge_request_diffs", ["merge_request_id"], name: "index_merge_request_diffs_on_merge_request_id", unique: true, using: :btree add_index "merge_request_diffs", ["merge_request_id"], name: "index_merge_request_diffs_on_merge_request_id", using: :btree
create_table "merge_requests", force: :cascade do |t| create_table "merge_requests", force: :cascade do |t|
t.string "target_branch", null: false t.string "target_branch", null: false
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
- [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
- [Koding](user/project/koding.md) Learn how to use Koding, the online IDE.
## Administrator documentation ## Administrator documentation
......
...@@ -10,7 +10,7 @@ GET /projects/:id/repository/commits ...@@ -10,7 +10,7 @@ GET /projects/:id/repository/commits
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch | | `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch |
| `since` | string | no | Only commits after or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `since` | string | no | Only commits after or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
| `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
...@@ -58,7 +58,7 @@ Parameters: ...@@ -58,7 +58,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
...@@ -102,7 +102,7 @@ Parameters: ...@@ -102,7 +102,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
...@@ -138,7 +138,7 @@ Parameters: ...@@ -138,7 +138,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
...@@ -187,7 +187,7 @@ POST /projects/:id/repository/commits/:sha/comments ...@@ -187,7 +187,7 @@ POST /projects/:id/repository/commits/:sha/comments
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `sha` | string | yes | The commit SHA or name of a repository branch or tag | | `sha` | string | yes | The commit SHA or name of a repository branch or tag |
| `note` | string | yes | The text of the comment | | `note` | string | yes | The text of the comment |
| `path` | string | no | The file path relative to the repository | | `path` | string | no | The file path relative to the repository |
...@@ -232,7 +232,7 @@ GET /projects/:id/repository/commits/:sha/statuses ...@@ -232,7 +232,7 @@ GET /projects/:id/repository/commits/:sha/statuses
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `sha` | string | yes | The commit SHA | `sha` | string | yes | The commit SHA
| `ref_name`| string | no | The name of a repository branch or tag or, if not given, the default branch | `ref_name`| string | no | The name of a repository branch or tag or, if not given, the default branch
| `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test` | `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test`
...@@ -306,7 +306,7 @@ POST /projects/:id/statuses/:sha ...@@ -306,7 +306,7 @@ POST /projects/:id/statuses/:sha
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
| `sha` | string | yes | The commit SHA | `sha` | string | yes | The commit SHA
| `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled` | `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled`
| `ref` | string | no | The `ref` (branch or tag) to which the status refers | `ref` | string | no | The `ref` (branch or tag) to which the status refers
......
...@@ -1022,3 +1022,112 @@ Example response: ...@@ -1022,3 +1022,112 @@ Example response:
"created_at": "2016-07-01T11:14:15.530Z" "created_at": "2016-07-01T11:14:15.530Z"
} }
``` ```
## Get MR diff versions
Get a list of merge request diff versions.
```
GET /projects/:id/merge_requests/:merge_request_id/versions
```
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
| `id` | String | yes | The ID of the project |
| `merge_request_id` | integer | yes | The ID of the merge request |
```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions
```
Example response:
```json
[{
"id": 110,
"head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30",
"base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd",
"start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd",
"created_at": "2016-07-26T14:44:48.926Z",
"merge_request_id": 105,
"state": "collected",
"real_size": "1"
}, {
"id": 108,
"head_commit_sha": "3eed087b29835c48015768f839d76e5ea8f07a24",
"base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd",
"start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd",
"created_at": "2016-07-25T14:21:33.028Z",
"merge_request_id": 105,
"state": "collected",
"real_size": "1"
}]
```
## Get a single MR diff version
Get a single merge request diff version.
```
GET /projects/:id/merge_requests/:merge_request_id/versions/:version_id
```
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
| `id` | String | yes | The ID of the project |
| `merge_request_id` | integer | yes | The ID of the merge request |
| `version_id` | integer | yes | The ID of the merge request diff version |
```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions/1
```
Example response:
```json
{
"id": 110,
"head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30",
"base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd",
"start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd",
"created_at": "2016-07-26T14:44:48.926Z",
"merge_request_id": 105,
"state": "collected",
"real_size": "1",
"commits": [{
"id": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30",
"short_id": "33e2ee85",
"title": "Change year to 2018",
"author_name": "Administrator",
"author_email": "admin@example.com",
"created_at": "2016-07-26T17:44:29.000+03:00",
"message": "Change year to 2018"
}, {
"id": "aa24655de48b36335556ac8a3cd8bb521f977cbd",
"short_id": "aa24655d",
"title": "Update LICENSE",
"author_name": "Administrator",
"author_email": "admin@example.com",
"created_at": "2016-07-25T17:21:53.000+03:00",
"message": "Update LICENSE"
}, {
"id": "3eed087b29835c48015768f839d76e5ea8f07a24",
"short_id": "3eed087b",
"title": "Add license",
"author_name": "Administrator",
"author_email": "admin@example.com",
"created_at": "2016-07-25T17:21:20.000+03:00",
"message": "Add license"
}],
"diffs": [{
"old_path": "LICENSE",
"new_path": "LICENSE",
"a_mode": "0",
"b_mode": "100644",
"diff": "--- /dev/null\n+++ b/LICENSE\n@@ -0,0 +1,21 @@\n+The MIT License (MIT)\n+\n+Copyright (c) 2018 Administrator\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n",
"new_file": true,
"renamed_file": false,
"deleted_file": false
}]
}
```
...@@ -492,7 +492,7 @@ PUT /projects/:id ...@@ -492,7 +492,7 @@ PUT /projects/:id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project
- `name` (optional) - project name - `name` (optional) - project name
- `path` (optional) - repository name for project - `path` (optional) - repository name for project
- `description` (optional) - short project description - `description` (optional) - short project description
...@@ -523,7 +523,7 @@ POST /projects/fork/:id ...@@ -523,7 +523,7 @@ POST /projects/fork/:id
Parameters: Parameters:
- `id` (required) - The ID of the project to be forked - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked
### Star a project ### Star a project
...@@ -536,7 +536,7 @@ POST /projects/:id/star ...@@ -536,7 +536,7 @@ POST /projects/:id/star
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star"
...@@ -603,7 +603,7 @@ DELETE /projects/:id/star ...@@ -603,7 +603,7 @@ DELETE /projects/:id/star
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star"
...@@ -674,7 +674,7 @@ POST /projects/:id/archive ...@@ -674,7 +674,7 @@ POST /projects/:id/archive
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive"
...@@ -761,7 +761,7 @@ POST /projects/:id/unarchive ...@@ -761,7 +761,7 @@ POST /projects/:id/unarchive
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive"
...@@ -843,7 +843,7 @@ DELETE /projects/:id ...@@ -843,7 +843,7 @@ DELETE /projects/:id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked
## Uploads ## Uploads
...@@ -857,7 +857,7 @@ POST /projects/:id/uploads ...@@ -857,7 +857,7 @@ POST /projects/:id/uploads
Parameters: Parameters:
- `id` (required) - The ID of the project - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked
- `file` (required) - The file to be uploaded - `file` (required) - The file to be uploaded
```json ```json
...@@ -886,7 +886,7 @@ POST /projects/:id/share ...@@ -886,7 +886,7 @@ POST /projects/:id/share
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked
- `group_id` (required) - The ID of a group - `group_id` (required) - The ID of a group
- `group_access` (required) - Level of permissions for sharing - `group_access` (required) - Level of permissions for sharing
...@@ -1118,7 +1118,7 @@ POST /projects/:id/fork/:forked_from_id ...@@ -1118,7 +1118,7 @@ POST /projects/:id/fork/:forked_from_id
Parameters: Parameters:
- `id` (required) - The ID of the project - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked
- `forked_from_id:` (required) - The ID of the project that was forked from - `forked_from_id:` (required) - The ID of the project that was forked from
### Delete an existing forked from relationship ### Delete an existing forked from relationship
...@@ -1129,7 +1129,7 @@ DELETE /projects/:id/fork ...@@ -1129,7 +1129,7 @@ DELETE /projects/:id/fork
Parameter: Parameter:
- `id` (required) - The ID of the project - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked
## Search for projects by name ## Search for projects by name
......
...@@ -5,7 +5,7 @@ Introduced in GitLab 8.8. ...@@ -5,7 +5,7 @@ Introduced in GitLab 8.8.
## Pipelines ## Pipelines
A pipeline is a group of [builds] that get executed in [stages] (batches). All A pipeline is a group of [builds] that get executed in [stages] \(batches). All
of the builds in a stage are executed in parallel (if there are enough of the builds in a stage are executed in parallel (if there are enough
concurrent [runners]), and if they all succeed, the pipeline moves on to the concurrent [runners]), and if they all succeed, the pipeline moves on to the
next stage. If one of the builds fails, the next stage is not (usually) next stage. If one of the builds fails, the next stage is not (usually)
......
...@@ -6,7 +6,7 @@ it organized and easy to find. ...@@ -6,7 +6,7 @@ it organized and easy to find.
## Location and naming of documents ## Location and naming of documents
>**Note:** >**Note:**
These guidelines derive from the discussion taken place in issue [#3349](ce-3349). These guidelines derive from the discussion taken place in issue [#3349][ce-3349].
The documentation hierarchy can be vastly improved by providing a better layout The documentation hierarchy can be vastly improved by providing a better layout
and organization of directories. and organization of directories.
...@@ -222,18 +222,26 @@ For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to ...@@ -222,18 +222,26 @@ For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to
``` ```
1. Find and replace any occurrences of the old location with the new one. 1. Find and replace any occurrences of the old location with the new one.
A quick way to find them is to use `grep`: A quick way to find them is to use `git grep`. First go to the root directory
where you cloned the `gitlab-ce` repository and then do:
``` ```
grep -nR "lfs_administration.md" doc/ git grep -n "workflow/lfs/lfs_administration"
git grep -n "lfs/lfs_administration"
``` ```
The above command will search in the `doc/` directory for Things to note:
`lfs_administration.md` recursively and will print the file and the line
where this file is mentioned. Note that we used just the filename
(`lfs_administration.md`) and not the whole the relative path
(`workflow/lfs/lfs_administration.md`).
- Since we also use inline documentation, except for the documentation itself,
the document might also be referenced in the views of GitLab (`app/`) which will
render when visiting `/help`, and sometimes in the testing suite (`spec/`).
- The above `git grep` command will search recursively in the directory you run
it in for `workflow/lfs/lfs_administration` and `lfs/lfs_administration`
and will print the file and the line where this file is mentioned.
You may ask why the two greps. Since we use relative paths to link to
documentation, sometimes it might be useful to search a path deeper.
- The `*.md` extension is not used when a document is linked to GitLab's
built-in help page, that's why we omit it in `git grep`.
## Configuration documentation for source and Omnibus installations ## Configuration documentation for source and Omnibus installations
...@@ -422,7 +430,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "domain ...@@ -422,7 +430,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "domain
[cURL]: http://curl.haxx.se/ "cURL website" [cURL]: http://curl.haxx.se/ "cURL website"
[single spaces]: http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html [single spaces]: http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html
[gfm]: http://docs.gitlab.com/ce/markdown/markdown.html#newlines "GitLab flavored markdown documentation" [gfm]: http://docs.gitlab.com/ce/user/markdown.html#newlines "GitLab flavored markdown documentation"
[doc-restart]: ../administration/restart_gitlab.md "GitLab restart documentation" [doc-restart]: ../administration/restart_gitlab.md "GitLab restart documentation"
[ce-3349]: https://gitlab.com/gitlab-org/gitlab-ce/issues/3349 "Documentation restructure" [ce-3349]: https://gitlab.com/gitlab-org/gitlab-ce/issues/3349 "Documentation restructure"
[graffle]: https://gitlab.com/gitlab-org/gitlab-design/blob/d8d39f4a87b90fb9ae89ca12dc565347b4900d5e/production/resources/gitlab-map.graffle [graffle]: https://gitlab.com/gitlab-org/gitlab-design/blob/d8d39f4a87b90fb9ae89ca12dc565347b4900d5e/production/resources/gitlab-map.graffle
......
...@@ -17,7 +17,7 @@ See the documentation below for details on how to configure these services. ...@@ -17,7 +17,7 @@ See the documentation below for details on how to configure these services.
- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages - [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
- [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users - [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users
- [Akismet](akismet.md) Configure Akismet to stop spam - [Akismet](akismet.md) Configure Akismet to stop spam
- [Koding](koding.md) Configure Koding to use IDE integration - [Koding](../administration/integration/koding.md) Configure Koding to use IDE integration
GitLab Enterprise Edition contains [advanced Jenkins support][jenkins]. GitLab Enterprise Edition contains [advanced Jenkins support][jenkins].
......
...@@ -66,7 +66,7 @@ dependency to do so. Please see the [github-markup gem readme](https://github.co ...@@ -66,7 +66,7 @@ dependency to do so. Please see the [github-markup gem readme](https://github.co
## Newlines ## Newlines
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#newlines https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#newlines
GFM honors the markdown specification in how [paragraphs and line breaks are handled](https://daringfireball.net/projects/markdown/syntax#p). GFM honors the markdown specification in how [paragraphs and line breaks are handled](https://daringfireball.net/projects/markdown/syntax#p).
...@@ -86,7 +86,7 @@ Sugar is sweet ...@@ -86,7 +86,7 @@ Sugar is sweet
## Multiple underscores in words ## Multiple underscores in words
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#multiple-underscores-in-words https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#multiple-underscores-in-words
It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words: It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words:
...@@ -101,7 +101,7 @@ do_this_and_do_that_and_another_thing ...@@ -101,7 +101,7 @@ do_this_and_do_that_and_another_thing
## URL auto-linking ## URL auto-linking
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#url-auto-linking https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#url-auto-linking
GFM will autolink almost any URL you copy and paste into your text: GFM will autolink almost any URL you copy and paste into your text:
...@@ -122,7 +122,7 @@ GFM will autolink almost any URL you copy and paste into your text: ...@@ -122,7 +122,7 @@ GFM will autolink almost any URL you copy and paste into your text:
## Multiline Blockquote ## Multiline Blockquote
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#multiline-blockquote https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#multiline-blockquote
On top of standard Markdown [blockquotes](#blockquotes), which require prepending `>` to quoted lines, On top of standard Markdown [blockquotes](#blockquotes), which require prepending `>` to quoted lines,
GFM supports multiline blockquotes fenced by <code>>>></code>: GFM supports multiline blockquotes fenced by <code>>>></code>:
...@@ -156,7 +156,7 @@ you can quote that without having to manually prepend `>` to every line! ...@@ -156,7 +156,7 @@ you can quote that without having to manually prepend `>` to every line!
## Code and Syntax Highlighting ## Code and Syntax Highlighting
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#code-and-syntax-highlighting https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#code-and-syntax-highlighting
_GitLab uses the [Rouge Ruby library][rouge] for syntax highlighting. For a _GitLab uses the [Rouge Ruby library][rouge] for syntax highlighting. For a
list of supported languages visit the Rouge website._ list of supported languages visit the Rouge website._
...@@ -226,7 +226,7 @@ But let's throw in a <b>tag</b>. ...@@ -226,7 +226,7 @@ But let's throw in a <b>tag</b>.
## Inline Diff ## Inline Diff
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#inline-diff https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#inline-diff
With inline diffs tags you can display {+ additions +} or [- deletions -]. With inline diffs tags you can display {+ additions +} or [- deletions -].
...@@ -242,7 +242,7 @@ However the wrapping tags cannot be mixed as such: ...@@ -242,7 +242,7 @@ However the wrapping tags cannot be mixed as such:
## Emoji ## Emoji
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#emoji https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#emoji
Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you: Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you:
...@@ -307,7 +307,7 @@ GFM also recognizes certain cross-project references: ...@@ -307,7 +307,7 @@ GFM also recognizes certain cross-project references:
## Task Lists ## Task Lists
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#task-lists https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#task-lists
You can add task lists to issues, merge requests and comments. To create a task list, add a specially-formatted Markdown list, like so: You can add task lists to issues, merge requests and comments. To create a task list, add a specially-formatted Markdown list, like so:
...@@ -330,7 +330,7 @@ Task lists can only be created in descriptions, not in titles. Task item state c ...@@ -330,7 +330,7 @@ Task lists can only be created in descriptions, not in titles. Task item state c
## Videos ## Videos
> If this is not rendered correctly, see > If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#videos https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#videos
Image tags with a video extension are automatically converted to a video player. Image tags with a video extension are automatically converted to a video player.
...@@ -780,7 +780,7 @@ A link starting with a `/` is relative to the wiki root. ...@@ -780,7 +780,7 @@ A link starting with a `/` is relative to the wiki root.
- The [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown. - The [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown.
- [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown. - [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown.
[markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md [markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md
[rouge]: http://rouge.jneen.net/ "Rouge website" [rouge]: http://rouge.jneen.net/ "Rouge website"
[redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website" [redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website"
[^1]: This link will be broken if you see this document from the Help page or docs.gitlab.com [^1]: This link will be broken if you see this document from the Help page or docs.gitlab.com
doc/user/project/img/issue_board.png

196 KB | W: | H:

doc/user/project/img/issue_board.png

269 KB | W: | H:

doc/user/project/img/issue_board.png
doc/user/project/img/issue_board.png
doc/user/project/img/issue_board.png
doc/user/project/img/issue_board.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -31,10 +31,9 @@ Below is a table of the definitions used for GitLab's Issue Board. ...@@ -31,10 +31,9 @@ Below is a table of the definitions used for GitLab's Issue Board.
There are three types of lists, the ones you create based on your labels, and There are three types of lists, the ones you create based on your labels, and
two default: two default:
- **Backlog** (default): shows all issues that do not fall in one of the other - **Backlog** (default): shows all opened issues that do not fall in one of the other lists. Always appears on the very left.
lists. Always appears on the very left. - **Done** (default): shows all closed issues that do not fall in one of the other lists. Always appears on the very right.
- **Done** (default): shows all closed issues. Always appears on the very right. - Label list: a list based on a label. It shows all opened or closed issues with that label.
- Label list: a list based on a label. It shows all issues with that label.
![GitLab Issue Board](img/issue_board.png) ![GitLab Issue Board](img/issue_board.png)
......
...@@ -68,7 +68,7 @@ GitLab instance. For details about what's next you can follow ...@@ -68,7 +68,7 @@ GitLab instance. For details about what's next you can follow
[this guide](https://www.koding.com/docs/creating-an-aws-stack) from step 8. [this guide](https://www.koding.com/docs/creating-an-aws-stack) from step 8.
Once stack initialized you will see the `README.md` content from your project Once stack initialized you will see the `README.md` content from your project
in `Stack Build` wizard, this wizard will let you to build the stack and import in `Stack Build` wizard, this wizard will let you build the stack and import
your project into it. **Once it's completed it will automatically open the your project into it. **Once it's completed it will automatically open the
related vm instead of importing from scratch**. related vm instead of importing from scratch**.
......
...@@ -26,6 +26,7 @@ this is similar to performing `git checkout feature; git merge master` locally. ...@@ -26,6 +26,7 @@ this is similar to performing `git checkout feature; git merge master` locally.
GitLab allows resolving conflicts in a file where all of the below are true: GitLab allows resolving conflicts in a file where all of the below are true:
- The file is text, not binary - The file is text, not binary
- The file is in a UTF-8 compatible encoding
- The file does not already contain conflict markers - The file does not already contain conflict markers
- The file, with conflict markers added, is not over 200 KB in size - The file, with conflict markers added, is not over 200 KB in size
- The file exists under the same path in both branches - The file exists under the same path in both branches
......
...@@ -26,5 +26,5 @@ do. ...@@ -26,5 +26,5 @@ do.
| `/done` | Mark todo as done | | `/done` | Mark todo as done |
| `/subscribe` | Subscribe | | `/subscribe` | Subscribe |
| `/unsubscribe` | Unsubscribe | | `/unsubscribe` | Unsubscribe |
| `/due <in 2 days or this Friday or December 31st>` | Set due date | | <code>/due &lt;in 2 days &#124; this Friday &#124; December 31st&gt;</code> | Set due date |
| `/remove_due_date` | Remove due date | | `/remove_due_date` | Remove due date |
...@@ -115,7 +115,7 @@ In this flow it is not common to have a production branch (or git flow master br ...@@ -115,7 +115,7 @@ In this flow it is not common to have a production branch (or git flow master br
Merge or pull requests are created in a git management application and ask an assigned person to merge two branches. Merge or pull requests are created in a git management application and ask an assigned person to merge two branches.
Tools such as GitHub and Bitbucket choose the name pull request since the first manual action would be to pull the feature branch. Tools such as GitHub and Bitbucket choose the name pull request since the first manual action would be to pull the feature branch.
Tools such as GitLab and Gitorious choose the name merge request since that is the final action that is requested of the assignee. Tools such as GitLab and others choose the name merge request since that is the final action that is requested of the assignee.
In this article we'll refer to them as merge requests. In this article we'll refer to them as merge requests.
If you work on a feature branch for more than a few hours it is good to share the intermediate result with the rest of the team. If you work on a feature branch for more than a few hours it is good to share the intermediate result with the rest of the team.
......
...@@ -80,3 +80,11 @@ If you click the "Hide whitespace changes" button, you can see the diff without ...@@ -80,3 +80,11 @@ If you click the "Hide whitespace changes" button, you can see the diff without
It is also working on commits compare view. It is also working on commits compare view.
![Commit Compare](merge_requests/commit_compare.png) ![Commit Compare](merge_requests/commit_compare.png)
## Merge Requests versions
Every time you push to merge request branch, a new version of merge request diff
is created. When you visit the merge request page you see latest version of changes.
However you can select an older one from version dropdown
![Merge Request Versions](merge_requests/versions.png)
...@@ -24,7 +24,7 @@ Feature: Project Merge Requests ...@@ -24,7 +24,7 @@ Feature: Project Merge Requests
Scenario: I should see target branch when it is different from default Scenario: I should see target branch when it is different from default
Given project "Shop" have "Bug NS-06" open merge request Given project "Shop" have "Bug NS-06" open merge request
When I visit project "Shop" merge requests page When I visit project "Shop" merge requests page
Then I should see "other_branch" branch Then I should see "feature_conflict" branch
Scenario: I should not see the numbers of diverged commits if the branch is rebased on the target Scenario: I should not see the numbers of diverged commits if the branch is rebased on the target
Given project "Shop" have "Bug NS-07" open merge request with rebased branch Given project "Shop" have "Bug NS-07" open merge request with rebased branch
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment