Skip to content

Commit bc596ad

Browse files
committed
chore: add comment for startPR func
Signed-off-by: Noor Shaikh <sk78692noor@gmail.com>
1 parent aa55899 commit bc596ad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/pipelineascode/pipelineascode.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ func (p *PacRun) Run(ctx context.Context) error {
149149
return nil
150150
}
151151

152+
// startPR creates and initializes a Tekton PipelineRun for the given match.
153+
// It may auto-create a basic auth Secret for git access (and set its ownerRef),
154+
// adds Pipelines-as-Code labels/annotations, optionally marks the PipelineRun
155+
// as pending when repository concurrency is enabled, creates the PipelineRun in
156+
// the target namespace, reports an initial status with a console URL to the SCM
157+
// provider, and patches state/logURL metadata used by the PAC watcher. On
158+
// partial failures after creation, it returns the created PipelineRun along
159+
// with the error so callers can decide how to proceed.
152160
func (p *PacRun) startPR(ctx context.Context, match matcher.Match) (*tektonv1.PipelineRun, error) {
153161
var gitAuthSecretName string
154162

0 commit comments

Comments
 (0)