Skip to content

Commit

Permalink
Fix message when the repository cannot be matched
Browse files Browse the repository at this point in the history
* Reference the repository CR in the message instead of namespace.
* Remove deprecated message related to access token.
  • Loading branch information
Roming22 authored and chmouel committed Aug 22, 2023
1 parent 76c8852 commit dc310ca
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/pipelineascode/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,8 @@ func (p *PacRun) verifyRepoAndUser(ctx context.Context) (*v1alpha1.Repository, e
}

if repo == nil {
if p.event.Provider.Token == "" {
msg := fmt.Sprintf("cannot set status since no repository has been matched on %s", p.event.URL)
p.eventEmitter.EmitMessage(nil, zap.WarnLevel, "RepositorySetStatus", msg)
return nil, nil
}
msg := fmt.Sprintf("cannot find a namespace match for %s", p.event.URL)
msg := fmt.Sprintf("cannot find a repository match for %s", p.event.URL)
p.eventEmitter.EmitMessage(nil, zap.WarnLevel, "RepositoryNamespaceMatch", msg)

return nil, nil
}

Expand Down

0 comments on commit dc310ca

Please sign in to comment.