Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

claire153
Copy link
Contributor

@claire153 claire153 commented Aug 13, 2025

Closes https://github.com/github/dependency-graph/issues/6488.

  • Adds a deprecation warning in the following places:
    • README
    • Dependency Review action Summary, only if the deprecated option is being used: see in this test run:
Screenshot 2025-08-15 at 12 05 31 PM - I also included small lint fixes.

@claire153 claire153 marked this pull request as ready for review August 14, 2025 18:03
@Copilot Copilot AI review requested due to automatic review settings August 14, 2025 18:03
@claire153 claire153 requested a review from a team as a code owner August 14, 2025 18:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deprecates the deny-licenses configuration option by adding deprecation warnings and making minor lint improvements. The purpose is to guide users toward using the allow-licenses option instead as part of a planned phase-out of deny list functionality.

  • Adds a deprecation warning message to the action summary output
  • Updates README documentation to mark deny-licenses as deprecated
  • Includes small lint fixes in test files (variable declaration improvements and unused import removal)

Reviewed Changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 2 comments.

File Description
src/summary.ts Adds deprecation warning function and calls it in the main summary function
tests/summary.test.ts Adds test for deprecation warning and includes lint fixes for variable declarations
README.md Updates documentation to mark deny-licenses option as deprecated

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor

@dangoor dangoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just a couple minor comments.

@ahpook
Copy link
Contributor

ahpook commented Aug 14, 2025

To follow up on my comments after thinking it over a bit more, two points:

  1. I think it's better to word this as a possible deprecation for removal in a future release. We actually don't know how widespread the usage of the deny-licenses directive is, and it's possible that there are irreplacable use cases that we should take into consideration. So I'd suggest something like "This option is deprecated for possible removal in the next major release. See Deprecate the deny-licenses option #938 for more information." That way people can register feedback and it doesn't sound quite so didactic.
  2. Related, please add an option to suppress deprecation messages - there may be more things we want to change as we're headed towards a 5.0 release, but getting a warning on every PR check will be super spammy and annoying.

@claire153
Copy link
Contributor Author

Thanks for both reviews!

@ahpook
Regarding your second point about adding an option to suppress deprecation messages: the warning only appears in the summary as required by the task (see screenshot in this PR's description).
It does not appear in the output of the job (see screenshot below). I agree it would have been spammy in there.

Do you think we should also be somehow allowing users to suppress the message in the Summary?
If so, I can look into a way of doing it.

Screenshot 2025-08-15 at 12 21 43 PM

Copy link
Contributor

@dangoor dangoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong preference on the warning suppression, so I'll leave that to @ahpook. From my perspective, a little tweak to the tests and this looks good!

@@ -119,8 +119,25 @@ test('adds deprecation warning for deny-licenses option', () => {
)
const text = core.summary.stringify()

expect(text).not.toContain(
'⚠️ <strong>Deprecation Warning</strong>: The <em>deny-licenses</em> option is deprecated and will be removed in the next major version release, use <em>allow-licenses</em> instead.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For a not.toContain test, I'd check for something short like deny-licenses or Deprecation Warning because any little text change would make this test always pass and not tell us anything useful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looks like this is already the case… the deprecation warning could be there, but the text of the warning is different from what we're testing for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected! Thank you for spotting this!

expect(text).toContain(
'⚠️ <strong>Deprecation Warning</strong>: The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.'
'⚠️ <strong>Deprecation Warning</strong>: The <em>deny-licenses</em> option is deprecated for possible removal in the next major release. See [Deprecate the deny-licenses option #938](https://github.com/actions/dependency-review-action/issues/938) for more information.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is more personal preference, but I would make this test resilient to change just like in the negative case. I'd rather not see this test have to change every time there's a minor text edit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that as well

@ahpook
Copy link
Contributor

ahpook commented Aug 15, 2025

Regarding your second point about adding an option to suppress deprecation messages: the warning only appears in the summary as required by the task (see screenshot in this PR's description).

Ah ok, nevermind me then. I'd thought it was inline in the PR.

ahpook
ahpook previously approved these changes Aug 16, 2025
Copy link
Contributor

@ahpook ahpook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, i like it!

@claire153 claire153 merged commit d8073c4 into main Aug 18, 2025
7 checks passed
@claire153 claire153 deleted the claire153/deprecate-deny-lists branch August 18, 2025 16:33
mergify bot added a commit to ArcadeData/arcadedb that referenced this pull request Aug 28, 2025
…2 [skip ci]

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.7.1 to 4.7.2.
Release notes

*Sourced from [actions/dependency-review-action's releases](https://github.com/actions/dependency-review-action/releases).*

> 4.7.2
> -----
>
> What's Changed
> --------------
>
> * Add Missing Languages to CodeQL Advanced Configuration by [`@​KyFaSt`](https://github.com/KyFaSt) in [actions/dependency-review-action#945](https://redirect.github.com/actions/dependency-review-action/pull/945)
> * Deprecate deny lists by [`@​claire153`](https://github.com/claire153) in [actions/dependency-review-action#958](https://redirect.github.com/actions/dependency-review-action/pull/958)
> * Address discrepancy between docs and reality by [`@​ahpook`](https://github.com/ahpook) in [actions/dependency-review-action#960](https://redirect.github.com/actions/dependency-review-action/pull/960)
>
> New Contributors
> ----------------
>
> * [`@​KyFaSt`](https://github.com/KyFaSt) made their first contribution in [actions/dependency-review-action#945](https://redirect.github.com/actions/dependency-review-action/pull/945)
> * [`@​claire153`](https://github.com/claire153) made their first contribution in [actions/dependency-review-action#958](https://redirect.github.com/actions/dependency-review-action/pull/958)
> * [`@​ahpook`](https://github.com/ahpook) made their first contribution in [actions/dependency-review-action#960](https://redirect.github.com/actions/dependency-review-action/pull/960)
>
> **Full Changelog**: <actions/dependency-review-action@v4...v4.7.2>


Commits

* [`bc41886`](actions/dependency-review-action@bc41886) Cut 4.7.2 version release ([#964](https://redirect.github.com/actions/dependency-review-action/issues/964))
* [`1c73553`](actions/dependency-review-action@1c73553) Merge pull request [#960](https://redirect.github.com/actions/dependency-review-action/issues/960) from ahpook/ahpook/address-docs-dashes
* [`fac3d41`](actions/dependency-review-action@fac3d41) Bump the minor-updates group across 1 directory with 5 updates ([#956](https://redirect.github.com/actions/dependency-review-action/issues/956))
* [`d8073c4`](actions/dependency-review-action@d8073c4) Merge pull request [#958](https://redirect.github.com/actions/dependency-review-action/issues/958) from actions/claire153/deprecate-deny-lists
* [`77184c6`](actions/dependency-review-action@77184c6) Fix tests
* [`5558c35`](actions/dependency-review-action@5558c35) Address discrepancy between docs and reality
* [`e85d57a`](actions/dependency-review-action@e85d57a) Remove test code
* [`3eb6279`](actions/dependency-review-action@3eb6279) Re-add test package. Only show warning in summary if option is used. Update c...
* [`7cf33ac`](actions/dependency-review-action@7cf33ac) Remove test deny list
* [`493bee0`](actions/dependency-review-action@493bee0) Remove test package
* Additional commits viewable in [compare view](actions/dependency-review-action@da24556...bc41886)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=actions/dependency-review-action&package-manager=github\_actions&previous-version=4.7.1&new-version=4.7.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.

3 participants