@@ -13,7 +13,7 @@ import (
1313 "github.com/openshift-pipelines/pipelines-as-code/pkg/matcher"
1414 "github.com/openshift-pipelines/pipelines-as-code/pkg/opscomments"
1515 "github.com/openshift-pipelines/pipelines-as-code/pkg/params/triggertype"
16- "github.com/openshift-pipelines/pipelines-as-code/pkg/provider"
16+ providerstatus "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/status "
1717 "github.com/openshift-pipelines/pipelines-as-code/pkg/resolve"
1818 "github.com/openshift-pipelines/pipelines-as-code/pkg/secrets"
1919 "github.com/openshift-pipelines/pipelines-as-code/pkg/templates"
@@ -92,10 +92,10 @@ func (p *PacRun) verifyRepoAndUser(ctx context.Context) (*v1alpha1.Repository, e
9292 // trigger CI on the repository, as any user is able to comment on a pushed commit in open-source repositories.
9393 if p .event .TriggerTarget == triggertype .Push && opscomments .IsAnyOpsEventType (p .event .EventType ) {
9494 p .debugf ("verifyRepoAndUser: checking access for gitops comment on push" )
95- status := provider .StatusOpts {
95+ status := providerstatus .StatusOpts {
9696 Status : CompletedStatus ,
9797 Title : "Permission denied" ,
98- Conclusion : failureConclusion ,
98+ Conclusion : providerstatus . ConclusionFailure ,
9999 DetailsURL : p .event .URL ,
100100 AccessDenied : true ,
101101 }
@@ -109,10 +109,10 @@ func (p *PacRun) verifyRepoAndUser(ctx context.Context) (*v1alpha1.Repository, e
109109 // on comment we skip it for now, we are going to check later on
110110 if p .event .TriggerTarget != triggertype .Push && p .event .EventType != opscomments .NoOpsCommentEventType .String () {
111111 p .debugf ("verifyRepoAndUser: checking access for trigger target=%s event_type=%s" , p .event .TriggerTarget , p .event .EventType )
112- status := provider .StatusOpts {
112+ status := providerstatus .StatusOpts {
113113 Status : queuedStatus ,
114114 Title : "Pending approval, waiting for an /ok-to-test" ,
115- Conclusion : pendingConclusion ,
115+ Conclusion : providerstatus . ConclusionPending ,
116116 DetailsURL : p .event .URL ,
117117 AccessDenied : true ,
118118 }
@@ -122,10 +122,10 @@ func (p *PacRun) verifyRepoAndUser(ctx context.Context) (*v1alpha1.Repository, e
122122 // When /ok-to-test is approved, update the parent "Pipelines as Code CI" status to success
123123 // to indicate the approval was successful before pipelines start running.
124124 if p .event .EventType == opscomments .OkToTestCommentEventType .String () {
125- approvalStatus := provider .StatusOpts {
125+ approvalStatus := providerstatus .StatusOpts {
126126 Status : CompletedStatus ,
127127 Title : "Approved" ,
128- Conclusion : successConclusion ,
128+ Conclusion : providerstatus . ConclusionSuccess ,
129129 DetailsURL : p .event .URL ,
130130 }
131131 if err := p .vcx .CreateStatus (ctx , p .event , approvalStatus ); err != nil {
@@ -282,10 +282,10 @@ func (p *PacRun) getPipelineRunsFromRepo(ctx context.Context, repo *v1alpha1.Rep
282282 // if the event is a comment event, but we don't have any match from the keys.OnComment then do the ACL checks again
283283 // we skipped previously so we can get the match from the event to the pipelineruns
284284 if p .event .EventType == opscomments .NoOpsCommentEventType .String () || p .event .EventType == opscomments .OnCommentEventType .String () {
285- status := provider .StatusOpts {
285+ status := providerstatus .StatusOpts {
286286 Status : queuedStatus ,
287287 Title : "Pending approval, waiting for an /ok-to-test" ,
288- Conclusion : pendingConclusion ,
288+ Conclusion : providerstatus . ConclusionPending ,
289289 DetailsURL : p .event .URL ,
290290 AccessDenied : true ,
291291 }
@@ -484,11 +484,11 @@ func (p *PacRun) checkNeedUpdate(_ string) (string, bool) {
484484
485485func (p * PacRun ) createNeutralStatus (ctx context.Context , title , text string ) error {
486486 p .debugf ("createNeutralStatus: title=%s" , title )
487- status := provider .StatusOpts {
487+ status := providerstatus .StatusOpts {
488488 Status : CompletedStatus ,
489489 Title : title ,
490490 Text : text ,
491- Conclusion : neutralConclusion ,
491+ Conclusion : providerstatus . ConclusionNeutral ,
492492 DetailsURL : p .event .URL ,
493493 }
494494 if err := p .vcx .CreateStatus (ctx , p .event , status ); err != nil {
0 commit comments