-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
check $DATABASE_URL if no --url arg #135
Conversation
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.
👍 Looks good to me! Reviewed everything up to 59a5d0c in 9 seconds
More details
- Looked at
29
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. src/main.rs:58
- Draft comment:
You can simplify themap_or
usage by usingok
:
env::var("DATABASE_URL").ok()
- Reason this comment was not posted:
Confidence changes required:50%
The use ofmap_or
can be simplified withok
. This applies to other similar patterns as well.
Workflow ID: wflow_92jQV6fOreZ5aJLi
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 63fa005 in 21 seconds
More details
- Looked at
49
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. src/main.rs:58
- Draft comment:
Loading the .env file using dotenvy is a good practice to ensure environment variables are available. Consider handling errors explicitly if loading the .env file is critical. - Reason this comment was not posted:
Confidence changes required:33%
The dotenvy crate is used to load environment variables from a .env file, which is a common practice for managing environment-specific configurations. The dotenv function is called at the beginning of the tokio_main function to ensure that any environment variables defined in a .env file are loaded before they are accessed. This is a good practice and aligns with the issue's requirement to read from the .env file.
2. src/main.rs:61
- Draft comment:
Checking if the DATABASE_URL is empty before using it is a good practice to avoid potential issues with an empty URL. - Reason this comment was not posted:
Confidence changes required:0%
The code checks if the DATABASE_URL environment variable is empty and returns None if it is. This is a good practice to avoid using an empty URL.
Workflow ID: wflow_uEKZV8QO2ZuAetuZ
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 10b78e5 in 24 seconds
More details
- Looked at
16
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. README.md:153
- Draft comment:
Clarify the order of precedence for checkingDATABASE_URL
in the environment variable and.env
file. The current description implies the environment variable is checked first, then the.env
file. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions checking forDATABASE_URL
in a.env
file, but the README update only mentions checking the environment variable and.env
file without specifying the order. This could be clarified.
Workflow ID: wflow_tFdO8WKlPqzr0KBb
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 9511dde in 15 seconds
More details
- Looked at
16
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/ci.yml:8
- Draft comment:
Thepaths-ignore
feature is correctly used to ignore markdown files in bothpush
andpull_request
events. This is a good practice to avoid unnecessary CI runs for documentation changes. - Reason this comment was not posted:
Confidence changes required:0%
The paths-ignore feature is correctly implemented to ignore markdown files in both push and pull_request events.
Workflow ID: wflow_XZgZ9sb6WNEsXXUu
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Included in release v0.2.12 |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [achristmascarl/rainfrog](https://github.com/achristmascarl/rainfrog) | patch | `v0.2.11` -> `v0.2.13` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>achristmascarl/rainfrog (achristmascarl/rainfrog)</summary> ### [`v0.2.13`](https://github.com/achristmascarl/rainfrog/releases/tag/v0.2.13) [Compare Source](achristmascarl/rainfrog@v0.2.12...v0.2.13) <!-- Release notes generated using configuration in .github/release.yml at v0.2.13 --> #### What's Changed - propogate DATABASE_URL when present by [@​achristmascarl](https://github.com/achristmascarl) in achristmascarl/rainfrog#138 **Full Changelog**: achristmascarl/rainfrog@v0.2.12...v0.2.13 ### [`v0.2.12`](https://github.com/achristmascarl/rainfrog/releases/tag/v0.2.12) [Compare Source](achristmascarl/rainfrog@v0.2.11...v0.2.12) <!-- Release notes generated using configuration in .github/release.yml at v0.2.12 --> #### KNOWN ISSUES - $DATABASE_URL doesn't work since the var wasn't used by the drivers; will be fixed in v0.2.13 #### What's Changed - bump sqlparser by [@​achristmascarl](https://github.com/achristmascarl) in achristmascarl/rainfrog#134 - check $DATABASE_URL if no --url arg by [@​achristmascarl](https://github.com/achristmascarl) in achristmascarl/rainfrog#135 **Full Changelog**: achristmascarl/rainfrog@v0.2.11...v0.2.12 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNTguMSIsInVwZGF0ZWRJblZlciI6IjM5LjE1OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
checks $DATABASE_URL and .env file for a connection string url
closes #113
Important
Add support for checking
DATABASE_URL
environment variable and.env
file for connection URL if--url
is not provided.src/main.rs
, if--url
is not provided, checkDATABASE_URL
environment variable and.env
file for connection URL.DATABASE_URL
is used from environment variable.dotenvy
crate toCargo.toml
andCargo.lock
for environment variable support..github/workflows/ci.yml
to ignore markdown file changes.This description was created by
for 9511dde. It will automatically update as commits are pushed.