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

Selecting the correct requirement based on the given marker condition. #11204

Merged
merged 6 commits into from
Jan 6, 2025

Conversation

thavaahariharangit
Copy link
Contributor

@thavaahariharangit thavaahariharangit commented Jan 2, 2025

What are you trying to accomplish?

Selecting the correct requirement based on the given marker condition.

When multiple requirements are present, the correct requirement should be selected based on the given marker condition.

Anything you want to highlight for special attention from reviewers?

Problem Being Solved:
In this PR
Title says : dependency version updated from 1.19.5 to 2.2.1
But file changes says: dependency version updated from 2.2.0 to 2.2.1
So there is a mismatch in title and actual pr changes.

How I am solving it:
Currently dependabot is always picking up the first dependency declaration from the requirements file.
But it should collect it based on the marker condition. (or the python_version used to compile)

For example:

distro==1.0.4;python_version<="2.6"
distro==1.3.0;python_version>="2.7"

if the compiling python_version is less than or equal to 2.6 then dependency version should be 1.0.4
else if the compiling python_version is greater than or equal to 2.7 then dependency version should be 1.3.0

I wrote RSpec to test the above 2 scenarios.

How will you know you've accomplished your goal?

RSpec and Dependabot Cli Run

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.

@thavaahariharangit thavaahariharangit requested a review from a team as a code owner January 2, 2025 18:00
@thavaahariharangit thavaahariharangit merged commit 81a7934 into main Jan 6, 2025
60 checks passed
@thavaahariharangit thavaahariharangit deleted the harry/incorrect-python-pr-title branch January 6, 2025 12:43
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.

2 participants