Commit f801e224 authored by Timothy Andrew's avatar Timothy Andrew

A new branch created for a confidential issue is named `<id>-confidential-issue`.

parent aa396ae5
...@@ -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
......
...@@ -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
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