--- title: "ADR 0008: Deprecated ops-comment trigger types" --- * Status: accepted, deprecation still open * Code: [`pkg/opscomments/comments.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/opscomments/comments.go), `EventTypeBackwardCompat` * Ticket: [SRVKP-5775](https://issues.redhat.com/browse/SRVKP-5775) * Raised: 2024-07-01 ## Context Trigger types used to be per-comment (`test-comment`, `retest-comment`, `ok-to-test-comment`, `cancel-comment`, ...). They were collapsed into a single `pull_request` trigger, because a comment is not a different kind of event: it is a pull request event that happens to arrive through a comment. Repositories and PipelineRuns still carry the old names in their annotations and event stream. Dropping them in one release would stop CI for anyone who pinned them. ## Decision `EventTypeBackwardCompat` rewrites an old ops-comment trigger type to `pull_request` and emits a `DeprecatedOpsComment` warning event on the repository, naming the old type and the replacement. Two exceptions: * `on-comment` keeps its own type, because it selects runs that are only triggered by a comment rather than replacing one. * Any value that is not an ops-comment type is returned unchanged, so the function is safe to call on every event. ## Consequences * Users see a warning event on every run that still uses the old types. That is the point, and it is also noise until they migrate. * The mapping lives in one function that every provider calls, so removing the compatibility layer is a single deletion once the warning has been out for a release or two. * Nothing records which repositories still rely on the old names, so the migration cannot be measured from PAC's side. The warning events are the only signal.