Skip to content

Commit 39f271e

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

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
@@ -150,6 +150,14 @@ func (p *PacRun) Run(ctx context.Context) error {
150150
return nil
151151
}
152152

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

0 commit comments

Comments
 (0)