Skip to content

Allow deny package removal#888

Merged
AshelyTC merged 4 commits into
actions:mainfrom
ellenfieldn:allow-deny-package-removal
Feb 6, 2025
Merged

Allow deny package removal#888
AshelyTC merged 4 commits into
actions:mainfrom
ellenfieldn:allow-deny-package-removal

Conversation

@ellenfieldn

Copy link
Copy Markdown
Contributor

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
@AshelyTC

AshelyTC commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

👋 @ellenfieldn thank you for contributing! There seems to be an error with the generated /dist files — it's failing in one of our CI checks. Could you try rebuilding the changes by running npm run build && npm run package?

@ellenfieldn

Copy link
Copy Markdown
Contributor Author

👋 @ellenfieldn thank you for contributing! There seems to be an error with the generated /dist files — it's failing in one of our CI checks. Could you try rebuilding the changes by running npm run build && npm run package?

Woops! Sorry about that, I think i crossed some streams when I merged from main.

Ran the commands and also enabled and ran the action in my fork just to be sure.

@AshelyTC AshelyTC merged commit ea2cae5 into actions:main Feb 6, 2025
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