#6813 Update commopsbot IRC bot to listen only for Fedora Planet messages by 'admin'
Closed: Fixed 5 years ago Opened 6 years ago by jflory7.

Summary

Update ircbot.py for commopsbot to listen for Fedora Planet fedmsg hooks, but only from the admin user (i.e. Fedora Magazine and Community Blog)

Description

It would be nice to have a messages for the Community Blog only in #fedora-commops, but the only way I know of doing that is to only allow Fedora Planet messages from the admin user.

Is this possible to do?

The commopsbot configuration is found here.


Metadata Update from @kevin:
- Issue priority set to: Waiting on Asignee

6 years ago

I think we can only do this with a new bot. ie, each bot can listen to specific topics with specific bodys and users. Would you like me to try and remove the planet from the current bot and make a new one that only notifies on planet posts from admin?

@kevin That would be awesome.

As of today, the CommOps bots do not relay any Planet notifications. So it should just be the creation of a new bot for the admin posts from the Planet.

Perhaps @pfrields @ryanlerch @cverna would also find this useful for #fedora-magazine too, since the admin user includes the Fedora Magazine as well.

Done. Let us know if you run into any problems with it.

:haircut:

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Hi, I've noticed two issues with the bot in the last couple weeks:

  1. The bot name is a typo (commoppslanet should be commopsplanet)
  2. Some Fedora Planet notifications still slip through the filter

Some, but not all, Fedora Planet notifications pass through the filter. Some examples of messages that have come through:

planet.post.new -- atodorov posted "Kiwi TCMS 5.0" http://kiwitcms.org/blog/kiwi-tcms-team/2018/07/24/kiwi-tcms-50/
planet.post.new -- stefw posted "Cockpit 173" https://cockpit-project.org/blog/cockpit-173.html
planet.post.new -- bex posted "Red Hat Summit" https://www.winglemeyer.org/technology/2017/07/13/event-report-red-hat-summit.html
planet.post.new -- bex posted "FCAIC in the House, part III" https://www.winglemeyer.org/ramblings/2017/04/27/FCAIC-in-the-house-3.html
planet.post.new -- bex posted "I Packaged DayJournal" https://www.winglemeyer.org/technology/2017/03/07/packaged-dayjournal.html
planet.post.new -- bex posted "FCAIC in the House, part II" https://www.winglemeyer.org/ramblings/2017/01/26/FCAIC-in-the-house-2.html
planet.post.new -- bex posted "LATAM Organizational FAD" https://www.winglemeyer.org/technology/2017/07/18/event-report-latam-org-fad.html
planet.post.new -- bex posted "Slice of Cake #5" https://www.winglemeyer.org/ramblings/2017/04/18/slice-of-cake.html
planet.post.new -- bex posted "Slice of Cake #23" https://www.winglemeyer.org/ramblings/2018/01/22/slice-of-cake.html
planet.post.new -- bex posted "FCAIC in the House" https://www.winglemeyer.org/ramblings/2016/10/20/FCAIC-in-the-house.html

Any idea why some of these might be coming through?

Metadata Update from @jflory7:
- Issue status updated to: Open (was: Closed)

5 years ago

Metadata Update from @smooge:
- Issue assigned to smooge

5 years ago

I am fixing the spell error.

            filters=dict(
                topic=[
                    '^((?!(planet)).)*$',
                ],
                body=['^((?!admin).)*$'],
            ),

I don't have any context in this filter to know why you are wanting to look for the word admin in the body of the post which might contain various headers and such which have that in there.

@smooge Ah, I see, I didn't know it was looking at the entire body of the content. This would probably explain it.

Currently, the admin user is used for the Fedora Magazine and Community Blog. I'd like to only grab Fedora Planet notifications from the admin user.

Can you give me a sample of where I can find a message that matches that?

@smooge This is one or two examples:

planet.post.new -- admin posted "4 cool apps for your terminal" https://fedoramagazine.org/4-cool-apps-for-your-terminal/
planet.post.new -- admin posted "Improve your Python skills this weekend" https://fedoramagazine.org/improve-python-skills-weekend/

Maybe we could filter for fedoramagazine.org or communityblog.fedoraproject.org?

Actually, for this bot, it would be great if we could only filter for communityblog.fedoraproject.org – the Fedora Magazine isn't as relevant for us.

It looks like @smooge made a change to fix this in July.

Is it working now? or not?

Yep! Everything works as expected. This is good to close. :clapper:

Metadata Update from @jflory7:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata