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

feat: Update existing configs with missing package-ecosystems #140

Merged
merged 10 commits into from
May 26, 2024

Conversation

zkoppert
Copy link
Member

@zkoppert zkoppert commented May 25, 2024

Pull Request

fixes #108

Proposed Changes

This pull request enhances the functionality of the Dependabot configuration file builder and environment variables handler in order to allow the action to recognize and add to existing dependabot configurations instead of skipping over those repos.

The changes include

  • Addition of a new parameter to the build_dependabot_file function to handle existing configurations,
  • Creation of a new function to add existing ecosystems to the exempt list
  • Introduction of a new environment variable to decide whether to update existing configurations. Set to False by default to not disrupt current users.
  • New tests that cover 2 scenarios
    • dependabot.yml exists and has all needed package-ecosystems already in it
    • dependabot.yml exists and has 1 ecosystem in it and another ecosystem that should be added

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance or breaking

@zkoppert zkoppert marked this pull request as ready for review May 25, 2024 06:38
@zkoppert zkoppert requested a review from jmeridth as a code owner May 25, 2024 06:38
@jmeridth
Copy link
Member

@zkoppert still looking at this. Awesome addition 🎉

Could you please update the .env-example with the new environment variable?

@zkoppert
Copy link
Member Author

Great catch on the .env-example! Added that ✅

Copy link
Member

@jmeridth jmeridth left a comment

Choose a reason for hiding this comment

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

Great change. Couple suggestions but not blockers.

evergreen.py Outdated Show resolved Hide resolved
@zkoppert zkoppert merged commit 7b6c709 into main May 26, 2024
24 checks passed
@zkoppert zkoppert deleted the existing-configs branch May 26, 2024 02:44
@ghost
Copy link

ghost commented May 27, 2024

Thank you for adding this feature.
I briefly looked through the changes, and it's not apparent to me how a project can mark that a ecosystem shouldn't be added to the dependabot-file. You can exclude ecosystems globally through the exempt_repos config, but can it be done per project?

@zkoppert
Copy link
Member Author

Great point @vidwah-nte, I've opened a new issue to track that request as currently it is not supported. #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect new ecosystems
2 participants