-
Notifications
You must be signed in to change notification settings - Fork 54
feat: add feature flag on verify command #309
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
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughThis update introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DiscordBot
participant verifyCommand
participant Config
User->>DiscordBot: Issues /verify command (with optional dev flag)
DiscordBot->>verifyCommand: Calls verifyCommand(..., dev?)
verifyCommand->>Config: Gets MAIN_SITE_URL based on env
alt dev flag is true
verifyCommand->>User: Responds with MAIN_SITE_URL + dev=true
else dev flag is false or absent
verifyCommand->>User: Responds with VERIFICATION_SITE_URL
end
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🔭 Outside diff range comments (1)
src/controllers/baseHandler.ts (1)
46-46
:⚠️ Potential issueFix the import path for DevFlag.
The import statement shows DevFlag being imported from
"../typeDefinitions/filterUsersByRole"
, but according to the relevant code snippets and other files in this PR, it should be imported from"../typeDefinitions/verify.types"
.-import { DevFlag } from "../typeDefinitions/filterUsersByRole"; +import { DevFlag } from "../typeDefinitions/verify.types";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (9)
.github/workflows/register-commands-production.yaml
(1 hunks).github/workflows/register-commands-staging.yaml
(1 hunks)config/config.ts
(4 hunks)src/constants/commands.ts
(1 hunks)src/constants/urls.ts
(1 hunks)src/controllers/baseHandler.ts
(1 hunks)src/controllers/verifyCommand.ts
(2 hunks)src/typeDefinitions/default.types.d.ts
(1 hunks)src/typeDefinitions/verify.types.ts
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/controllers/baseHandler.ts (3)
src/typeDefinitions/discordMessage.types.d.ts (1)
messageRequestDataOptions
(66-71)src/typeDefinitions/verify.types.ts (1)
DevFlag
(1-5)src/controllers/verifyCommand.ts (1)
verifyCommand
(13-47)
config/config.ts (1)
src/constants/urls.ts (3)
RDS_MAIN_SITE_URL
(31-31)RDS_STAGING_MAIN_SITE_URL
(32-32)RDS_DEVELOPMENT_MAIN_SITE_URL
(33-33)
src/controllers/verifyCommand.ts (3)
src/typeDefinitions/default.types.d.ts (1)
env
(1-3)src/typeDefinitions/verify.types.ts (1)
DevFlag
(1-5)src/constants/responses.ts (2)
VERIFICATION_STRING
(37-38)VERIFICATION_SUBSTRING
(40-41)
🔇 Additional comments (7)
.github/workflows/register-commands-staging.yaml (1)
57-57
: Standardize YAML quoting for wranglerVersion
Changed thewranglerVersion
value from single quotes to double quotes to match the production workflow and ensure consistent YAML style..github/workflows/register-commands-production.yaml (1)
57-57
: Ensure consistent quoting style
UpdatedwranglerVersion
to use double quotes for consistency with the staging workflow and YAML conventions.src/typeDefinitions/default.types.d.ts (1)
16-16
: LGTM!The
MAIN_SITE_URL
property addition is consistent with the existing interface structure and properly typed as a string.config/config.ts (2)
16-18
: LGTM! Clean import of main site URL constants.The imports follow the established pattern and include all necessary environment-specific URLs.
80-80
: LGTM! Consistent addition of MAIN_SITE_URL across environments.The
MAIN_SITE_URL
property is correctly added to all three environment configurations (production, staging, default) with their respective URL constants.Also applies to: 89-89, 99-99
src/controllers/verifyCommand.ts (2)
11-11
: LGTM! Correct import of DevFlag type.The import follows the proper path structure for the DevFlag type definition.
19-21
: LGTM! Function signature properly updated.The optional
dev
parameter is correctly added to support the new feature flag functionality.
f158da0
to
d1d97d0
Compare
1db11ae
to
30e42e8
Compare
3cc98a0
to
d1d97d0
Compare
* feat: add feature flag on verify command * feat: add test cases * fix: comments * revert: yml file changes Co-authored-by: Amit Prakash <[email protected]>
Date: 26 may, 2025
Developer Name: @tejaskh3
Issue Ticket Number
closes #310
Description
Documentation Updated?
NA
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
testing video on new site vs old both are same
Screen.Recording.2025-05-26.at.10.11.06.AM.1.1.mov
new screenshot

after updation