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

Order cherrypicking candidates by the closed date #34739

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

ephraimbuddy
Copy link
Contributor

Currently, the candidates are ordered by the PR number but ordering by the closed date is better and will help avoid some conflicts

Currently, the candidates are ordered by the PR number but ordering by the closed date
is better and will help avoid some conflicts
@@ -266,7 +266,9 @@ def compare(target_version, github_token, previous_version=None, show_uncherrypi
url="URL",
)
)

milestone_issues = sorted(
milestone_issues, key=lambda x: x.closed_at if x.closed_at else x.created_at, reverse=True
Copy link
Member

Choose a reason for hiding this comment

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

I didn't understand the need of reverse here:

(older commits first)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just so I can cherrypick from the bottom of the list upwards. The last item would be the oldest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The sorting is to get an order based on date then reverse it so that oldest commit is listed last

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I see!

@ephraimbuddy ephraimbuddy merged commit 90628e4 into apache:main Oct 3, 2023
@ephraimbuddy ephraimbuddy deleted the improve-cherrypicking branch October 3, 2023 21:57
ephraimbuddy added a commit that referenced this pull request Oct 5, 2023
Currently, the candidates are ordered by the PR number but ordering by the closed date
is better and will help avoid some conflicts

(cherry picked from commit 90628e4)
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