Skip to content

Commit

Permalink
Merge pull request #17 from increments/fix-custom-message-handling
Browse files Browse the repository at this point in the history
Fix custom message handling logic
  • Loading branch information
getty104 committed Dec 20, 2023
2 parents 33d013a + 0fed9b7 commit c2feca5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ruboty/github/actions/merge_pull_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ def request

def after_merge_message
message.reply("Merged #{issue.html_url}")

custom_message = ENV.fetch('AFTER_MERGE_MESSAGE', nil)
message.reply(custom_message) if custom_message
target_repository = ENV.fetch('AFTER_MERGE_MESSAGE_TARGET_REPOSITORY', '')

return unless (repository == target_repository) && custom_message

message.reply(custom_message)
end
end
end
Expand Down

0 comments on commit c2feca5

Please sign in to comment.