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 dependency name edge-case #32

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Conversation

ChrisBAshton
Copy link
Contributor

A recent PR was auto-merged when it should not have been: alphagov/content-data-api#1996

This is because the name of the dependency was not being matched by the regex (\w does not support hyphenated names). It therefore looked as though NO dependencies were being updated, and it seemed therefore that there were no top-level dependencies being updated that weren't on the allowlist. govuk-dependabot-merger therefore gave the green light to auto-merge.

Have now tweaked the regex to catch any kind of dependency name. This did break the multiple_dependencies_commit spec, because each of its dependencies is wrapped in backticks (as opposed to the single-dependency commits, which had no backticks), so the names weren't matching. I've now added an inline gsub to remove the backticks from the names, since they're never actually part of the dependency names.

@ChrisBAshton ChrisBAshton changed the title Fix subdependency edge-case Fix dependency name edge-case Jan 2, 2024
A recent PR was auto-merged when it should not have been:
alphagov/content-data-api#1996

This is because the name of the dependency was not being matched
by the regex (`\w` does not support hyphenated names). It therefore
looked as though _NO_ dependencies were being updated, and it
seemed therefore that there were no top-level dependencies being
updated that weren't on the allowlist. govuk-dependabot-merger
therefore gave the green light to auto-merge.

Have now tweaked the regex to catch any kind of dependency name.
This did break the `multiple_dependencies_commit` spec, because
each of its dependencies is wrapped in backticks (as opposed to
the single-dependency commits, which had no backticks), so the
names weren't matching. I've now added an inline `gsub` to remove
the backticks from the names, since they're never actually part
of the dependency names.
@ChrisBAshton ChrisBAshton force-pushed the fix-subdependency-edge-case branch from 5101b5e to ee02a46 Compare January 2, 2024 13:20
@ChrisBAshton ChrisBAshton merged commit 20febab into main Jan 2, 2024
7 checks passed
@ChrisBAshton ChrisBAshton deleted the fix-subdependency-edge-case branch January 2, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants