Giter VIP home page Giter VIP logo

Comments (22)

PeteGoo avatar PeteGoo commented on August 16, 2024

Hi, one of the issues we are seeing is that, on GitHub PRs, mentions seem to occur for anyone who has ever committed to the codebase at all.

from tcslackbuildnotifier.

Youkai-no-nii-chan avatar Youkai-no-nii-chan commented on August 16, 2024

But i'm talking about other issue. Even if mention is correctly inserted into message there is no notification because mention is inside attachment (part of the message with red line to the left).

from tcslackbuildnotifier.

galkinrost avatar galkinrost commented on August 16, 2024

@PeteGoo Should it have to work now? With latest release i don't receive mentions too

from tcslackbuildnotifier.

PeteGoo avatar PeteGoo commented on August 16, 2024

I'll have a look

from tcslackbuildnotifier.

jhurwitz avatar jhurwitz commented on August 16, 2024

@PeteGoo any updates?

from tcslackbuildnotifier.

marvin-w avatar marvin-w commented on August 16, 2024

Can someone tell me if this is working now?

Because there was a PR that should have fixed it.

from tcslackbuildnotifier.

jhurwitz avatar jhurwitz commented on August 16, 2024

My bad :). I saw the issue was still Open and didn't read the full thread or see the PR.

I see #68 was included in release 1.4.5; we're still running 1.4.4. Sounds like an update will fix this for us (unless there's something still not working, as per @galkinrost). I'll ping this thread if it doesn't work for me after the update.

from tcslackbuildnotifier.

marvin-w avatar marvin-w commented on August 16, 2024

Thanks! Would be much appreciated!

from tcslackbuildnotifier.

jhurwitz avatar jhurwitz commented on August 16, 2024

This appears to still be broken for us. TeamCity 9.1.5, tcSlackBuildNotifier 1.4.6.

from tcslackbuildnotifier.

marvin-w avatar marvin-w commented on August 16, 2024

Thanks for the feedback! Can you show me what's wrong exactly?

from tcslackbuildnotifier.

jhurwitz avatar jhurwitz commented on August 16, 2024

This is what I see (test names redacted):

screen shot 2016-08-29 at 11 39 07 pm

The user who broke the build (vgod) says he was not notified. I also find it interesting that the @mention text is black and non-clickable, whereas normal @mentions are blue and show the user's profile when clicked.

I asked that user to confirm at /profile.html that his Slack username was in his profile; he never responded to me, but I'm pretty sure it is (because, I believe I found in testing a few weeks ago, the bot doesn't even post an @ before the name unless your Slack username is in your profile).

I haven't yet tried to repro on my account, but if you'd like me to be 100% sure it's broken, I can try.

I was poking around Slack API docs, and I found https://api.slack.com/docs/message-formatting#linking_to_channels_and_users which seems to suggest that you may need the user ID (beginning with @U) to mention a user, so perhaps simply writing @username isn't enough.

To confirm this, I used the Slack API tester (https://api.slack.com/methods/chat.postMessage/test) to post two messages to a channel. The first had text test @jhurwitz and the second had text test <@U[...]>. This was the result:

screenshot 2016-08-29 23 50 55

The first created black text that did not notify me; the second created blue text that did notify me.

Interestingly though, I just looked at what #68 changed; it supplies link_names=1 to the chat.postMessage API call, and when I tried this in the API tester, a simple test @jhurwitz did create a blue mention that notified me. When I tried link_names=1 with an @mention in an attachment, the mention was blue/clickable but didn't notify me. Still, that doesn't explain why the mentions from tcSlackBuildNotifier would be black/non-clickable with no notification.

Browsing through the code a bit more, I see that link_names=1 is only provided in postViaApi, and not postViaWebHook; I wonder if perhaps our install is using webhooks instead of the API. (I can check this tomorrow if that would help.)

(And even if adding link_names=1 to postViaWebHook correctly linkifies the @mention, there's still the issue of seemingly not receiving notifications for mentions in attachments; this would appear to be a Slack bug, but perhaps one we could work around by moving the mention from the attachment to the text?)

from tcslackbuildnotifier.

Sephon avatar Sephon commented on August 16, 2024

Any update on this?
At least a workaround, like the one jhurwitz mentioned, would be very appreciated.

from tcslackbuildnotifier.

waelouf avatar waelouf commented on August 16, 2024

I believe pull request #149 fixed this issue

from tcslackbuildnotifier.

laurencee avatar laurencee commented on August 16, 2024

Yeah that looks like it'd fix the issue but there doesn't seem to be a recent release that includes that change.
@marvin-w

from tcslackbuildnotifier.

IanYoder avatar IanYoder commented on August 16, 2024

@PeteGoo @marvin-w Any chance we can get a new release, since the bug has been fixed? Anything I/we can do to help a new release get created?

from tcslackbuildnotifier.

marvin-w avatar marvin-w commented on August 16, 2024

@IanYoder @laurencee sorry for the delay.

Release is here: https://github.com/PeteGoo/tcSlackBuildNotifier/releases/tag/v1.4.7

I didn't retest this issue so if you could provide some feedback I'd close this issue afterwards.

from tcslackbuildnotifier.

laurencee avatar laurencee commented on August 16, 2024

@marvin-w Unfortunately mentions still don't appear to be working, it's just basic @blah text.

from tcslackbuildnotifier.

IanYoder avatar IanYoder commented on August 16, 2024

@marvin-w @laurencee If I'm reading everything correctly, I don't think the change made it into the release.

You can see here that line 333 of tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotificationImpl.java appears to contain the fix, but that line wasn't changed as part of the release.

I also wanted to say that I really appreciate your quick feedback and work!

from tcslackbuildnotifier.

laurencee avatar laurencee commented on August 16, 2024

Oh... well that makes a lot of sense then! haha

Edit: well unfortunately like i said, even with those changes it's not working for us :(

from tcslackbuildnotifier.

marvin-w avatar marvin-w commented on August 16, 2024

@IanYoder @laurencee Thanks for your feedback. As far as I know the code from @waelouf was merged and is available in the current release: https://github.com/PeteGoo/tcSlackBuildNotifier/commits/v1.4.7

If it doesn't work there might be another issue which isn't fixed already.

from tcslackbuildnotifier.

IanYoder avatar IanYoder commented on August 16, 2024

@marvin-w I see the change now - thank you. I'll let you know if it's working as soon as we're able to update the version and test it out.

from tcslackbuildnotifier.

IanYoder avatar IanYoder commented on August 16, 2024

@marvin-w We were able to update the plugin today, and I confirmed that the notification worked - thank you!

One suggestion I wanted to make, though: would it be possible to add some configuration to notify someone of subsequent failures, rather than just the initial failure? I didn't realize that the update was working right away, because I wasn't notified when I re-ran a broken build, or even when I committed another change; I had to fix the broken build, then re-break it.

from tcslackbuildnotifier.

Related Issues (20)

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.