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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ruby 3.0] replace slack-notifier gem with internal library #18537
Conversation
19b9dd2
to
f0d7303
Compare
f0d7303
to
cd7dd67
Compare
cd7dd67
to
81449b1
Compare
81449b1
to
722e640
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃殌 Really good stuff!!
@@ -0,0 +1,56 @@ | |||
module Fastlane | |||
module Notification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I almost forgot to mention that I like this namespace strategy a lot 馃槉
@ainame This is ready for a rebase whenever you got time! I tried to do it on my own but it looked liked a large rebase than I felt comfortable doing as I didn鈥檛 want to mess up your PR 馃槈 |
722e640
to
4a54f05
Compare
FYI: We can rebase this branch without having to resolve conflicts like below馃檪
dc2cd56 is the last commit in the previous branch. This way commits made for this PR will be applied to the master branch that has previous PR's changes squashed. |
@joshdholtz Thanks! This PR is ready to review! |
OMG... I had no idea about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, thank you 馃憦
Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
c58d9cd
to
1541c8f
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the 鈩癸笍 Googlers: Go here for more info. |
@googlebot I consent. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the 鈩癸笍 Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautiful 馃槏 Thanks again for all your work. This 3.0 dream is getting reeaaaalllll 鉂わ笍
Hey @ainame 馃憢 Thank you for your contribution to fastlane and congrats on getting this pull request merged 馃帀 Please let us know if this change requires an immediate release by adding a comment here 馃憤 |
Congratulations! 馃帀 This was released as part of fastlane 2.182.0 馃殌 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
As per the plan #17931 for Ruby 3.0, I've been working on fixing Ruby 2.7's deprecation warnings which will crash on Ruby 3.0. There is an issue where one of the fastlane's dependencies slack-notifier, which is not maintained any more, keeps producing that warning. As I explained in #18512 I decided to go with having our own implementation to post messages to Slack in fastlane. That way we get full control of logic. It is not only about Ruby version support but also Slack's webhook transition.
Right now there are two translations ongoing
To be fair,
slack-notifier
does support those but we don't know what changes will be coming from Slack in future.Description
Prior to this PR, I've updated
fastlane/spec/fastlane/actions_specs/slack_spec.rb
so it's now independent from the gem. This PR addedFastlane::Notification::Slack
class to own simple alternative ofslack-notifier
. (I suppose it might be interesting to support Microsoft teams or whatever other popular chat tools in fastlane as it's remote working era馃檪 That's why it's gotFastlane::Notification
namespace.)After digging through the gem, I realised most of the extra features in
slack-notifier
was not used by fastlane. OnlySlack::Notifier::Util::LinkFormatter
was needed to be re-implemented.Testing Steps
Get an incoming webook url from here
https://www.slack.com/apps/manage/custom-integrations
Add this snippet to
fastlane/Fastfile
in the repoRun
bundle exec fastlane slack_test
As you can see Slack app's incoming webhook can't overwrite username and icon. Instead, you need to customise them on its settings page.