Skip to content

Commit

Permalink
Stamp passport event for stopping release platform run
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Nov 24, 2023
1 parent e64e05a commit ce23a6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/release_platform_run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ReleasePlatformRun < ApplicationRecord
scope :sequential, -> { order("release_platform_runs.created_at ASC") }
scope :have_not_reached_production, -> { on_track.reject(&:production_release_happened?) }

STAMPABLE_REASONS = %w[version_changed tag_created version_corrected finished]
STAMPABLE_REASONS = %w[version_changed tag_created version_corrected finished stopped]

STATES = {
created: "created",
Expand All @@ -61,7 +61,7 @@ class ReleasePlatformRun < ApplicationRecord
transitions from: [:created, :on_track], to: :on_track
end

event :stop do
event :stop, after_commit: -> { event_stamp!(reason: :stopped, kind: :notice, data: {version: release_version}) } do
before { self.stopped_at = Time.current }
transitions from: [:created, :on_track], to: :stopped
end
Expand Down
1 change: 1 addition & 0 deletions config/locales/passport/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ en:
version_changed_html: 'Updated the release version to <span class="emphasize">%{version}</span>'
version_corrected_html: 'Updated the release version to <span class="emphasize">%{version}</span> since the ongoing release has moved on to <span class="emphasize">%{ongoing_version}</span>'
finished_html: 'Finished the platform release with version <span class="emphasize">%{version}</span>'
stopped_html: 'Stopped the platform release with version <span class="emphasize">%{version}</span>'
tag_created_html: 'Tag <span class="emphasize">%{tag}</span> was cut'
step_run:
created_html: 'Started the step <span class="emphasize">%{name}</span> for <span class="emphasize">%{sha}</span>'
Expand Down

0 comments on commit ce23a6e

Please sign in to comment.