Giter VIP home page Giter VIP logo

Comments (11)

ptfly avatar ptfly commented on May 20, 2024 2

Cant right now, not in front of a computer. Will test tmr and report back. Thanks for your cooperation!

from fastlane-plugin-slack_bot.

ptfly avatar ptfly commented on May 20, 2024 1

Works, thanks for the update!

from fastlane-plugin-slack_bot.

crazymanish avatar crazymanish commented on May 20, 2024

Hi @ptfly

Can you share with me how you are calling the post_to_slack action, so I can debug...it should not raise exception, nothing breaking was release in v2.188.0 🤔

from fastlane-plugin-slack_bot.

ptfly avatar ptfly commented on May 20, 2024

Nothing special, it was working before, may be some other dependency. Here is the implementation on my side:

    messageInstance = post_to_slack(
        channel: slackChannel,
        api_token: slackToken,
        username: slackUsername,
        icon_url: slackAvatar,
        pretext: "New App version is available for testing!",
        default_payloads: [:git_branch, :number_of_commits, :last_git_commit],
        payload: {
            "iOS:" => iosStoreLink,
            "Android:" => androidStoreLink,
            "Build Details:" => appPackage[:version] +" / "+ appPackage[:build],
        }
    )

from fastlane-plugin-slack_bot.

crazymanish avatar crazymanish commented on May 20, 2024

Hi @ptfly

Just tested with one message will all the above params, It is working for me...
I am requesting you to try one test slack message i.e see below

post_to_slack(
        channel: slackChannel,
        api_token: slackToken,
        pretext: "This is a testing slack message", # testing slack message
        default_payloads: [:git_branch, :number_of_commits, :last_git_commit],
        payload: {
            "iOS:" => "iosStoreLink",
            "Android:" => "androidStoreLink",
            "Build Details:" => "appPackage[:version]" +" / "+ "appPackage[:build]",
        }
    )

from fastlane-plugin-slack_bot.

ptfly avatar ptfly commented on May 20, 2024

The exact same error. I even tried with just this:

    post_to_slack(
        channel: slackChannel,
        api_token: slackToken,
        pretext: "This is a testing slack message",
    )

No difference at all :(

If I comment out this line:
options[:message] = Helper::SlackBotLinkFormatterHelper.format(options[:message]) from post_to_slack.rb action, I can send the message.

Also, I have to remove the payload object in order to succeed. Nomatter the content of the payload, when used, it fails.

Ruby version:ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

from fastlane-plugin-slack_bot.

ptfly avatar ptfly commented on May 20, 2024

Ok, here is the fix, replacing this:

        # def initialize string, formats: %i[html markdown]
        #   @formats = formats
        #   @orig    = string.respond_to?(:scrub) ? string.scrub : string
        # end

        # This one works at least on my setup
        def initialize string, opts = {}
          @formats = opts[:formats] || %i[html markdown]
          @orig    = string.respond_to?(:scrub) ? string.scrub : string
        end

Found the fix here: slack-notifier/slack-notifier#124 (comment)

from fastlane-plugin-slack_bot.

crazymanish avatar crazymanish commented on May 20, 2024

Ok, here is the fix, replacing this:

        # def initialize string, formats: %i[html markdown]
        #   @formats = formats
        #   @orig    = string.respond_to?(:scrub) ? string.scrub : string
        # end

        # This one works at least on my setup
        def initialize string, opts = {}
          @formats = opts[:formats] || %i[html markdown]
          @orig    = string.respond_to?(:scrub) ? string.scrub : string
        end

Found the fix here: slack-notifier/slack-notifier#124 (comment)

Cool, but that is Ruby 3.0.0 issue 🤔 and you are using Ruby2.6.3
Anyways, I am applying this patch, will release soon 😊

Screenshot 2021-07-29 at 20 02 32

from fastlane-plugin-slack_bot.

ptfly avatar ptfly commented on May 20, 2024

Yes, its 3.0 but have no idea why its working. Probably fastlane is using another ruby in a different context which I might have installed with something else. Have to check this thing out :)

from fastlane-plugin-slack_bot.

crazymanish avatar crazymanish commented on May 20, 2024

Hi @ptfly

Push the fix and release the new version 1.1.0...
https://rubygems.org/gems/fastlane-plugin-slack_bot/versions/1.1.0

You may need to run bundle update fastlane-plugin-slack_bot to use the latest version.
can you please test once? After your confirmation, I will close this bug. Thanks for finding the issue 👏

from fastlane-plugin-slack_bot.

crazymanish avatar crazymanish commented on May 20, 2024

Thanks, Closing this issue with git-commit 54b0af0 & release version v1.1.0

from fastlane-plugin-slack_bot.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.