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

[pull] main from atlassian:main #104

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 3, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

* chore: make spa wrapper width variable

* chore: rectify colum names

* chore: work to delete ghe server

* chore: update test cases

* chore: add test cases

* fix: build error

* chore: add test cases

* chore: add test cases

* chore: add config option for GHR server app

* chore: refactor code

* chore: pr review comments

* chore: update code as per PR comments

* chore: update code as per PR comments

* Enforce security check on GHES app (#2624)

---------

Co-authored-by: Gary Xue <[email protected]>
Copy link

restack-app bot commented Jan 3, 2024

No applications have been configured for previews targeting branch: main. To do so go to restack console and configure your applications for previews.

Copy link

semanticdiff-com bot commented Jan 3, 2024

Review changes with SemanticDiff.

Analyzed 26 of 28 files.

Overall, the semantic diff is 21% smaller than the GitHub diff.

File Information
Filename Status
docker-compose.yml Unsupported file format
✔️ spa/src/api/subscriptions/index.ts Analyzed
✔️ spa/src/common/Wrapper.tsx Analyzed
✔️ spa/src/pages/Connections/GHCloudConnections/index.tsx 11.7% smaller
✔️ spa/src/pages/Connections/GHEnterpriseConnections/GHEnterpriseAppHeader.tsx Analyzed
✔️ spa/src/pages/Connections/GHEnterpriseConnections/GHEnterpriseApplication.tsx 22.14% smaller
✔️ spa/src/pages/Connections/GHEnterpriseConnections/index.tsx 32.85% smaller
✔️ spa/src/pages/Connections/Modals/DisconnectGHEServerModal.test.tsx Analyzed
✔️ spa/src/pages/Connections/Modals/DisconnectGHEServerModal.tsx Analyzed
✔️ spa/src/pages/Connections/Modals/DisconnectSubscriptionModal.tsx 85.99% smaller
✔️ spa/src/pages/Connections/Modals/RestartBackfillModal.tsx 84.0% smaller
✔️ spa/src/pages/Connections/index.tsx 40.55% smaller
✔️ spa/src/services/subscription-manager/index.ts 5.26% smaller
✔️ spa/src/utils/dynamicTableHelper.tsx 35.25% smaller
✔️ spa/src/utils/index.ts 9.09% smaller
✔️ src/config/feature-flags.ts 66.67% smaller
✔️ src/rest-interfaces/index.ts 5.26% smaller
✔️ src/rest/rest-router.ts 8.7% smaller
✔️ src/rest/routes/enterprise/delete-ghe-app.test.ts Analyzed
✔️ src/rest/routes/enterprise/delete-ghe-app.ts Analyzed
✔️ src/rest/routes/enterprise/delete-ghe-server.test.ts Analyzed
✔️ src/rest/routes/enterprise/delete-ghe-server.ts Analyzed
✔️ src/rest/routes/enterprise/index.ts Analyzed
✔️ src/rest/routes/subscriptions/sync.test.ts Analyzed
✔️ src/rest/routes/subscriptions/sync.ts 14.54% smaller
✔️ src/transforms/transform-deployment.test.ts 1.84% smaller
✔️ src/transforms/transform-deployment.ts 49.88% smaller
test/snapshots/app.test.ts.snap Unsupported file format

Copy link

coderabbitai bot commented Jan 3, 2024

Important

Auto Review Skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

pr-code-reviewer bot commented Jan 3, 2024

👋 Hi there!

  1. In the docker-compose.yml file, it's important to update the ngrok image to "ngrok/ngrok:latest" and modify the command to remove "ngrok" from the beginning.
  2. In the spa/src/api/subscriptions/index.ts file, it's important to add two new delete methods: deleteGHEServer and deleteGHEApp.
  3. There may be other improvements or issues in the code-diff, but without additional context or information, these are the most important changes observed.


Automatically generated with the help of gpt-3.5-turbo.
Feedback? Please don't hesitate to drop me an email at [email protected].

Copy link

instapr bot commented Jan 3, 2024

Please remove the unnecessary sponsor message from the pull request body.

Copy link

sweep-ai bot commented Jan 3, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link

Pull Request Review - Summary

Hey there! 👋 Here's a summary of the previous tasks and their results for the pull request review. Let's dive in!

Changes

  1. Added new API endpoints for deleting GHEServer and GHEApp in subscriptions/index.ts.
  2. Added new props width to Wrapper component in common/Wrapper.tsx.
  3. Added new component GHEnterpriseAppHeader in pages/Connections/GHEnterpriseConnections/GHEnterpriseAppHeader.tsx.
  4. Added new function openChildWindow in utils/index.ts.
  5. Added new type DELETE_GHE_APP to BackfillPageModalTypes in rest-interfaces/index.ts.

Suggestions

  1. In subscriptions/index.ts, consider using template literals instead of string concatenation in deleteGHEApp and deleteGHEServer functions.
  2. In common/Wrapper.tsx, consider renaming the prop attr to something more descriptive.
  3. In pages/Connections/GHCloudConnections/index.tsx, consider extracting the openedModal function to a separate helper function for better readability.
  4. In pages/Connections/GHCloudConnections/index.tsx, consider using destructuring assignment for the props in the GitHubCloudConnections component for better readability.
  5. In pages/Connections/GHEnterpriseConnections/GHEnterpriseAppHeader.tsx, consider renaming the prop toggleShowAppContent to something more descriptive.

Bugs

  1. In pages/Connections/GHCloudConnections/index.tsx, there is a potential bug in the openedModal function. The refetch function is not being passed as a prop to the modal components.
  2. In utils/index.ts, there is a potential bug. (The description seems to be cut off. Please provide the complete details.)

Improvements

  1. In the GitHubEnterpriseApp component in GHEnterpriseApplication.tsx, the code in lines 29-34 can be refactored for better readability. (Please provide the code snippet for further analysis.)

Rating

Please rate the code from 0 to 10 based on the criteria of readability, performance, and security. Kindly provide a brief explanation for the rating.

That's it for the summary! If you have any further questions or need more details, feel free to ask. Good luck with the pull request! 🚀

@pull pull bot added the ⤵️ pull label Jan 3, 2024
Copy link

sonarcloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ammar-ahmed-butt ammar-ahmed-butt merged commit 8589870 into ammar-knowledge:main Jan 21, 2024
3 of 5 checks passed
</p>
<ul>
<li>
<a

Check warning

Code scanning / CodeQL

Potentially unsafe external link Medium

External links without noopener/noreferrer are a potential security risk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants