--- title: "ADR 0073: Custom params resolve in a fixed order, standard params are not overridable" --- * Status: accepted * Code: [`pkg/customparams/customparams.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/customparams/customparams.go), [`pkg/customparams/standard.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/customparams/standard.go) ## Context `GetParams` resolves the `params` of a Repository into template values. A param can carry a plain value, a `secretKeyRef` and a CEL `filter`. Values can also be passed on the trigger comment, and a set of standard params (revision, repo_url, and so on) is built from the event. A follow-up run may be templated after the webhook payload is gone, so filters that read it cannot be evaluated again. ## Decision * A param with an empty name is skipped with an event emitted at error level. * For a given name the first filter that evaluates true wins; later params of the same name with a filter are skipped with a warning event. A param without a filter is not subject to this. * If both a value and a secret ref are set, the value is used and an info event is emitted. * A param named like a standard param is not added from the Repository spec, so standard params cannot be overridden; the old comment asked whether they should be and the code answers no. Values parsed from the trigger comment are applied last and may override both. * A param that appears on the comment but not as a standard one is first set to an empty string so the comment value can overwrite it. * `MatchedFilters` records which filter expression selected each name, without values; `WithFilterOutcomes` makes `GetParams` use these records instead of evaluating filters. A nil map selects none. * For `repo_url`, `CloneURL` replaces the event URL when set. The earlier comment says Bitbucket Data Center has a special checkout URL, expected to be fixed in 2.0. ## Consequences * Headers are not available to filters; a TODO asked whether to add them. * The `CloneURL` override applies to any provider that sets it, not only Bitbucket Data Center.