Skip to content

Commit

Permalink
fix(circleci): correctly get a Orb name when a line has an inline com…
Browse files Browse the repository at this point in the history
…ment (#27736)
  • Loading branch information
y-yagi committed Mar 6, 2024
1 parent 6b06555 commit 66db519
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/modules/manager/circleci/__fixtures__/config2.yml
Expand Up @@ -5,11 +5,11 @@ orbs:
release-workflows: hutson/library-release-workflows@4.1.0
# Comments help me understand my work.
# The next line is intentionally just whitespace!

no-version: abc/def

# Comments help me understand my work.
volatile: zzz/zzz@volatile
volatile: zzz/zzz@volatile # Comments help me understand my work.

test_plan: &test_plan
steps:
Expand Down
4 changes: 3 additions & 1 deletion lib/modules/manager/circleci/extract.ts
Expand Up @@ -29,7 +29,9 @@ export function extractPackageFile(
lineNumber += 1;
continue;
}
const orbMatch = regEx(/^\s+([^:]+):\s(.+)$/).exec(orbLine);
const orbMatch = regEx(/^\s+([^:]+):\s(.+?)(?:\s*#.*)?$/).exec(
orbLine,
);
if (orbMatch) {
logger.trace('orbMatch');
foundOrbOrNoop = true;
Expand Down

0 comments on commit 66db519

Please sign in to comment.