-
-
Notifications
You must be signed in to change notification settings - Fork 647
Implement certificate metadata issuance system #4922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anurag2787
wants to merge
18
commits into
OWASP:feature/contributor-recognition-program
Choose a base branch
from
anurag2787:certificate-metadata
base: feature/contributor-recognition-program
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
db9356c
Implement contribution score calculation
anurag2787 ab44181
Fixed coderabbit review
anurag2787 6059dca
fix error logging
anurag2787 19df2cb
Merge branch 'feature/contributor-recognition-program' into score-cal…
anurag2787 e75c035
Address the review
anurag2787 034b419
fixed pre-commit check
anurag2787 3461f2c
Address coderabbit comment
anurag2787 839d772
Create Certificate metadata generation
anurag2787 0359e86
fixed check
anurag2787 362b013
address coderabbit comment
anurag2787 d651eed
update
anurag2787 32353e5
fix error handling
anurag2787 2839c93
update
anurag2787 31e69d7
Merge branch 'feature/contributor-recognition-program' into certifica…
anurag2787 abc9b21
Merge branch 'feature/contributor-recognition-program' into certifica…
anurag2787 425ee43
Fixed file naming
anurag2787 b069ab8
Address the review
anurag2787 67388ee
Fixed exception
anurag2787 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
27 changes: 27 additions & 0 deletions
27
backend/apps/owasp/management/commands/owasp_crp_recognition_recalculate_scores.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| """Command to recalculate contributor scores.""" | ||
|
|
||
| from django.core.management.base import BaseCommand | ||
|
|
||
| from apps.owasp.score_calculator import ContributionScoreCalculator | ||
|
|
||
|
|
||
| class Command(BaseCommand): | ||
| """Management command for recalculating contributor scores.""" | ||
|
|
||
| help = "Recalculate contributor scores and tier assignments." | ||
|
|
||
| def handle(self, *args, **options) -> None: | ||
| """Handle the command execution.""" | ||
| self.stdout.write("Starting score recalculation for all users...") | ||
|
|
||
| calculator = ContributionScoreCalculator() | ||
| result = calculator.recalculate_all() | ||
|
|
||
| self.stdout.write( | ||
| self.style.SUCCESS( | ||
| f"Score recalculation complete:\n" | ||
| f" - Total users: {result['total']}\n" | ||
| f" - Created: {result['created']}\n" | ||
| f" - Updated: {result['updated']}" | ||
| ) | ||
| ) |
28 changes: 28 additions & 0 deletions
28
backend/apps/owasp/migrations/0074_alter_certificate_table_and_more.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Generated by Django 6.0.3 on 2026-06-12 16:25 | ||
|
|
||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("owasp", "0073_scoringweight_certificate_contributionscore_and_more"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterModelTable( | ||
| name="certificate", | ||
| table="owasp_crp_recognition_certificates", | ||
| ), | ||
| migrations.AlterModelTable( | ||
| name="contributionscore", | ||
| table="owasp_crp_recognition_contribution_scores", | ||
| ), | ||
| migrations.AlterModelTable( | ||
| name="leaderboardsnapshot", | ||
| table="owasp_crp_recognition_leaderboard_snapshots", | ||
| ), | ||
| migrations.AlterModelTable( | ||
| name="scoringweight", | ||
| table="owasp_crp_recognition_scoring_weights", | ||
| ), | ||
| ] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| from .board_of_directors import BoardOfDirectors | ||
| from .certificate import Certificate | ||
| from .chapter import Chapter | ||
| from .committee import Committee | ||
| from .contribution_score import ContributionScore | ||
| from .crp.certificate import Certificate | ||
| from .crp.contribution_score import ContributionScore | ||
| from .crp.leaderboard_snapshot import LeaderboardSnapshot | ||
| from .crp.recognition_enums import EventTypeChoices, TierChoices | ||
| from .crp.scoring_weight import ScoringWeight | ||
| from .entity_channel import EntityChannel | ||
| from .entity_member import EntityMember | ||
| from .event import Event | ||
| from .leaderboard_snapshot import LeaderboardSnapshot | ||
| from .member_profile import MemberProfile | ||
| from .member_snapshot import MemberSnapshot | ||
| from .post import Post | ||
| from .project import Project | ||
| from .project_health_metrics import ProjectHealthMetrics | ||
| from .project_health_requirements import ProjectHealthRequirements | ||
| from .recognition_enums import EventTypeChoices, TierChoices | ||
| from .scoring_weight import ScoringWeight | ||
| from .snapshot import Snapshot | ||
| from .sponsor import Sponsor |
Empty file.
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
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
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
File renamed without changes.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.