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
f801e224
Commit
f801e224
authored
Apr 19, 2016
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A new branch created for a confidential issue is named `<id>-confidential-issue`.
parent
aa396ae5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/issue.rb
app/models/issue.rb
+1
-1
spec/models/issue_spec.rb
spec/models/issue_spec.rb
+1
-1
No files found.
app/models/issue.rb
View file @
f801e224
...
@@ -158,7 +158,7 @@ class Issue < ActiveRecord::Base
...
@@ -158,7 +158,7 @@ class Issue < ActiveRecord::Base
def
to_branch_name
def
to_branch_name
if
self
.
confidential?
if
self
.
confidential?
"
issue-
#{
iid
}
"
"
#{
iid
}
-confidential-issue
"
else
else
"
#{
iid
}
-
#{
title
.
parameterize
}
"
"
#{
iid
}
-
#{
title
.
parameterize
}
"
end
end
...
...
spec/models/issue_spec.rb
View file @
f801e224
...
@@ -248,7 +248,7 @@ describe Issue, models: true do
...
@@ -248,7 +248,7 @@ describe Issue, models: true do
it
"does not contain the issue title if confidential"
do
it
"does not contain the issue title if confidential"
do
issue
=
create
(
:issue
,
title:
'testing-issue'
,
confidential:
true
)
issue
=
create
(
:issue
,
title:
'testing-issue'
,
confidential:
true
)
expect
(
issue
.
to_branch_name
).
to
match
/
\Aissue
/
expect
(
issue
.
to_branch_name
).
to
match
/
confidential-issue\z
/
end
end
end
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