Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AFTER_MERGE_MESSAGE env variable to customize the message after merge #16

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

getty104
Copy link
Member

What

Implemented the after_merge_message method in Ruboty::Actions::MergePullRequest

  • In addition to the message that was displayed after merging, it is now possible to send a customized message.
  • This allows for commanding ruboty to perform post-merge processes.

@getty104 getty104 self-assigned this Dec 20, 2023
@getty104 getty104 changed the title Add AFTER_MERGE_MESSAGE env variable to customize the message after m… Add AFTER_MERGE_MESSAGE env variable to customize the message after message Dec 20, 2023
@getty104 getty104 changed the title Add AFTER_MERGE_MESSAGE env variable to customize the message after message Add AFTER_MERGE_MESSAGE env variable to customize the message after merge Dec 20, 2023
@getty104 getty104 requested review from a team and atm-snag2 and removed request for a team December 20, 2023 00:55

def after_merge_message
message.reply("Merged #{issue.html_url}")
message.reply(ENV.fetch('AFTER_MERGE_MESSAGE', nil)) if ENV.fetch('AFTER_MERGE_MESSAGE', nil)
Copy link

@atm-snag2 atm-snag2 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits

Suggested change
message.reply(ENV.fetch('AFTER_MERGE_MESSAGE', nil)) if ENV.fetch('AFTER_MERGE_MESSAGE', nil)
message.reply(ENV.fetch('AFTER_MERGE_MESSAGE', nil)) if ENV.fetch('AFTER_MERGE_MESSAGE', false)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it

atm-snag2
atm-snag2 previously approved these changes Dec 20, 2023
Copy link

@atm-snag2 atm-snag2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codeclimate bot commented Dec 20, 2023

Code Climate has analyzed commit ee43e40 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link

@atm-snag2 atm-snag2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@getty104 getty104 merged commit 33d013a into master Dec 20, 2023
5 checks passed
@getty104 getty104 deleted the add-after-merge-message-env branch December 20, 2023 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants