fix: add transforms for aliased built-ins #1048
Merged
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.
Description
Adds missing transformers for aliased built-ins
Closes #1046
Summary generated by Reviewpad on 18 Aug 23 04:56 UTC
This pull request includes changes to the
transform.go
file. Here is a summary of the changes:addDefaultsToRequestedReviewers
function to format a string with requested reviewers.addDefaultsToAddReviewers
function to format a string with additional reviewers.addDefaultGetSizeMethod
function to replace a string with a default size method value.addDefaultCountUserIssues
function to replace a string with a default count of user issues.addDefaultCountUserPullRequests
function to replace a string with a default count of user pull requests.addDefaultHasOnlyCompletedCheckRuns
function to replace a string with a default check runs value.addDefaultAddReviewersBasedOnCodeAuthor
function to replace a string with a default code author value.addDefaultsToAddAssignees
function to format a string with additional assignees.addEmptyFilterToContainsOnlyCodeWithoutSemanticChanges
function to replace a string with an empty filter value.summarizeAlias
andtransformAladinoExpression
functions.Please let me know if you have any further questions or need additional assistance with the code review!
馃 Generated by Copilot at e591f5c
This pull request improves the testing and usability of some aladino functions in the
engine
package. It adds and modifies tests inengine/transform_internal_test.go
to cover the new functions and the renamed$hasOnlyCompletedCheckRuns
function. It also adds functions inengine/transform.go
that provide default values for optional arguments of aladino functions such as$hasLabel
,$hasMilestone
, and$hasAssignee
.Code review and merge strategy
Ship: this pull request can be automatically merged and does not require code review
How
馃 Generated by Copilot at e591f5c
engine
package to simplify the usage of aladino functions and avoid errors when optional arguments are not provided (link, link, link, link, link, link, link)transformAladinoExpression
function (link)TestTransformAladinoExpression
function in theengine/transform_internal_test.go
file to check the functionality and correctness of the new functions (link, link, link, link)$haveAllChecksRunCompleted
and$haveAnyChecksRunCompleted
functions to$hasOnlyCompletedCheckRuns
and modify the existing test cases accordingly (link)