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

chore: Add development environment setup #48

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

@devin-ai-integration devin-ai-integration bot commented Nov 8, 2024

This PR adds the necessary development environment setup files and configurations to make it easier for developers to work on the project locally.

Changes include:

  • Development environment configuration (.env.development)
  • Development wrapper script (dev.sh)
  • Test fixtures for local testing
  • ShellCheck fixes in main.sh and utils.sh

Link to Devin run: https://preview.devin.ai/devin/1d9e099d3eab483c9a0a2ae493174bf2

If you have any feedback, you can leave comments in the PR and I'll address them in the app!

- Add development environment configuration
- Create development wrapper script
- Add test fixtures for local testing
- Fix shellcheck issues in main.sh and utils.sh
@github-actions github-actions bot added the size/m label Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

Score: 85

Improvements:

  • Use consistent naming conventions for shell scripts and variables to enhance readability and maintainability.
  • Consider adding error handling in utils::parse_args for unknown arguments rather than just logging an error.
  • Ensure that exported variables are explicitly defined as local within the function before exporting.
  • Simplify and streamline the condition checking for required files and environment variables.
+utils::parse_args() {
+  # Use local variables within the function scope
+  local arg
+  # Iterate over provided arguments
+  for arg in "$@"; do
+    case "$arg" in
+      --github_token=*)
+        github_token="${arg#*=}"
+        export github_token
+        ;;
+      --open_ai_api_key=*)
+        open_ai_api_key="${arg#*=}"
+        export open_ai_api_key
+        ;;
+      --gpt_model_name=*)
+        gpt_model_name="${arg#*=}"
+        export gpt_model_name
+        ;;
+      --github_api_url=*)
+        github_api_url="${arg#*=}"
+        export github_api_url
+        ;;
+      --files_to_ignore=*)
+        files_to_ignore="${arg#*=}"
+        export files_to_ignore
+        ;;
+      *)
+        utils::log_error "Unknown argument: $arg"
+        exit 1
+        ;;
+    esac
+  done
+}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants