Skip to content

Fix trigger regex patterns in Tekton pull-request pipeline files #1512

@coderabbitai

Description

@coderabbitai

Problem

The on-comment regex patterns in the autogenerated Tekton pull-request pipeline files contain literal spaces after /kfbuild which prevents proper matching. Pipelines-as-Code trims leading whitespace from comment text, so patterns like ^/kfbuild jupyter/trustyai/ubi9-python-3.12 will never match actual comments.

Affected Files

Multiple pipeline files in .tekton/ directory with names ending in -pull-request.yaml have this issue, including:

  • .tekton/odh-workbench-jupyter-trustyai-cpu-py312-ubi9-pull-request.yaml
  • And likely many others with similar patterns

Current Problematic Pattern

pipelinesascode.tekton.dev/on-comment: ^/kfbuild jupyter/trustyai/ubi9-python-3.12

Suggested Fix

pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+jupyter/trustyai/ubi9-python-3\.12$

Changes Needed

  1. Replace literal spaces with \s+ after /kfbuild
  2. Escape dots in version numbers (e.g., 3\.12)
  3. Add end-of-line anchor $ for precise matching
  4. Update the generation script scripts/generate_pull_request_pipelineruns.py to produce correct patterns

Context

Impact

Currently, the comment-triggered builds cannot be activated because the regex patterns don't match actual user comments.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions