Skip to content

Conversation

@amanchauhann
Copy link

I made the following changes to the code:

  1. Wrapped the entire code in a try-catch block to handle any unexpected errors that might occur during execution.
  2. Added error handling for each asynchronous function call, by wrapping them in their respective try-catch blocks.
  3. Added error handling for the case where the GIT_SSH_COMMAND environment variable is not defined.

To confirm:

  1. Set an invalid GIT_HOST environment variable and confirm that the code throws an error.
  2. Set INCLUDE_WEEKENDS environment variable to false and confirm that no commits are made on weekends.
  3. Set INCLUDE_WEEKDAYS environment variable to false and confirm that no commits are made on weekdays.
  4. Set MIN_COMMITS_PER_DAY and MAX_COMMITS_PER_DAY environment variables to values less than or greater than one and confirm that the number of commits made on each day is within the specified range.

The code logs a success message for each commit made.

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.

1 participant