Skip to content

Commit

Permalink
Drop staging identifier
Browse files Browse the repository at this point in the history
As result of a discussion related to #6308 we decided to drop the
identifier, since there is no fixed naming scheme we could rely on.
  • Loading branch information
bgeuken committed Nov 21, 2018
1 parent 27928a6 commit c345bb5
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/api/app/models/staging/staging_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ class StagingProject < Project
after_destroy :update_staging_workflow_on_backend
before_create :add_managers_group

def staging_identifier
name[/.*:Staging:(.*)/, 1]
end

def classified_requests
requests = (requests_to_review | staged_requests.includes(:reviews)).map do |request|
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
%ul.pl-4
- projects.sort.each do |project|
%li
= link_to(project.staging_identifier, staging_workflow_staging_project_path(staging_workflow, project.name))
= link_to(project.name, staging_workflow_staging_project_path(staging_workflow, project.name))
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%span.badge{ class: "state-#{staging_project.overall_state}" }
%span.badge.badge-light
= link_to(staging_project.staging_identifier, staging_workflow_staging_project_path(staging_workflow, staging_project.name))
= link_to(staging_project.name, staging_workflow_staging_project_path(staging_workflow, staging_project.name))
%span
%br
= staging_project.overall_state
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/api/spec/models/staging/staging_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@
end
end

describe '#staging_identifier' do
before do
staging_project.update(name: 'openSUSE_41:Staging:myStagingProject')
end

it { expect(staging_project.staging_identifier).to eq('myStagingProject') }
end

describe '#untracked_requests' do
let!(:request_with_review) do
create(:review_bs_request_by_project, request_attributes.merge(reviewer: user, review_by_project: staging_project))
Expand Down

0 comments on commit c345bb5

Please sign in to comment.