Skip to content

[CI] End-to-End Badge Assignment Automation #116

Description

@PARTH-TUSSLE

Current Behavior

Currently, only a few badges (like Design Pioneer / first-design) are programmatically assigned in Layer5 Cloud when a user performs a first-time action, while others rely on manual trigger scripts or Slack commands (badge-award.yml). Most badges on badges.layer5.io require manual tracking.

Desired Behavior

Automate badge assignments programmatically across ~30 eligible badges on badges.layer5.io using quantifiable criteria, categorized into 4 core execution tracks:

  1. In-App Cloud Events: Backend triggers when users perform first-time in-app actions.
  2. Project Contribution PR Merges: Reusable GitHub Action running on merged PRs to grant project badges.
  3. Monthly Contributor Crons: Scheduled GitHub Action calculating multi-month / cumulative milestones.
  4. Org & Role Webhooks: Automated badge sync for GitHub Org & Slack role grants.

Implementation

  • Track 1: In-App Cloud Events (Layer5 Cloud Backend)
    • first-application (Application Pioneer): Intercept POST /api/application.
    • first-share (Sharing is Caring): Intercept catalog publish / visibility change in PUT /api/pattern.
    • bring-a-buddy (Bring a Buddy): Award upon invitation acceptance.
    • gitops-connected (GitOps Connected): Trigger on GitHub App installation webhook.
    • first-deployment (Shipped): Telemetry event on successful deployment.
    • need-for-speed (Need for Speed): Intercept POST /api/perf/profile/result.
    • first-interactive-terminal-session (Hip Hacker): Pod exec websocket open telemetry.
    • first-log-streaming-session (Log Streamer): Pod log stream websocket open telemetry.
  • Track 2: Project Contribution PR Merges (GitHub Actions)
    • Reusable PR merge workflow mapping merged PR paths to contributor badges (sistent-contributor, meshery, meshery-operator, meshsync, meshery-docs, meshery-catalog, landscape, ui-ux).
  • Track 3: Monthly Contributor Milestone Crons (GitHub Actions)
    • Scheduled monthly workflow (1st of every month) querying GitHub GraphQL API for continuous-contributor, longevity-legend, review-rockstar, code-cleanup-crew, security-sentinel.
  • Track 4: Org & Role Webhooks
    • Webhook integration for employee and meshmate badges.

Acceptance Tests

  • Merging a PR in project repositories automatically triggers badge award API calls for authors.
  • End-of-month scheduled workflows calculate contributor thresholds and issue badges accurately.
  • In-app actions trigger badge assignment and notifications seamlessly.

Contributor Guides and Resources

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciContinuous integration | Build and release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions