Skip to content
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

Github Integrations #1398

Merged
merged 18 commits into from
Mar 16, 2024
Merged

Conversation

Salman2301
Copy link
Contributor

@Salman2301 Salman2301 commented Feb 13, 2024

Description 📣

This PR is focus on updating the current Github Integrations and also add Organization and Environment sync.

  • Move the current integrations to react-hook-form
    • Show error on bad request
  • Organization (UI)
  • Environment (UI)
  • Integrations Section (UI)
  • Sync.ts backend
  • Refactor
  • Update docs

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

Will update soon


@Salman2301
Copy link
Contributor Author

#408

Copy link

gitguardian bot commented Feb 15, 2024

⚠️ GitGuardian has uncovered 9 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Generic Password 9282dd0 docker-compose.dev.yml View secret
- Generic Password 9282dd0 docker-compose.dev.yml View secret
- Generic Password 9282dd0 .env.example View secret
- Generic Password 9282dd0 docker-compose.pg.yml View secret
- Generic Password 9282dd0 docker-compose.pg.yml View secret
- Generic High Entropy Secret 9282dd0 .env.example View secret
- Generic Private Key f77942c backend/e2e-test/routes/v3/secrets.spec.ts View secret
- Generic Private Key f77942c backend/e2e-test/routes/v3/secrets.spec.ts View secret
- Generic High Entropy Secret f77942c .env.test.example View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. 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


🦉 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!

@Salman2301
Copy link
Contributor Author

integrations section for

  1. Github Repo
  2. Github Environment
  3. Github Organization

Note that the schema being used was mongo. I updated the schema to match the current pg table. And also scope field moved outside from the metadata. Which Qovery integration was being used. Would be nice @vmatsiiako and @dangtony98 if you take a look.

Screenshot 2024-02-15 at 3 55 41 PM

@Salman2301
Copy link
Contributor Author

Based on different scope, the secret will be synced

Screenshot 2024-02-15 at 4 07 46 PM Screenshot 2024-02-15 at 4 07 54 PM Screenshot 2024-02-15 at 4 08 18 PM

@akhilmhdh akhilmhdh requested a review from dangtony98 February 15, 2024 17:12
@Salman2301
Copy link
Contributor Author

@akhilmhdh should I move to zod form resolver instead of yup?

@Salman2301
Copy link
Contributor Author

This is ready to merge

Copy link
Contributor

@Grraahaam Grraahaam left a comment

Choose a reason for hiding this comment

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

I haven't tested the PR yet, but it looks good. Great to have the feature and the docs at the same time 💪🏽

docs/images/integrations/github/integrations-github.png Outdated Show resolved Hide resolved
docs/integrations/cicd/githubactions.mdx Outdated Show resolved Hide resolved
@maidul98
Copy link
Collaborator

Sorry about the delay @Salman2301. I will put this on the teams radar for next sprint

@dangtony98
Copy link
Collaborator

dangtony98 commented Mar 16, 2024

Hey @Salman2301!

I made some changes to the code. Can you help fix a few edge-cases:

  1. When Scope > Repository Environment is selected, then the Environment dropdown should be disabled until the Repository field is selected.
  2. The Repository Environment field should never display organizations in the dropdown (for some reason it shows me organizations when Repository is not selected.

Screenshot illustrating 1:

Screenshot 2024-03-15 at 6 52 25 PM

Screenshot illustrating 2:

Screenshot 2024-03-15 at 6 50 38 PM

@Salman2301
Copy link
Contributor Author

Hey @Salman2301!

I made some changes to the code. Can you help fix a few edge-cases:

  1. When Scope > Repository Environment is selected, then the Environment dropdown should be disabled until the Repository field is selected.
  2. The Repository Environment field should never display organizations in the dropdown (for some reason it shows me organizations when Repository is not selected.

Both issue fixed with a simple disabled passed to select component.

@dangtony98 dangtony98 merged commit 56fc5a2 into Infisical:main Mar 16, 2024
5 of 6 checks passed
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.

4 participants