Skip to content

Commit

Permalink
Add warning about request auto-acceptance
Browse files Browse the repository at this point in the history
  • Loading branch information
saraycp committed Nov 21, 2022
1 parent 23bfc42 commit 627a4df
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/app/views/webui/request/beta_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
- if @bs_request.superseded_by.present?
by
= link_to(@bs_request.superseded_by, number: @bs_request.superseded_by)

- if @bs_request.accept_at.present?
%span.badge.alert-warning.ml-1 auto-accept

%p.font-italic
Created by
= user_with_realname_and_icon(@bs_request.creator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,28 @@
.comment_new.mt-3
= render partial: 'webui/comment/new', locals: { commentable: bs_request }
%hr

- if bs_request.accept_at.present?
.alert.alert-warning.p-2.mb-3
%i.fas.fa-exclamation-triangle
%span The current request
- if BsRequest::FINAL_REQUEST_STATES.include?(bs_request.state)
%span
was
%strong auto-accepted
at
%span.fuzzy-time{ title: "#{I18n.l bs_request.accept_at}" }
= succeed '.' do
= I18n.l bs_request.accept_at, format: :only_date
- elsif bs_request.accept_at.past?
%span
will be
%strong auto-accepted
after all the reviews are submitted.
- else
will be
%strong auto-accepted
in #{time_ago_in_words(bs_request.accept_at)}.
= render RequestDecisionComponent.new(bs_request: bs_request, action: action,
is_target_maintainer: is_target_maintainer,
is_author: is_author)

0 comments on commit 627a4df

Please sign in to comment.