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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
361b495e
Commit
361b495e
authored
Mar 25, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/7.9.1' into '7-9-stable'
WIP | Release 7.9.1 See merge request !1738
parents
16d6f0e3
b68f9bef
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
180 additions
and
25 deletions
+180
-25
CHANGELOG
CHANGELOG
+10
-1
Gemfile.lock
Gemfile.lock
+1
-1
app/controllers/admin/services_controller.rb
app/controllers/admin/services_controller.rb
+3
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+4
-0
app/views/admin/services/_form.html.haml
app/views/admin/services/_form.html.haml
+13
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+12
-10
app/views/projects/diffs/_text_file.html.haml
app/views/projects/diffs/_text_file.html.haml
+1
-1
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+6
-5
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-1
features/admin/settings.feature
features/admin/settings.feature
+7
-0
features/dashboard/new_project.feature
features/dashboard/new_project.feature
+13
-0
features/steps/admin/settings.rb
features/steps/admin/settings.rb
+29
-0
features/steps/dashboard/new_project.rb
features/steps/dashboard/new_project.rb
+27
-0
lib/gitlab/bitbucket_import/client.rb
lib/gitlab/bitbucket_import/client.rb
+2
-2
lib/gitlab/github_import/client.rb
lib/gitlab/github_import/client.rb
+1
-1
lib/gitlab/gitlab_import/client.rb
lib/gitlab/gitlab_import/client.rb
+1
-1
lib/gitlab/ldap/person.rb
lib/gitlab/ldap/person.rb
+0
-1
spec/lib/gitlab/bitbucket_import/client_spec.rb
spec/lib/gitlab/bitbucket_import/client_spec.rb
+17
-0
spec/lib/gitlab/github_import/client_spec.rb
spec/lib/gitlab/github_import/client_spec.rb
+16
-0
spec/lib/gitlab/gitlab_import/client_spec.rb
spec/lib/gitlab/gitlab_import/client_spec.rb
+16
-0
No files found.
CHANGELOG
View file @
361b495e
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 7.9.0 (unreleased)
v 7.9.1
- Include missing events and fix save functionality in admin service template settings form (Stan Hu)
- Fix "Import projects from" button to show the correct instructions (Stan Hu)
- Fix OAuth2 issue importing a new project from GitHub and GitLab (Stan Hu)
- Fix for LDAP with commas in DN
- Fix missing events and in admin Slack service template settings form (Stan Hu)
- Don't show commit comment button when user is not signed in.
- Downgrade gemnasium-gitlab-service gem
v 7.9.0
- Add HipChat integration documentation (Stan Hu)
- Add HipChat integration documentation (Stan Hu)
- Update documentation for object_kind field in Webhook push and tag push Webhooks (Stan Hu)
- Update documentation for object_kind field in Webhook push and tag push Webhooks (Stan Hu)
- Fix broken email images (Hannes Rosenögger)
- Fix broken email images (Hannes Rosenögger)
...
...
Gemfile.lock
View file @
361b495e
...
@@ -188,7 +188,7 @@ GEM
...
@@ -188,7 +188,7 @@ GEM
dotenv (>= 0.7)
dotenv (>= 0.7)
thor (>= 0.13.6)
thor (>= 0.13.6)
formatador (0.2.4)
formatador (0.2.4)
gemnasium-gitlab-service (0.2.
5
)
gemnasium-gitlab-service (0.2.
4
)
rugged (~> 0.21)
rugged (~> 0.21)
gemojione (2.0.0)
gemojione (2.0.0)
json
json
...
...
app/controllers/admin/services_controller.rb
View file @
361b495e
...
@@ -46,7 +46,9 @@ class Admin::ServicesController < Admin::ApplicationController
...
@@ -46,7 +46,9 @@ class Admin::ServicesController < Admin::ApplicationController
:user_key
,
:device
,
:priority
,
:sound
,
:bamboo_url
,
:username
,
:password
,
:user_key
,
:device
,
:priority
,
:sound
,
:bamboo_url
,
:username
,
:password
,
:build_key
,
:server
,
:teamcity_url
,
:build_type
,
:build_key
,
:server
,
:teamcity_url
,
:build_type
,
:description
,
:issues_url
,
:new_issue_url
,
:restrict_to_branch
,
:description
,
:issues_url
,
:new_issue_url
,
:restrict_to_branch
,
:send_from_committer_email
,
:disable_diffs
:send_from_committer_email
,
:disable_diffs
,
:push_events
,
:tag_push_events
,
:note_events
,
:issues_events
,
:merge_requests_events
])
])
end
end
end
end
app/helpers/projects_helper.rb
View file @
361b495e
...
@@ -146,6 +146,10 @@ module ProjectsHelper
...
@@ -146,6 +146,10 @@ module ProjectsHelper
nav_tabs
<<
feature
if
project
.
send
:"
#{
feature
}
_enabled"
nav_tabs
<<
feature
if
project
.
send
:"
#{
feature
}
_enabled"
end
end
if
project
.
issues_enabled
||
project
.
merge_requests_enabled
nav_tabs
<<
[
:milestones
,
:labels
]
end
nav_tabs
.
flatten
nav_tabs
.
flatten
end
end
...
...
app/views/admin/services/_form.html.haml
View file @
361b495e
...
@@ -14,6 +14,11 @@
...
@@ -14,6 +14,11 @@
=
preserve
do
=
preserve
do
=
markdown
@service
.
help
=
markdown
@service
.
help
.form-group
=
f
.
label
:active
,
"Active"
,
class:
"control-label"
.col-sm-10
=
f
.
check_box
:active
-
if
@service
.
supported_events
.
length
>
1
-
if
@service
.
supported_events
.
length
>
1
.form-group
.form-group
=
f
.
label
:url
,
"Trigger"
,
class:
'control-label'
=
f
.
label
:url
,
"Trigger"
,
class:
'control-label'
...
@@ -34,6 +39,14 @@
...
@@ -34,6 +39,14 @@
%strong
Tag push events
%strong
Tag push events
%p
.light
%p
.light
This url will be triggered when a new tag is pushed to the repository
This url will be triggered when a new tag is pushed to the repository
-
if
@service
.
supported_events
.
include?
(
"note"
)
%div
=
f
.
check_box
:note_events
,
class:
'pull-left'
.prepend-left-20
=
f
.
label
:note_events
,
class:
'list-label'
do
%strong
Comments
%p
.light
This url will be triggered when someone adds a comment
-
if
@service
.
supported_events
.
include?
(
"issue"
)
-
if
@service
.
supported_events
.
include?
(
"issue"
)
%div
%div
=
f
.
check_box
:issues_events
,
class:
'pull-left'
=
f
.
check_box
:issues_events
,
class:
'pull-left'
...
...
app/views/layouts/nav/_project.html.haml
View file @
361b495e
...
@@ -44,11 +44,12 @@
...
@@ -44,11 +44,12 @@
%span
%span
Graphs
Graphs
=
nav_link
(
controller: :milestones
)
do
-
if
project_nav_tab?
:milestones
=
link_to
namespace_project_milestones_path
(
@project
.
namespace
,
@project
),
title:
'Milestones'
do
=
nav_link
(
controller: :milestones
)
do
%i
.fa.fa-clock-o
=
link_to
namespace_project_milestones_path
(
@project
.
namespace
,
@project
),
title:
'Milestones'
do
%span
%i
.fa.fa-clock-o
Milestones
%span
Milestones
-
if
project_nav_tab?
:issues
-
if
project_nav_tab?
:issues
=
nav_link
(
controller: :issues
)
do
=
nav_link
(
controller: :issues
)
do
...
@@ -67,11 +68,12 @@
...
@@ -67,11 +68,12 @@
Merge Requests
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
=
nav_link
(
controller: :labels
)
do
-
if
project_nav_tab?
:labels
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
do
=
nav_link
(
controller: :labels
)
do
%i
.fa.fa-tags
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
do
%span
%i
.fa.fa-tags
Labels
%span
Labels
-
if
project_nav_tab?
:wiki
-
if
project_nav_tab?
:wiki
=
nav_link
(
controller: :wikis
)
do
=
nav_link
(
controller: :wikis
)
do
...
...
app/views/projects/diffs/_text_file.html.haml
View file @
361b495e
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
-
else
-
else
%td
.old_line
%td
.old_line
=
link_to
raw
(
type
==
"new"
?
" "
:
line_old
),
"#
#{
line_code
}
"
,
id:
line_code
=
link_to
raw
(
type
==
"new"
?
" "
:
line_old
),
"#
#{
line_code
}
"
,
id:
line_code
-
if
@comments_allowed
-
if
@comments_allowed
&&
can?
(
current_user
,
:write_note
,
@project
)
=
link_to_new_diff_note
(
line_code
)
=
link_to_new_diff_note
(
line_code
)
%td
.new_line
{
data:
{
linenumber:
line
.
new_pos
}}
%td
.new_line
{
data:
{
linenumber:
line
.
new_pos
}}
=
link_to
raw
(
type
==
"old"
?
" "
:
line
.
new_pos
)
,
"#
#{
line_code
}
"
,
id:
line_code
=
link_to
raw
(
type
==
"old"
?
" "
:
line
.
new_pos
)
,
"#
#{
line_code
}
"
,
id:
line_code
...
...
app/views/projects/milestones/show.html.haml
View file @
361b495e
...
@@ -60,11 +60,12 @@
...
@@ -60,11 +60,12 @@
Participants
Participants
%span
.badge
=
@users
.
count
%span
.badge
=
@users
.
count
.pull-right
-
if
@project
.
issues_enabled
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-grouped"
,
title:
"New Issue"
do
.pull-right
%i
.fa.fa-plus
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-grouped"
,
title:
"New Issue"
do
New Issue
%i
.fa.fa-plus
=
link_to
'Browse Issues'
,
namespace_project_issues_path
(
@milestone
.
project
.
namespace
,
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-grouped"
New Issue
=
link_to
'Browse Issues'
,
namespace_project_issues_path
(
@milestone
.
project
.
namespace
,
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-grouped"
.tab-content
.tab-content
.tab-pane.active
#tab-issues
.tab-pane.active
#tab-issues
...
...
app/views/projects/new.html.haml
View file @
361b495e
...
@@ -111,6 +111,6 @@
...
@@ -111,6 +111,6 @@
$ ->
$ ->
$('.how_to_import_link').bind 'click', (e) ->
$('.how_to_import_link').bind 'click', (e) ->
e.preventDefault()
e.preventDefault()
import_modal = $(this).
parent().find
(".modal").show()
import_modal = $(this).
next
(".modal").show()
$('.modal-header .close').bind 'click', ->
$('.modal-header .close').bind 'click', ->
$(".modal").hide()
$(".modal").hide()
features/admin/settings.feature
View file @
361b495e
...
@@ -7,3 +7,10 @@ Feature: Admin Settings
...
@@ -7,3 +7,10 @@ Feature: Admin Settings
Scenario
:
Change application settings
Scenario
:
Change application settings
When
I modify settings and save form
When
I modify settings and save form
Then
I should see application settings saved
Then
I should see application settings saved
Scenario
:
Change Slack Service Template settings
When
I click on
"Service Templates"
And
I click on
"Slack"
service
Then
I check all events and submit form
And
I should see service template settings saved
And
I should see all checkboxes checked
features/dashboard/new_project.feature
0 → 100644
View file @
361b495e
@dashboard
Feature
:
New Project
Background
:
Given
I sign in as a user
And
I own project
"Shop"
And
I visit dashboard page
@javascript
Scenario
:
I
should see New projects page
Given
I click
"New project"
link
Then
I see
"New project"
page
When
I click on
"Import project from GitHub"
Then
I see instructions on how to import from GitHub
features/steps/admin/settings.rb
View file @
361b495e
...
@@ -15,4 +15,33 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
...
@@ -15,4 +15,33 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
current_application_settings
.
home_page_url
.
should
==
'https://about.gitlab.com/'
current_application_settings
.
home_page_url
.
should
==
'https://about.gitlab.com/'
page
.
should
have_content
'Application settings saved successfully'
page
.
should
have_content
'Application settings saved successfully'
end
end
step
'I click on "Service Templates"'
do
click_link
'Service Templates'
end
step
'I click on "Slack" service'
do
click_link
'Slack'
end
step
'I check all events and submit form'
do
page
.
check
(
'Active'
)
page
.
check
(
'Push events'
)
page
.
check
(
'Tag push events'
)
page
.
check
(
'Comments'
)
page
.
check
(
'Issues events'
)
page
.
check
(
'Merge Request events'
)
fill_in
'Webhook'
,
with:
"http://localhost"
click_on
'Save'
end
step
'I should see service template settings saved'
do
page
.
should
have_content
'Application settings saved successfully'
end
step
'I should see all checkboxes checked'
do
all
(
'input[type=checkbox]'
).
each
do
|
checkbox
|
checkbox
.
should
be_checked
end
end
end
end
features/steps/dashboard/new_project.rb
0 → 100644
View file @
361b495e
class
Spinach::Features::NewProject
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
step
'I click "New project" link'
do
click_link
"New project"
end
step
'I see "New project" page'
do
page
.
should
have_content
(
"Project path"
)
end
step
'I click on "Import project from GitHub"'
do
first
(
'.how_to_import_link'
).
click
end
step
'I see instructions on how to import from GitHub'
do
github_modal
=
first
(
'.modal-body'
)
github_modal
.
should
be_visible
github_modal
.
should
have_content
"To enable importing projects from GitHub"
all
(
'.modal-body'
).
each
do
|
element
|
element
.
should_not
be_visible
unless
element
==
github_modal
end
end
end
lib/gitlab/bitbucket_import/client.rb
View file @
361b495e
...
@@ -62,7 +62,7 @@ module Gitlab
...
@@ -62,7 +62,7 @@ module Gitlab
end
end
def
find_deploy_key
(
project_identifier
,
key
)
def
find_deploy_key
(
project_identifier
,
key
)
JSON
.
parse
(
api
.
get
(
"/api/1.0/repositories/
#{
project_identifier
}
/deploy-keys"
).
body
).
find
do
|
deploy_key
|
JSON
.
parse
(
api
.
get
(
"/api/1.0/repositories/
#{
project_identifier
}
/deploy-keys"
).
body
).
find
do
|
deploy_key
|
deploy_key
[
"key"
].
chomp
==
key
.
chomp
deploy_key
[
"key"
].
chomp
==
key
.
chomp
end
end
end
end
...
@@ -92,7 +92,7 @@ module Gitlab
...
@@ -92,7 +92,7 @@ module Gitlab
end
end
def
bitbucket_options
def
bitbucket_options
OmniAuth
::
Strategies
::
Bitbucket
.
default_options
[
:client_options
].
dup
OmniAuth
::
Strategies
::
Bitbucket
.
default_options
[
:client_options
].
symbolize_keys
end
end
end
end
end
end
...
...
lib/gitlab/github_import/client.rb
View file @
361b495e
...
@@ -46,7 +46,7 @@ module Gitlab
...
@@ -46,7 +46,7 @@ module Gitlab
end
end
def
github_options
def
github_options
OmniAuth
::
Strategies
::
GitHub
.
default_options
[
:client_options
].
dup
OmniAuth
::
Strategies
::
GitHub
.
default_options
[
:client_options
].
symbolize_keys
end
end
end
end
end
end
...
...
lib/gitlab/gitlab_import/client.rb
View file @
361b495e
...
@@ -71,7 +71,7 @@ module Gitlab
...
@@ -71,7 +71,7 @@ module Gitlab
end
end
def
gitlab_options
def
gitlab_options
OmniAuth
::
Strategies
::
GitLab
.
default_options
[
:client_options
].
dup
OmniAuth
::
Strategies
::
GitLab
.
default_options
[
:client_options
].
symbolize_keys
end
end
end
end
end
end
...
...
lib/gitlab/ldap/person.rb
View file @
361b495e
...
@@ -14,7 +14,6 @@ module Gitlab
...
@@ -14,7 +14,6 @@ module Gitlab
end
end
def
self
.
find_by_dn
(
dn
,
adapter
)
def
self
.
find_by_dn
(
dn
,
adapter
)
dn
=
Net
::
LDAP
::
Filter
.
escape
(
dn
)
adapter
.
user
(
'dn'
,
dn
)
adapter
.
user
(
'dn'
,
dn
)
end
end
...
...
spec/lib/gitlab/bitbucket_import/client_spec.rb
0 → 100644
View file @
361b495e
require
'spec_helper'
describe
Gitlab
::
BitbucketImport
::
Client
do
let
(
:token
)
{
'123456'
}
let
(
:secret
)
{
'secret'
}
let
(
:client
)
{
Gitlab
::
BitbucketImport
::
Client
.
new
(
token
,
secret
)
}
before
do
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"bitbucket"
)
end
it
'all OAuth client options are symbols'
do
client
.
consumer
.
options
.
keys
.
each
do
|
key
|
expect
(
key
).
to
be_kind_of
(
Symbol
)
end
end
end
spec/lib/gitlab/github_import/client_spec.rb
0 → 100644
View file @
361b495e
require
'spec_helper'
describe
Gitlab
::
GithubImport
::
Client
do
let
(
:token
)
{
'123456'
}
let
(
:client
)
{
Gitlab
::
GithubImport
::
Client
.
new
(
token
)
}
before
do
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"github"
)
end
it
'all OAuth2 client options are symbols'
do
client
.
client
.
options
.
keys
.
each
do
|
key
|
expect
(
key
).
to
be_kind_of
(
Symbol
)
end
end
end
spec/lib/gitlab/gitlab_import/client_spec.rb
0 → 100644
View file @
361b495e
require
'spec_helper'
describe
Gitlab
::
GitlabImport
::
Client
do
let
(
:token
)
{
'123456'
}
let
(
:client
)
{
Gitlab
::
GitlabImport
::
Client
.
new
(
token
)
}
before
do
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"gitlab"
)
end
it
'all OAuth2 client options are symbols'
do
client
.
client
.
options
.
keys
.
each
do
|
key
|
expect
(
key
).
to
be_kind_of
(
Symbol
)
end
end
end
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