Repository navigation
feat(karma): ranking y puesto por usuario - #795
Merged
Merged
Conversation
- agrega 'karma top [n]' con ranking por targetId, empates y tope de 25 - agrega 'karma @usuario' con score y puesto, resolviendo por mención o nombre - escapa markup de Slack en los nombres y cubre el flujo ++ existente con tests
hectorpalmatellez
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descripción
Agrega dos comandos a
scripts/karma.js:huemul karma top [n]: ranking de karma portargetId, con empates (mismo puntaje comparte puesto), orden alfabético secundario y tope de 25 (10 por defecto).huemul karma @usuario: puntaje y puesto del usuario, resolviendo por mención de Slack o por nombre.Los nombres se escapan para no inyectar markup de Slack y se truncan a 40 caracteres. El flujo existente de
++/--no cambia.Ejemplo de comportamiento
Tests
test/karma.test.js(10 tests):targetIdy orden por scoretop n++Corrido:
TZ=America/Santiago node node_modules/ava/entrypoints/cli.mjs test/karma.test.js→ 10 passed