@@ -44,7 +44,7 @@ func (v *Provider) CheckPolicyAllowing(_ context.Context, event *info.Event, all
4444 return false , fmt .Sprintf ("user: %s is not a member of any of the allowed teams: %v" , event .Sender , allowedTeams )
4545}
4646
47- func (v * Provider ) IsAllowed (ctx context.Context , event * info.Event , pac * info. PacOpts ) (bool , error ) {
47+ func (v * Provider ) IsAllowed (ctx context.Context , event * info.Event ) (bool , error ) {
4848 aclPolicy := policy.Policy {
4949 Repository : v .repo ,
5050 EventEmitter : v .eventEmitter ,
@@ -74,7 +74,7 @@ func (v *Provider) IsAllowed(ctx context.Context, event *info.Event, pac *info.P
7474 }
7575
7676 // Try to parse the comment from an owner who has issues a /ok-to-test
77- ownerAllowed , err := v .aclAllowedOkToTestFromAnOwner (ctx , event , pac )
77+ ownerAllowed , err := v .aclAllowedOkToTestFromAnOwner (ctx , event )
7878 if err != nil {
7979 return false , err
8080 }
@@ -95,7 +95,7 @@ func (v *Provider) IsAllowed(ctx context.Context, event *info.Event, pac *info.P
9595// if there is a /ok-to-test in there running an aclCheck again on the comment
9696// Sender if she is an OWNER and then allow it to run CI.
9797// TODO: pull out the github logic from there in an agnostic way.
98- func (v * Provider ) aclAllowedOkToTestFromAnOwner (ctx context.Context , event * info.Event , pac * info. PacOpts ) (bool , error ) {
98+ func (v * Provider ) aclAllowedOkToTestFromAnOwner (ctx context.Context , event * info.Event ) (bool , error ) {
9999 revent := info .NewEvent ()
100100 event .DeepCopyInto (revent )
101101 revent .EventType = ""
@@ -108,14 +108,14 @@ func (v *Provider) aclAllowedOkToTestFromAnOwner(ctx context.Context, event *inf
108108 case * giteaStructs.IssueCommentPayload :
109109 // if we don't need to check old comments, then on issue comment we
110110 // need to check if comment have /ok-to-test and is from allowed user
111- if ! pac .RememberOKToTest {
111+ if ! v . run . Info . Pac .RememberOKToTest {
112112 return v .aclAllowedOkToTestCurrentComment (ctx , revent , event .Comment .ID )
113113 }
114114 revent .URL = event .Issue .URL
115115 case * giteaStructs.PullRequestPayload :
116116 // if we don't need to check old comments, then on push event we don't need
117117 // to check anything for the non-allowed user
118- if ! pac .RememberOKToTest {
118+ if ! v . run . Info . Pac .RememberOKToTest {
119119 return false , nil
120120 }
121121 revent .URL = event .PullRequest .HTMLURL
0 commit comments