WIP: preserve failed Codex job issue-414-euwzily9
このコミットが含まれているのは:
@@ -100,7 +100,8 @@ class MaterialsController < ApplicationController
|
||||
material = nil
|
||||
|
||||
begin
|
||||
Material.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'materials.create', created_by_user: current_user) do
|
||||
tag = resolve_material_tag!(locale, tag_name_raw)
|
||||
material = Material.new(tag:, url:,
|
||||
created_by_user: current_user,
|
||||
@@ -151,7 +152,8 @@ class MaterialsController < ApplicationController
|
||||
uploaded_blob = build_uploaded_material_blob!(file, file_sha256)
|
||||
|
||||
begin
|
||||
Material.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'materials.update', created_by_user: current_user) do
|
||||
MaterialVersionRecorder.ensure_snapshot!(material, created_by_user: current_user)
|
||||
tag = resolve_material_tag!(locale, tag_name_raw)
|
||||
material.assign_attributes(tag:, url:, updated_by_user: current_user)
|
||||
@@ -185,7 +187,8 @@ class MaterialsController < ApplicationController
|
||||
material = Material.find_by(id: params[:id])
|
||||
return head :not_found unless material
|
||||
|
||||
Material.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'materials.destroy', created_by_user: current_user) do
|
||||
MaterialVersionRecorder.ensure_snapshot!(material, created_by_user: current_user)
|
||||
material.discard!
|
||||
MaterialVersionRecorder.record!(material:, event_type: :discard,
|
||||
|
||||
@@ -95,7 +95,8 @@ class NicoTagsController < ApplicationController
|
||||
linked_tag_names = params[:tags].to_s.split
|
||||
linked_tags = nil
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'external_tags.update', created_by_user: current_user) do
|
||||
linked_tags = Tag.normalise_tags!(locale, linked_tag_names,
|
||||
with_tagme: false,
|
||||
with_no_deerjikist: false,
|
||||
|
||||
@@ -346,7 +346,8 @@ class PostsController < ApplicationController
|
||||
post = nil
|
||||
conflict_json = nil
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'posts.update', created_by_user: current_user) do
|
||||
post = Post.lock.find(params[:id].to_i)
|
||||
|
||||
base_version = nil
|
||||
|
||||
@@ -11,7 +11,8 @@ class TagChildrenController < ApplicationController
|
||||
parent = Tag.find(parent_id)
|
||||
child = Tag.find(child_id)
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'tags.update', created_by_user: current_user) do
|
||||
TagVersioning.ensure_snapshot!(child, created_by_user: current_user)
|
||||
|
||||
TagImplication.find_or_create_by!(parent_tag: parent, tag: child)
|
||||
@@ -33,7 +34,8 @@ class TagChildrenController < ApplicationController
|
||||
parent = Tag.find(parent_id)
|
||||
child = Tag.find(child_id)
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'tags.update', created_by_user: current_user) do
|
||||
TagVersioning.ensure_snapshot!(child, created_by_user: current_user)
|
||||
|
||||
TagImplication.find_by(parent_tag: parent, tag: child)&.destroy!
|
||||
|
||||
@@ -467,7 +467,8 @@ class TagsController < ApplicationController
|
||||
return render_unprocessable_entity 'ニコタグは変更できません.', field: :category
|
||||
end
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'tags.update', created_by_user: current_user) do
|
||||
TagVersioning.ensure_snapshot!(tag, created_by_user: current_user,
|
||||
language_code: locale.language_code)
|
||||
|
||||
@@ -518,7 +519,8 @@ class TagsController < ApplicationController
|
||||
return render_unprocessable_entity 'ニコタグは変更できません.', field: :category
|
||||
end
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'tags.update', created_by_user: current_user) do
|
||||
TagVersioning.ensure_snapshot!(tag, created_by_user: current_user,
|
||||
language_code: locale.language_code)
|
||||
|
||||
|
||||
@@ -246,7 +246,9 @@ class WikiPagesController < ApplicationController
|
||||
|
||||
base_revision_id = params[:base_revision_id].presence
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'tag_descriptions.update',
|
||||
created_by_user: current_user, reason: params[:message].presence) do
|
||||
SharedResourceIdAllocator.lock_space!(Tag, 'tags')
|
||||
tag.lock!
|
||||
old_title = tag_name.name
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする