diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-03-10 13:56:42 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-03-10 14:07:46 +0100 |
| commit | dfef1a7b5ab07617d3c5a595f3764bdcc01ef23e (patch) | |
| tree | 0b0a0af2ab05149faa8c264fa65572697d05bd39 /src/ci | |
| parent | 06d86cd60c59d4fb7b0df30248a0c50fbd96b14b (diff) | |
| download | rust-dfef1a7b5ab07617d3c5a595f3764bdcc01ef23e.tar.gz rust-dfef1a7b5ab07617d3c5a595f3764bdcc01ef23e.zip | |
Handle backticks in try job patterns
Diffstat (limited to 'src/ci')
| -rw-r--r-- | src/ci/citool/src/main.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ci/citool/src/main.rs b/src/ci/citool/src/main.rs index 2a4be061e4e..cd690ebeb06 100644 --- a/src/ci/citool/src/main.rs +++ b/src/ci/citool/src/main.rs @@ -46,13 +46,20 @@ impl GitHubContext { } } - /// Tries to parse patterns of CI jobs that should be executed in the form of + /// Tries to parse patterns of CI jobs that should be executed + /// from the commit message of the passed GitHub context + /// + /// They can be specified in the form of /// try-job: <job-pattern> - /// from the commit message of the passed GitHub context. + /// or + /// try-job: `<job-pattern>` + /// (to avoid GitHub rendering the glob patterns as Markdown) fn get_try_job_patterns(&self) -> Vec<String> { if let Some(ref msg) = self.commit_message { msg.lines() .filter_map(|line| line.trim().strip_prefix("try-job: ")) + // Strip backticks if present + .map(|l| l.trim_matches('`')) .map(|l| l.trim().to_string()) .collect() } else { |
