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

Expand Centralized Ecosystem Format with Language Version Information for Bundler #10867

Merged
merged 12 commits into from
Nov 5, 2024

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Oct 30, 2024

What are you trying to accomplish?

This PR adds language version details for Bundler into the centralized ecosystem structure in Dependabot. The goal is to enhance consistency in representing package manager and language information across ecosystems.

Anything you want to highlight for special attention from reviewers?

This update follows the existing centralized format and extends it to include language versions for Bundler, laying the groundwork for other ecosystems like Composer and npm_and_yarn.

How will you know you've accomplished your goal?

  • Bundler language version information is accessible in the centralized ecosystem structure.
  • Tests verify that functionality works as expected without causing regressions.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes, including additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes.
  • I have ensured that the code is well-documented and easy to understand.

@github-actions github-actions bot added L: php:composer Issues and code for Composer L: ruby:bundler RubyGems via bundler labels Oct 30, 2024
@kbukum1 kbukum1 changed the base branch from main to kamil/update_package_manager_abstraction_for_bundler_and_composer October 30, 2024 20:57
@kbukum1 kbukum1 changed the title Add Language Version Information for Bundler into Centralized Ecosystem Expand Centralized Ecosystem Format with Language Version Information for Bundler Oct 30, 2024
Base automatically changed from kamil/update_package_manager_abstraction_for_bundler_and_composer to main October 31, 2024 21:07
@kbukum1 kbukum1 force-pushed the kamil/add_language_info_for_bundler branch from 2081402 to 98cf02d Compare October 31, 2024 21:35
@kbukum1 kbukum1 force-pushed the kamil/add_language_info_for_bundler branch from 98cf02d to 301a5af Compare October 31, 2024 21:37
@kbukum1 kbukum1 removed the L: php:composer Issues and code for Composer label Nov 4, 2024
return bundler_version if package_manager.unsupported?

# read raw version directly from the ecosystem environment
bundler_raw_version = SharedHelpers.in_a_temporary_repo_directory(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review Tip: When retrieving the full raw version of Bundler, note that if an unsupported Bundler version (e.g., "1") is specified, retrieving the raw version won’t be possible. In such cases, an "unsupported version" is getting raised error so we won't need to fetch the raw version.

def ruby_raw_version
return @ruby_raw_version if defined?(@ruby_raw_version)

ruby_raw_version = SharedHelpers.in_a_temporary_repo_directory(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review Tip: We want to find the raw version for language directly from the ecosystem environment.


return nil unless package_manager.unsupported?

Language.new(ruby_raw_version)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review Tip: If the package manager is unsupported, the language version may not be retrievable. Additionally, fetching the language version is unnecessary, as the process will raise an unsupported package manager error.

@kbukum1 kbukum1 marked this pull request as ready for review November 4, 2024 23:58
@kbukum1 kbukum1 requested a review from a team as a code owner November 4, 2024 23:58
Copy link
Contributor

@honeyankit honeyankit left a comment

Choose a reason for hiding this comment

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

LGTM

@kbukum1 kbukum1 merged commit 957342d into main Nov 5, 2024
129 checks passed
@kbukum1 kbukum1 deleted the kamil/add_language_info_for_bundler branch November 5, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: ruby:bundler RubyGems via bundler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants