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

fix: Fix empty pr edge case #6

Merged
merged 1 commit into from
May 12, 2023
Merged

fix: Fix empty pr edge case #6

merged 1 commit into from
May 12, 2023

Conversation

jbrocher
Copy link
Owner

@jbrocher jbrocher commented May 12, 2023

=== auto-pr-body ===

Summary
Introduced new features and improved existing code in order to provide better support for parsing of pull request bodies.

List of Changes

  • Introduced new property body, so that it returns the custom text and auto text separated by a delimiter, including the case when the PR body is empty.
  • Updated init() method to split the body string into chunks and to assign the auto text value based on the length of the chunks.
  • Introduced a new method, update_auto_body(), to update the auto text.
  • Added test cases for both body and update_auto_body() methods.

Refactoring Target

  • Replace substring extraction from the body string in the update_auto_body() method with the body_chunks list.
  • Use regular expression instead of split() function to better parse the body string.
  • Rename the DELIMITER constant for better readability and maintainability.

@jbrocher jbrocher merged commit add26ac into main May 12, 2023
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