Skip to content

Fix patchwork version comparison #1122

Description

@Toastbrot236

Currently, the condition we use to determine whether patchwork's user agent is outdated or not is bugged. Setting the requirement to 1.1, for example, would make 2.0 get rejected because right now, the minor version is compared independently from the major version. The condition should probably be changed to something like this:

(version.Major < requiredMajor) || (version.Major == requiredMajor && version.Minor < requiredMinor)

where true would still mean that the user agent should be rejected. We should only compare the minor versions if the major versions are identical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions