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

Allow deny package removal #888

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ellenfieldn
Copy link

Summary

There was a bug where if a repository already has a dependency specified as part of deny_packages, the dependency review action will block any commit that attempts to remove that dependency. See #887

In deny.ts, there was no logic around whether the dependency was being added or removed as part of the change. By comparison, licenses are only rejected when dependencies are added or updated (which I believe shows up as two distinct changes -- an add and a remove).

This PR updates the behavior so that pre-existing dependencies not allowed as part of deny_packages can be removed. This works for each of the key scenarios:

  • Deny a package by name
  • Deny a package by name and version
  • Deny a package by namespace

@ellenfieldn ellenfieldn requested a review from a team as a code owner January 27, 2025 21:14
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.

1 participant