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

Add env variable to message #157

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

adamnolte
Copy link
Contributor

@adamnolte adamnolte commented Oct 13, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced the exec command under the testing command group to allow users to provide a custom message for test runs.
    • Introduced a default message option sourced from a new constant.
  • Bug Fixes

    • Improved configurability of the exec command for better user experience.

Copy link

coderabbitai bot commented Oct 13, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The pull request introduces a new option for the exec command within the testing command group, allowing users to specify a message for test runs. This option is linked to a newly created constant, AUTOBLOCKS_TEST_RUN_MESSAGE_NAME, which has a default value derived from an environment variable. The changes enhance the configurability of the command by enabling user-defined messages that are passed to the testing handler.

Changes

File Change Summary
src/cli.ts Added a message option to the exec command under testing, utilizing AUTOBLOCKS_TEST_RUN_MESSAGE_NAME.
src/util/constants.ts Introduced a new constant AUTOBLOCKS_TEST_RUN_MESSAGE_NAME with the value 'AUTOBLOCKS_TEST_RUN_MESSAGE'.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant Handler

    User->>CLI: exec --message "Test run description"
    CLI->>Handler: handlers.testing.exec(runMessage: "Test run description")
    Handler-->>CLI: Execute tests
    CLI-->>User: Display test results
Loading

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>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 testing code 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Oct 13, 2024

🏗️ E2E / py-no-cli-runner (#1393)  •  ➡️ View in Autoblocks


🟢  python-e2e-test-suite-1-no-cli-runner    x = "x1"  y = "y1"

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    1.00 / 1.00 / 1.00             4 / 0 / 0
is-friendly           0.09 / 0.44 / 0.79             2 / 0 / 2

Test Case Duration
Min: 90.26ms / Avg: 427.83ms / Max: 793.47ms
 
 
🟢  python-e2e-test-suite-1-no-cli-runner    x = "x2"  y = "y1"

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    1.00 / 1.00 / 1.00             4 / 0 / 0
is-friendly           0.17 / 0.46 / 0.89             3 / 0 / 1

Test Case Duration
Min: 95.05ms / Avg: 477.01ms / Max: 982.41ms
 
 
🔴  python-e2e-test-suite-2-no-cli-runner

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.80 / 1.00             8 / 2 / 0
is-friendly           0.13 / 0.59 / 0.95             9 / 0 / 1

Test Case Duration
Min: 77.18ms / Avg: 456.27ms / Max: 950.79ms
 
 

Generated by Autoblocks against 965713b

Copy link

github-actions bot commented Oct 13, 2024

🏗️ E2E / ts-no-cli-runner (#1393)  •  ➡️ View in Autoblocks


🟢  typescript-e2e-test-suite-1-no-cli-runner

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    1.00 / 1.00 / 1.00             4 / 0 / 0
is-friendly           0.03 / 0.38 / 0.92             4 / 0 / 0

Test Case Duration
Min: 329.74ms / Avg: 537.53ms / Max: 721.72ms
 
 
🔴  typescript-e2e-test-suite-2-no-cli-runner

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.80 / 1.00             8 / 2 / 0
is-friendly           0.02 / 0.45 / 0.76            10 / 0 / 0

Test Case Duration
Min: 68.96ms / Avg: 364.53ms / Max: 778.55ms
 
 

Generated by Autoblocks against 965713b

Copy link

github-actions bot commented Oct 13, 2024

🏗️ E2E / ts (#1393)  •  ➡️ View in Autoblocks


🔴  typescript-e2e-test-suite-1-with-cli-runner

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.75 / 1.00             3 / 1 / 0
is-friendly           0.04 / 0.64 / 0.96             4 / 0 / 0

Test Case Duration
Min: 172.03ms / Avg: 310.54ms / Max: 600.46ms
 
 
🔴  typescript-e2e-test-suite-2-with-cli-runner

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.90 / 1.00             9 / 1 / 0
is-friendly           0.12 / 0.62 / 0.93            10 / 0 / 0

Test Case Duration
Min: 21.71ms / Avg: 541.47ms / Max: 889.61ms
 
 

Generated by Autoblocks against 965713b

@adamnolte adamnolte enabled auto-merge (squash) October 13, 2024 22:08
Copy link

github-actions bot commented Oct 13, 2024

🏗️ E2E / py (#1393)  •  ➡️ View in Autoblocks


🔴  python-e2e-test-suite-1-with-cli-runner    x = "x1"  y = "y1"

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.75 / 1.00             3 / 1 / 0
is-friendly           0.48 / 0.71 / 0.88             3 / 0 / 1

Test Case Duration
Min: 130.30ms / Avg: 588.17ms / Max: 883.27ms
 
 
🔴  python-e2e-test-suite-1-with-cli-runner    x = "x2"  y = "y1"

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.75 / 1.00             3 / 1 / 0
is-friendly           0.25 / 0.60 / 0.95             4 / 0 / 0

Test Case Duration
Min: 771.54ms / Avg: 836.41ms / Max: 912.01ms
 
 
🔴  python-e2e-test-suite-2-with-cli-runner

Evaluators               Min / Avg / Max    Pass / Fail / Skip
--------------------------------------------------------------
has-all-substrings    0.00 / 0.80 / 1.00             8 / 2 / 0
is-friendly           0.06 / 0.45 / 0.79            10 / 0 / 0

Test Case Duration
Min: 58.28ms / Avg: 617.43ms / Max: 950.09ms
 
 

Generated by Autoblocks against 965713b

@adamnolte adamnolte merged commit ef69fbd into main Oct 13, 2024
12 of 13 checks passed
@adamnolte adamnolte deleted the adam/epd-1505-update-cli-for-env-variable branch October 13, 2024 22:08
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