Skip to content

Commit

Permalink
Fix merge_commit_message
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Apr 17, 2023
1 parent 5a7195f commit 5676499
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion updater/bin/update-script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -882,14 +882,25 @@ def show_diff(original_file, updated_file)
# Set auto complete for this Pull Request
# Pull requests that pass all policies will be merged automatically.
# Optional policies can be ignored by passing their identifiers
#
# The merge commit message should contain the PR number and title for tracking.
# This is the default behaviour in Azure DevOps
# Example:
# Merged PR 24093: Bump Tingle.Extensions.Logging.LogAnalytics from 3.4.2-ci0005 to 3.4.2-ci0006
#
# Bumps [Tingle.Extensions.Logging.LogAnalytics](...) from 3.4.2-ci0005 to 3.4.2-ci0006
# - [Release notes](....)
# - [Changelog](....)
# - [Commits](....)
merge_commit_message = "Merged PR #{pull_request_id}: #{msg.pr_name}\n\n#{msg.commit_message}"
if $options[:set_auto_complete]
auto_complete_user_id = pull_request["createdBy"]["id"]
puts "Setting auto complete on ##{pull_request_id}."
azure_client.autocomplete_pull_request(
# Adding argument names will fail! Maybe because there is no spec?
pull_request_id,
auto_complete_user_id,
msg.commit_message, # merge_commit_message
merge_commit_message,
true, # delete_source_branch
true, # squash_merge
$options[:merge_strategy],
Expand Down

0 comments on commit 5676499

Please sign in to comment.