-
Notifications
You must be signed in to change notification settings - Fork 30
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
refactor: don't recreate patch every time #1080
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request is in ship
mode. Reviewpad will merge it.
Pull request is not up to date with the base branch. Reviewpad will rebase it. After the rebase, please trigger Reviewpad by running the command |
/reviewpad run |
Pull request is not up to date with the base branch. Reviewpad will rebase it. After the rebase, please trigger Reviewpad by running the command |
387da43
to
1246beb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request is ready to be merged. Reviewpad will merge it for you.
Description
the
NewPullRequestTarget
function fetches the patch from the API everytime which is a problem if it's called multiple times, this PR introduces a new functionNewPullRequestTargetWithPatch
which can be passed the patch so that it's possible to reuse the patch that was already fetched.Closes #1078
Summary generated by Reviewpad on 20 Sep 23 11:04 UTC
This pull request adds a new function to create a pull request target that can receive a patch. It also refactors an existing function to clarify its purpose. The changes include modifications to the
pull_request_target.go
andinterpreter.go
files.🤖 Generated by Copilot at d92737d
This pull request enables the Aladino script to modify the GitHub pull request target using the
apply
command. It does this by passing the patch data from the environment to thePullRequestTarget
constructor and storing it in the struct.Code review and merge strategy
Ask: this pull request requires a code review before merge
How
🤖 Generated by Copilot at d92737d
PullRequestTarget
that takes patch data as an argument (link)ExecStatement
function ininterpreter.go
to use the new constructor function and pass the patch data from the environment (link)interpreter.go
for readability (link)