-
Notifications
You must be signed in to change notification settings - Fork 752
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
Feature/with feature flags #1716
Conversation
…rowd.dev into feature/with-feature-flags
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
8013672 | GitHub Access Token | 1f1b0f7 | backend/src/services/memberService.ts | View secret |
8013672 | GitHub Access Token | 07a48b6 | backend/src/services/memberService.ts | View secret |
8013672 | GitHub Access Token | 3692f5b | backend/src/services/memberService.ts | View secret |
8013672 | GitHub Access Token | 8a9e204 | backend/src/services/memberService.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
@@ -7,6 +7,8 @@ export enum FeatureFlag { | |||
MEMBER_ENRICHMENT = 'member-enrichment', | |||
ORGANIZATION_ENRICHMENT = 'organization-enrichment', | |||
SEGMENTS = 'segments', | |||
FIND_GITHUB = 'find-github', | |||
QUICKSTART_V2 = 'quickstart-v2', |
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.
quickstart is not there anymore so just delete this line.
Co-authored-by: Joana Maia <[email protected]>
Changes proposed ✍️
What
🤖 Generated by Copilot at 374d76e
This pull request adds a feature to find GitHub profiles for members who do not have one, using the GitHub search API and a feature flag. It modifies the backend and frontend services, components, routes, controllers, configuration, and types to implement the feature. It also reformats some code and simplifies a script.
🤖 Generated by Copilot at 374d76e
Why
How
🤖 Generated by Copilot at 374d76e
CROWD_GITHUB_TOKEN
to store the GitHub personal access token for the API calls to GitHub (link)githubToken
to map the environment variable to thegithubToken.token
value (link, link, link, link)/tenant/:tenantId/member/github/:id
to handle the GET requests to find the GitHub profiles for a given member ID (link)memberFindGithub
to validate the user permissions, call theMemberService.findGithub
method, and send the response using theresponseHandler
(link)findGithub
to theMemberService
class to make a GET request to the GitHub search API, passing the member identities as a query string and the GitHub token as a header, and map the response data to a simpler format (link, link)FIND_GITHUB
to theFeatureFlag
enum to represent the feature flag for finding GitHub profiles for members (link)app-member-find-github-drawer
to render a drawer that shows the GitHub profile suggestions for the member, and allow the user to select and update the member username with the GitHub identity (link)findGithub
to theMemberService
class in the frontend to make a GET request to the backend route and return the suggestions array (link)findGitHub
to theFEATURE_FLAGS
object in the frontend to represent the feature flag for finding GitHub profiles for members (link)v-if="isFindGitHubFeatureEnabled"
to theel-tooltip
andspan
elements in themember-dropdown
andmember-enrichment
components to check if the feature flag is enabled before rendering the tooltip and the button for the enrichment feature (link, link)el-dropdown-item
with the commandmemberFindGitHub
to themember-dropdown
component to render a button to find GitHub profiles for the member, and make it visible only if the feature flag is enabled and the member does not have a GitHub identity already (link)openFindGitHubDrawer
to themember-dropdown
andmember-enrichment
components to control the visibility of the drawer component (link, link)isFindGitHubFeatureEnabled
to themember-dropdown
andmember-enrichment
components to check if the feature flag is enabled or not using theFeatureFlag.isFlagEnabled
method (link, link)isFindingGitHubDisabled
to themember-dropdown
component to check if the member has a GitHub identity or not, and disable the button if so (link)v-else
to thespan
element in themember-enrichment
component to render the enrichment button only if the feature flag for finding GitHub profiles is not enabled, and add a new conditionv-else
to theel-button
element to render the button with the text "Find GitHub" and a GitHub icon if the member does not have a GitHub identity or an email (link)handleCommand
to themember-dropdown
component to handle the case when the user clicks the button to find GitHub profiles for the member, and set theopenFindGitHubDrawer
data property to true (link)onFindGithubClick
to themember-enrichment
component to set theopenFindGitHubDrawer
data property to true when the user clicks the button to find GitHub profiles (link)handleSubmit
to themember-find-github-drawer
component to call theMemberService.update
method to update the member username with the selected GitHub identity, and dispatch themember/doFind
action to refresh the member data (link)install_lib_packages.sh
script to simplify the script and remove the unnecessary color variables (link)FeatureFlagService
class for debugging purposes (link)frontend/src/utils/featureFlag/index.js
file (link)Checklist ✅
Feature
,Improvement
, orBug
.