Skip to content

Support both the internal and external representation for the update config function #12344

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

Closed
wants to merge 2 commits into from

Conversation

yeikel
Copy link
Contributor

@yeikel yeikel commented May 30, 2025

What are you trying to accomplish?

Enhances the update_config function by allowing it to support both internal and external representations of package ecosystem names.

For example, github_actions (internal) and github-actions (external) are now both recognized, improving compatibility and flexibility when parsing configuration files.

Anything you want to highlight for special attention from reviewers?

I discovered this small annoyance while trying to call the update_config from a library. I suspect that other users of this API may need to keep a similar map to use this feature

How will you know you've accomplished your goal?

Using the existing and updated tests cases

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@yeikel yeikel requested a review from a team as a code owner May 30, 2025 00:25
@yeikel yeikel force-pushed the support-two-way-config-input branch from 16b73cb to 016de36 Compare May 30, 2025 00:25
inverted = PACKAGE_MANAGER_LOOKUP.invert
package_ecosystem = inverted[package_manager] || PACKAGE_MANAGER_LOOKUP[package_manager]
if package_ecosystem.nil?
inverted.fetch(package_manager) # throws KeyError
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keep for backwards compatibility with existing usage

@yeikel yeikel force-pushed the support-two-way-config-input branch 4 times, most recently from b1a98f1 to 74ec8c2 Compare June 3, 2025 20:01
@yeikel
Copy link
Contributor Author

yeikel commented Jun 3, 2025

@sachin-sandhu Any chance you can help me find a reviewer for this change?

…config function

Enhances the `update_config` function by allowing it to support both internal and external representations of package ecosystem names.

For example, `github_actions` (internal) and `github-actions` (external) are now both recognized, improving compatibility and flexibility when parsing configuration files.
@yeikel yeikel force-pushed the support-two-way-config-input branch from 74ec8c2 to 09f7448 Compare June 4, 2025 13:42
@sachin-sandhu sachin-sandhu moved this to Scoping in Dependabot Jun 10, 2025
@sachin-sandhu
Copy link
Contributor

@yeikel , thank you for your contribution!

we will triage the PR for review, we will keep you updated on any new updates.

@sachin-sandhu sachin-sandhu moved this from Scoping to In review in Dependabot Jun 11, 2025
@sachin-sandhu
Copy link
Contributor

Hi @yeikel 👋🏻 ,

Apologies for late communication,

We discussed the proposed change with the team internally in detail. Dependabot team thanks you for your contribution and your unparalleled effort in improving dependabot. To make it work consistently across board (advisory db and api), we would also need to make additional changes which are out of scope of current work. We are not going ahead with the change.

@yeikel yeikel closed this Jul 15, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in Dependabot Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants