Making WordPress.org

Changeset 11794


Ignore:
Timestamp:
04/26/2022 06:17:41 AM (2 years ago)
Author:
dd32
Message:

Profiles: Auto-assign Meta Contributor badge when receiving props on a Meta commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/svn.php

    r11372 r11794  
    22namespace WordPressdotorg\Trac\Watcher\SVN;
    33use function WordPressdotorg\Trac\Watcher\Props\from_log as props_from_log;
     4use function WordPressdotorg\Profiles\assign_badge;
    45use function WordPressdotorg\Trac\Watcher\Props\find_user_id;
    56
     
    165166
    166167                $wpdb->insert( $props_table, $data );
     168
     169                // Auto-assign Meta Contributor badge for matched meta contributions.
     170                if ( $user_id && 'meta' === $slug && function_exists( 'WordPressdotorg\Profiles\assign_badge' ) ) {
     171                    assign_badge( 'meta-contributor', $user_id );
     172                }
    167173            }
    168174        }
Note: See TracChangeset for help on using the changeset viewer.