Skip to content

Conversation

@az2924
Copy link
Collaborator

@az2924 az2924 commented Jan 2, 2026

…ngLanguage

562

Description of changes

  • Added shouldExpireBy and syntaxHighlighting into createTable SQL
  • Added shouldExpireBy and syntaxHighlighting into createTable in AdminController
  • Added tests to AdminControllerTests

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Dev

A. Integration Tests Passing
Screenshot 2026-01-02 at 2 15 19 AM

B. Created Leaderboard with shouldExpireBy set and syntaxHighlightingLanguage set to NULL

Screenshot 2026-01-02 at 6 22 37 PM Screenshot 2026-01-02 at 6 22 58 PM

C. Created Leaderboard with shouldExpireBy not set and syntaxHighlightingLanguage set to cpp

Screenshot 2026-01-02 at 6 31 31 PM Screenshot 2026-01-02 at 6 48 42 PM

Staging

Copilot AI review requested due to automatic review settings January 2, 2026 07:03
@az2924
Copy link
Collaborator Author

az2924 commented Jan 2, 2026

/deploy

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

The command to deploy to staging for the commit 4896827 has been triggered. View action run

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for optional shouldExpireBy and syntaxHighlightingLanguage fields to leaderboards. These fields allow administrators to set an expiration date for leaderboards and specify the programming language for syntax highlighting.

  • Added database columns for shouldExpireBy and syntaxHighlightingLanguage to the Leaderboard table
  • Implemented validation logic in AdminController to ensure expiration dates are in the future
  • Added comprehensive test coverage for the new optional fields including null handling, validation, and combinations

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
db/migration/V0066__Add_expireBy_and_syntaxHighlighting_to_leaderboard_table.SQL Adds database columns for the new leaderboard fields (note: these columns already exist from previous migrations)
src/main/java/com/patina/codebloom/api/admin/body/NewLeaderboardBody.java Adds shouldExpireBy and syntaxHighlightingLanguage as optional fields to the request body
src/main/java/com/patina/codebloom/api/admin/AdminController.java Implements validation for shouldExpireBy (must be in future) and maps both new fields to the Leaderboard model
src/main/java/com/patina/codebloom/common/db/repos/leaderboard/LeaderboardSqlRepository.java Updates SQL INSERT statement to include the new columns and sets their values when creating a leaderboard
src/test/java/com/patina/codebloom/api/admin/AdminControllerTest.java Adds comprehensive tests for the new fields including success cases, validation, null handling, and combinations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Overall Project 72.3% 🍏
Files changed 100% 🍏

File Coverage
LeaderboardSqlRepository.java 89.8% 🍏
AdminController.java 66.21% 🍏

@az2924
Copy link
Collaborator Author

az2924 commented Jan 2, 2026

/deploy

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Staging deployment succeeded for commit 4896827

View run

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

The command to deploy to staging for the commit bad69ce has been triggered. View action run

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Overall Project 72.3% 🍏
Files changed 100% 🍏

File Coverage
LeaderboardSqlRepository.java 89.8% 🍏
AdminController.java 66.21% 🍏

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Staging deployment failed for commit bad69ce

**

View run

1 similar comment
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Staging deployment failed for commit bad69ce

**

View run

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Overall Project 72.3% 🍏
Files changed 100% 🍏

File Coverage
LeaderboardSqlRepository.java 89.8% 🍏
AdminController.java 66.21% 🍏

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Staging deployment succeeded for commit bad69ce

View run

@az2924
Copy link
Collaborator Author

az2924 commented Jan 2, 2026

/deploy

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

The command to deploy to staging for the commit 3d5af15 has been triggered. View action run

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Staging deployment succeeded for commit 3d5af15

View run

@az2924
Copy link
Collaborator Author

az2924 commented Jan 2, 2026

/deploy

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

The command to deploy to staging for the commit 3d5af15 has been triggered. View action run

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Staging deployment succeeded for commit 3d5af15

View run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants