Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on enhancing the merge functionality in the
app.js
file and updating the tests in thetest.js
file to accommodate these changes. The key changes include the addition of a dynamic merge method selection based on the repository's settings and the corresponding updates in the test cases to validate these changes.Merge method enhancement:
app.js
: Added a dynamic merge method selection logic. Based on the repository's settings, it now chooses between 'merge', 'squash', or 'rebase' as the merge method. Previously, it defaulted to use 'merge' as the merge method.Test case updates:
test.js
: Updated the test payload to includeallow_merge_commit
,allow_squash_merge
, andallow_rebase_merge
properties to mimic the repository's settings. This was done in thepayloadPrLabeled
andpayloadPrLabeledByBot
objects. [1] [2]test.js
: Updated theafter.each
test cleanup method to reset the merge settings.test.js
: Updated and added new test cases to validate the dynamic merge method selection logic. These tests ensure that the correct merge method ('merge', 'squash', or 'rebase') is used based on the repository's settings.This closes #13