def git_receive(config, message): """ Git pushes to dist-git Including this rule will produce notifications triggered when somebody runs ``fedpkg push`` on a package. """ return message['topic'] == _('git.receive')
def git_branch(config, message): """ New dist-git branches for packages Include this rule to receive notifications of new branches being created for Fedora package git repos. """ return message['topic'] == _('git.branch')
def git_repo_new(config, message): """ New repository in dist-git (https://src.fedoraproject.org). This rule triggers when a new dist-git repository is added. This occurs once a package has been reviewed and the SCM request has been approved. """ return message['topic'] == _('pagure.project.new', prefix='org.fedoraproject')
def mdapi_repo_update(config, message): """ mdapi repository changes We have a fancy (new in 2015) service called `mdapi <https://apps.fedoraproject.org/mdapi>`_ which provides a JSON api over the yum/dnf repos we create and serve. It updates its cache with a cronjob, and that cronjob produces fedmsg messages about what changed with each new import. Include this rule to receive notifications of mdapi repo changes. Hint: it is nice to use in combination with rules that target packages of interest. """ return message['topic'] == _('mdapi.repo.update')
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['fmn']) def fmn_catchall(config, message): """ All FMN meta-notification stuff Adding this rule will indiscriminately match notifications of all types from `this service <https://apps.fedoraproject.org/notifications>`_. Those kinds of messages include account, profile, and notification-preference changes. """ return message['topic'].split('.')[3] == 'fmn' @hint(topics=[_('fmn.confirmation.update')]) def fmn_confirmation_update(config, message): """ Confirmation status changes (FMN) Adding this rule to your filters will let through messages from `Notifications <https://apps.fedoraproject.org/notifications>`_ whenever the status of confirmation changes. """ return message['topic'].endswith('fmn.confirmation.update') @hint(topics=[_('fmn.filter.update')]) def fmn_filter_update(config, message): """ Notification filter changes (FMN) Adding this rule to your filters will let through messages
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['askbot']) def askbot_catchall(config, message): """ All askbot events Adding this rule will indiscriminately match notifications of all types from `Ask Fedora <https://ask.fedoraproject.org>`_ i.e. answers to questions, tag changes, moderation flags, etc.. """ return message['topic'].split('.')[3] == 'askbot' @hint(topics=[_('askbot.post.delete')]) def askbot_post_deleted(config, message): """ Deleted Ask Fedora posts This rule will let through messages that get sent when either a question or an answer are **deleted** from the `Ask Fedora <https://ask.fedoraproject.org/questions>`_ forum system. """ return message['topic'].endswith('askbot.post.delete') @hint(topics=[_('askbot.post.edit')]) def askbot_post_edited(config, message): """ Updates to Ask Fedora posts This rule will let through messages that get sent when either a question or an answer are **edited** on the `Ask Fedora
import six from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('anitya.project.version.update', prefix='org.release-monitoring')], invertible=False) def anitya_unmapped_new_update(config, message): """ New releases of upstream projects that have no mapping to Fedora Adding this rule will let through events when new upstream releases are detected, but only on upstream projects that have no mapping to Fedora Packages. This could be useful to you if you want to monitor release-monitoring.org itself and watch for projects that might need help adjusting their metadata. """ if not anitya_new_update(config, message): return False for package in message['msg']['message']['packages']: if package['distro'].lower() == 'fedora': return False # If none of the packages were listed as Fedora, then this is unmapped. return True @hint(categories=['anitya']) def anitya_catchall(config, message): """ All release-monitoring.org events
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['meetbot']) def meetbot_catchall(config, message): """ All IRC meeting events Adding this rule will indiscriminately match notifications of all types from trusty old `zodbot <https://meetbot.fedoraproject.org/>`_. It publishes messages about IRC meetings stopping, starting, changing,.. etc, as they occur. """ return message['topic'].split('.')[3] == 'meetbot' @hint(topics=[_('meetbot.meeting.complete')]) def meetbot_meeting_complete(config, message): """ IRC meetings ending Trusty old `zodbot <https://meetbot.fedoraproject.org/>`_ publishes messages too! Adding this rule will notify you when an IRC meeting ends. """ return message['topic'].endswith('meetbot.meeting.complete') @hint(topics=[_('meetbot.meeting.start')]) def meetbot_meeting_start(config, message): """ IRC meetings starting Trusty old `zodbot <https://meetbot.fedoraproject.org/>`_ publishes
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('mailman.receive')]) def mailman_receive(config, message): """ Mailing list emails Including this rule will trigger a notification anytime an **email is posted** to any Fedora Project **mailman3** list. If you're using this to send yourself emails, it might make more sense to just *subscribe to the list*... think about it. """ return message['topic'].endswith('mailman.receive')
""" return message['topic'].split('.')[3] == 'bodhi' @hint(categories=['bodhi'], invertible=False) def bodhi_critpath(config, message): """ Critpath updates (of any kind) Adding this rule will allow through notifications about **critpath updates** from the `Bodhi Updates System <https://admin.fedoraproject.org/updates>`_. """ return message['msg'].get('update', {}).get('critpath', False) @hint(topics=[_('bodhi.buildroot_override.tag')]) def bodhi_buildroot_override_tag(config, message): """ New buildroot overrides Adding this rule will allow through notifications whenever a user **requests a buildroot override** via the `Bodhi Updates System <https://admin.fedoraproject.org/updates>`_. """ return message['topic'].endswith('bodhi.buildroot_override.tag') @hint(topics=[_('bodhi.buildroot_override.untag')]) def bodhi_buildroot_override_untag(config, message): """ Buildroot overrides being removed Adding this rule will allow through notifications whenever a user
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('fedimg.image.test')]) def fedimg_image_test_state(config, message): """ Fedimg: An image test state (started, completed, or failed) Adding this rule will let through notifications from the `Fedimg <https://github.com/fedora-infra/fedimg>`_ indicating the *image test state* (started, completed or failed). """ return message['topic'].endswith('fedimg.image.test') @hint(topics=[_('fedimg.image.test')], invertible=False) def fedimg_image_test_started(config, message): """ Fedimg: An image test has started Adding this rule will let through notifications from the `Fedimg <https://github.com/fedora-infra/fedimg>`_ indicating the *image test* has started. """ if not fedimg_image_test_state(config, message): return False return message['msg']['status'] == 'started' @hint(topics=[_('fedimg.image.test')], invertible=False) def fedimg_image_test_completed(config, message): """ Fedimg: An image test has completed
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['git']) def git_catchall(config, message): """ All dist-git activity Adding this rule will indiscriminately match notifications of all types from `dist-git <http://pkgs.fedoraproject.org/cgit>`_. """ return message['topic'].split('.')[3] == 'git' @hint(topics=[_('git.branch')]) def git_branch(config, message): """ New dist-git branches for packages Include this rule to receive notifications of new branches being created for Fedora package git repos. """ return message['topic'] == _('git.branch') @hint(topics=[_('git.lookaside.new')]) def git_lookaside_new(config, message): """ New tarballs uploaded to the lookaside cache Include this rule to receive notifications of new sources being uploaded to the "lookaside cache" as when someone runs ``fedpkg new-sources <TARBALL>``. """
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['compose']) def compose_catchall(config, message): """ All compose events Adding this rule will indiscriminately match notifications of all types from the `compose process <https://apps.fedoraproject.org/releng-dash>`_. """ return message['topic'].split('.')[3] == 'compose' @hint(topics=[_('compose.branched.complete')]) def compose_branched_complete(config, message): """ Compose completed for a specific branch Adding this rule will allow through notifications published when `release engineering <https://fedoraproject.org/wiki/ReleaseEngineering>`_ completes the **entire** `compose <https://apps.fedoraproject.org/releng-dash/>`_ of the 'branched' Fedora pre-release. """ return message['topic'].endswith('compose.branched.complete') @hint(topics=[_('compose.branched.mash.complete')]) def compose_branched_mash_complete(config, message): """ Mash completed for a specific branch Adding this rule will allow through notifications published when `release engineering <https://fedoraproject.org/wiki/ReleaseEngineering>`_ completes
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('kerneltest.release.edit')]) def kerneltest_release_edit(config, message): """ An admin edits an existing release (kerneltest) Adding this rule to your filters will let through messages from `Kernel Test <https://apps.fedoraproject.org/kerneltest>`_ when an admin **edits** an existing release. """ return message['topic'].endswith('kerneltest.release.edit') @hint(topics=[_('kerneltest.release.new')]) def kerneltest_release_new(config, message): """ An admin adds a new release (kerneltest) Adding this rule to your filters will let through messages from `Kernel Test <https://apps.fedoraproject.org/kerneltest>`_ when an admin **sets up** an existing release. """ return message['topic'].endswith('kerneltest.release.new') @hint(topics=[_('kerneltest.upload.new')]) def kerneltest_upload_new(config, message): """ New kerneltest test results Adding this rule to your filters will let through messages from `Kernel Test <https://apps.fedoraproject.org/kerneltest>`_
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('nuancier.candidate.approved')]) def nuancier_candidate_approved(config, message): """ Approved wallpaper candidates Adding this rule to your filters will let through messages from `Nuancier <https://apps.fedoraproject.org/nuancier>`_ when an admin **approves** a candidate submission. """ return message['topic'].endswith('nuancier.candidate.approved') @hint(topics=[_('nuancier.candidate.denied')]) def nuancier_candidate_denied(config, message): """ Denied wallpaper candidates Adding this rule to your filters will let through messages from `Nuancier <https://apps.fedoraproject.org/nuancier>`_ when an admin **denies** a candidate submission. """ return message['topic'].endswith('nuancier.candidate.denied') @hint(topics=[_('nuancier.candidate.new')]) def nuancier_candidate_new(config, message): """ New wallpaper candidates Adding this rule to your filters will let through messages from `Nuancier <https://apps.fedoraproject.org/nuancier>`_
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('taskotron.result.new')]) def taskotron_result_new(config, message, **kwargs): """ New taskotron task result This rule lets through messages from the `taskotron <https://taskotron.fedoraproject.org>`_ about new task result. """ return message['topic'].endswith('taskotron.result.new') @hint(categories=['taskotron'], invertible=False) def taskotron_task(config, message, task=None): """ Particular taskotron task With this rule, you can limit messages to only those of particular `taskotron <https://taskotron.fedoraproject.org/>`_ task. You can specify several tasks by separating them with a comma ',', i.e.: ``dist.depcheck,dist.rpmlint``. """ # We only operate on taskotron messages, first off. if not taskotron_result_new(config, message): return False if not task: return False
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=["ansible"]) def all_ansible(config, message): """ An ansible action from Fedora-Infra The `Fedora Infrastructure team <https://fedoraproject.org/wiki/Infrastructure>`_ uses `ansible <http://ansibleworks.com>`_ to manage resources and deploy services. This rule will let through messages *all* the messages related to ansible. """ return ".ansible." in message["topic"] @hint(topics=[_("ansible.playbook.complete")]) def playbook_complete(config, message): """ Fedora-infra playbook runs finishing The `Fedora Infrastructure team <https://fedoraproject.org/wiki/Infrastructure>`_ uses `ansible <http://ansibleworks.com>`_ to manage resources and deploy services. This rule will let through messages indicating that a playbook run has *completed*. """ return message["topic"].endswith("ansible.playbook.complete") @hint(topics=[_("ansible.playbook.start")]) def playbook_started(config, message): """ Fedora-infra playbook runs starting
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['copr']) def copr_catchall(config, message): """ All Copr events Adding this rule will indiscriminately match notifications of all types from `copr <https://copr.fedoraproject.org>`__, i.e. new and finished builds, newly spun up workers and chroots, etc.. """ return message['topic'].split('.')[3] == 'copr' @hint(topics=[_('copr.build.start')]) def copr_build_start(config, message): """ Copr builds starting `Copr <https://copr.fedoraproject.org/>`_ publishes messages when a new build starts. Adding this rule will get you those messages. """ return message['topic'].endswith('copr.build.start') @hint(topics=[_('copr.build.end')]) def copr_build_end(config, message): """ Copr builds ending `Copr <https://copr.fedoraproject.org/>`__ publishes messages when a new build ends. Adding this rule will get you those messages. """
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('fedora_elections.candidate.delete')]) def fedora_elections_candidate_delete(config, message): """ Candidates are deleted from an election. Adding this rule will let through elections from `Fedora Elections <https://apps.fedoraproject.org/voting/>`_ whenever a candidate is deleted in an election. """ return message['topic'].endswith('fedora_elections.candidate.delete') @hint(topics=[_('fedora_elections.candidate.edit')]) def fedora_elections_candidate_edit(config, message): """ Candidates are updated in an election. Adding this rule will let through elections from `Fedora Elections <https://apps.fedoraproject.org/voting/>`_ whenever a candidate is edited in an election. """ return message['topic'].endswith('fedora_elections.candidate.edit') @hint(topics=[_('fedora_elections.candidate.new')]) def fedora_elections_candidate_new(config, message): """ New candidates are added to an election. Adding this rule will let through elections from `Fedora Elections <https://apps.fedoraproject.org/voting/>`_ whenever a
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('logger.log')]) def logger_log(config, message): """ Admin logging and debug statements Include this rule to receive notifications of messages being sent by an admin who uses `fedmsg-logger` on a host, and doesn't explicitly provide a topic for the message to get sent as. This is usually used for testing. """ return message['topic'].endswith('logger.log')
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['github']) def github_catchall(config, message): """ All Fedora-related GitHub activity Adding this rule will indiscriminately match notifications of all types from `github <https://github.com>`__ (but only the repositories that are mapped to Fedora via the `github2fedmsg service <https://apps.fedoraproject.org/github2fedmsg>`_). """ return message['topic'].split('.')[3] == 'github' @hint(topics=[_('github.commit_comment')]) def github_commit_comment(config, message): """ Commit comments (github.com) Adding this rule to your filters will let through messages from `Github <https://apps.fedoraproject.org/github2fedmsg>`__ when someone **directly comments on a commit**. """ return message['topic'].endswith('github.commit_comment') @hint(topics=[_('github.create')]) def github_create(config, message): """ New tags and branches (github.com) Adding this rule to your filters will let through messages
so you get only a *certain subset* of messages from one instance. You almost certainly do not want **all** messages from a given instance. You can specify several instances by separating them with a comma ',', i.e.: ``primary,ppc``. """ instance = kw.get('instance', instance) if not instance: return False instances = [item.strip() for item in instance.split(',')] return message['msg'].get('instance') in instances @hint(topics=[_('buildsys.task.state.change')]) def koji_scratch_build_state_change(config, message): """ Scratch builds changing state (any state) This rule lets through messages from the `koji build system <http://koji.fedoraproject.org>`_ about **scratch** build state state changes (any state at all: started, completed, failed, cancelled). """ return message['topic'].endswith('buildsys.task.state.change') @hint(topics=[_('buildsys.task.state.change')], invertible=False) def koji_scratch_build_started(config, message): """ Scratch builds starting This rule lets through messages from the `koji build
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_("fedora_elections.candidate.delete")]) def fedora_elections_candidate_delete(config, message): """ Candidates are deleted from an election. Adding this rule will let through elections from `Fedora Elections <https://apps.fedoraproject.org/voting/>`_ whenever a candidate is deleted in an election. """ return message["topic"].endswith("fedora_elections.candidate.delete") @hint(topics=[_("fedora_elections.candidate.edit")]) def fedora_elections_candidate_edit(config, message): """ Candidates are updated in an election. Adding this rule will let through elections from `Fedora Elections <https://apps.fedoraproject.org/voting/>`_ whenever a candidate is edited in an election. """ return message["topic"].endswith("fedora_elections.candidate.edit") @hint(topics=[_("fedora_elections.candidate.new")]) def fedora_elections_candidate_new(config, message): """ New candidates are added to an election. Adding this rule will let through elections from `Fedora Elections <https://apps.fedoraproject.org/voting/>`_ whenever a
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['pkgdb']) def pkgdb_catchall(config, message): """ All Package DB events Adding this rule will indiscriminately match notifications of all types from `pkgdb2 <https://admin.fedoraproject.org/pkgdb>`_, i.e. ACL changes, new packages, requests for ownership, etc.. """ return message['topic'].split('.')[3] == 'pkgdb' @hint(topics=[_('pkgdb.acl.update')]) def pkgdb_acl_update(config, message): """ Package ACL updates Adding this rule will trigger notifications when an ACL on a package is **updated** in the Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_. """ return message['topic'].endswith('pkgdb.acl.update') @hint(topics=[_('pkgdb.acl.delete')]) def pkgdb_acl_delete(config, message): """ Package ACLs are deleted Adding this rule will trigger notifications when an ACL on a package is **deleted** in the Fedora `Package DB
# Basic building steps @hint(categories=['ci']) def ci_catchall(config, message): """ All CI events Adding this rule will indiscriminately match notifications of all types from the `Fedora Atomic CI pipeline <https://fedoraproject.org/wiki/FedoraAtomicCI/pipeline>`_, i.e. new build queued, running, complete, compose running, complete, etc.. """ return message['topic'].split('.')[3] == 'ci' @hint(topics=[_('ci.pipeline.package.ignore')]) def ci_package_ignore(config, message): """ Package ignored by CI Adding this rule will trigger notifications a package is ignored by the Fedora Atomic `CI pipeline <https://fedoraproject.org/wiki/FedoraAtomicCI/pipeline>`_. """ return message['topic'].endswith('ci.pipeline.package.ignore') @hint(topics=[_('ci.pipeline.package.queued')]) def ci_package_queued(config, message): """ Package queued in CI Adding this rule will trigger notifications a package has been queued
from fmn.lib.hinting import hint, prefixed as _ import fnmatch RELEASE_CRITICAL_TASKS = [ # if you update this, don't forget to also update the docstring for # taskotron_release_critical_task() 'dist.abicheck', 'dist.rpmdeplint', 'dist.upgradepath', ] @hint(topics=[_('taskotron.result.new')]) def taskotron_result_new(config, message, **kwargs): """ New taskotron task result This rule lets through messages from the `taskotron <https://taskotron.fedoraproject.org>`_ about new task result. """ return message['topic'].endswith('.taskotron.result.new') @hint(categories=['taskotron'], invertible=False) def taskotron_task(config, message, task=None): """ Particular taskotron task With this rule, you can limit messages to only those of particular `taskotron <https://taskotron.fedoraproject.org/>`_ task. Some tasks are documented on the `wiki <https://fedoraproject.org/wiki/Taskotron/Tasks>`_, and a full list of testcases (on which you can match) is visible in `resultsdb <https://taskotron.fedoraproject.org/resultsdb/testcases>`_.
"""Notification rules relating to dist-git.""" from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['git']) def git_catchall(config, message): """ All dist-git activity Adding this rule will indiscriminately match notifications of all types from `dist-git <http://pkgs.fedoraproject.org/cgit>`_. """ return message['topic'].split('.')[3] == 'git' @hint(topics=[_('git.branch')]) def git_branch(config, message): """ New dist-git branches for packages Include this rule to receive notifications of new branches being created for Fedora package git repos. """ return message['topic'] == _('git.branch') @hint(topics=[_('git.lookaside.new')]) def git_lookaside_new(config, message): """ New tarballs uploaded to the lookaside cache Include this rule to receive notifications of new sources being uploaded to the "lookaside cache" as when someone runs ``fedpkg new-sources <TARBALL>``.
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=["fedoratagger"]) def fedoratagger_catchall(config, message): """ All Fedora Tagger events Adding this rule will indiscriminately match notifications of all types from `fedora-tagger <https://apps.fedoraproject.org/tagger>`_, i.e. votes on tags, usage count changes, etc.. """ return message["topic"].split(".")[3] == "fedoratagger" @hint(topics=[_("fedoratagger.rating.update")]) def fedoratagger_rating_update(config, message): """ The rating changes on a package (fedora-tagger) Adding this rule to your filters will let through messages from `Fedora Tagger <https://apps.fedoraproject.org/tagger>`_ that get published when a user updates the **rating** on a package. """ return message["topic"].endswith("fedoratagger.rating.update") @hint(topics=[_("fedoratagger.tag.create")]) def fedoratagger_tag_create(config, message): """ New tags on a package (fedora-tagger) Adding this rule to your filters will let through messages from `Fedora Tagger <https://apps.fedoraproject.org/tagger>`_
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('fedbadges.badge.award')]) def fedbadges_badge_award(config, message): """ New badge awards in the Fedora Badges system Adding this rule will let through notifications from the `Fedora Badges <https://badges.fedoraproject.org>`_ system whenever someone is *awarded a new badge*. """ return message['topic'].endswith('fedbadges.badge.award') @hint(topics=[_('fedbadges.person.login.first')]) def fedbadges_person_first_login(config, message): """ New people login to badges.fedoraproject.org Adding this rule will let through notifications from the `Fedora Badges <https://badges.fedoraproject.org>`_ system whenever someone *logs in* for the *first time*. """ return message['topic'].endswith('fedbadges.person.login.first') @hint(topics=[_('fedbadges.person.rank.advance')]) def fedbadges_person_rank_advance(config, message): """ Rank changes in the Fedora Badges system Adding this rule will let through notifications from the `Fedora Badges <https://badges.fedoraproject.org>`_ system whenever someone's *rank
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['copr']) def copr_catchall(config, message): """ All Copr events Adding this rule will indiscriminately match notifications of all types from `copr <https://copr.fedoraproject.org>`_, i.e. new and finished builds, newly spun up workers and chroots, etc.. """ return message['topic'].split('.')[3] == 'copr' @hint(topics=[_('copr.build.start')]) def copr_build_start(config, message): """ Copr builds starting `Copr <https://copr.fedoraproject.org/>`_ publishes messages when a new build starts. Adding this rule will get you those messages. """ return message['topic'].endswith('copr.build.start') @hint(topics=[_('copr.build.end')]) def copr_build_end(config, message): """ Copr builds ending `Copr <https://copr.fedoraproject.org/>`_ publishes messages when a new build ends. Adding this rule will get you those messages. """
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's build or resolution state changes. """ return message['topic'].endswith('koschei.package.state.change') @hint(categories=['koschei'], invertible=False) def koschei_group(config, message, group=None): """ Particular Koschei package groups This rule limits message to particular `Koschei <https://apps.fedoraproject.org/koschei/>`_ groups. You can specify more groups separated by commas. """ if not group or 'koschei' not in message['topic']: return False groups = set([item.strip() for item in group.split(',')]) return bool(groups.intersection(message['msg'].get('groups', [])))
import six from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[ _('anitya.project.version.update', prefix='org.release-monitoring') ], invertible=False) def anitya_unmapped_new_update(config, message): """ New releases of upstream projects that have no mapping to Fedora Adding this rule will let through events when new upstream releases are detected, but only on upstream projects that have no mapping to Fedora Packages. This could be useful to you if you want to monitor release-monitoring.org itself and watch for projects that might need help adjusting their metadata. """ if not anitya_new_update(config, message): return False for package in message['msg']['message']['packages']: if package['distro'].lower() == 'fedora': return False # If none of the packages were listed as Fedora, then this is unmapped. return True @hint(categories=['anitya']) def anitya_catchall(config, message):
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['fedoratagger']) def fedoratagger_catchall(config, message): """ All Fedora Tagger events Adding this rule will indiscriminately match notifications of all types from `fedora-tagger <https://apps.fedoraproject.org/tagger>`_, i.e. votes on tags, usage count changes, etc.. """ return message['topic'].split('.')[3] == 'fedoratagger' @hint(topics=[_('fedoratagger.rating.update')]) def fedoratagger_rating_update(config, message): """ The rating changes on a package (fedora-tagger) Adding this rule to your filters will let through messages from `Fedora Tagger <https://apps.fedoraproject.org/tagger>`_ that get published when a user updates the **rating** on a package. """ return message['topic'].endswith('fedoratagger.rating.update') @hint(topics=[_('fedoratagger.tag.create')]) def fedoratagger_tag_create(config, message): """ New tags on a package (fedora-tagger) Adding this rule to your filters will let through messages from `Fedora Tagger <https://apps.fedoraproject.org/tagger>`_
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('planet.post.new')]) def planet_post_new(config, message): """ New blog posts on the Fedora Planet Yes, yes.. you could always use an RSS reader... but if you add *this* rule to your filter, you'll get notifications when new posts appear on the `Fedora Planet <https://planet.fedoraproject.org>`_. """ return message['topic'].endswith('planet.post.new')
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['bugzilla']) def bugzilla_catchall(config, message): """ All RHBZ activity Adding this rule will indiscriminately match notifications of all types from `Bugzilla <https://bugzilla.redhat.com>`_. """ return message['topic'].split('.')[3] == 'bugzilla' @hint(topics=[_('bugzilla.bug.new')]) def bugzilla_bug_new(config, message): """ New RHBZ bugs Adding this rule will trigger notifications when a user **files** a new bug in `Bugzilla <https://bugzilla.redhat.com>`_ for **Fedora** or **Fedora EPEL** products. """ return message['topic'].endswith('bugzilla.bug.new') @hint(topics=[_('bugzilla.bug.update')]) def bugzilla_bug_update(config, message): """ Updates to existing RHBZ bugs Adding this rule will trigger notifications when a user **updates** a bug in `Bugzilla <https://bugzilla.redhat.com>`_ for **Fedora** or **Fedora EPEL** products.
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['wiki']) def wiki_catchall(config, message): """ All wiki events Adding this rule will indiscriminately match notifications of all types from the Fedora Project `wiki <https://fedoraproject.org/wiki>`_ i.e. edits to wiki pages, new media uploads, etc... """ return message['topic'].split('.')[3] == 'wiki' @hint(topics=[_('wiki.article.edit')]) def wiki_article_edit(config, message): """ Wiki edits Fedora's `Wiki <https://fedoraproject.org/wiki>`_ has a fedmsg hook that publishes messages when a user **edits a page**. Adding this rule will trigger notifications whenever that event occurs. """ return message['topic'].endswith('wiki.article.edit') @hint(topics=[_('wiki.upload.complete')]) def wiki_upload_complete(config, message): """ Wiki media uploads Fedora's `Wiki <https://fedoraproject.org/wiki>`_ has a fedmsg hook that publishes messages when a user **uploads some media** (like a video or
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['fedocal']) def fedocal_catchall(config, message): """ All Fedora Calendar events Adding this rule will indiscriminately match notifications of all types from the `Fedocal Calendaring System <https://apps.fedoraproject.org/calendar>`_, i.e. messages about new calendars, new meetings, and more. """ return message['topic'].split('.')[3] == 'fedocal' @hint(topics=[_('fedocal.calendar.clear')]) def fedocal_calendar_clear(config, message): """ When an admin has cleared all meetings from a calendar. Adding this rule will let through notifications from `Fedocal <https://apps.fedoraproject.org/calendar>`_ whenever someone clears all meetings from a calendar there. """ return message['topic'].endswith('fedocal.calendar.clear') @hint(topics=[_('fedocal.calendar.new')]) def fedocal_calendar_create(config, message): """ New fedocal calendars Adding this rule will let through notifications from `Fedocal
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('fedbadges.badge.award')]) def fedbadges_badge_award(config, message): """ New badge awards in the Fedora Badges system Adding this rule will let through notifications from the `Fedora Badges <https://badges.fedoraproject.org>`__ system whenever someone is *awarded a new badge*. """ return message['topic'].endswith('fedbadges.badge.award') @hint(topics=[_('fedbadges.person.login.first')]) def fedbadges_person_first_login(config, message): """ New people login to badges.fedoraproject.org Adding this rule will let through notifications from the `Fedora Badges <https://badges.fedoraproject.org>`__ system whenever someone *logs in* for the *first time*. """ return message['topic'].endswith('fedbadges.person.login.first') @hint(topics=[_('fedbadges.person.rank.advance')]) def fedbadges_person_rank_advance(config, message): """ Rank changes in the Fedora Badges system Adding this rule will let through notifications from the `Fedora Badges <https://badges.fedoraproject.org>`__ system whenever someone's *rank
from fmn.lib.hinting import hint, prefixed as _ @hint(categories=['mbs']) def mbs_catchall(config, message): """ All MBS events Adding this rule will indiscriminately match notifications of all types from the `module build service <https://mbs.fedoraproject.org>`_, i.e. every time any module build transitions to any state (init, wait, build, failed, completed, ready, ...) """ return message['topic'].split('.')[3] == 'mbs' @hint(topics=[_('mbs.module.state.change')]) def mbs_build_state_change(config, message): """ Module builds changing state (any state) This rule lets through messages from the `mbs build service <https://mbs.fedoraproject.org>`_ that get published anytime a build changes state. The state could be anything: started, completed, failed, etc... """ return message['topic'].endswith('mbs.module.state.change') @hint(topics=[_('buildsys.build.state.change')], invertible=False) def mbs_build_started(config, message): """ Module builds submitted
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('autocloud.compose.queued')]) def autocloud_compose_test_queued(config, message): """ Autocloud: A compose has been queued for testing Adding this rule will let through notifications from the `Autocloud <https://apps.fedoraproject.org/autocloud/>` indicating the *compose test* has been queued. """ return message['topic'].endswith('autocloud.compose.queued') @hint(topics=[_('autocloud.compose.running')]) def autocloud_compose_test_running(config, message): """ Autocloud: The tests for the compose are running Adding this rule will let through notifications from the `Autocloud <https://apps.fedoraproject.org/autocloud/>` indicating the *compose test* has started running. """ return message['topic'].endswith('autocloud.compose.running') @hint(topics=[_('autocloud.compose.complete')]) def autocloud_compose_test_completed(config, message): """ Autocloud: The tests for the compose has completed Adding this rule will let through notifications from the `Autocloud <https://apps.fedoraproject.org/autocloud/>`