As in title. We need this for several reasons, including:
Implementation-wise, we want to implement this in openapi-alps PR summary task (recent example PR touching relevant code files), following rules as expressed in this PR:
description:
- if:
- payloadType: Pull_Request
then:
- if:
- filesMatchPattern: # any files, not necessarily all
pattern: specification/.*(\.tsp|tspconfig.yaml)
then:
- addLabel:
label: TypeSpec
Note that the above-given PR doesn't work as expected because the filesMatchPattern selector requires for all files to match the pattern [1]. We want to ad the label when any files match the pattern.
One situation to consider is: what if given PR has both OpenAPI specs created by hand, and also generated from TypeSpec? In such case we also add the TypeSpec label. The assumption here is that such cases should be very rare and can be handled manually, while automation can approximate such PR to being TypeSpec-only PRs.
Related work:
[1]:
source of filesMatchPattern
doc for filesMatchPattern
issue we filed
As in title. We need this for several reasons, including:
Implementation-wise, we want to implement this in openapi-alps PR summary task (recent example PR touching relevant code files), following rules as expressed in this PR:
Note that the above-given PR doesn't work as expected because the
filesMatchPatternselector requires for all files to match the pattern [1]. We want to ad the label when any files match the pattern.One situation to consider is: what if given PR has both OpenAPI specs created by hand, and also generated from TypeSpec? In such case we also add the
TypeSpeclabel. The assumption here is that such cases should be very rare and can be handled manually, while automation can approximate such PR to being TypeSpec-only PRs.Related work:
[1]:
source of
filesMatchPatterndoc for
filesMatchPatternissue we filed