-
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
feat: trigger on check #1018
feat: trigger on check #1018
Conversation
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 |
16aeb65
to
df840a4
Compare
/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 |
df840a4
to
b9bff55
Compare
/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 |
b9bff55
to
166c10a
Compare
/reviewpad run |
Reviewpad Report ℹ️ Messages
|
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.
Description
Introduces ability to trigger workflows when an issue is found by a check.
Summary generated by Reviewpad on 11 Aug 23 18:47 UTC
This pull request includes the following changes:
In the
mocks.go
file, a newnil
element is added to a function call. This change does not seem to have a significant impact but may be necessary for the overall functionality of the code.The
run.go
file has been modified. On line 152, an additional argumentnil
is added to a function call to thereviewpad.Run
function. These changes appear to be related to adjusting the parameters passed to thereviewpad.Run
function.Multiple function calls in different test cases have been modified in the
mocks_test.go
file. Specifically, anil
parameter is added in the functionsTestNewEvalEnv_WhenGetPullRequestFilesFails
,TestNewEvalEnv_WhenNewFileFails
,TestNewEvalEnv
, andTestNewEvalEnv_WhenGetPullRequestFails
.The
exec.go
file contains changes to theExecConfigurationFile
function. The changes introduce a check to determine if a workflow should run based on a triggering check. The function checks if any of the checks inchecksWithIssues
match thetriggerOnCheck
field of the workflow. If a match is found, the workflow should run; otherwise, it continues to the next workflow.The
env.go
file has a new methodGetChecksWithIssues()
added to theInterpreter
interface.The
loader.go
file has changes in thetransform
function. The changes include adding a new fieldTriggerOnCheck
to thetransformedWorkflows
struct in theappend
function call.In the
integration_test.go
file, on line 330, a new argumentnil
is added to the functionreviewpad.Run()
.The
inline_rules_normalizer.go
file contains changes to theprocessWorkflow
function. These changes include adding the fieldTriggerOnCheck
to thewf
struct initialization.The
interpreter_internal_test.go
file has changes related to addingnil
values to the arguments of certain function calls in the test casesTestNewInterpreter_WhenNewEvalEnvFails
,TestNewInterpreter
, andTestReportMetric
.The
interpreter.go
file introduces a new functionGetChecksWithIssues()
to retrieve a slice of strings. Additionally, theNewInterpreter
function is modified to accept an additional parameterchecksWithIssues
of type[]string
.In the
engine/lang.go
file, a new fieldTriggerOnCheck
is added to thePadWorkflow
struct.The
engine/exec_test.go
file includes two changes. On line 444 and line 719, newnil
values are added.The
lang/type_internal_test.go
file has test cases added for theEquals()
function. These tests compare various types and assert that theEquals()
function correctly identifies identical types.Changes in the
runner.go
file include a new parameterchecksWithIssue
added to theRun
function. This parameter is used in the call toaladino.NewInterpreter
. Thealadino.NewInterpreter
call is updated to include thechecksWithIssue
parameter.The
env.go
file introduces changes to theEnv
interface and theBaseEnv
struct. TheEnv
interface now includes a new methodGetChecksWithIssues()
, which returns a slice of strings. TheBaseEnv
struct includes a new fieldChecksWithIssues
of type[]string
. TheGetChecksWithIssues()
method is implemented in theBaseEnv
struct to return theChecksWithIssues
field. TheNewEvalEnv()
function is also updated to receive a new parameterchecksWithIssues
of type[]string
and assign it to theChecksWithIssues
field of theBaseEnv
struct.Please review these changes and ensure they align with the requirements of the system.
🤖 Generated by Copilot at 05ba2b6
Add
TriggerOnCheck
field toPadWorkflow
type to enable custom workflows based on checks. This change affects theengine/lang.go
file.Code review and merge strategy
Ship: this pull request can be automatically merged and does not require code review
<! -- Ask: this pull request requires a code review before merge -->
How
🤖 Generated by Copilot at 05ba2b6
TriggerOnCheck
to thePadWorkflow
type to specify a check name that triggers the workflow execution (link)