Skip to content

Commit

Permalink
Add ci_src_must_match support
Browse files Browse the repository at this point in the history
Summary:
`ci_src_must_match` is an attribute of custom workflows which contains a list of globs and requires any of the changed files to match any of the globs in order for the target to be considered for selection.
This is basically an intersection functionality in UTD terms, and it's widely requested by the owners of resource-constrained or specialized custom workflows.

Reviewed By: Acesine

Differential Revision: D65802534

fbshipit-source-id: 34fa861f88f100209e9683fdd2a3f17308372721
  • Loading branch information
Fedir Panasenko authored and facebook-github-bot committed Nov 21, 2024
1 parent f7d15ad commit 3c3c15d
Show file tree
Hide file tree
Showing 5 changed files with 282 additions and 105 deletions.
4 changes: 4 additions & 0 deletions btd/src/buck/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ pub struct BuckTarget {
pub ci_srcs: Box<[Glob]>,
/// Used as additional triggers
#[serde(default, skip_serializing_if = "is_empty_slice")]
pub ci_srcs_must_match: Box<[Glob]>,
/// Used as additional triggers
#[serde(default, skip_serializing_if = "is_empty_slice")]
pub ci_deps: Box<[TargetPattern]>,
}

Expand Down Expand Up @@ -205,6 +208,7 @@ impl BuckTarget {
labels: Labels::default(),
oncall: None,
ci_srcs: Box::new([]),
ci_srcs_must_match: Box::new([]),
ci_deps: Box::new([]),
}
}
Expand Down
Loading

0 comments on commit 3c3c15d

Please sign in to comment.