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

fix: ensure existing dependabot configs without end of file newlines get processed properly #232

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

zkoppert
Copy link
Member

@zkoppert zkoppert commented Sep 26, 2024

Pull Request

fixes #231

Ensure existing dependabot configs without end of file newlines get processed properly so we can add new language configs without a formatting error. See #231 for details on formatting error.

Proposed Changes

This pull request introduces a new test case to the test_dependabot_file.py file to ensure the dependabot.yml file is built correctly with bundler and specific configurations. It also modifies the existing config builder code to detect existing newlines and handle the case where one doesn't already exist. The goal of all of this is to prevent writing new language configs starting on the same line as the previous config, breaking the yaml format.

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
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

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

…operly

Signed-off-by: Zack Koppert <zkoppert@github.com>
…bot config

Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert self-assigned this Sep 26, 2024
@zkoppert zkoppert marked this pull request as ready for review September 26, 2024 18:26
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.

@zkoppert zkoppert merged commit b50bd41 into main Sep 26, 2024
40 checks passed
@zkoppert zkoppert deleted the no-newline-in-existing-config branch September 26, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad output when existing dependabot file does not end with a newline
2 participants