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
90256134
Commit
90256134
authored
Jun 04, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
9654f295
327de633
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
8 deletions
+27
-8
app/controllers/concerns/import_url_params.rb
app/controllers/concerns/import_url_params.rb
+2
-0
changelogs/unreleased/sh-fix-import-url-update.yml
changelogs/unreleased/sh-fix-import-url-update.yml
+5
-0
doc/api/snippets.md
doc/api/snippets.md
+5
-5
doc/raketasks/backup_restore.md
doc/raketasks/backup_restore.md
+3
-3
spec/controllers/concerns/import_url_params_spec.rb
spec/controllers/concerns/import_url_params_spec.rb
+12
-0
No files found.
app/controllers/concerns/import_url_params.rb
View file @
90256134
...
...
@@ -2,6 +2,8 @@
module
ImportUrlParams
def
import_url_params
return
{}
unless
params
.
dig
(
:project
,
:import_url
).
present?
{
import_url:
import_params_to_full_url
(
params
[
:project
])
}
end
...
...
changelogs/unreleased/sh-fix-import-url-update.yml
0 → 100644
View file @
90256134
---
title
:
Fix project settings not being able to update
merge_request
:
29097
author
:
type
:
fixed
doc/api/snippets.md
View file @
90256134
...
...
@@ -165,15 +165,15 @@ Parameters:
|:--------------|:-------|:---------|:---------------------------------------------------|
|
`title`
| string | yes | Title of a snippet. |
|
`file_name`
| string | yes | Name of a snippet file. |
|
`co
ntent
`
| string | yes | Content of a snippet. |
|
`co
de
`
| string | yes | Content of a snippet. |
|
`description`
| string | no | Description of a snippet. |
|
`visibility`
| string |
no
| Snippet's
[
visibility
](
#snippet-visibility-level
)
. |
|
`visibility`
| string |
yes
| Snippet's
[
visibility
](
#snippet-visibility-level
)
. |
Example request:
```
sh
curl
--request
POST
\
--data
'{"title": "This is a snippet", "co
ntent
": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }'
\
--data
'{"title": "This is a snippet", "co
de
": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }'
\
--header
'Content-Type: application/json'
\
--header
"PRIVATE-TOKEN: valid_api_token"
\
https://gitlab.example.com/api/v4/snippets
...
...
@@ -222,14 +222,14 @@ Parameters:
|
`title`
| string | no | Title of a snippet. |
|
`file_name`
| string | no | Name of a snippet file. |
|
`description`
| string | no | Description of a snippet. |
|
`co
ntent
`
| string | no | Content of a snippet. |
|
`co
de
`
| string | no | Content of a snippet. |
|
`visibility`
| string | no | Snippet's
[
visibility
](
#snippet-visibility-level
)
. |
Example request:
```
sh
curl
--request
PUT
\
--data
'{"title": "foo", "co
ntent
": "bar"}'
\
--data
'{"title": "foo", "co
de
": "bar"}'
\
--header
'Content-Type: application/json'
\
--header
"PRIVATE-TOKEN: valid_api_token"
\
https://gitlab.example.com/api/v4/snippets/1
...
...
doc/raketasks/backup_restore.md
View file @
90256134
...
...
@@ -917,9 +917,9 @@ backup beforehand.
1.
Clear all the tokens for projects, groups, and the whole instance:
CAUTION:
**Caution:**
The last UPDATE operation will stop the runners being able to pick up
new jobs. You must register new runners.
CAUTION: **Caution:**
The last UPDATE operation will stop the runners being able to pick up
new jobs. You must register new runners.
```sql
-- Clear project tokens
...
...
spec/controllers/concerns/import_url_params_spec.rb
View file @
90256134
...
...
@@ -8,6 +8,18 @@ describe ImportUrlParams do
controller
.
import_url_params
end
context
'empty URL'
do
let
(
:params
)
do
ActionController
::
Parameters
.
new
(
project:
{
title:
'Test'
})
end
it
'returns empty hash'
do
expect
(
import_url_params
).
to
eq
({})
end
end
context
'url and password separately provided'
do
let
(
:params
)
do
ActionController
::
Parameters
.
new
(
project:
{
...
...
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