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
def to_branch_name
if self.confidential?
"issue-#{iid}"
"#{iid}-confidential-issue"
else
"#{iid}-#{title.parameterize}"
end
......
......@@ -248,7 +248,7 @@ describe Issue, models: true do
it "does not contain the issue title if confidential" do
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
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