Skip to content

Commit

Permalink
Include PR summary in status log
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshire137 committed Nov 25, 2024
1 parent 5057197 commit 80bfa7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/project_pull_mover/gh_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ def mark_pull_request_as_draft(number:, repo_nwo:, pull_name:)
project_global_id: String,
status_field_id: String,
old_option_name: String,
new_option_name: String
new_option_name: String,
pull_name: String
).returns(T.nilable(String))
end
def set_project_item_status(option_id:, project_item_id:, project_global_id:, status_field_id:, old_option_name:, new_option_name:)
@logger.loading("Moving #{to_s} out of '#{old_option_name}' column to " \
def set_project_item_status(option_id:, project_item_id:, project_global_id:, status_field_id:, old_option_name:, new_option_name:, pull_name:)
@logger.loading("Moving #{pull_name} out of '#{old_option_name}' column to " \
"'#{new_option_name}'...") unless quiet_mode?
`#{gh_path} project item-edit --id #{project_item_id} --project-id #{project_global_id} --field-id #{status_field_id} --single-select-option-id #{option_id}`
end
Expand Down
5 changes: 5 additions & 0 deletions lib/project_pull_mover/pull_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def set_in_progress_status
return unless option_id

@gh_cli.set_project_item_status(
pull_name: to_s,
option_id: option_id,
project_item_id: project_item_id,
project_global_id: project_global_id,
Expand All @@ -253,6 +254,7 @@ def set_needs_review_status
return unless option_id

@gh_cli.set_project_item_status(
pull_name: to_s,
option_id: option_id,
project_item_id: project_item_id,
project_global_id: project_global_id,
Expand All @@ -267,6 +269,7 @@ def set_not_against_main_status
return unless option_id

@gh_cli.set_project_item_status(
pull_name: to_s,
option_id: option_id,
project_item_id: project_item_id,
project_global_id: project_global_id,
Expand All @@ -281,6 +284,7 @@ def set_ready_to_deploy_status
return unless option_id

@gh_cli.set_project_item_status(
pull_name: to_s,
option_id: option_id,
project_item_id: project_item_id,
project_global_id: project_global_id,
Expand All @@ -295,6 +299,7 @@ def set_conflicting_status
return unless option_id

@gh_cli.set_project_item_status(
pull_name: to_s,
option_id: option_id,
project_item_id: project_item_id,
project_global_id: project_global_id,
Expand Down

0 comments on commit 80bfa7c

Please sign in to comment.