Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(circleci): correctly get a Orb name when a line has an inline comment #27736

Merged
merged 2 commits into from Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion lib/modules/manager/circleci/extract.ts
Expand Up @@ -29,7 +29,7 @@ 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