Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f18c3393
Commit
f18c3393
authored
Feb 13, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6e8126c0
d5f4a8dc
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
14 deletions
+36
-14
app/assets/javascripts/diffs/store/mutations.js
app/assets/javascripts/diffs/store/mutations.js
+1
-0
app/assets/javascripts/diffs/store/utils.js
app/assets/javascripts/diffs/store/utils.js
+1
-0
changelogs/unreleased/56237-api-truncated-commit-title.yml
changelogs/unreleased/56237-api-truncated-commit-title.yml
+5
-0
doc/development/documentation/styleguide.md
doc/development/documentation/styleguide.md
+1
-1
doc/user/project/pages/index.md
doc/user/project/pages/index.md
+1
-1
doc/user/project/web_ide/index.md
doc/user/project/web_ide/index.md
+1
-1
lib/api/entities.rb
lib/api/entities.rb
+2
-1
spec/javascripts/diffs/store/utils_spec.js
spec/javascripts/diffs/store/utils_spec.js
+23
-9
spec/requests/api/commits_spec.rb
spec/requests/api/commits_spec.rb
+1
-1
No files found.
app/assets/javascripts/diffs/store/mutations.js
View file @
f18c3393
...
@@ -144,6 +144,7 @@ export default {
...
@@ -144,6 +144,7 @@ export default {
if
(
left
||
right
)
{
if
(
left
||
right
)
{
return
{
return
{
...
line
,
left
:
line
.
left
?
mapDiscussions
(
line
.
left
)
:
null
,
left
:
line
.
left
?
mapDiscussions
(
line
.
left
)
:
null
,
right
:
line
.
right
?
mapDiscussions
(
line
.
right
,
()
=>
!
left
)
:
null
,
right
:
line
.
right
?
mapDiscussions
(
line
.
right
,
()
=>
!
left
)
:
null
,
};
};
...
...
app/assets/javascripts/diffs/store/utils.js
View file @
f18c3393
...
@@ -161,6 +161,7 @@ export function addContextLines(options) {
...
@@ -161,6 +161,7 @@ export function addContextLines(options) {
const
normalizedParallelLines
=
contextLines
.
map
(
line
=>
({
const
normalizedParallelLines
=
contextLines
.
map
(
line
=>
({
left
:
line
,
left
:
line
,
right
:
line
,
right
:
line
,
line_code
:
line
.
line_code
,
}));
}));
if
(
options
.
bottom
)
{
if
(
options
.
bottom
)
{
...
...
changelogs/unreleased/56237-api-truncated-commit-title.yml
0 → 100644
View file @
f18c3393
---
title
:
'
API:
Expose
full
commit
title'
merge_request
:
25189
author
:
Robert Schilling
type
:
fixed
doc/development/documentation/styleguide.md
View file @
f18c3393
...
@@ -112,7 +112,7 @@ table_display_block: true
...
@@ -112,7 +112,7 @@ table_display_block: true
## Emphasis
## Emphasis
- Use double asterisks (`**`) to mark a word or text in bold (`**bold**`).
- Use double asterisks (`**`) to mark a word or text in bold (`**bold**`).
- Use undescore (`_`) for text in italics (`_italic_`).
- Use unde
r
score (`_`) for text in italics (`_italic_`).
- Use greater than (`>`) for blockquotes.
- Use greater than (`>`) for blockquotes.
## Punctuation
## Punctuation
...
...
doc/user/project/pages/index.md
View file @
f18c3393
...
@@ -66,7 +66,7 @@ publish any website written directly in plain HTML, CSS, and JavaScript.</p>
...
@@ -66,7 +66,7 @@ publish any website written directly in plain HTML, CSS, and JavaScript.</p>
If you're using GitLab.com, your website will be publicly available to the internet.
If you're using GitLab.com, your website will be publicly available to the internet.
If you're using self-managed instances (Core, Starter, Premium, or Ultimate),
If you're using self-managed instances (Core, Starter, Premium, or Ultimate),
your websites will be published on your own server, according to the
your websites will be published on your own server, according to the
[
Pages admin settings
](
../../../administration/pages/index.md
)
chosen by your sys
da
min,
[
Pages admin settings
](
../../../administration/pages/index.md
)
chosen by your sys
ad
min,
who can opt for making them public or internal to your server.
who can opt for making them public or internal to your server.
### How it works
### How it works
...
...
doc/user/project/web_ide/index.md
View file @
f18c3393
...
@@ -50,7 +50,7 @@ review the list of changed files. Click on each file to review the changes and
...
@@ -50,7 +50,7 @@ review the list of changed files. Click on each file to review the changes and
click the tick icon to stage the file.
click the tick icon to stage the file.
Once you have staged some changes, you can add a commit message and commit the
Once you have staged some changes, you can add a commit message and commit the
staged changes. Unstaged changes will not be commited.
staged changes. Unstaged changes will not be commit
t
ed.
![
Commit changes
](
img/commit_changes.png
)
![
Commit changes
](
img/commit_changes.png
)
...
...
lib/api/entities.rb
View file @
f18c3393
...
@@ -369,8 +369,9 @@ module API
...
@@ -369,8 +369,9 @@ module API
end
end
class
Commit
<
Grape
::
Entity
class
Commit
<
Grape
::
Entity
expose
:id
,
:short_id
,
:
title
,
:
created_at
expose
:id
,
:short_id
,
:created_at
expose
:parent_ids
expose
:parent_ids
expose
:full_title
,
as: :title
expose
:safe_message
,
as: :message
expose
:safe_message
,
as: :message
expose
:author_name
,
:author_email
,
:authored_date
expose
:author_name
,
:author_email
,
:authored_date
expose
:committer_name
,
:committer_email
,
:committed_date
expose
:committer_name
,
:committer_email
,
:committed_date
...
...
spec/javascripts/diffs/store/utils_spec.js
View file @
f18c3393
...
@@ -14,7 +14,7 @@ import { MERGE_REQUEST_NOTEABLE_TYPE } from '~/notes/constants';
...
@@ -14,7 +14,7 @@ import { MERGE_REQUEST_NOTEABLE_TYPE } from '~/notes/constants';
import
diffFileMockData
from
'
../mock_data/diff_file
'
;
import
diffFileMockData
from
'
../mock_data/diff_file
'
;
import
{
noteableDataMock
}
from
'
../../notes/mock_data
'
;
import
{
noteableDataMock
}
from
'
../../notes/mock_data
'
;
const
getDiffFileMock
=
()
=>
Object
.
assign
({},
diffFileMockData
);
const
getDiffFileMock
=
()
=>
JSON
.
parse
(
JSON
.
stringify
(
diffFileMockData
)
);
describe
(
'
DiffsStoreUtils
'
,
()
=>
{
describe
(
'
DiffsStoreUtils
'
,
()
=>
{
describe
(
'
findDiffFile
'
,
()
=>
{
describe
(
'
findDiffFile
'
,
()
=>
{
...
@@ -80,30 +80,44 @@ describe('DiffsStoreUtils', () => {
...
@@ -80,30 +80,44 @@ describe('DiffsStoreUtils', () => {
});
});
describe
(
'
addContextLines
'
,
()
=>
{
describe
(
'
addContextLines
'
,
()
=>
{
it
(
'
should add context lines
properly with bottom parameter
'
,
()
=>
{
it
(
'
should add context lines
'
,
()
=>
{
const
diffFile
=
getDiffFileMock
();
const
diffFile
=
getDiffFileMock
();
const
inlineLines
=
diffFile
.
highlighted_diff_lines
;
const
inlineLines
=
diffFile
.
highlighted_diff_lines
;
const
parallelLines
=
diffFile
.
parallel_diff_lines
;
const
parallelLines
=
diffFile
.
parallel_diff_lines
;
const
lineNumbers
=
{
oldLineNumber
:
3
,
newLineNumber
:
5
};
const
lineNumbers
=
{
oldLineNumber
:
3
,
newLineNumber
:
5
};
const
contextLines
=
[{
lineNumber
:
42
}];
const
contextLines
=
[{
lineNumber
:
42
,
line_code
:
'
123
'
}];
const
options
=
{
inlineLines
,
parallelLines
,
contextLines
,
lineNumbers
,
bottom
:
true
};
const
options
=
{
inlineLines
,
parallelLines
,
contextLines
,
lineNumbers
};
const
inlineIndex
=
utils
.
findIndexInInlineLines
(
inlineLines
,
lineNumbers
);
const
inlineIndex
=
utils
.
findIndexInInlineLines
(
inlineLines
,
lineNumbers
);
const
parallelIndex
=
utils
.
findIndexInParallelLines
(
parallelLines
,
lineNumbers
);
const
parallelIndex
=
utils
.
findIndexInParallelLines
(
parallelLines
,
lineNumbers
);
const
normalizedParallelLine
=
{
const
normalizedParallelLine
=
{
left
:
options
.
contextLines
[
0
],
left
:
options
.
contextLines
[
0
],
right
:
options
.
contextLines
[
0
],
right
:
options
.
contextLines
[
0
],
line_code
:
'
123
'
,
};
};
utils
.
addContextLines
(
options
);
utils
.
addContextLines
(
options
);
expect
(
inlineLines
[
inlineLines
.
length
-
1
]).
toEqual
(
contextLines
[
0
]);
expect
(
inlineLines
[
inlineIndex
]).
toEqual
(
contextLines
[
0
]);
expect
(
parallelLines
[
parallelLines
.
length
-
1
]).
toEqual
(
normalizedParallelLine
);
expect
(
parallelLines
[
parallelIndex
]).
toEqual
(
normalizedParallelLine
);
});
it
(
'
should add context lines properly with bottom parameter
'
,
()
=>
{
const
diffFile
=
getDiffFileMock
();
const
inlineLines
=
diffFile
.
highlighted_diff_lines
;
const
parallelLines
=
diffFile
.
parallel_diff_lines
;
const
lineNumbers
=
{
oldLineNumber
:
3
,
newLineNumber
:
5
};
const
contextLines
=
[{
lineNumber
:
42
,
line_code
:
'
123
'
}];
const
options
=
{
inlineLines
,
parallelLines
,
contextLines
,
lineNumbers
,
bottom
:
true
};
const
normalizedParallelLine
=
{
left
:
options
.
contextLines
[
0
],
right
:
options
.
contextLines
[
0
],
line_code
:
'
123
'
,
};
delete
options
.
bottom
;
utils
.
addContextLines
(
options
);
utils
.
addContextLines
(
options
);
expect
(
inlineLines
[
inline
Index
]).
toEqual
(
contextLines
[
0
]);
expect
(
inlineLines
[
inline
Lines
.
length
-
1
]).
toEqual
(
contextLines
[
0
]);
expect
(
parallelLines
[
parallel
Index
]).
toEqual
(
normalizedParallelLine
);
expect
(
parallelLines
[
parallel
Lines
.
length
-
1
]).
toEqual
(
normalizedParallelLine
);
});
});
});
});
...
...
spec/requests/api/commits_spec.rb
View file @
f18c3393
...
@@ -237,7 +237,7 @@ describe API::Commits do
...
@@ -237,7 +237,7 @@ describe API::Commits do
end
end
describe
'create'
do
describe
'create'
do
let
(
:message
)
{
'Created
fil
e'
}
let
(
:message
)
{
'Created
a new file with a very very looooooooooooooooooooooooooooooooooooooooooooooong commit messag
e'
}
let
(
:invalid_c_params
)
do
let
(
:invalid_c_params
)
do
{
{
branch:
'master'
,
branch:
'master'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment